/* ==========================================================================
   CSS Design System: Najm Al-Khaleej Accounts v2.1
   Author: Antigravity
   ========================================================================== */

:root {
  /* Playful Gulf Star Brand Identity Colors (Soft Sky Blue, Warm Yellow, Pure White) */
  --primary-hue: 205;
  --primary: #3a86c8; /* Friendly bright blue */
  --primary-light: #64b5f6; /* Pastel sky blue */
  --primary-dark: #1976d2; /* Vibrant dark blue for high contrast text */
  --primary-ultra-light: #f0f7fd; /* Soft cloud background */
  --primary-glow: rgba(74, 144, 226, 0.15);
  
  --secondary: #ffca28; /* Warm sun yellow */
  --secondary-glow: rgba(255, 202, 40, 0.15);
  
  --accent: #ff7043; /* Cheerful soft orange */
  --accent-glow: rgba(255, 112, 67, 0.15);
  
  --brand-navy: #0087d1; /* Bright Blue instead of dark navy */
  --brand-navy-light: #29b6f6;
  
  --success: #2e7d32;
  --success-light: #e8f5e9;
  
  --warning: #ef6c00;
  --warning-light: #fff3e0;
  
  --danger: #c62828;
  --danger-light: #ffebee;
  
  --dark-bg: #f0f7fd; /* Bright instead of dark blue background */
  --dark-card: #ffffff; /* Bright card backgrounds */
  
  --light-bg: #f4f9fd;
  --light-card: #ffffff;
  --light-border: #cbd5e1;
  
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-white: #ffffff;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Base & Core Styles
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: hsl(var(--primary-hue), 80%, 15%);
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: var(--font-family);
}

.hide {
  display: none !important;
}

/* ==========================================================================
   Login Page Styling
   ========================================================================== */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e3f2fd 0%, #fffde7 100%);
  padding: 20px;
}

.login-card {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  margin-bottom: 35px;
}

.logo-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.login-header h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 22px;
  text-align: right;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.input-field {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field i {
  position: absolute;
  right: 15px;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.input-field input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 1rem;
  transition: var(--transition);
}

.input-field input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.error-message {
  background-color: var(--danger-light);
  color: var(--danger);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border-right: 4px solid var(--danger);
  font-weight: 600;
  text-align: right;
}

.login-footer {
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   App Layout (Sidebar + Main)
   ========================================================================== */

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background-color: hsl(var(--primary-hue), 85%, 12%);
  color: var(--text-white);
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-logo {
  font-size: 2.2rem;
  color: var(--secondary);
}

.logo-text h2 {
  font-size: 1.15rem;
  color: var(--text-white);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.nav-item i {
  font-size: 1.3rem;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--primary-light) 0%, rgba(255, 255, 255, 0.15) 100%);
  border-right: 4px solid var(--secondary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.6);
}

.user-info div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-info span {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-info small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

.btn-logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-family);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 5px;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--secondary);
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 100vh;
}

/* ==========================================================================
   Header & Controls
   ========================================================================== */

.top-header {
  background-color: var(--light-card);
  border-bottom: 1px solid var(--light-border);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.selectors {
  display: flex;
  gap: 25px;
}

.selector-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selector-group label {
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.custom-select {
  padding: 8px 15px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 600;
  outline: none;
  cursor: pointer;
  background-color: var(--light-bg);
  transition: var(--transition);
}

.custom-select:focus {
  border-color: var(--primary-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.date-badge {
  background-color: var(--primary-ultra-light);
  color: var(--primary);
  padding: 8px 15px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--primary-glow);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-white);
  box-shadow: 0 4px 6px rgba(0, 128, 128, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 128, 128, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-light);
  color: var(--primary-light);
}

.btn-outline:hover {
  background-color: var(--primary-ultra-light);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-danger-outline {
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger-outline:hover {
  background-color: var(--danger-light);
}

/* ==========================================================================
   Dashboard Components
   ========================================================================== */

.tab-content {
  display: none;
  padding: 30px;
  animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dashboard-banner {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: var(--text-white);
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.dashboard-banner h1 {
  color: var(--text-white);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.dashboard-banner p {
  opacity: 0.9;
  font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-border);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.card-info {
  flex-grow: 1;
}

.card-info h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  direction: ltr;
  text-align: right;
}

.stat-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.sub-label {
  color: var(--text-muted);
}

.sub-val {
  font-weight: 700;
  direction: ltr;
}

.progress-bar {
  background-color: var(--light-border);
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.progress {
  background-color: var(--success);
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Themes */
.card-teal .card-icon {
  background-color: var(--primary-ultra-light);
  color: var(--primary);
}
.card-orange .card-icon {
  background-color: var(--secondary-glow);
  color: var(--secondary);
}
.card-green .card-icon {
  background-color: var(--success-light);
  color: var(--success);
}
.card-blue .card-icon {
  background-color: hsl(210, 100%, 96%);
  color: hsl(210, 100%, 45%);
}
.card-purple .card-icon {
  background-color: hsl(270, 100%, 96%);
  color: hsl(270, 100%, 45%);
}

/* Charts Row */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  padding: 25px;
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--light-border);
  padding-bottom: 15px;
}

.chart-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-legend {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-color.revenue { background-color: var(--primary-light); }
.legend-color.expense { background-color: var(--warning); }

.chart-wrapper {
  position: relative;
  width: 100%;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Table Components
   ========================================================================== */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-title h2 {
  font-size: 1.6rem;
  margin-bottom: 5px;
}

.section-title p {
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-row {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 15px 25px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 400px;
}

.search-input i {
  position: absolute;
  right: 15px;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.search-input input {
  width: 100%;
  padding: 8px 40px 8px 15px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-family);
  transition: var(--transition);
}

.search-input input:focus {
  border-color: var(--primary-light);
}

.filter-summary {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 600;
}

.filter-summary strong {
  color: var(--primary);
}

.table-container {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: 30px;
}

.table-container.scrollable {
  overflow-x: auto;
}

.table-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--light-border);
  background-color: var(--primary-ultra-light);
}

.table-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.data-table th, .data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--light-border);
  white-space: nowrap;
}

.data-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.85rem;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.data-table tr.sub-headers th {
  font-size: 0.75rem;
  padding: 6px 12px;
  background-color: #f8fafc;
  border-top: 1px dashed var(--light-border);
}

/* Sticky column for Student/Staff Names */
.excel-style th.sticky-col, .excel-style td.sticky-col {
  position: sticky;
  right: 0;
  background-color: #fff;
  z-index: 2;
  box-shadow: -2px 0 5px rgba(0,0,0,0.05);
  font-weight: 700;
}

.excel-style th.sticky-col {
  background-color: #f1f5f9;
  z-index: 3;
}

.excel-style tbody tr:hover td.sticky-col {
  background-color: #f8fafc;
}

/* Excel Style Inputs inside table cells */
.table-input {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: center;
  font-family: var(--font-family);
  font-weight: 600;
  transition: var(--transition);
  direction: ltr;
}

.table-input:hover {
  border-color: var(--light-border);
  background-color: #fff;
}

.table-input:focus {
  border-color: var(--primary-light);
  outline: none;
  background-color: #fff;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Cell payment options button (NEW) */
.cell-receipt-action {
  font-size: 0.75rem;
  background-color: var(--primary-ultra-light);
  color: var(--primary);
  border: 1px solid var(--primary-glow);
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 4px;
  transition: var(--transition);
}

.cell-receipt-action:hover {
  background-color: var(--primary-light);
  color: #fff;
}

/* Highlighted Columns */
.total-highlight {
  font-weight: 700;
  background-color: var(--primary-ultra-light) !important;
  color: var(--primary);
}

.remaining-alert {
  font-weight: 700;
  background-color: var(--danger-light) !important;
  color: var(--danger);
}

.remaining-ok {
  font-weight: 700;
  background-color: var(--success-light) !important;
  color: var(--success);
}

.actions-col {
  width: 80px;
  text-align: center;
}

.actions-cell {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  color: var(--text-muted);
}

.btn-icon:hover {
  background-color: var(--light-border);
}

.btn-icon.edit:hover {
  color: var(--primary);
}

.btn-icon.delete:hover {
  color: var(--danger);
}

/* Expense view filters bar */
.expense-filters {
  display: flex;
  gap: 15px;
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 15px 25px;
  margin-bottom: 10px;
}

.expense-filters .search-input {
  flex-grow: 2;
}

/* Type Pill Tags */
.pill {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

.pill-fixed {
  background-color: hsl(210, 100%, 96%);
  color: hsl(210, 100%, 45%);
}

.pill-variable {
  background-color: var(--warning-light);
  color: var(--warning);
}

/* ==========================================================================
   Owner Settings Grid Layout
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 25px;
}

.settings-panel {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light-border);
  padding-bottom: 12px;
}

.panel-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6); /* Slate 900 translucent */
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--light-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 600px;
  padding: 30px;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.receipt-modal-box {
  max-width: 720px; /* Wider to support detailed bill receipt tables */
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.95);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-border);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 1.2rem;
}

.close-modal {
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--danger);
}

.form-group {
  margin-bottom: 18px;
  text-align: right;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  border-top: 1px solid var(--light-border);
  padding-top: 18px;
}

/* ==========================================================================
   Detailed Bill Receipt Card Layout (NEW)
   ========================================================================== */

.receipt-print-area {
  background-color: #ffffff;
  color: #1e293b;
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 25px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
  position: relative;
}

.receipt-print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.receipt-logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-receipt-icon {
  font-size: 2.8rem;
  color: var(--primary);
}

.receipt-logo-block h2 {
  font-size: 1.15rem;
  margin: 0;
  color: #0f172a;
}

.receipt-logo-block p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.receipt-meta-block {
  text-align: left;
}

.receipt-meta-block h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.receipt-meta-block p {
  font-size: 0.8rem;
  font-weight: 600;
}

.receipt-divider {
  border: 0;
  border-top: 2px double #0f172a;
  margin: 15px 0;
}

.receipt-body {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.receipt-body p {
  margin-bottom: 8px;
}

.receipt-body strong {
  color: #000;
  font-size: 1rem;
}

.receipt-table-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.receipt-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  font-size: 0.82rem;
  text-align: center;
}

.receipt-mini-table th, .receipt-mini-table td {
  border: 1px solid #1e293b;
  padding: 8px 6px;
}

.receipt-mini-table th {
  background-color: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.receipt-mini-table td {
  direction: ltr;
}

.receipt-print-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 25px;
}

.sig-line-short {
  border-bottom: 1px solid #0f172a;
  width: 160px;
  height: 1px;
  margin-top: 25px;
}

.school-stamp-placeholder {
  border: 2px dashed var(--primary-light);
  color: var(--primary-light);
  border-radius: 50%;
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  transform: rotate(-15deg);
  opacity: 0.65;
  margin-top: 10px;
}

/* ==========================================================================
   Annual Report Sheet (Print layout & preview)
   ========================================================================== */

.report-sheet {
  background-color: var(--light-card);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px;
  margin-top: 20px;
  min-height: 800px;
}

.report-header-print {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.report-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.report-logo i {
  font-size: 3rem;
  color: var(--primary);
}

.report-logo div h2 {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.report-logo div p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.report-title-meta {
  text-align: left;
}

.report-title-meta h1 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.report-title-meta p {
  font-size: 0.9rem;
  color: var(--text-main);
}

.divider {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  margin: 25px 0;
}

.report-section {
  margin-bottom: 35px;
}

.report-section h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 15px;
  border-right: 4px solid var(--secondary);
  padding-right: 10px;
}

.report-summary-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.rep-box {
  background-color: var(--light-bg);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 18px 15px;
  text-align: center;
}

.rep-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}

.rep-box strong {
  font-size: 1.3rem;
  color: #0f172a;
  display: block;
  direction: ltr;
}

.rep-box.highlighting {
  background-color: var(--primary-ultra-light);
  border-color: var(--primary-light);
}

.rep-box.highlighting strong {
  color: var(--primary);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.report-table th, .report-table td {
  padding: 10px 15px;
  border: 1px solid var(--light-border);
  text-align: right;
}

.report-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.report-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.report-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px dashed var(--light-border);
}

.signature-block {
  text-align: right;
  width: 250px;
}

.signature-block span {
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 40px;
}

.sig-line {
  border-bottom: 1px solid var(--text-muted);
  width: 100%;
  height: 1px;
}

#rep-date-stamp {
  font-weight: 600;
}

/* ==========================================================================
   Print Styles Override (NEW: Receipt Printing)
   ========================================================================== */

@media print {
  body {
    background-color: #fff;
    color: #000;
    font-size: 11px;
  }

  /* Universal hides */
  .sidebar, .top-header, .section-title.no-print, .actions-col, .actions-cell, .modal-header.no-print, .receipt-form-inputs.no-print, .modal-actions.no-print {
    display: none !important;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .main-content {
    overflow: visible;
    max-height: none;
    padding: 0;
  }

  /* CASE A: If printing a receipt modal (it has class .show) */
  body:has(.modal.show) .tab-content {
    display: none !important;
  }
  
  body:has(.modal.show) .modal:not(.show) {
    display: none !important;
  }
  
  body:has(.modal.show) .modal.show {
    position: relative !important;
    background: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  body:has(.modal.show) .modal.show .modal-content {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
  }

  body:has(.modal.show) .receipt-print-area {
    border: 2px solid #000 !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    page-break-inside: avoid;
  }

  body:has(.modal.show) .receipt-mini-table th, 
  body:has(.modal.show) .receipt-mini-table td {
    border: 1px solid #000 !important;
    padding: 5px !important;
  }

  /* CASE B: Standard full report printing */
  body:not(:has(.modal.show)) .tab-content {
    display: none !important;
  }

  body:not(:has(.modal.show)) .tab-content#tab-reports {
    display: block !important;
    padding: 0;
  }

  .report-sheet {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-height: auto;
  }

  .report-summary-boxes {
    gap: 10px;
  }

  .rep-box {
    border: 1px solid #000;
    padding: 10px 5px;
  }

  .report-table th, .report-table td {
    border: 1px solid #000;
    padding: 6px 10px;
  }

  .report-section {
    page-break-inside: avoid;
  }
}

/* Owner Read-Only interface locking rules */
.role-readonly .table-input {
  pointer-events: none !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-main) !important;
  font-weight: 700 !important;
  text-align: center;
}

.role-readonly .btn-icon.delete,
.role-readonly .btn-icon.edit,
.role-readonly #btn-add-student,
.role-readonly #btn-add-staff,
.role-readonly #btn-add-transport,
.role-readonly #btn-add-expense,
.role-readonly #btn-add-special-revenue,
.role-readonly #btn-add-user,
.role-readonly #btn-add-branch,
.role-readonly #btn-save-receipt-date,
.role-readonly #btn-save-salary-receipt-date,
.role-readonly .modal-actions button[type="submit"],
.role-readonly .actions-col,
.role-readonly .actions-cell {
  display: none !important;
}

/* ==========================================================================
   Phase 3 (v2.5) Premium Landing Page & Interactive Widgets
   ========================================================================== */

/* Top bar social & contact bar */
.top-social-bar {
  background-color: var(--brand-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}
.top-social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.top-social-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.top-social-links a:hover {
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.top-contact-info {
  display: flex;
  gap: 20px;
  align-items: center;
}
.top-contact-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-contact-info i {
  color: var(--secondary);
}

/* Updated main header */
.web-header {
  background: var(--light-card) !important;
  border-bottom: 2px solid var(--light-border) !important;
  box-shadow: var(--shadow-sm);
  padding: 15px 40px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.web-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.web-brand-logo {
  height: 55px;
  object-fit: contain;
}
.web-logo-text {
  text-align: right;
  line-height: 1.3;
}
.web-logo-text h2 {
  font-size: 1.3rem;
  color: var(--brand-navy);
  margin: 0;
  font-weight: 800;
}
.web-logo-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.web-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.web-nav a {
  font-weight: 700;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.web-nav a:hover, .web-nav a.active {
  color: var(--primary);
  background: var(--primary-ultra-light);
}
.nav-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-register-pill {
  background: linear-gradient(135deg, var(--secondary) 0%, #e0a51f 100%);
  color: #000 !important;
  font-weight: 800 !important;
  border-radius: 50px !important;
  padding: 10px 22px !important;
  box-shadow: 0 4px 15px rgba(242, 184, 48, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-register-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 184, 48, 0.6);
}

/* Premium Slider Hero Section */
.hero-slider-section {
  position: relative;
  background: linear-gradient(135deg, #f7fbfc 0%, #ebf4f5 100%);
  padding: 80px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  border-bottom: 1px solid var(--light-border);
}
.hero-slider-section::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(73, 157, 169, 0.05);
  filter: blur(80px);
}
.hero-slider-content {
  flex: 1;
  max-width: 600px;
  text-align: right;
  z-index: 2;
}
.badge-slogan {
  background: var(--primary-ultra-light);
  color: var(--primary);
  border: 1px solid rgba(73, 157, 169, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.hero-slider-content h1 {
  font-size: 2.8rem;
  line-height: 1.3;
  color: var(--brand-navy);
  margin-bottom: 20px;
  font-weight: 800;
}
.hero-slider-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.8;
}
.hero-slider-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-circle-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-circle-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed var(--primary);
  animation: rotateCircle 30s linear infinite;
}
.hero-circle-glow {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 4px solid var(--secondary);
  box-shadow: 0 0 30px var(--secondary-glow);
  animation: pulseCircle 4s ease-in-out infinite;
}
.hero-circle-image {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--light-card);
  box-shadow: var(--shadow-lg);
  z-index: 5;
  background-color: var(--light-bg);
}
@keyframes rotateCircle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulseCircle {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.03); opacity: 1; }
}

/* Stats Counter Banner */
.stats-counter-section {
  background: var(--brand-navy);
  padding: 40px 20px;
  color: #fff;
  border-top: 4px solid var(--secondary);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.stat-card {
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.stat-icon {
  font-size: 2.5rem;
  color: var(--secondary);
}
.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* Landing Page Specific Override for Dark Background Banner */
.stats-counter-section .stat-card {
  padding: 10px;
}
.stats-counter-section .stat-number {
  font-size: 2.6rem;
  color: #fff;
}
.stats-counter-section .stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* About Us Section styling */
.about-section {
  padding: 80px 40px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 50px;
}
.about-content {
  flex: 1.2;
  text-align: right;
}
.about-content h2 {
  font-size: 2.2rem;
  color: var(--brand-navy);
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.about-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.about-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-main);
  text-align: justify;
}
.about-visual {
  flex: 0.8;
}
.about-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--light-border);
  transition: var(--transition);
}
.about-img-frame:hover {
  transform: scale(1.02);
}
.about-img-frame img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

/* Interactive Calculator Styles */
.calculator-section {
  padding: 80px 40px;
  background: var(--primary-ultra-light);
  border-top: 1px solid var(--light-border);
  border-bottom: 1px solid var(--light-border);
}
.calc-container {
  max-width: 1000px;
  margin: 40px auto 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  overflow: hidden;
}
.calc-inputs {
  padding: 40px;
  background: #fff;
  border-left: 1px solid var(--light-border);
  text-align: right;
}
.calc-inputs h3 {
  color: var(--brand-navy);
  font-size: 1.4rem;
  margin-bottom: 25px;
}
.calc-group {
  margin-bottom: 25px;
}
.calc-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}
.calc-select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-family);
  font-weight: 600;
  transition: var(--transition);
  font-size: 1rem;
}
.calc-select:focus {
  border-color: var(--primary);
}
.calc-results {
  padding: 40px;
  background: var(--brand-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
}
.calc-results h3 {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 25px;
}
.calc-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
}
.calc-summary-row.total-row {
  border-bottom: none;
  border-top: 2px solid var(--secondary);
  margin-top: 15px;
  padding-top: 20px;
}
.calc-summary-row.total-row .calc-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
}
.calc-val {
  font-weight: 700;
}
.calc-schedule {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
}
.calc-action {
  margin-top: 25px;
}

