/* Accessibility utility: keep supporting labels available to assistive tech
   without adding visual noise to dense operational filters. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* ============================================================
   DeptPay — Design System
   Extracted from the AVALON/DeptPay Figma screens.
   One stylesheet reused by every page (app shell + auth + public).
   ============================================================ */

:root{
  color-scheme: light;

  /* Brand & accents */
  --blue:        #2563EB;
  --blue-dark:   #1D4ED8;
  --blue-soft:   #EFF4FF;
  --navy:        #0F172A;   /* app sidebar */
  --navy-2:      #131C31;
  --hero-navy:   #1F2A5C;   /* login / landing hero panel */
  --emerald:     #10B981;   /* admin-portal accent */
  --emerald-dark:#059669;

  /* Status */
  --success:#10B981; --success-bg:#ECFDF5; --success-tx:#047857;
  --warning:#F59E0B; --warning-bg:#FFFBEB; --warning-tx:#B45309;
  --danger:#EF4444; --danger-bg:#FEF2F2; --danger-tx:#DC2626;
  --info:#2563EB;   --info-bg:#EFF4FF;   --info-tx:#1D4ED8;
  --violet:#7C3AED; --violet-bg:#F5F3FF; --violet-tx:#6D28D9;

  /* Neutrals */
  --bg:#F8FAFC;
  --surface:#FFFFFF;
  --border:#E2E8F0;
  --border-2:#EDF1F6;
  --text:#0F172A;
  --text-body:#334155;
  --muted:#64748B;
  --muted-2:#94A3B8;

  /* Shape */
  --r-card:14px;
  --r-btn:10px;
  --r-input:10px;
  --r-pill:999px;

  /* Shadow */
  --sh-sm:0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --sh-card:0 1px 2px rgba(15,23,42,.03), 0 6px 20px rgba(15,23,42,.05);
  --sh-lg:0 20px 45px rgba(15,23,42,.12);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --sidebar-w:248px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
/* Lucide replaces [data-lucide] elements with a sized <svg> at runtime, but
   until that script runs (or if its CDN is ever slow/unreachable) a bare
   inline <i> ignores width/height entirely and has no intrinsic size. An
   icon-only control (logout links, the mobile hamburger, etc.) with no other
   content then collapses to a 0x0 hit box - unclickable, not just unstyled.
   inline-block gives it real dimensions in both states. */
i[data-lucide]{display:inline-block}
.serif{font-family:var(--serif)}
.muted{color:var(--muted)}
.text-blue{color:var(--blue)}
.text-green{color:var(--emerald-dark)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--font);font-weight:600;font-size:14px;
  padding:11px 18px;border-radius:var(--r-btn);border:1px solid transparent;
  cursor:pointer;transition:.15s ease;white-space:nowrap;
}
/* Feedback on the press itself, not just the hover color swap - a button
   that only changes on hover reads as inert on touch devices, which never
   fire :hover at all. */
.btn:active{transform:scale(.97)}
@media (prefers-reduced-motion:reduce){.btn:active{transform:none}}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn:disabled:active{transform:none}
.btn i,.btn svg{width:17px;height:17px}
/* Shared loading-spinner animation - most loader-2/loader-circle icons
   across the app rendered as a static, inert-looking icon because nothing
   defined this class. One rule here instead of redefining it per page. */
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spin{animation:none}}
.btn--primary{background:var(--blue);color:#fff}
.btn--primary:hover{background:var(--blue-dark)}
.btn--dark{background:var(--navy);color:#fff}
.btn--dark:hover{background:#1e293b}
.btn--green{background:var(--emerald);color:#fff}
.btn--green:hover{background:var(--emerald-dark)}
.btn--ghost{background:#fff;color:var(--text-body);border-color:var(--border)}
.btn--ghost:hover{background:#f8fafc;border-color:#cbd5e1}
.btn--soft{background:var(--blue-soft);color:var(--blue-dark)}
.btn--danger{background:var(--danger);color:#fff}
.btn--block{width:100%}
.btn--sm{padding:8px 13px;font-size:13px}
.btn--lg{padding:13px 22px;font-size:15px}

/* ---------- Badges / pills ---------- */
.badge{
  display:inline-flex;align-items:center;gap:5px;
  font-size:11.5px;font-weight:600;line-height:1;
  padding:5px 10px;border-radius:var(--r-pill);
}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.badge--plain::before{display:none}
.badge--success{background:var(--success-bg);color:var(--success-tx)}
.badge--warning{background:var(--warning-bg);color:var(--warning-tx)}
.badge--danger{background:var(--danger-bg);color:var(--danger-tx)}
.badge--info{background:var(--info-bg);color:var(--info-tx)}
.badge--violet{background:var(--violet-bg);color:var(--violet-tx)}
.badge--neutral{background:#F1F5F9;color:#475569}

/* ---------- Cards ---------- */
.card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-card);box-shadow:var(--sh-card);
}
.card__head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:18px 20px;border-bottom:1px solid var(--border-2);
}
.card__title{font-size:15px;font-weight:700;margin:0}
.card__link{font-size:13px;font-weight:600;color:var(--blue)}
.card__body{padding:20px}

/* ---------- Grids ---------- */
.grid{display:grid;gap:16px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.col-2{display:grid;grid-template-columns:1fr 340px;gap:16px}

/* ---------- Stat cards ---------- */
.stat{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-card);padding:18px 18px 16px;box-shadow:var(--sh-card);
}
.stat__top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.stat__label{font-size:12.5px;color:var(--muted);font-weight:500}
.stat__value{font-size:26px;font-weight:800;letter-spacing:-.02em;color:var(--text)}
.stat__value--blue{color:var(--blue)}
.stat__value--green{color:var(--emerald-dark)}

/* ---------- Tables ---------- */
.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.table{width:100%;border-collapse:collapse}
.table-wrap .table{min-width:600px}
.table th{
  text-align:left;font-size:11.5px;font-weight:600;color:var(--muted-2);
  text-transform:none;padding:12px 16px;border-bottom:1px solid var(--border-2);white-space:nowrap;
}
.table td{padding:14px 16px;border-bottom:1px solid var(--border-2);font-size:13.5px;color:var(--text-body)}
.table tr:last-child td{border-bottom:none}
.table tbody tr:hover{background:#FBFCFE}
.table .amount{font-weight:700;color:var(--text)}
.cell-user{display:flex;align-items:center;gap:10px}
.cell-user img,.avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;background:#dbe3ef;flex-shrink:0}
.cell-user .name{font-weight:600;color:var(--text)}

/* ---------- App shell ---------- */
.app{display:flex;min-height:100vh}
.sidebar{
  width:var(--sidebar-w);flex-shrink:0;background:var(--navy);color:#cbd5e1;
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;
}
.sidebar__brand{display:flex;align-items:center;gap:10px;padding:20px 20px 18px}
.brand-mark{width:30px;height:30px;flex-shrink:0;display:block}
.brand-name{font-weight:800;letter-spacing:.02em;color:#fff;font-size:15px}
.brand-sub{font-size:9.5px;letter-spacing:.14em;color:#64748b;font-weight:600;margin-top:1px}
.nav{padding:6px 12px;flex:1;overflow-y:auto}
.nav__item{
  display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:9px;
  color:#94a3b8;font-weight:500;font-size:13.5px;margin-bottom:2px;cursor:pointer;
  transition:background-color .15s ease,color .15s ease;
}
.nav__item i,.nav__item svg{width:18px;height:18px}
.nav__item:hover{background:rgba(148,163,184,.10);color:#e2e8f0}
.nav__item.is-active{background:var(--blue);color:#fff}
.sidebar--green .nav__item.is-active{background:var(--emerald)}
.nav__badge{margin-left:auto;background:var(--danger);color:#fff;font-size:10.5px;
  font-weight:700;padding:1px 7px;border-radius:var(--r-pill)}
.sidebar__user{
  display:flex;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid rgba(148,163,184,.14);
}
.sidebar__user .name{color:#fff;font-weight:600;font-size:13px}
.sidebar__user .sub{color:#64748b;font-size:11px}
.sidebar__user .logout{margin-left:auto;color:#64748b;cursor:pointer}

/* Mobile sidebar backdrop */
.backdrop{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:50;opacity:0;visibility:hidden;transition:.25s}
.backdrop.show{opacity:1;visibility:visible}
@media(min-width:821px){.backdrop{display:none!important}}

/* Main column */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  display:flex;align-items:center;gap:16px;padding:16px 26px;
  background:rgba(248,250,252,.85);backdrop-filter:blur(6px);
  border-bottom:1px solid var(--border-2);position:sticky;top:0;z-index:20;
}
.topbar__title{font-size:19px;font-weight:800;letter-spacing:-.01em;margin:0}
.search{flex:1;max-width:360px;margin:0 auto;position:relative}
.search input{
  width:100%;border:1px solid var(--border);background:#fff;border-radius:var(--r-pill);
  padding:9px 14px 9px 36px;font-size:13px;font-family:var(--font);color:var(--text);
}
.search input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}
.search i,.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted-2);z-index:2;pointer-events:none;stroke:currentColor}
.topbar__actions{display:flex;align-items:center;gap:14px;margin-left:auto}
.icon-btn{position:relative;color:var(--muted);cursor:pointer;display:grid;place-items:center}
.icon-btn .dot{position:absolute;top:-2px;right:-2px;width:8px;height:8px;border-radius:50%;background:var(--danger);border:2px solid var(--bg)}
.user-chip{display:flex;align-items:center;gap:9px}
.user-chip .name{font-weight:600;font-size:13px}
.user-chip .sub{font-size:11px;color:var(--muted)}
.content{padding:24px 26px;max-width:1240px;width:100%}
.page-head{margin-bottom:18px}
.page-head h2{font-size:18px;font-weight:800;margin:0 0 4px}
.page-head p{margin:0;color:var(--muted);font-size:13px}

/* Recent activity / deadlines / quick actions */
.list-row{display:flex;align-items:center;gap:12px;padding:13px 20px;border-bottom:1px solid var(--border-2)}
.list-row:last-child{border-bottom:none}
.deadline{display:flex;align-items:flex-start;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border-2)}
.deadline:last-child{border-bottom:none}
.deadline .d-title{font-weight:600;font-size:13.5px}
.deadline .d-sub{font-size:12px;color:var(--muted)}
.deadline .d-amt{margin-left:auto;text-align:right;font-weight:700}
.qa{display:flex;flex-direction:column;gap:9px}

/* ---------- Auth (split screen) ---------- */
.auth{display:grid;grid-template-columns:1fr 1fr;min-height:100vh}
.auth__brand{
  background:var(--hero-navy);color:#fff;padding:40px 46px;
  display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;
}
/* Same ambient depth as the landing hero, so the first screen someone signs
   in through doesn't read as a flatter, unfinished cousin of the marketing
   page. Static (no loop/drift) - a glow that's always mid-pulse reads as
   distracting, not alive. */
.auth__brand::before{content:"";position:absolute;width:460px;height:460px;border-radius:50%;
  background:radial-gradient(circle,rgba(37,99,235,.28),transparent 70%);top:-140px;right:-140px;pointer-events:none}
.auth__brand::after{content:"";position:absolute;width:360px;height:360px;border-radius:50%;
  background:radial-gradient(circle,rgba(16,185,129,.14),transparent 70%);bottom:-140px;left:-100px;pointer-events:none}
.auth__brand > *{position:relative;z-index:1}
.auth__brand--slate{background:linear-gradient(160deg,#101a2e,#16233d)}
.auth__brand h1{font-family:var(--serif);font-size:40px;line-height:1.1;font-weight:700;margin:0 0 14px}
.auth__brand p{color:#b8c2da;max-width:360px;font-size:14px}
.auth__panel{display:flex;align-items:center;justify-content:center;padding:40px 24px;background:#fff}
.auth__card{width:100%;max-width:400px}
.auth__logo{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:6px}
.auth__title{text-align:center;font-size:22px;font-weight:800;margin:6px 0 20px}
.tabs{display:flex;background:#F1F5F9;border-radius:var(--r-btn);padding:4px;margin-bottom:20px}
.tabs button{
  flex:1;border:none;background:transparent;padding:9px;border-radius:8px;
  font-family:var(--font);font-weight:600;font-size:13px;color:var(--muted);cursor:pointer;
  transition:background-color .15s ease,color .15s ease,box-shadow .15s ease;
}
.tabs button.is-active{background:#fff;color:var(--blue);box-shadow:var(--sh-sm)}

.field{margin-bottom:15px}
.field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:6px;color:var(--text-body)}
.input-wrap{position:relative;display:flex;align-items:center}
.input-wrap i,.input-wrap svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted-2);z-index:2;pointer-events:none;stroke:currentColor}
.input-wrap .eye{left:auto;right:12px;cursor:pointer;pointer-events:auto;z-index:3}
.input{
  width:100%;border:1px solid var(--border);border-radius:var(--r-input);
  padding:11px 12px 11px 36px;font-size:14px;font-family:var(--font);color:var(--text);background:#fff;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}
.input--plain{padding-left:12px}
.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.check{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-body)}
.link{color:var(--blue);font-weight:600;font-size:13px}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted-2);font-size:12px;margin:18px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}

/* ---------- Utilities ---------- */
.stack{display:flex;flex-direction:column}
.mt-2{margin-top:8px}.mt-4{margin-top:16px}.mb-4{margin-bottom:16px}
.flex{display:flex}.items-center{align-items:center}.gap-2{gap:8px}.gap-3{gap:12px}
.hamburger{display:none}

/* ---------- Responsive ---------- */
@media (max-width:1024px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(3,1fr)}
  .col-2{grid-template-columns:1fr}
  /* Allow the topbar to wrap on narrower laptops/tablets to prevent overflow */
  .topbar{flex-wrap:wrap}
}
@media (max-width:820px){
  .auth{grid-template-columns:1fr}
  .auth__brand{display:none}
  /* Sidebar becomes an off-canvas drawer */
  .sidebar{position:fixed;left:0;top:0;z-index:60;width:min(264px,84vw);height:100vh;height:100dvh;
    overflow-y:auto;transform:translateX(-100%);transition:transform .25s ease}
  .sidebar.is-open{transform:translateX(0);box-shadow:var(--sh-lg)}
  .hamburger{display:grid;place-items:center;color:var(--text);cursor:pointer}
  /* Keep the search visible on tablets (more usable) but limit its width */
  .search{max-width:420px;margin:0 12px}
  .topbar{padding:14px 18px;gap:12px}
  .content{padding:20px 18px}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  /* Any flex header row (title + action buttons) should wrap instead of overflow */
  .page-head{width:100%}
}
@media (max-width:640px){
  .grid-3{grid-template-columns:1fr 1fr}
  .user-chip{display:none}
  .stat__value{font-size:23px}
}
@media (max-width:560px){
  /* Keep stat cards 2-up so dashboards stay compact, not one giant column */
  .grid-2,.grid-3,.grid-4{grid-template-columns:repeat(2,1fr)}
  .grid{gap:12px}
  .content{padding:16px 14px}
  .topbar{padding:12px 14px;gap:10px}
  .topbar__title{font-size:17px}
  .card__head{padding:14px 16px;flex-wrap:wrap}
  .card__body{padding:16px}
  .row-between{flex-wrap:wrap}
  .page-head h2{font-size:16px}
  .stat{padding:15px 15px 14px}
  .stat__value{font-size:22px}
  .auth__panel{padding:28px 18px}
  /* Button groups inside headers wrap and can go full-width */
  .page-head > div{width:100%}
}
@media (max-width:400px){
  /* Single column on very small phones */
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .stat__value{font-size:21px}
  .topbar__title{font-size:16px}
  .btn--lg{padding:12px 16px;font-size:14px}
}

/* ============================================================
   Mobile responsiveness fix
   - Prevent grid/table children from forcing the dashboard wider
     than the viewport.
   - Keep dashboard tables readable without horizontal clipping.
   ============================================================ */

/* Grid/flex children are allowed to shrink below their intrinsic width. */
.card,
.stack,
.col-2 > *,
.grid > *{
  min-width:0;
  max-width:100%;
}

/* A table inside the main dashboard column must not determine the grid width. */
.col-2{
  grid-template-columns:minmax(0,1fr) minmax(0,340px);
  width:100%;
  max-width:100%;
}

.table-wrap{
  max-width:100%;
}

@media (max-width:1024px){
  .col-2{grid-template-columns:minmax(0,1fr)}
}

@media (max-width:640px){
  /* Dashboard tables fit the phone instead of being clipped at 600px. */
  .col-2 .table-wrap{
    overflow-x:hidden;
    width:100%;
  }

  .col-2 .table-wrap .table{
    width:100%;
    min-width:0;
    table-layout:fixed;
  }

  .col-2 .table th,
  .col-2 .table td{
    padding:10px 6px;
    font-size:11px;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:normal;
    vertical-align:middle;
  }

  .col-2 .table th{
    font-size:10px;
  }

  /* Give names/payment titles more room than the compact columns. */
  .col-2 .table th:first-child,
  .col-2 .table td:first-child{
    width:34%;
  }

  .col-2 .cell-user{
    gap:6px;
    min-width:0;
  }

  .col-2 .cell-user img{
    width:26px;
    height:26px;
  }

  .col-2 .cell-user > div{
    min-width:0;
  }

  .col-2 .cell-user .name,
  .col-2 .table td > div{
    overflow-wrap:anywhere;
  }

  .col-2 .badge{
    padding:4px 6px;
    font-size:9.5px;
    gap:4px;
  }

  .col-2 .badge::before{
    width:5px;
    height:5px;
  }

  .col-2 .card__link{
    font-size:11px;
  }
}

@media (max-width:400px){
  .col-2 .table th,
  .col-2 .table td{
    padding:9px 4px;
    font-size:10px;
  }

  .col-2 .table th{
    font-size:9px;
  }

  .col-2 .table th:first-child,
  .col-2 .table td:first-child{
    width:35%;
  }
}

/* Hide the central search on small phones and tighten the topbar spacing */
@media (max-width:520px){
  .search{display:none}
  .topbar{padding:12px 14px;gap:10px}
}

/* Student dashboard activity uses the same quiet surface language as the
   rest of the product. Status color belongs to badges, not card chrome. */
.dashboard-activity .table td:first-child{font-weight:600;color:var(--text)}
.dashboard-activity .activity-title{font-weight:600;color:var(--text)}

@media (max-width:640px){
  .dashboard-activity .table-wrap{overflow:visible}
  .dashboard-activity .table,
  .dashboard-activity .table tbody{display:block}
  .dashboard-activity .table thead{display:none}
  .dashboard-activity .table tbody tr{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 14px;
    padding:15px 16px;border-bottom:1px solid var(--border-2)
  }
  .dashboard-activity .table tbody tr:last-child{border-bottom:0}
  .dashboard-activity .table tbody td{
    display:flex;flex-direction:column;align-items:flex-start;gap:3px;
    padding:0;border:0;min-width:0;white-space:normal;font-size:12px
  }
  .dashboard-activity .table tbody td::before{
    content:"";font-size:10px;letter-spacing:.02em;
    color:var(--muted-2);font-weight:600
  }
  .dashboard-activity .table tbody td:nth-child(1){grid-column:1/-1;font-size:13px}
  .dashboard-activity .table tbody td:nth-child(1)::before{content:"Dues"}
  .dashboard-activity .table tbody td:nth-child(2)::before{content:"Date"}
  .dashboard-activity .table tbody td:nth-child(3){justify-self:end;align-items:flex-end}
  .dashboard-activity .table tbody td:nth-child(3)::before{content:"Amount"}
  .dashboard-activity .table tbody td:nth-child(4)::before{content:"Payment"}
  .dashboard-activity .table tbody td:nth-child(5){justify-self:end;align-items:flex-end}
  .dashboard-activity .table tbody td:nth-child(5)::before{content:"Receipt"}
  .dashboard-activity .table tbody td .badge{font-size:10px}
}

/* Payment History uses the same readable card language on phones. Every
   field stays in the viewport; there is no hidden sixth-column scroll. */
.student-history .table-wrap{width:100%}
@media (max-width:640px){
  .student-history .table-wrap{overflow:visible}
  .student-history .table,
  .student-history .table tbody{display:block}
  .student-history .table{width:100%;min-width:0;table-layout:fixed}
  .student-history .table thead{display:none}
  .student-history .table tbody tr{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;
    padding:17px 18px;border-bottom:1px solid var(--border-2)
  }
  .student-history .table tbody tr:last-child{border-bottom:0}
  .student-history .table tbody td{
    display:flex;flex-direction:column;align-items:flex-start;gap:3px;
    min-width:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;font-size:12px
  }
  .student-history .table tbody td::before{
    font-size:10px;letter-spacing:.02em;
    color:var(--muted-2);font-weight:600
  }
  .student-history .table tbody td:nth-child(1){grid-column:1/-1;font-size:12px;font-weight:600}
  .student-history .table tbody td:nth-child(1)::before{content:"Reference"}
  .student-history .table tbody td:nth-child(2){grid-column:1/-1}
  .student-history .table tbody td:nth-child(2)::before{content:"Dues"}
  .student-history .table tbody td:nth-child(3)::before{content:"Date"}
  .student-history .table tbody td:nth-child(4){justify-self:end;align-items:flex-end}
  .student-history .table tbody td:nth-child(4)::before{content:"Amount"}
  .student-history .table tbody td:nth-child(5)::before{content:"Payment"}
  .student-history .table tbody td:nth-child(6){justify-self:end;align-items:flex-end}
  .student-history .table tbody td:nth-child(6)::before{content:"Receipt"}
  .student-history .table tbody td .badge{font-size:10px}
}

/* Refined student dashboard overview. The primary number gets one clear
   surface; the supporting figures stay quiet and easy to scan. */
.dashboard-overview{display:grid;grid-template-columns:minmax(230px,.9fr) minmax(0,1.5fr);gap:16px;margin-bottom:18px}
.dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.dashboard-overview .stat{border-radius:22px;min-height:132px}
.dashboard-overview .stat--hero{display:flex;flex-direction:column;justify-content:space-between;padding:22px 22px 20px;background:linear-gradient(145deg,#172033 0%,#263b61 100%);border:0;box-shadow:0 12px 28px rgba(31,47,78,.18)}
.dashboard-overview .stat--hero .stat__label{color:#cbd5e1;font-size:13px}
.dashboard-overview .stat--hero .stat__value{color:#fff;font-size:32px;letter-spacing:-.04em}
.dashboard-overview .stat__support{color:#aebbd0;font-size:12px;margin-top:8px}
.dashboard-overview .stat__icon{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:rgba(255,255,255,.1);color:var(--blue);flex-shrink:0}
.dashboard-overview .stat__icon svg{width:16px;height:16px}
.dashboard-overview .stat--hero .stat__icon{color:#fff;background:rgba(255,255,255,.12)}
.dashboard-overview .stat--metric{min-height:132px;padding:20px}
.dashboard-overview .stat--metric .stat__top{align-items:flex-start}
.dashboard-overview .stat--metric .stat__value{font-size:28px;margin-top:auto}
.dashboard-overview .stat--metric{background:transparent;box-shadow:none;border-color:var(--border-2)}

@media (max-width:1024px){
  .dashboard-overview{grid-template-columns:1fr}
}

@media (max-width:640px){
  .dashboard-overview{display:block;margin-bottom:14px}
  .dashboard-overview .stat--hero{min-height:158px;padding:22px;border-radius:24px}
  .dashboard-overview .stat--hero .stat__value{font-size:34px}
  .dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
  .dashboard-overview .stat--metric{min-height:92px;padding:12px 8px;border-radius:15px}
  .dashboard-overview .stat--metric .stat__top{display:block;margin-bottom:14px}
  .dashboard-overview .stat--metric .stat__icon{display:none}
  .dashboard-overview .stat--metric .stat__label{font-size:10px;line-height:1.2;white-space:nowrap}
  .dashboard-overview .stat--metric .stat__value{font-size:20px}
  .dashboard-activity{border-radius:22px}
  .dashboard-activity .card__head{padding:17px 18px}
  .dashboard-activity .table tbody tr{padding:17px 18px}
  .dashboard-activity .table tbody td:nth-child(1) > div:first-child{font-size:13px;line-height:1.35}
  .dashboard-activity .table tbody td:nth-child(1) > div:last-child{font-size:10px;color:var(--muted-2)}
}

/* Dashboard payment actions */
.dashboard-payments-due{padding:22px;background:var(--surface);border:1px solid var(--border);border-radius:22px;box-shadow:var(--sh-card);margin-bottom:18px}
.dashboard-page .content{max-width:none}
.dashboard-page .dashboard-payments-due,
.dashboard-page .dashboard-overview,
.dashboard-page .col-2{width:100%;max-width:100%;margin-left:0;margin-right:0}
.dashboard-banner{display:block;margin:0 0 16px;padding:12px 16px;background:var(--danger-bg);color:var(--danger-tx);border-radius:var(--r-card);font-size:13.5px;font-weight:600}
.dashboard-banner[hidden]{display:none}
.quick-actions{gap:16px}
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}
.section-heading h3{font-size:18px;letter-spacing:-.02em;margin:3px 0 0}
.eyebrow{display:block;color:var(--muted-2);font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.due-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:15px 0;border-top:1px solid var(--border-2)}
.due-item__info{display:flex;flex-direction:column;gap:4px;min-width:0}
.due-item__session{font-weight:700;color:var(--text)}
.due-item__level{font-size:12px;color:var(--muted)}
.due-item__amount{font-weight:800;color:var(--text);white-space:nowrap}
.dashboard-loading,.dashboard-empty{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:13px;padding:8px 0}
.dashboard-loading svg{width:16px;height:16px;color:var(--blue)}
.dashboard-empty{padding:8px 0;color:var(--success-tx)}
.dashboard-empty svg{width:20px;height:20px;color:var(--success);flex-shrink:0}
.dashboard-empty div{display:flex;flex-direction:column;gap:2px}
.dashboard-empty span{color:var(--muted);font-size:12px}
.dashboard-wallet{margin:0 0 18px}
.dashboard-wallet.is-empty .card__head{padding:14px 18px;border-bottom:0}
.dashboard-wallet.is-empty .card__body{padding:0 18px 14px}
.wallet-empty{display:flex;align-items:center;gap:12px;color:var(--muted)}
.wallet-empty svg{width:22px;height:22px;color:var(--blue);flex-shrink:0}
.wallet-empty strong{display:block;color:var(--text);font-size:13px}
.wallet-empty p{font-size:12px;margin:3px 0 0}
.wallet-address-label{margin-bottom:8px;font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.wallet-address-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.wallet-address-code{font-family:monospace;font-size:13px;font-weight:600}
.quick-actions-links{display:flex;flex-direction:column;gap:2px;padding:4px 0}
.quick-action-link{display:flex;align-items:center;gap:9px;padding:10px 2px;color:var(--text-body);font-size:13px;font-weight:600;border-bottom:1px solid var(--border-2)}
.quick-action-link:last-child{border-bottom:0}
.quick-action-link:hover,.quick-action-link:focus-visible{color:var(--blue)}
.quick-action-link svg{width:16px;height:16px;color:var(--muted-2)}

@media (max-width:640px){
  .dashboard-page .content{width:100%;max-width:100%;padding-left:14px;padding-right:14px;overflow-x:clip}
  .dashboard-payments-due{padding:18px 16px;border-radius:22px}
  .section-heading{align-items:flex-start;margin-bottom:8px}
  .section-heading h3{font-size:17px}
  .due-item{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:15px 0}
  .due-item__amount{grid-column:2;grid-row:1;align-self:start;font-size:13px}
  .due-item .due-pay-btn{grid-column:1/-1;width:100%;justify-content:center;margin-top:3px}
  .dashboard-wallet{margin-top:14px}
}

/* Admin collections command center */
.admin-overview{display:grid;grid-template-columns:minmax(230px,.9fr) minmax(0,1.7fr);gap:16px;margin-bottom:12px}
.admin-overview__metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.admin-overview .stat{border-radius:20px;min-height:132px}
.admin-overview .stat--hero{display:flex;flex-direction:column;justify-content:space-between;padding:22px;background:linear-gradient(145deg,#172033 0%,#263b61 100%);border:0;box-shadow:0 12px 28px rgba(31,47,78,.18)}
.admin-overview .stat--hero .stat__label{color:#cbd5e1;font-size:13px}
.admin-overview .stat--hero .stat__value{color:#fff;font-size:32px;letter-spacing:-.04em}
.admin-overview .stat__support{color:var(--muted);font-size:11px;margin-top:7px}
.admin-overview .stat--hero .stat__support{color:#aebbd0}
.admin-overview .stat__icon{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:var(--blue-soft);color:var(--blue);flex-shrink:0}
.admin-overview .stat__icon svg{width:16px;height:16px}
.admin-overview .stat--hero .stat__icon{color:#fff;background:rgba(255,255,255,.12)}
.admin-overview .stat--metric{padding:18px;display:flex;flex-direction:column}
.admin-overview .stat--metric .stat__value{font-size:24px;margin-top:auto}
.admin-overview .stat--metric{background:transparent;box-shadow:none;border-color:var(--border-2)}
.admin-ops-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}
.admin-ops-stats .stat{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-radius:12px;background:transparent;box-shadow:none}
.admin-ops-stats strong{font-size:15px;color:var(--text)}

@media (max-width:1100px){
  .admin-overview{grid-template-columns:1fr}
}
@media (max-width:640px){
  .admin-overview{display:block;margin-bottom:10px}
  .admin-overview .stat--hero{min-height:150px;padding:21px;border-radius:22px}
  .admin-overview .stat--hero .stat__value{font-size:32px}
  .admin-overview__metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
  .admin-overview .stat--metric{min-height:118px;padding:16px;border-radius:16px}
  .admin-overview .stat--metric .stat__icon{display:none}
  .admin-overview .stat--metric .stat__label{font-size:11px;line-height:1.25}
  .admin-overview .stat--metric .stat__value{font-size:21px}
  .admin-ops-stats{gap:6px;margin-bottom:14px}
  .admin-ops-stats{grid-template-columns:1fr;border-top:1px solid var(--border-2);border-bottom:1px solid var(--border-2);padding:2px 0}
  .admin-ops-stats .stat{display:flex;align-items:center;justify-content:space-between;padding:9px 2px;text-align:left;border-bottom:1px solid var(--border-2);border-radius:0}
  .admin-ops-stats .stat:last-child{border-bottom:0}
  .admin-ops-stats .stat__label{display:block;font-size:11px;line-height:1.2}
  .admin-ops-stats strong{display:block;margin-top:0;font-size:14px}
}

/* Admin tables become deliberate mobile records instead of forcing a wide
   desktop table into a narrow viewport. */
@media (max-width:640px){
  .admin-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .admin-filters select,.admin-filters input{width:100%;min-width:0}
  .admin-filters .admin-filter-session{grid-column:1/-1}
  .admin-filters #applyFilters{grid-column:1/-1;width:100%;justify-content:center}

  .admin-recent-transactions,
  .admin-transactions-table,
  .admin-dues-table,
  .admin-payment-links-table{display:block;width:100%;min-width:0!important;table-layout:auto}
  .admin-recent-transactions thead,
  .admin-transactions-table thead,
  .admin-dues-table thead,
  .admin-payment-links-table thead{display:none}
  .admin-recent-transactions tbody,
  .admin-transactions-table tbody,
  .admin-dues-table tbody,
  .admin-payment-links-table tbody{display:block}
  .admin-recent-transactions tbody tr,
  .admin-transactions-table tbody tr,
  .admin-dues-table tbody tr,
  .admin-payment-links-table tbody tr{
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;
    padding:16px;border-bottom:1px solid var(--border-2);background:var(--surface)
  }
  .admin-recent-transactions tbody tr:last-child,
  .admin-transactions-table tbody tr:last-child,
  .admin-dues-table tbody tr:last-child,
  .admin-payment-links-table tbody tr:last-child{border-bottom:0}
  .admin-recent-transactions tbody td,
  .admin-transactions-table tbody td,
  .admin-dues-table tbody td,
  .admin-payment-links-table tbody td{
    display:flex;flex-direction:column;align-items:flex-start;gap:3px;
    min-width:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;
    font-size:12px;line-height:1.35
  }
  .col-2 .admin-recent-transactions tbody td{padding:0;font-size:12px}
  .admin-recent-transactions tbody td::before,
  .admin-transactions-table tbody td::before,
  .admin-dues-table tbody td::before,
  .admin-payment-links-table tbody td::before{
    font-size:10px;color:var(--muted-2);font-weight:600;letter-spacing:.02em
  }
  .admin-recent-transactions tbody td:nth-child(1),
  .admin-transactions-table tbody td:nth-child(1){grid-column:1/-1;font-weight:600;font-size:13px}
  .admin-recent-transactions tbody td:nth-child(1)::before{content:"Student"}
  .admin-recent-transactions tbody td:nth-child(2)::before{content:"Level"}
  .admin-recent-transactions tbody td:nth-child(3)::before{content:"Session"}
  .admin-recent-transactions tbody td:nth-child(4){justify-self:end;align-items:flex-end}
  .admin-recent-transactions tbody td:nth-child(4)::before{content:"Amount"}
  .admin-recent-transactions tbody td:nth-child(5)::before{content:"Payment"}
  .admin-recent-transactions tbody td:nth-child(6){justify-self:end;align-items:flex-end}
  .admin-recent-transactions tbody td:nth-child(6)::before{content:"Receipt"}
  .admin-recent-transactions tbody td:nth-child(7){grid-column:1/-1}
  .admin-recent-transactions tbody td:nth-child(7)::before{content:"Paid"}

  .admin-transactions-table tbody td:nth-child(1)::before{content:"Reference"}
  .admin-transactions-table tbody td:nth-child(2)::before{content:"Student"}
  .admin-transactions-table tbody td:nth-child(3)::before{content:"Level"}
  .admin-transactions-table tbody td:nth-child(4)::before{content:"Session"}
  .admin-transactions-table tbody td:nth-child(5){justify-self:end;align-items:flex-end}
  .admin-transactions-table tbody td:nth-child(5)::before{content:"Amount"}
  .admin-transactions-table tbody td:nth-child(6)::before{content:"Payment"}
  .admin-transactions-table tbody td:nth-child(7){justify-self:end;align-items:flex-end}
  .admin-transactions-table tbody td:nth-child(7)::before{content:"Receipt"}
  .admin-transactions-table tbody td:nth-child(8){grid-column:1/-1}
  .admin-transactions-table tbody td:nth-child(8)::before{content:"Paid"}
  .admin-transactions-table tbody td .badge{font-size:10px}
  .admin-transactions-table tbody td .link{font-size:11px}

  .col-2 .admin-dues-table tbody td,
  .col-2 .admin-payment-links-table tbody td{padding:0;font-size:12px}
  .admin-dues-table tbody td:nth-child(1),
  .admin-payment-links-table tbody td:nth-child(1){grid-column:1/-1;font-weight:600;font-size:13px}
  .admin-dues-table tbody td:nth-child(1)::before{content:"Level"}
  .admin-dues-table tbody td:nth-child(2)::before{content:"Session"}
  .admin-dues-table tbody td:nth-child(3){justify-self:end;align-items:flex-end}
  .admin-dues-table tbody td:nth-child(3)::before{content:"Department net"}
  .admin-dues-table tbody td:nth-child(4)::before{content:"Currency"}
  .admin-dues-table tbody td:nth-child(5)::before{content:"Status"}
  .admin-dues-table tbody td:nth-child(6)::before{content:"Created"}
  .admin-payment-links-table tbody td:nth-child(1)::before{content:"Level"}
  .admin-payment-links-table tbody td:nth-child(2)::before{content:"Session"}
  .admin-payment-links-table tbody td:nth-child(3){grid-column:1/-1}
  .admin-payment-links-table tbody td:nth-child(3)::before{content:"Public link"}
  .admin-payment-links-table tbody td:nth-child(4)::before{content:"Status"}
  .admin-payment-links-table tbody td:nth-child(5)::before{content:"Expires"}
  .admin-payment-links-table tbody td:nth-child(6){grid-column:1/-1}
  .admin-payment-links-table tbody td:nth-child(6)::before{content:"Actions"}
  .admin-payment-links-table tbody td:nth-child(6)>div{width:100%}
  .admin-payment-links-table tbody td:nth-child(6) .btn{flex:1;justify-content:center}
  .admin-dues-table tbody tr.empty-row,
  .admin-payment-links-table tbody tr.empty-row{display:block}
  .admin-dues-table tbody tr.empty-row td,
  .admin-payment-links-table tbody tr.empty-row td{display:block;padding:0}
  .admin-dues-table tbody tr.empty-row td::before,
  .admin-payment-links-table tbody tr.empty-row td::before{display:none}
}
/* Accessible confirmation dialog shared by destructive admin actions. */
.dp-confirm-backdrop{position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.52);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);animation:dp-confirm-fade .18s ease-out}
.dp-confirm{position:relative;width:min(100%,460px);background:var(--surface);border:1px solid rgba(15,23,42,.08);border-radius:22px;box-shadow:0 28px 90px rgba(15,23,42,.26);padding:28px;animation:dp-confirm-rise .2s ease-out}
.dp-confirm h2{margin:0 34px 8px 0;font-size:20px;letter-spacing:-.02em;color:var(--text-heading)}
.dp-confirm p{margin:0;color:var(--text-body);font-size:13px;line-height:1.6}
.dp-confirm__close{position:absolute;right:15px;top:14px;border:0;background:var(--surface-2);color:var(--muted);font-size:0;line-height:1;padding:5px 9px;border-radius:999px;cursor:pointer;transition:background .15s ease,color .15s ease,transform .15s ease}
.dp-confirm__close::before{content:"×";font-size:22px}
.dp-confirm__close:hover,.dp-confirm__close:focus-visible{background:var(--surface-2);color:var(--text-heading)}
.dp-confirm__close:hover{transform:scale(1.04)}
.dp-confirm__reason{margin-top:17px}.dp-confirm__reason[hidden]{display:none}
.dp-confirm__reason label{display:block;font-size:12px;font-weight:600;color:var(--text-heading);margin-bottom:6px}
.dp-confirm__reason textarea{width:100%;min-height:78px;resize:vertical;border:1px solid var(--border);border-radius:10px;padding:10px;font:inherit;font-size:13px}
.dp-confirm__error{min-height:18px;margin-top:7px;color:var(--danger-tx);font-size:12px}
.dp-confirm__actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}
@keyframes dp-confirm-fade{from{opacity:0}to{opacity:1}}
@keyframes dp-confirm-rise{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (max-width:640px){.dp-confirm-backdrop{align-items:flex-end;padding:12px}.dp-confirm{width:100%;border-radius:22px;padding:24px 20px calc(20px + env(safe-area-inset-bottom))}.dp-confirm__actions{display:grid;grid-template-columns:1fr 1fr}.dp-confirm__actions .btn{width:100%;justify-content:center}}

/* Every admin data table keeps the same mobile reading rhythm. */
@media (max-width:640px){
  .admin-receipts-table,
  .admin-audit-table,
  .admin-students-table,
  .admin-staff-table{display:block;width:100%;min-width:0!important;table-layout:auto}
  .admin-receipts-table thead,
  .admin-audit-table thead,
  .admin-students-table thead,
  .admin-staff-table thead{display:none}
  .admin-receipts-table tbody,
  .admin-audit-table tbody,
  .admin-students-table tbody,
  .admin-staff-table tbody{display:block}
  .admin-receipts-table tbody tr,
  .admin-audit-table tbody tr,
  .admin-students-table tbody tr,
  .admin-staff-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;padding:16px;border-bottom:1px solid var(--border-2);background:var(--surface)}
  .admin-receipts-table tbody tr:last-child,
  .admin-audit-table tbody tr:last-child,
  .admin-students-table tbody tr:last-child,
  .admin-staff-table tbody tr:last-child{border-bottom:0}
  .admin-receipts-table tbody td,
  .admin-audit-table tbody td,
  .admin-students-table tbody td,
  .admin-staff-table tbody td{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.35}
  .col-2 .admin-receipts-table tbody td,
  .col-2 .admin-audit-table tbody td,
  .col-2 .admin-students-table tbody td,
  .col-2 .admin-staff-table tbody td{padding:0;font-size:12px}
  .admin-receipts-table tbody td::before,
  .admin-audit-table tbody td::before,
  .admin-students-table tbody td::before,
  .admin-staff-table tbody td::before{font-size:10px;color:var(--muted-2);font-weight:600;letter-spacing:.02em}
  .admin-receipts-table tbody td:nth-child(1),
  .admin-audit-table tbody td:nth-child(1),
  .admin-students-table tbody td:nth-child(1),
  .admin-staff-table tbody td:nth-child(1){grid-column:1/-1;font-weight:600;font-size:13px}
  .admin-receipts-table tbody td:nth-child(1)::before{content:"Payment"}
  .admin-receipts-table tbody td:nth-child(2)::before{content:"Receipt status"}
  .admin-receipts-table tbody td:nth-child(3)::before{content:"Token ID"}
  .admin-receipts-table tbody td:nth-child(4)::before{content:"Transaction"}
  .admin-receipts-table tbody td:nth-child(5)::before{content:"Attempts"}
  .admin-receipts-table tbody td:nth-child(6)::before{content:"Minted at"}
  .admin-receipts-table tbody td:nth-child(7){grid-column:1/-1}
  .admin-receipts-table tbody td:nth-child(7)::before{content:"Actions"}
  .admin-audit-table tbody td:nth-child(1)::before{content:"When"}
  .admin-audit-table tbody td:nth-child(2)::before{content:"Actor"}
  .admin-audit-table tbody td:nth-child(3)::before{content:"Actor type"}
  .admin-audit-table tbody td:nth-child(4)::before{content:"Action"}
  .admin-audit-table tbody td:nth-child(5)::before{content:"Resource type"}
  .admin-audit-table tbody td:nth-child(6)::before{content:"Resource ID"}
  .admin-students-table tbody td:nth-child(1)::before{content:"Student"}
  .admin-students-table tbody td:nth-child(2)::before{content:"Level"}
  .admin-students-table tbody td:nth-child(3)::before{content:"Dashboard access"}
  .admin-students-table tbody td:nth-child(4)::before{content:"Added"}
  .admin-students-table tbody td:nth-child(5){grid-column:1/-1}
  .admin-students-table tbody td:nth-child(5)::before{content:"Actions"}
  .admin-students-table tbody td:nth-child(5)>div{width:100%}
  .admin-students-table tbody td:nth-child(5) .btn{flex:1;justify-content:center}
  .admin-staff-table tbody td:nth-child(1)::before{content:"Email"}
  .admin-staff-table tbody td:nth-child(2)::before{content:"Role"}
  .admin-staff-table tbody td:nth-child(3)::before{content:"Created"}
  .admin-staff-table tbody td:nth-child(4){grid-column:1/-1}
  .admin-staff-table tbody td:nth-child(4)::before{content:"Actions"}
  .admin-staff-table tbody td:nth-child(4) .staff-actions{width:100%}
  .admin-receipts-table tbody tr.empty-row,
  .admin-audit-table tbody tr.empty-row,
  .admin-students-table tbody tr.empty-row,
  .admin-staff-table tbody tr.empty-row{display:block}
  .admin-receipts-table tbody tr.empty-row td,
  .admin-audit-table tbody tr.empty-row td,
  .admin-students-table tbody tr.empty-row td,
  .admin-staff-table tbody tr.empty-row td{display:block;padding:0}
.admin-receipts-table tbody tr.empty-row td::before,
  .admin-audit-table tbody tr.empty-row td::before,
  .admin-students-table tbody tr.empty-row td::before,
  .admin-staff-table tbody tr.empty-row td::before{display:none}
}

.admin-staff-table{min-width:760px}
.admin-staff-table th:last-child,.admin-staff-table td:last-child{min-width:285px}
.staff-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:260px}
.staff-status{line-height:1.5}
.staff-action-buttons{display:flex;gap:7px;width:100%}
.staff-action-buttons .btn{flex:1;justify-content:center;white-space:nowrap}
@media (max-width:640px){.staff-actions{min-width:0;width:100%;gap:8px}.staff-action-buttons{gap:8px}.staff-action-buttons .btn{min-width:0;padding-left:9px;padding-right:9px}}

.password-actions{display:flex;gap:7px;flex-wrap:wrap;margin:-6px 0 10px}.password-actions .btn{align-items:center}.password-strength{font-size:11.5px;line-height:1.4;color:var(--muted);margin:-2px 0 12px}.password-strength.is-weak{color:var(--danger-tx)}.password-strength.is-strong{color:var(--success-tx)}
@media (max-width:640px){.password-actions{display:grid;grid-template-columns:1fr auto auto}.password-actions .btn{justify-content:center}.password-actions .btn:first-child{min-width:0}}

/* Student product shell: shared navigation and app-bar treatment.  Scoped so
   staff/admin surfaces keep their existing operating-console layout. */
.student-shell{--student-bg:#f7f7f4;--student-surface:#fff;--student-ink:#12233f;--student-muted:#687486;--student-line:#e4e7eb;background:var(--student-bg);color:var(--student-ink)}
.student-shell .main{background:var(--student-bg);min-height:100vh}
.student-shell .sidebar{width:224px;background:#fff;color:var(--student-ink);border-right:1px solid var(--student-line);box-shadow:none}
.student-shell .sidebar__brand{height:74px;padding:0 24px;border-bottom:1px solid #edf0f2;color:var(--student-ink);font-size:15px;font-weight:800;letter-spacing:.08em}
.student-shell .sidebar__brand img{width:23px;height:23px}
.student-shell .sidebar__user{padding:16px 20px;border-top:1px solid #edf0f2;border-bottom:0}
.student-shell .sidebar__user .avatar{width:34px;height:34px;border:1px solid #d9dee5;box-shadow:none}
.student-shell .sidebar__user .name{color:var(--student-ink);font-size:13px;font-weight:700}
.student-shell .sidebar__user .sub{color:var(--student-muted);font-size:11px}
.student-shell .sidebar__user button.logout{margin-left:auto;color:#788496;background:transparent;border:0;padding:6px;cursor:pointer}
.student-shell .sidebar__nav{padding:18px 12px}
.student-shell .nav__item{min-height:42px;margin:3px 0;padding:0 12px;border-radius:9px;color:#657184;font-size:13px;font-weight:600}
.student-shell .nav__item i{width:17px;height:17px}
.student-shell .nav__item:hover{background:#f2f4f5;color:var(--student-ink)}
.student-shell .nav__item.is-active{background:#eef2f6;color:var(--student-ink);box-shadow:none}
.student-shell .sidebar__footer{border-top:1px solid #edf0f2;padding:14px 12px}
.student-shell .sidebar__footer .nav__item{color:#788496}
.student-shell .topbar{min-height:64px;padding:14px 40px;background:rgba(247,247,244,.92);border-bottom:1px solid rgba(228,231,235,.9);box-shadow:none;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.student-shell .topbar__title{margin:0;color:var(--student-muted);font-size:12px;font-weight:700;letter-spacing:.04em}
.student-shell .topbar .hamburger,.student-shell .topbar .search{display:none!important}
.student-shell .topbar__actions{margin-left:auto}
.student-shell .topbar .user-chip{gap:10px}
.student-shell .topbar .user-chip .avatar{width:34px;height:34px;border:1px solid #d9dee5;box-shadow:none}
.student-shell .topbar .user-chip .name{color:var(--student-ink);font-size:12px;font-weight:700}
.student-shell .topbar .user-chip .sub{color:var(--student-muted);font-size:11px}
.student-shell .student-topbar{display:flex!important;visibility:visible;opacity:1;transform:none;align-items:center;justify-content:space-between;gap:18px;min-height:64px;padding:14px 40px;background:rgba(247,247,244,.92);border-bottom:1px solid rgba(228,231,235,.9);position:sticky;top:0;z-index:20;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.student-shell .student-topbar__section{color:var(--student-muted);font-size:12px;font-weight:700;letter-spacing:.04em}
.student-shell .student-topbar__brand{display:none;align-items:center;gap:8px;color:var(--student-ink);font-size:15px;font-weight:800;letter-spacing:.08em;text-decoration:none}
.student-shell .student-topbar__brand img{width:22px;height:22px}
.student-shell .student-topbar__right{display:flex;align-items:center;gap:14px;margin-left:auto}
.student-shell .student-header-profile{display:flex;align-items:center;gap:9px;min-width:0;color:inherit;text-decoration:none}
.student-shell .student-header-profile__copy{display:flex;flex-direction:column;min-width:0}
.student-shell .student-header-profile__name{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:700}
.student-shell .student-header-profile__meta{font-size:11px;color:var(--student-muted)}
.student-shell .student-header__logout{display:grid;place-items:center;width:36px;height:36px;color:#788496;background:transparent;border:1px solid transparent;border-radius:9px;cursor:pointer}
.student-shell .student-header__logout:hover,.student-shell .student-header__logout:focus-visible{color:var(--student-ink);background:#fff;border-color:var(--student-line)}
.student-shell .student-header__logout i,.student-shell .student-header__logout svg{width:17px;height:17px}
.student-shell .student-avatar{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid #ccd6e5;border-radius:50%;background:#edf2f8;color:#243d67;font-size:11px;font-weight:800;letter-spacing:.02em;object-fit:cover}
.student-shell .content{max-width:1120px;padding:38px 40px 56px}
.student-shell .page-head{margin-bottom:28px}
.student-shell .page-head h2{margin:0 0 7px;color:var(--student-ink);font-size:26px;font-weight:650;letter-spacing:-.03em}
.student-shell .page-head p{color:var(--student-muted);font-size:14px}
.student-shell .mobile-bottom-nav{display:none}
html:not(.icons-ready) .student-shell [data-lucide]{visibility:hidden}

@media (max-width:820px){
  .student-shell .sidebar,.student-shell .backdrop{display:none!important}
  .student-shell .topbar{min-height:60px;padding:12px 20px}
  .student-shell .topbar::before{content:"DEPTPAY";display:block;color:var(--student-ink);font-size:15px;font-weight:800;letter-spacing:.08em}
  .student-shell .topbar__title{display:none}
  .student-shell .topbar__actions{display:flex;align-items:center}
  .student-shell .topbar .user-chip .name,.student-shell .topbar .user-chip .sub{display:none}
  .student-shell .topbar .user-chip .avatar{width:34px;height:34px}
  .student-shell .student-topbar{display:flex!important;min-height:60px;padding:12px 20px}
  .student-shell .student-topbar__section{display:none}
  .student-shell .student-topbar__brand{display:flex}
  .student-shell .student-topbar__right{display:flex;align-items:center;gap:0;margin-left:auto}
  .student-shell .student-header-profile{width:34px;height:34px;gap:0}
  .student-shell .student-header-profile__copy{display:none}.student-shell .student-header__logout{display:grid}
  .student-shell .content{padding:28px 20px 98px}
  .student-shell .page-head{margin-bottom:24px}
  .student-shell .page-head h2{font-size:24px}
  .student-shell .mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:9px 12px calc(9px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--student-line);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
  .student-shell .mobile-bottom-nav__item{min-height:42px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:8px;color:#7a8797;font-size:10px;font-weight:600;text-decoration:none}
.student-shell .mobile-bottom-nav__item i,.student-shell .mobile-bottom-nav__item svg{width:17px;height:17px;stroke-width:1.8}
  .student-shell .mobile-bottom-nav__item.is-active{color:var(--student-ink);background:#f0f3f5}
}

@media (max-width:370px){.student-shell .content{padding-left:16px;padding-right:16px}.student-shell .topbar{padding-left:16px;padding-right:16px}.student-shell .student-topbar{padding-left:16px;padding-right:16px}.student-shell .mobile-bottom-nav{padding-left:8px;padding-right:8px}}

/* Keep every student-facing route in the same quiet utility language as Home. */
.student-shell:not(.dashboard-page):not(.receipt-page) .content{width:100%;max-width:1120px;margin:0 auto}
.student-shell:not(.dashboard-page):not(.receipt-page) .page-head{position:relative;overflow:hidden;margin-bottom:30px;padding:26px 30px;border:1px solid #d7e1e8;border-radius:20px;background:radial-gradient(circle at 92% 8%,rgba(77,141,179,.14),transparent 30%),linear-gradient(135deg,#fffdf8 0%,#f2f7f6 100%);box-shadow:0 14px 30px rgba(35,57,78,.07)}
.student-shell:not(.dashboard-page):not(.receipt-page) .page-head::after{content:"";position:absolute;right:28px;bottom:-55px;width:150px;height:150px;border:1px solid rgba(55,112,139,.14);border-radius:50%;box-shadow:0 0 0 16px rgba(55,112,139,.03),0 0 0 34px rgba(55,112,139,.02)}
.student-shell:not(.dashboard-page):not(.receipt-page) .page-head>*{position:relative;z-index:1}.student-shell:not(.dashboard-page):not(.receipt-page) .page-head h1,.student-shell:not(.dashboard-page):not(.receipt-page) .page-head h2{max-width:620px;font-size:clamp(28px,3.5vw,38px);font-weight:650;letter-spacing:-.05em}.student-shell:not(.dashboard-page):not(.receipt-page) .page-head p{max-width:570px;color:#596d77}
.student-shell .sidebar__user .logout{display:inline-flex;align-items:center;gap:7px;padding:8px 9px;border:0;border-radius:8px;background:transparent;color:#788496;cursor:pointer}.student-shell .sidebar__user .logout:hover,.student-shell .sidebar__user .logout:focus-visible{background:#f1f4f5;color:var(--student-ink)}.student-shell .logout-label{font-size:11px;font-weight:700;white-space:nowrap}
.student-shell:not(.dashboard-page):not(.receipt-page) .card{border:1px solid var(--student-line);border-radius:14px;box-shadow:none;background:var(--student-surface)}
.student-shell:not(.dashboard-page):not(.receipt-page) .card__head{border-bottom:1px solid #edf0f2;background:transparent}
.student-shell:not(.dashboard-page):not(.receipt-page) .page-head h2{font-size:24px;font-weight:650;letter-spacing:-.03em}
.student-shell:not(.dashboard-page):not(.receipt-page) .page-head p{color:var(--student-muted)}
.student-shell .rc-tile{border:1px solid var(--student-line);border-radius:14px;background:#fff;box-shadow:none;transition:border-color .15s ease,transform .15s ease}
.student-shell .rc-tile:hover{box-shadow:none;border-color:#cbd3dd;transform:translateY(-1px)}
.student-shell .rc-tile__top,.student-shell .rc-tile__foot{border-color:#edf0f2}
.student-shell .rc-tile__body{padding:15px 18px}
.student-shell .rc-tile__t{color:var(--student-ink)}
.student-shell .rc-tile__s,.student-shell .rc-tile__no{color:var(--student-muted)}
.student-shell .pf-head{gap:16px}
.student-shell .pf-avatar{width:68px;height:68px;border:1px solid #ccd6e5;box-shadow:none}
.student-shell .student-history{overflow:hidden}
.student-shell .student-history .table-wrap{max-width:100%}
.student-loading-state{display:grid;grid-column:1/-1;gap:10px;padding:24px 18px}
.student-skeleton{display:block;position:relative;overflow:hidden;background:#e9edf1;border-radius:5px}
.student-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.62),transparent);animation:student-shell-shimmer 1.4s infinite}
.student-skeleton--line{height:12px;width:42%}
.student-skeleton--short{height:10px;width:27%}
.student-skeleton--tile{height:150px;width:100%;border-radius:10px}
@keyframes student-shell-shimmer{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.student-skeleton::after{animation:none}}
.student-history-loading td{border:0!important;padding:18px!important}
.student-history-loading__lines{display:grid;gap:10px}
.student-shell .student-content > .dashboard-section,
.student-shell .content > .card,
.student-shell .content > .receipts-list{content-visibility:auto;contain-intrinsic-size:260px}
.student-shell .dashboard-error{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 24px;padding:13px 15px;border:1px solid #efd7d4;border-radius:12px;background:#fff8f7;color:#7e3936;font-size:13px}
.student-shell .dashboard-error[hidden]{display:none}
.student-shell .dashboard-error__copy{min-width:0}
.student-shell .dashboard-error__title{display:block;color:#71322f;font-weight:700;margin-bottom:2px}
.student-shell .dashboard-error__message{display:block;color:#8d5551;font-size:12px}
@media (max-width:640px){
  .student-shell:not(.dashboard-page):not(.receipt-page) .content{padding-left:20px;padding-right:20px}
  .student-shell .rc-tile__foot{flex-wrap:wrap}
  .student-shell .rc-tile__foot .btn{flex:1 1 120px}
  .student-history-loading td{display:block!important;grid-column:1/-1!important}
}

/* Shared staff notification inbox. It is intentionally compact so the
   operational signal sits beside identity without competing with the page. */
.staff-notifications{position:relative;z-index:40;flex:0 0 auto}
.staff-notifications__trigger{position:relative;display:grid;place-items:center;width:38px;height:38px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);cursor:pointer;transition:color .15s ease,background .15s ease,border-color .15s ease}
.staff-notifications__trigger:hover,.staff-notifications__trigger:focus-visible{color:var(--text-heading);background:var(--surface-2);border-color:var(--border);outline:none}
.staff-notifications__trigger i,.staff-notifications__trigger svg{width:18px;height:18px}
.staff-notifications__badge{position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;border:2px solid var(--surface);border-radius:99px;background:var(--danger-tx);color:#fff;font-size:9px;font-weight:800;line-height:1}
.staff-notifications__badge[hidden],.staff-notifications__panel[hidden]{display:none}
.staff-notifications__panel{position:absolute;top:calc(100% + 10px);right:0;width:min(390px,calc(100vw - 28px));overflow:hidden;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:0 18px 46px rgba(15,23,42,.18)}
.staff-notifications__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:15px 16px 12px;border-bottom:1px solid var(--border-2);background:var(--surface-2)}
.staff-notifications__head strong{display:block;color:var(--text-heading);font-size:14px;letter-spacing:-.01em}.staff-notifications__head span{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.staff-notifications__close{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer}.staff-notifications__close:hover,.staff-notifications__close:focus-visible{background:var(--surface);color:var(--text-heading);outline:none}.staff-notifications__close i,.staff-notifications__close svg{width:15px;height:15px}
.staff-notifications__list{max-height:390px;overflow:auto;padding:6px}.staff-notification{display:flex;align-items:flex-start;gap:10px;padding:11px 10px;border-radius:10px;color:var(--text-body);text-decoration:none}.staff-notification:hover,.staff-notification:focus-visible{background:var(--surface-2);outline:none}.staff-notification__icon{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:var(--blue-soft);color:var(--blue)}.staff-notification__icon i,.staff-notification__icon svg{width:15px;height:15px}.staff-notification.is-warning .staff-notification__icon{background:#fff5dc;color:#9a6b00}.staff-notification.is-critical .staff-notification__icon{background:var(--danger-bg);color:var(--danger-tx)}.staff-notification__copy{min-width:0;display:grid;gap:3px;flex:1}.staff-notification__copy strong{color:var(--text-heading);font-size:12px;line-height:1.3}.staff-notification__copy span{color:var(--muted);font-size:11px;line-height:1.4}.staff-notifications__count{display:grid;place-items:center;min-width:23px;height:23px;align-self:center;padding:0 5px;border-radius:7px;background:var(--surface-2);color:var(--text-heading);font-size:10px;font-weight:800}.staff-notifications__empty,.staff-notifications__state{display:grid;place-items:center;gap:6px;padding:28px 20px;text-align:center;color:var(--muted);font-size:11px;line-height:1.45}.staff-notifications__empty i,.staff-notifications__empty svg{width:22px;height:22px;color:var(--green);margin-bottom:3px}.staff-notifications__empty strong{color:var(--text-heading);font-size:12px}.staff-notifications__empty span{max-width:260px}.staff-notifications__state--error{color:var(--danger-tx)}.staff-notifications__foot{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--border-2);background:var(--surface-2)}.staff-notifications__foot a{flex:1;padding:7px 8px;border-radius:7px;color:var(--text-heading);font-size:10.5px;font-weight:700;text-align:center;text-decoration:none}.staff-notifications__foot a:hover,.staff-notifications__foot a:focus-visible{background:var(--surface);outline:none}
.staff-notifications__push{display:flex;align-items:center;gap:8px;padding:9px 12px 11px;border-top:1px solid var(--border-2);background:var(--surface-2)}.staff-notifications__push-button{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text-heading);cursor:pointer;font-size:10.5px;font-weight:700}.staff-notifications__push-button:hover,.staff-notifications__push-button:focus-visible{border-color:var(--green);outline:none}.staff-notifications__push-button:disabled{cursor:wait;opacity:.7}.staff-notifications__push-button.is-enabled{border-color:#bfe4ca;color:var(--green)}.staff-notifications__push-button i,.staff-notifications__push-button svg{width:14px;height:14px}.staff-notifications__push-status{color:var(--muted);font-size:10px;line-height:1.3}.staff-notifications__push-status.is-error{color:var(--danger-tx)}
.staff-notification-row{display:flex;align-items:stretch;gap:3px}.staff-notification-row.is-read{opacity:.66}.staff-notification-row .staff-notification{flex:1;min-width:0}.staff-notification__read{display:grid;place-items:center;width:30px;flex:0 0 30px;margin:7px 3px 7px 0;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}.staff-notification__read:hover,.staff-notification__read:focus-visible{background:var(--surface-2);color:var(--green);outline:none}.staff-notification__read:disabled{cursor:wait;opacity:.65}.staff-notification__read i,.staff-notification__read svg{width:15px;height:15px}.staff-notification__read-label{display:grid;place-items:center;width:30px;flex:0 0 30px;margin-right:3px;color:var(--green);font-size:9px;font-weight:700}
.department-context{display:flex;align-items:center;gap:8px;min-width:0;margin-left:22px;padding:7px 11px;border:1px solid var(--border);border-radius:9px;background:var(--surface-2);color:var(--muted);font-size:10.5px;line-height:1.25}.department-context__label{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}.department-context strong{display:block;max-width:220px;overflow:hidden;color:var(--text-heading);font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}.department-context i,.department-context svg{width:15px;height:15px;flex:0 0 15px;color:var(--green)}
@media(max-width:760px){.department-context{margin-left:12px}.department-context__label{display:none}.department-context strong{max-width:150px}}
@media(max-width:600px){.staff-notifications__panel{position:fixed;top:64px;right:14px;width:min(390px,calc(100vw - 28px))}.staff-notifications__trigger{width:36px;height:36px}}
