@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=optional');

/* ── CSS Variables ─────────────────────────────────────────────────── */
:root {
  --navy:          #0f2044;
  --navy-mid:      #1a3360;
  --navy-light:    #243f7a;
  --gold:          #c9922a;
  --gold-light:    #e0aa45;
  --gold-pale:     #fdf3e0;
  --student-accent:#1d6f42;
  --surface:       #ffffff;
  --surface-2:     #f7f8fc;
  --border:        #e2e6f0;
  --text:          #111827;
  --text-2:        #4b5563;
  --text-3:        #9ca3af;
  --shadow-sm:     0 1px 3px rgba(15,32,68,.08);
  --shadow-md:     0 4px 16px rgba(15,32,68,.11);
  --shadow-lg:     0 12px 40px rgba(15,32,68,.15);
  --ease:          cubic-bezier(.4,0,.2,1);
  --ease-out:      cubic-bezier(0,0,.2,1);
  --radius:        12px;
  --sidebar-w:     222px;
  --touch:         44px;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html { overflow-x: hidden; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  color: var(--text); background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── Animations (minimal, purposeful) ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lpPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,.12); }
}

.fade-up { animation: fadeUp .5s var(--ease-out) both; }
.fade-in { animation: fadeIn .4s var(--ease-out) both; }
.d1 { animation-delay: .06s; }
.d2 { animation-delay: .12s; }
.d3 { animation-delay: .18s; }
.d4 { animation-delay: .24s; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.3rem; border-radius: 8px; font-weight: 600;
  font-size: .875rem; border: none; cursor: pointer; line-height: 1;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease);
  letter-spacing: .01em; white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Glassmorphism buttons — translucent navy fill, blurred backdrop, soft border/glow.
   Used for every primary/secondary action button so the UI reads as one system. */