/* Stories / News Cards section */
.stories-section {
  padding: 80px 40px;
  background: #fff;
  text-align: center;
}
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 0 auto;
}
.story-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  text-align: right;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.story-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.story-img-container {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: var(--light-bg);
}
.story-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.story-card:hover .story-img-container img {
  transform: scale(1.05);
}
.story-date-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px var(--accent-glow);
  z-index: 10;
  line-height: 1.2;
  text-align: center;
  padding: 4px;
}
.story-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.story-body h4 {
  font-size: 1.15rem;
  color: var(--brand-navy);
  margin-bottom: 12px;
  font-weight: 800;
  line-height: 1.4;
}
.story-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Call to contact banner */
.whatsapp-banner {
  background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
  padding: 60px 40px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--secondary);
}
.whatsapp-banner-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.whatsapp-banner h2 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 15px;
}
.whatsapp-banner p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}
.btn-whatsapp-banner {
  background: #25d366;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 14px 35px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}
.btn-whatsapp-banner:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.5);
}

/* Floating WhatsApp Widget */
.wa-chat-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 1000;
  transition: var(--transition);
  animation: chatBounce 2.5s infinite;
}
.wa-chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}
@keyframes chatBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
.wa-chat-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 360px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--light-border);
  z-index: 1000;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: slideInChat 0.3s ease-out;
}
@keyframes slideInChat {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.wa-chat-header {
  background: #075e54;
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: right;
}
.wa-rep-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #128c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.wa-rep-info {
  line-height: 1.3;
}
.wa-rep-info h4 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
}
.wa-rep-info span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}
.wa-chat-body {
  padding: 20px;
  background: #efe7dd; /* Classic whatsapp chat bg */
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.wa-message-bubble {
  background: #fff;
  padding: 12px 15px;
  border-radius: var(--radius-md) 0 var(--radius-md) var(--radius-md);
  font-size: 0.9rem;
  color: #303030;
  align-self: flex-start;
  max-width: 85%;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  text-align: right;
}
.wa-options-list {
  background: #fff;
  border-top: 1px solid var(--light-border);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-option-btn {
  background: var(--light-bg);
  border: 1px solid var(--light-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.wa-option-btn:hover {
  background: var(--primary-ultra-light);
  border-color: var(--primary);
}

/* Modal Lightbox for news detail */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.lightbox-content {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  animation: slideUp 0.3s ease-out;
  text-align: right;
}
.lightbox-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  transition: var(--transition);
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.7);
}
.lightbox-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.lightbox-body {
  padding: 30px;
}
.lightbox-date {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: block;
}
.lightbox-body h3 {
  font-size: 1.4rem;
  color: var(--brand-navy);
  margin-bottom: 15px;
  font-weight: 800;
}
.lightbox-body p {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1rem;
}

/* settings updates layout */
.file-upload-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--light-bg);
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--light-border);
}
.file-upload-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--light-border);
  display: none;
  background-color: #fff;
}

/* Dual Calculators Section & Summer Program Styles */
.calculators-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1100px;
  margin: 40px auto 0 auto;
}
.calc-container-vertical {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 480px;
}
.calc-inputs-vertical {
  padding: 30px;
  background: #fff;
  text-align: right;
  flex: 1;
}
.calc-inputs-vertical h3 {
  color: var(--brand-navy);
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-inputs-vertical h3 i {
  color: var(--primary);
  font-size: 1.5rem;
}
.calc-results-vertical {
  padding: 30px;
  background: var(--brand-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  min-height: 250px;
}
.calc-results-vertical h3 {
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: 700;
}
.calc-summary-row-vertical {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--light-border);
  font-size: 0.95rem;
  text-align: right;
}
.calc-summary-row-vertical:last-of-type {
  border-bottom: none;
}
.calc-summary-row-vertical span:first-child {
  color: var(--text-muted);
}
.calc-summary-row-vertical span:last-child {
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 900px) {
  .calculators-wrapper {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }
}

/* Summer Program Styles & Badges */
.summer-badge {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8a50 100%);
  color: #fff;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.summer-header-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--brand-navy) 100%);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  border: 1px solid var(--border);
}
.summer-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}
.summer-info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: var(--radius-md);
  text-align: center;
}
.summer-info-card i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 8px;
}
.summer-info-card h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 5px;
}
.summer-info-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin: 0;
}

/* Styling fixes for text readability (dark text on light backgrounds) */
.stats-counter-section .stat-number,
#tab-summer .stat-number {
  color: var(--text-main) !important;
}

.stats-counter-section .stat-label,
#tab-summer .stat-label {
  color: var(--text-muted) !important;
}

/* Tuition Calculator results box on homepage */
.calc-results-vertical,
.calc-summary-row-vertical,
.calc-summary-row-vertical span {
  color: var(--text-main) !important;
}
.calc-summary-row-vertical span:first-child {
  color: var(--text-muted) !important;
}
.calc-summary-row-vertical.total-row-vertical,
.calc-summary-row-vertical.total-row-vertical span {
  color: var(--primary-dark) !important;
}


/* ==========================================================================
   Mobile Responsive Layouts & Drawer
   ========================================================================== */

/* Mobile Header */
.mobile-header {
  display: none;
  background-color: hsl(var(--primary-hue), 85%, 12%);
  color: #fff;
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-logo h2 {
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}

.mobile-logo i {
  font-size: 1.5rem;
  color: var(--secondary);
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 98;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
  display: block;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
  
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    right: -280px; /* Hidden offscreen on the right (RTL layout) */
    width: 260px;
    height: 100vh;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: -5px 0 15px rgba(0,0,0,0.15);
  }
  
  .sidebar.show {
    right: 0;
  }
  
  .top-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    align-items: stretch;
    text-align: center;
  }
  
  .selectors {
    flex-direction: column;
    gap: 10px;
  }
  
  .selector-group {
    justify-content: space-between;
  }
  
  .header-actions {
    justify-content: center;
    width: 100%;
  }
  
  .tab-content {
    padding: 15px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }
  
  .search-input {
    max-width: none;
  }
  
  /* Make all table containers scrollable on mobile */
  .table-container {
    overflow-x: auto !important;
  }
  
  /* Fix double scrollbar on mobile */
  .main-content {
    max-height: none;
  }
}