.btn-navy {
  background: rgba(15,32,68,.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 4px 14px rgba(15,32,68,.25), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-navy:hover {
  background: rgba(26,51,96,.92);
  box-shadow: 0 6px 20px rgba(15,32,68,.32), inset 0 1px 0 rgba(255,255,255,.12);
}

.btn-gold {
  background: rgba(201,146,42,.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 4px 14px rgba(201,146,42,.25), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn-gold:hover {
  background: rgba(224,170,69,.92);
  box-shadow: 0 6px 20px rgba(201,146,42,.32), inset 0 1px 0 rgba(255,255,255,.14);
}

.btn-outline {
  background: rgba(15,32,68,.05);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--navy); border: 1.5px solid rgba(15,32,68,.18);
}
.btn-outline:hover { border-color: var(--navy); background: rgba(15,32,68,.09); }


.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger  { background: #dc2626; color: #fff; }
.btn-danger:hover  { background: #b91c1c; }

.btn-lg { padding: .8rem 1.9rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: .35rem .85rem; font-size: .78rem; border-radius: 6px; }

/* ── Card ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-hover { transition: box-shadow .22s var(--ease), transform .22s var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── Forms ─────────────────────────────────────────────────────────── */
.form-label {
  display: block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-2); margin-bottom: .38rem;
}
.form-input, select.form-input, textarea.form-input {
  width: 100%; padding: .65rem 1rem; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: .875rem;
  color: var(--text); outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,32,68,.1);
}
.form-input::placeholder { color: var(--text-3); }

.input-group { position: relative; }
.input-icon {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%); color: var(--text-3);
  font-size: .82rem; pointer-events: none;
}
.input-group .form-input { padding-left: 2.35rem; }

/* ── Badges ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .35rem 1rem; border-radius: 6px;
  font-size: .75rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-pending  { background: #fbbf24; color: #fff; box-shadow: 0 2px 4px rgba(251,191,36,.25); }
.badge-approved { background: #10b981; color: #fff; box-shadow: 0 2px 4px rgba(16,185,129,.25); }
.badge-rejected { background: #ef4444; color: #fff; box-shadow: 0 2px 4px rgba(239,68,68,.25); }
.badge-active   { background: #3b82f6; color: #fff; box-shadow: 0 2px 4px rgba(59,130,246,.25); }
.badge-info     { background: #06b6d4; color: #fff; box-shadow: 0 2px 4px rgba(6,182,212,.25); }

/* ── Alerts ────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .85rem 1rem; border-radius: 10px; font-size: .875rem; font-weight: 500;
}
.alert i { margin-top: .1rem; flex-shrink: 0; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Filter bar ────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.filter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .4rem; }

/* ── Small icon action buttons (table row actions) ────────────────── */
.action-btn {
  width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; background: var(--surface-2); color: var(--text-2);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.action-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.action-btn-success { background: #dcfce7; color: #15803d; }
.action-btn-success:hover { background: #bbf7d0; }
.action-btn-danger  { background: #fee2e2; color: #b91c1c; }
.action-btn-danger:hover { background: #fecaca; }
.action-btn.edit    { background: #dbeafe; color: #1d4ed8; }
.action-btn.edit:hover { background: #bfdbfe; }
.action-btn.delete  { background: #fee2e2; color: #b91c1c; }
.action-btn.delete:hover { background: #fecaca; }

.hidden { display: none !important; }

/* ── Table ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead th {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%); padding: .95rem 1.1rem;
  text-align: left; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #fff; border-bottom: 2px solid var(--navy-light);
  box-shadow: 0 2px 4px rgba(15,32,68,.08);
}
.data-table tbody td {
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
.data-table tbody tr {
  transition: background .15s var(--ease);
}
.data-table tbody tr:nth-child(odd) { background: rgba(15,32,68,.015); }
.data-table tbody tr:nth-child(even) { background: var(--surface); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { 
  background: linear-gradient(90deg, rgba(15,32,68,.06), rgba(15,32,68,.03));
}
.data-table tbody tr:hover { box-shadow: inset 0 0 0 1px rgba(15,32,68,.08); }

/* Enhanced table utilities */
.data-table .badge { 
  font-size: .76rem; 
  padding: .4rem .95rem;
}

/* App shell ─────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* Sidebar — fixed width, full viewport height, single vertical column */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); max-width: var(--sidebar-w);
  height: 100vh; height: 100dvh; flex-shrink: 0; box-sizing: border-box;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; flex-wrap: nowrap;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto; overflow-x: hidden;
  transition: transform .28s var(--ease);
}

/* Portal colour overrides */
.sidebar.portal-student { background: var(--navy); }
.sidebar.portal-teacher { background: var(--navy); }

.sidebar-logo {
  padding: 1.35rem 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: .85rem;
  flex-shrink: 0;
}
.sidebar-logo img {
  width: 60px; height: 60px; border-radius: 50%;
  object-fit: cover; background: #fff; padding: 3px;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.sidebar-logo-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.12rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-logo-sub  { font-size: .7rem; color: rgba(255,255,255,.5); margin-top: 2px; }

.sidebar-section-label {
  padding: 1.1rem .9rem .3rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.38);
  flex-shrink: 0;
}
/* All nav sections live inside one scroll wrapper so they stay grouped
   together at the top instead of each stretching to fill the sidebar. */
.sidebar-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; flex-wrap: nowrap;
}
.sidebar-nav { flex: 0 0 auto; padding: .35rem .7rem; display: flex; flex-direction: column; flex-wrap: nowrap; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem .8rem; border-radius: 8px;
  color: rgba(255,255,255,.68); font-size: .85rem; font-weight: 500;
  transition: background .18s, color .18s; margin-bottom: .1rem;
  flex-shrink: 0; white-space: nowrap;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
/* Single source of truth for the active nav state — frosted-glass highlight with a
   gold accent bar, on top of the navy sidebar, used on every registrar page. */
.sidebar-nav a.active {
  background: rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-weight: 700;
  box-shadow: inset 3px 0 0 var(--gold), inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-nav a i { width: 17px; text-align: center; font-size: .82rem; opacity: .8; }
.sidebar-nav a.active i { opacity: 1; color: var(--gold-light); }

.sidebar-footer {
  padding: .65rem .7rem; border-top: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sidebar-footer a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; border-radius: 8px;
  color: rgba(255,255,255,.55); font-size: .83rem; font-weight: 500;
  transition: background .18s, color .18s;
}
.sidebar-footer a:hover { background: rgba(220,38,38,.2); color: #fca5a5; }

.sidebar-profile {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .8rem; margin-bottom: .35rem;
  border-radius: 10px; background: rgba(255,255,255,.06);
}
.sidebar-profile-avatar {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: #1C2B3A; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-profile-info { min-width: 0; }
.sidebar-profile-name {
  color: #fff; font-size: .82rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-profile-role { color: rgba(255,255,255,.5); font-size: .72rem; }

/* Main content area — sits beside the fixed sidebar, never underneath it */
.main-area {
  flex: 1; margin-left: var(--sidebar-w); box-sizing: border-box;
  display: flex; flex-direction: column; min-height: 100vh; min-width: 0;
  width: 100%; max-width: 100%;
}

/* Topbar */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .8rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left  { display: flex; align-items: center; gap: .9rem; }
.topbar-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem; color: var(--navy); font-weight: 700; }
.topbar-sub   { font-size: .73rem; color: var(--text-3); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: .65rem; }

.topbar-user {
  display: flex; align-items: center; gap: .6rem;
  font-size: .83rem; color: var(--text-2);
}
.topbar-user strong { color: var(--text); font-weight: 600; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold-pale); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--gold); flex-shrink: 0;
}

/* Page content */
.page-content { padding: 1.6rem; flex: 1; min-width: 0; overflow-x: hidden; }

/* Gold accent bar */
.portal-accent-bar { height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); flex-shrink: 0; }

/* Enrollment status tracker ──────────────────────────────────────────── */
.enroll-tracker {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin-top: .75rem;
}
.enroll-tracker-col {
  flex: 1 1 0; min-width: 0; padding: .85rem 1rem;
  border-right: 1px solid var(--border);
}
.enroll-tracker-col:last-child { border-right: none; }
.enroll-tracker-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); margin-bottom: .3rem;
}
.enroll-tracker-value { font-size: .85rem; font-weight: 700; line-height: 1.35; white-space: normal; word-break: normal; }
.enroll-tracker-sep {
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 24px; color: var(--border-strong); font-size: .7rem;
  background: var(--surface-1);
}
@media (max-width: 576px) {
  .enroll-tracker { flex-direction: column; }
  .enroll-tracker-col { border-right: none; border-bottom: 1px solid var(--border); }
  .enroll-tracker-col:last-child { border-bottom: none; }
  .enroll-tracker-sep { display: none; }
}

.pagination-bar {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  padding: .85rem 1rem; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 .4rem;
  border: 1.5px solid var(--border); border-radius: 7px;
  background: #fff; color: var(--navy); font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: background .15s, border-color .15s;
}
.pg-btn:hover:not(.disabled) { background: var(--navy); color: #fff; border-color: var(--navy); }
.pg-btn.disabled { opacity: .4; pointer-events: none; }
.pg-status {
  min-width: 64px; text-align: center; font-size: .83rem; font-weight: 700;
  color: var(--text-2); background: #fff; border: 1.5px solid var(--border);
  border-radius: 7px; padding: .3rem .6rem;
}
.pg-jump { display: flex; align-items: center; gap: .35rem; margin-left: .5rem; }
.pg-jump-input {
  width: 70px; padding: .35rem .5rem; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: .83rem; outline: none; color: var(--text);
}
.pg-jump-input:focus { border-color: var(--navy); }
.pg-jump-btn {
  padding: .35rem .75rem; border: none; border-radius: 7px;
  background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.pg-jump-btn:hover { opacity: .88; }
.pg-total { margin-left: auto; font-size: .78rem; color: var(--text-3); }
@media (max-width: 576px) {
  .pg-total { margin-left: 0; width: 100%; order: 10; }
}

/* Dark backdrop shown behind the sidebar when it's open as a mobile drawer */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(15,32,68,.5);
  opacity: 0; transition: opacity .25s var(--ease);
}

/* Hamburger — hidden on desktop (sidebar is always visible there);
   shown at the mobile breakpoint below to open/close the drawer. */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: none; border-radius: 9px;
  background: var(--surface-2); color: var(--navy); font-size: 1.05rem;
  flex-shrink: 0; transition: background .15s;
}
.hamburger:hover { background: var(--border); }

/* ── Responsive system ─────────────────────────────────────────────────
   Breakpoints:
     ≥1200px         desktop — fixed sidebar, full multi-column layout
     992px–1199px    small desktop / large tablet
     768px–991px     tablet — sidebar collapses to off-canvas
     576px–767px     mobile
     ≤480px          small phones
   Sidebar becomes an off-canvas drawer (toggled by the hamburger button)
   at any width below 1200px, since a fixed 220px rail stops leaving
   enough room for content well before true desktop width. ──────────── */

/* Below desktop (tablet + mobile): sidebar collapses to an off-canvas drawer */
@media (max-width: 1199.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay { display: block; }
  .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
  .sidebar-overlay:not(.active) { pointer-events: none; }

  .main-area { margin-left: 0; width: 100%; }

  .hamburger { display: inline-flex; }
}

/* Small desktop / large tablet — trim outer spacing slightly */
@media (max-width: 1199.98px) and (min-width: 992px) {
  .page-content { padding: 1.35rem; }
}

/* Tablet — two-column blocks may stack, tables stay inside their scroll wrap */
@media (max-width: 991.98px) {
  .page-content { padding: 1.15rem; }
  .filter-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

/* Mobile — single-column forms, full-width controls, tighter chrome */
@media (max-width: 767.98px) {
  .page-content { padding: 1rem; }
  .topbar { padding: .7rem 1rem; }
  .topbar-title { font-size: 1.02rem; }

  /* Forms collapse to one column on phones */
  .filter-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 1.25rem; }

  /* Search inputs take the full available width */
  .input-group, .form-group { width: 100%; }

  /* Comfortable touch targets */
  .hamburger { width: var(--touch); height: var(--touch); }
  .btn { min-height: var(--touch); }
  .btn-sm { min-height: 38px; }
  .action-btn { width: var(--touch); height: var(--touch); }
  .pg-btn { min-width: var(--touch); height: var(--touch); }
  .form-input, select.form-input, textarea.form-input { min-height: var(--touch); }

  /* Long names/emails wrap instead of forcing table width */
  .data-table tbody td { overflow-wrap: anywhere; }
}

/* Small phones — tighten stat cards, topbar text, and card padding further */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
  .stat-card { padding: .9rem 1rem; }
  .topbar-sub { display: none; }
  .page-content { padding: .75rem; }
  .card { border-radius: 10px; }
  .modal-box { border-radius: 12px; margin: 0 .5rem; }
  .sidebar-logo img { width: 48px; height: 48px; }
}

/* Landscape phones — vertical space is scarce even though width isn't */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .sidebar-logo { padding: .8rem 1rem .7rem; }
  .sidebar-logo img { width: 42px; height: 42px; }
  .sidebar-nav a, .sidebar-footer a { padding: .42rem .8rem; }
  .topbar { padding: .5rem 1rem; }
  .page-content { padding: .85rem; }
}

/* ── Stat cards ─────────────────────────────────────────────────────── */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.3rem;
  display: flex; align-items: center; gap: .9rem;
  transition: box-shadow .22s var(--ease), transform .22s var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.stat-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.55rem; font-weight: 700; color: var(--text); line-height: 1.1; margin-top: 1px; }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.48);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--surface); border-radius: 16px; padding: 1.75rem;
  width: 100%; max-width: 450px; box-shadow: var(--shadow-lg);
  animation: fadeUp .28s var(--ease-out);
}

/* ── Misc utilities ─────────────────────────────────────────────────── */
.section-heading { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.45rem; font-weight: 700; color: var(--navy); }
.section-sub { font-size: .85rem; color: var(--text-2); margin-top: .2rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-3); }
.empty-state i { font-size: 2.2rem; margin-bottom: .6rem; display: block; }
.empty-state p { font-size: .88rem; }

/* Quick-link card (student dashboard) */
.quick-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  transition: box-shadow .22s var(--ease), transform .22s var(--ease), border-color .22s;
}
.quick-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--gold); }
.quick-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
/* Consistent navy-glass treatment for quick-action icons (links that act as buttons),
   replacing the mismatched per-instance pastel colors. */
.quick-icon-glass {
  background: rgba(15,32,68,.08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--navy); border: 1px solid rgba(15,32,68,.1);
}
.quick-card:hover .quick-icon-glass { background: rgba(15,32,68,.14); color: var(--navy-mid); }
.quick-title { font-weight: 700; font-size: .9rem; color: var(--text); }
.quick-sub   { font-size: .75rem; color: var(--text-3); margin-top: 1px; }

/* Two-panel dashboard row (e.g. "by type" / "by grade" breakdowns) that
   stacks to one column on its own once space runs out — no fixed
   1fr/1fr split that would squeeze on tablets and phones. */
.two-col-grid {
  display: grid; gap: 1.25rem; margin-bottom: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ── Tab system ─────────────────────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }
