/* ================================================
   CatSU Online Enrollment System
   Premium Design System
   ================================================ */

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Plus Jakarta Sans', sans-serif;

  /* Brand Palette */
  --navy: #0a1628;
  --navy-2: #111d32;
  --blue: #1a73b5;
  --blue-light: #3b9ad9;
  --blue-dark: #0d5a8a;
  --cyan: #e6f3f8;
  --gold: #e5a91a;
  --gold-dark: #c48f0e;

  /* Neutrals */
  --ink: #1a2332;
  --muted: #6b7a8d;
  --muted-light: #94a3b4;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --bg-subtle: #f8fafc;

  /* Semantic Colors */
  --success: #0f766e;
  --success-bg: #f0fdfa;
  --success-border: #99f6e4;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --ring: 0 0 0 3px rgba(26, 115, 181, 0.12);
  --shadow-xs: 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-card: 0 1px 3px rgba(10, 22, 40, 0.05), 0 10px 28px -8px rgba(10, 22, 40, 0.08);
  --shadow-card-hover: 0 4px 12px rgba(10, 22, 40, 0.06), 0 20px 44px -14px rgba(10, 22, 40, 0.12);
  --shadow-float: 0 24px 60px -16px rgba(10, 22, 40, 0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 120ms var(--ease-out);
  --transition-base: 200ms var(--ease-out);
  --transition-slow: 320ms var(--ease-out);
}

/* ================================================
   Reset & Base
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--blue-dark); }

::selection { background: rgba(26, 115, 181, 0.15); }

.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ================================================
   App Shell
   ================================================ */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ================================================
   Topbar — Neomorphism Design
   ================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  background: #e4e9f0;
  box-shadow: 0 4px 12px rgba(163, 177, 198, 0.35), 0 -2px 8px rgba(255, 255, 255, 0.8);
  border-bottom: none;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--blue) 50%, var(--gold) 100%);
  opacity: 0.85;
  border-radius: 0 0 4px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.brand:hover { color: var(--navy); opacity: 0.92; }

.brand-logo {
  width: 42px;
  height: 42px;
  padding: 3px;
  background: #e4e9f0;
  border-radius: 12px;
  box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.5), -4px -4px 10px rgba(255, 255, 255, 0.9);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--navy);
}

.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 1px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.portal-link {
  color: var(--muted);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  transition: all 0.2s ease;
  background: #e4e9f0;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.35), -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.portal-link:hover {
  color: var(--blue);
  box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

#session-label {
  padding: 7px 16px;
  background: #e4e9f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
  box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

/* ================================================
   Page Layout
   ================================================ */
.page {
  width: 100%;
  margin: 0 auto;
  padding: 40px clamp(20px, 3.5vw, 48px) 80px;
  animation: fadeIn 0.3s var(--ease-out);
}

/* ================================================
   Staff Sidebar Layout
   ================================================ */
.staff-layout {
  display: flex;
  min-height: calc(100vh - 72px);
  width: 100%;
  margin: 0;
}

.staff-sidebar {
  width: 260px;
  min-width: 260px;
  background: #e4e9f0;
  border-right: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20;
  box-shadow: 4px 0 12px rgba(163, 177, 198, 0.3);
  transition: width 0.25s ease, min-width 0.25s ease;
}

.staff-sidebar.collapsed {
  width: 68px;
  min-width: 68px;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(163, 177, 198, 0.25);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.sidebar-collapse-btn:hover {
  background: rgba(163, 177, 198, 0.45);
  color: var(--ink);
}

.staff-sidebar.collapsed .sidebar-header {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.staff-sidebar.collapsed .sidebar-header > *:not(.sidebar-role-icon):not(.sidebar-collapse-wrap) {
  display: none;
}
.staff-sidebar.collapsed .sidebar-collapse-wrap {
  display: flex;
  justify-content: center;
  padding: 0;
  margin-top: 8px;
}
.staff-sidebar.collapsed .sidebar-collapse-wrap .sidebar-collapse-btn {
  margin: 0;
}
.staff-sidebar.collapsed .sidebar-role-icon {
  margin-bottom: 0;
  width: 40px;
  height: 40px;
  font-size: 16px;
}
.staff-sidebar.collapsed .sidebar-nav {
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.staff-sidebar.collapsed .sidebar-nav-item {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 0;
  gap: 0;
  margin-bottom: 4px;
}
.staff-sidebar.collapsed .sidebar-nav-item i {
  font-size: 16px;
  width: auto;
}
.staff-sidebar.collapsed .sidebar-nav-item .nav-badge {
  display: none;
}
.staff-sidebar.collapsed .sidebar-footer {
  padding: 12px 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item {
  font-size: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
}
.staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item i {
  font-size: 16px;
  width: auto;
}
.staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item span {
  display: none;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.25);
  background: #dfe4eb;
}

.sidebar-role-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.4), -3px -3px 6px rgba(255, 255, 255, 0.85);
}

.sidebar-role-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 4px;
}

.sidebar-role-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  margin-bottom: 2px;
  user-select: none;
  text-decoration: none;
  background: transparent;
}

.sidebar-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-nav-item:hover {
  background: #dfe4eb;
  color: var(--ink);
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.sidebar-nav-item.active {
  background: var(--cyan);
  color: var(--blue);
  font-weight: 700;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.6);
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: #e4e9f0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.4), -2px -2px 5px rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.sidebar-nav-item.active .nav-badge {
  background: rgba(26, 115, 181, 0.15);
  color: var(--blue);
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.sidebar-divider {
  height: 1px;
  background: rgba(163, 177, 198, 0.25);
  margin: 8px 14px;
}

.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(163, 177, 198, 0.25);
  background: #dfe4eb;
}

.sidebar-footer .sidebar-nav-item:last-child {
  color: var(--danger);
}

.sidebar-footer .sidebar-nav-item:last-child:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.sidebar-footer .sidebar-nav-item:last-child i {
  color: var(--danger);
}

.sidebar-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
}

.sidebar-section {
  display: none;
  animation: fadeIn 0.25s var(--ease-out);
}

.sidebar-section.active {
  display: block;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(10, 22, 40, 0.3);
  font-size: 18px;
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.35);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.4);
  z-index: 150;
  backdrop-filter: blur(2px);
}

@media (max-width: 1024px) {
  .staff-sidebar {
    position: fixed;
    left: -280px;
    top: 72px;
    height: calc(100vh - 72px);
    z-index: 160;
    transition: left 0.3s var(--ease-out);
    box-shadow: none;
    width: 260px;
    min-width: 260px;
  }
  .staff-sidebar.collapsed {
    width: 260px;
    min-width: 260px;
  }
  .sidebar-collapse-btn { display: none; }
  .staff-sidebar.collapsed .sidebar-header { padding: 24px 20px 20px; flex-direction: column; }
  .staff-sidebar.collapsed .sidebar-header > * { display: unset; }
  .staff-sidebar.collapsed .sidebar-collapse-wrap { display: none; }
  .staff-sidebar.collapsed .sidebar-nav { padding: 12px 10px; align-items: unset; }
  .staff-sidebar.collapsed .sidebar-nav-item { width: unset; height: unset; padding: 11px 14px; font-size: 13.5px; justify-content: unset; gap: 10px; margin-bottom: 2px; }
  .staff-sidebar.collapsed .sidebar-nav-item i { font-size: 14px; width: 18px; }
  .staff-sidebar.collapsed .sidebar-nav-item .nav-badge { display: unset; }
  .staff-sidebar.collapsed .sidebar-footer { padding: 12px 10px 16px; align-items: unset; }
  .staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item { width: unset; height: unset; padding: 11px 14px; font-size: 13.5px; justify-content: unset; gap: 10px; }
  .staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item i { font-size: 14px; width: 18px; }
  .staff-sidebar.collapsed .sidebar-footer .sidebar-nav-item span { display: unset; }
  .staff-sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(10, 22, 40, 0.15);
  }
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar-overlay.open {
    display: block;
  }
  .staff-layout {
    min-height: calc(100vh - 72px);
  }
  .sidebar-main {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .staff-sidebar {
    width: 260px;
    left: -280px;
  }
  .sidebar-header {
    padding: 20px 16px 16px;
  }
  .sidebar-nav-item {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ================================================
   Buttons
   ================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  min-height: 42px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.button:active { transform: scale(0.975); }
.button:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.button.full { width: 100%; }

/* Primary */
.button:where(:not(.button-gold):not(.button-light):not(.button-ghost):not(.button-danger):not(.button-outline):not(.button-reject)) {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(26, 115, 181, 0.2);
}

.button:where(:not(.button-gold):not(.button-light):not(.button-ghost):not(.button-danger):not(.button-outline):not(.button-reject)):hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(26, 115, 181, 0.25);
  transform: translateY(-1px);
}

.button:where(:not(.button-gold):not(.button-light):not(.button-ghost):not(.button-danger):not(.button-outline):not(.button-reject)):active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 2px rgba(26, 115, 181, 0.2);
}

/* Gold */
.button-gold {
  background: linear-gradient(135deg, var(--gold), #d49b14);
  color: #2a1f00;
  box-shadow: 0 1px 2px rgba(229, 169, 26, 0.25);
}

.button-gold:hover {
  background: linear-gradient(135deg, var(--gold-dark), #b38510);
  box-shadow: 0 4px 12px rgba(229, 169, 26, 0.3);
  transform: translateY(-1px);
}

/* Light */
.button-light {
  background: rgba(255, 255, 255, 0.08);
  color: #c8d8e8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button-light:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Ghost */
.button-ghost {
  background: #e4e9f0;
  color: var(--muted);
  border: none;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.35), -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.button-ghost:hover {
  color: var(--blue);
  box-shadow: inset 2px 2px 5px rgba(163, 177, 198, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

/* Danger / Reject */
.button-danger,
.button-reject {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 2px rgba(185, 28, 28, 0.2);
}

.button-danger:hover,
.button-reject:hover {
  background: #991b1b;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
  transform: translateY(-1px);
}

/* Outline */
.button-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.button-outline:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ================================================
   Panels / Cards
   ================================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ================================================
   Dashboard Head
   ================================================ */
.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.dashboard-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--navy);
  margin-top: 6px;
  line-height: 1.1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-dark);
  letter-spacing: 1.5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--cyan);
  border: 1px solid rgba(26, 115, 181, 0.1);
  border-radius: var(--radius-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--navy);
}

.muted {
  font-size: 13px;
  color: var(--muted);
}

/* ================================================
   Stats
   ================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
}

.stat:nth-child(2)::before { background: var(--gold); }
.stat:nth-child(3)::before { background: var(--success); }
.stat:nth-child(4)::before { background: var(--danger); }

.stat:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.stat small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -1px;
}

/* ================================================
   Tables
   ================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 13.5px;
}

.data-table th {
  padding: 13px 18px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:nth-child(even) { background: #fafcfe; }
.data-table tbody tr:hover { background: #f0f7fc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr td:first-child {
  box-shadow: inset 3px 0 0 transparent;
  transition: box-shadow var(--transition-fast);
}

.data-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

.data-table .empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}

/* ================================================
   Tags
   ================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--cyan);
  color: var(--blue-dark);
  border: 1px solid rgba(26, 115, 181, 0.1);
  white-space: nowrap;
  letter-spacing: 0.1px;
}

.tag.irregular {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* ================================================
   Notices
   ================================================ */
.notice {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--cyan);
  color: var(--ink);
  border: 1px solid rgba(26, 115, 181, 0.1);
  border-left: 3px solid var(--blue);
  font-size: 13.5px;
  line-height: 1.6;
}

.notice.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  border-left-color: var(--success);
  color: var(--success);
}

.notice.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger);
  color: var(--danger);
}

/* ================================================
   Forms
   ================================================ */
.form-field {
  display: block;
  margin: 18px 0;
}

.form-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3c5160;
}

.input,
.form-field input,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-subtle);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus,
.form-field input:focus,
.form-field select:focus {
  border-color: var(--blue);
  box-shadow: var(--ring);
  background: #fff;
}

.input::placeholder,
.form-field input::placeholder { color: var(--muted-light); }

/* ================================================
   Staff Dashboard — Premium Design
   ================================================ */

/* Dashboard Header Enhancement */
.staff-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.staff-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: 2px;
}

.staff-info { flex: 1; }

.staff-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-dark);
  letter-spacing: 1.5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--cyan);
  border: 1px solid rgba(26, 115, 181, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.staff-header h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--navy);
  line-height: 1.15;
  margin-top: 4px;
}

.staff-header .muted {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
}

.staff-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.staff-meta-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.staff-meta-label strong {
  color: var(--ink);
}

/* Stats Grid — Enhanced */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px 18px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
}

.stat:nth-child(2)::before { background: var(--gold); }
.stat:nth-child(3)::before { background: var(--success); }
.stat:nth-child(4)::before { background: var(--danger); }
.stat:nth-child(5)::before { background: #7c3aed; }

.stat:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.stat small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -1px;
}

/* Pipeline Cards */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pipeline-card {
  background: #e4e9f0;
  border: none;
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 5px 5px 12px rgba(163, 177, 198, 0.4), -5px -5px 12px rgba(255, 255, 255, 0.85);
}
.pipeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.pipeline-card:nth-child(1)::before { background: var(--blue); }
.pipeline-card:nth-child(2)::before { background: var(--gold); }
.pipeline-card:nth-child(3)::before { background: #7c3aed; }
.pipeline-card:nth-child(4)::before { background: var(--success); }

.pipeline-card:hover {
  box-shadow: 7px 7px 16px rgba(163, 177, 198, 0.5), -7px -7px 16px rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.pipeline-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.5px;
}

.pipeline-label {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}

/* Queue Status — Enhanced */
.queue-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: #e4e9f0;
  border: none;
  border-radius: 14px;
  border-left: 4px solid var(--blue);
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.8);
}

.queue-status strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.queue-status strong::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
  animation: queuePulse 2s ease-in-out infinite;
}

@keyframes queuePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.05); }
}

/* ================================================
   Adviser Block Grid — Compact block cards
   ================================================ */
.adviser-block-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.adviser-block-card {
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  animation: fadeSlideUp 0.35s ease both;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}
.adviser-block-card:hover {
  box-shadow: 8px 8px 18px rgba(163, 177, 198, 0.5), -8px -8px 18px rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}
.adviser-block-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 10px;
}
.adviser-block-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.35), -2px -2px 5px rgba(255, 255, 255, 0.75);
}
.adviser-block-card-info {
  flex: 1;
  min-width: 0;
}
.adviser-block-card-info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adviser-block-card-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.adviser-block-card-bar {
  height: 4px;
  margin: 0 16px;
  background: rgba(163, 177, 198, 0.3);
  border-radius: 2px;
  overflow: hidden;
}
.adviser-block-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.adviser-block-card-bar-fill.sf-slots-good { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.adviser-block-card-bar-fill.sf-slots-low { background: linear-gradient(90deg, #b45309, #f59e0b); }
.adviser-block-card-bar-fill.sf-slots-critical { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.adviser-block-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 0;
}
.adviser-block-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.adviser-block-tag--pending { background: #fef3c7; color: #92400e; }
.adviser-block-tag--enrolled { background: #d1fae5; color: #065f46; }
.adviser-block-tag--empty { background: #dfe4eb; color: var(--muted); box-shadow: inset 1px 1px 2px rgba(163, 177, 198, 0.25), inset -1px -1px 2px rgba(255, 255, 255, 0.6); }
.adviser-block-card-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px 16px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  transition: color 0.2s;
}
.adviser-block-card:hover .adviser-block-action { color: #1e40af; }
.adviser-block-card-action svg { transition: transform 0.2s; }
.adviser-block-card:hover .adviser-block-card-action svg { transform: translateX(3px); }

/* ================================================
   Adviser Block Detail — Student list view
   ================================================ */
.adviser-block-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.adviser-block-detail-title {
  flex: 1;
}
.adviser-block-detail-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.adviser-block-detail-title p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.adviser-block-detail-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #e4e9f0;
  border: none;
  border-radius: 14px;
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.8);
}
.adviser-block-detail-bar-fill {
  flex: 1;
  height: 6px;
  background: rgba(163, 177, 198, 0.3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.adviser-block-detail-bar-fill::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.adviser-block-detail-bar-fill.sf-slots-good::before { background: linear-gradient(90deg, #0f766e, #14b8a6); width: inherit; }
.adviser-block-detail-bar-fill.sf-slots-low::before { background: linear-gradient(90deg, #b45309, #f59e0b); width: inherit; }
.adviser-block-detail-bar-fill.sf-slots-critical::before { background: linear-gradient(90deg, #b91c1c, #ef4444); width: inherit; }
.adviser-block-detail-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.adviser-students-table-wrap {
  background: #e4e9f0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}
.adviser-students-table {
  width: 100%;
  border-collapse: collapse;
}
.adviser-students-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  background: #dfe4eb;
  border-bottom: 1px solid rgba(163, 177, 198, 0.25);
}
.adviser-students-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.2);
  vertical-align: middle;
}
.adviser-students-table tr:last-child td { border-bottom: none; }
.adviser-student-row { transition: background 0.15s; }
.adviser-student-row:hover td { background: #dfe4eb; }
.adviser-student-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adviser-student-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.adviser-view-btn {
  background: var(--blue) !important;
  color: #fff !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  min-height: 32px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
.adviser-view-btn:hover { background: #1e40af !important; }

/* ================================================
   Adviser Honor Tags — Dean's / President's Lister
   ================================================ */
.adviser-honor-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.adviser-honor-tag i { font-size: 9px; }
.adviser-honor--deans {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.adviser-honor--presidents {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* Application Row Cards */
.app-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 20px;
  background: #e4e9f0;
  border: none;
  border-radius: 16px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  box-shadow: 5px 5px 12px rgba(163, 177, 198, 0.35), -5px -5px 12px rgba(255, 255, 255, 0.8);
}
.app-row:hover {
  box-shadow: 7px 7px 16px rgba(163, 177, 198, 0.45), -7px -7px 16px rgba(255, 255, 255, 0.9);
  border-left-color: var(--blue);
  transform: translateX(2px);
}

.app-row-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.app-row-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.app-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.app-row-meta .tag {
  font-size: 10.5px;
  padding: 2px 8px;
}

.app-row-grades {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.app-row-grade-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: #dfe4eb;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: inset 1px 1px 2px rgba(163, 177, 198, 0.25), inset -1px -1px 2px rgba(255, 255, 255, 0.6);
}

.app-row-grade-chip strong {
  font-size: 11px;
  color: var(--blue);
}

.app-row-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-shrink: 0;
}

/* Enhanced Buttons */
.btn-sm {
  font-size: 12px !important;
  padding: 7px 14px !important;
  min-height: 34px !important;
}

.button-sm {
  font-size: 12px !important;
  padding: 7px 14px !important;
  min-height: 34px !important;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* Detail Panel Chips */
.admin-detail-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #e4e9f0;
  border: none;
  border-radius: 14px;
  transition: all 0.2s ease;
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.35), inset -3px -3px 6px rgba(255, 255, 255, 0.75);
}
.admin-detail-chip:hover {
  box-shadow: 5px 5px 10px rgba(163, 177, 198, 0.4), -5px -5px 10px rgba(255, 255, 255, 0.85);
}
.admin-detail-chip i {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.admin-detail-chip small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.admin-detail-chip strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* Empty States — Enhanced */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.35), inset -4px -4px 8px rgba(255, 255, 255, 0.75);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Table Enhancement */
.data-table tbody tr {
  transition: all var(--transition-fast);
}
.data-table tbody tr:hover {
  background: #f0f7fc;
}
.data-table tbody tr td:first-child {
  box-shadow: inset 3px 0 0 transparent;
  transition: box-shadow var(--transition-fast);
}
.data-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

/* Staff Responsive */
@media (max-width: 768px) {
  .staff-header { flex-direction: column; gap: 16px; }
  .staff-meta { align-items: flex-start; flex-direction: row; gap: 12px; }
  .app-row { grid-template-columns: 1fr; }
  .app-row-actions { justify-content: flex-start; margin-top: 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
}

/* ================================================
   Empty States
   ================================================ */
.empty-state {
  text-align: center;
  padding: 56px 28px;
  background: var(--bg-subtle);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ================================================
   Search Bar
   ================================================ */
.search-bar {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.search-bar .input { flex: 1; }

/* ================================================
   Role Switch
   ================================================ */
.role-switch {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.role-switch select {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* ================================================
   Modal
   ================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn 0.15s var(--ease-out);
}

.modal-overlay.hidden { display: none; }

.modal-content {
  background: #e4e9f0;
  border-radius: 24px;
  padding: 32px;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 10px 10px 24px rgba(163, 177, 198, 0.5), -10px -10px 24px rgba(255, 255, 255, 0.95);
  border: none;
  animation: modalIn 0.25s var(--ease-out);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================================
   Footer
   ================================================ */
.site-footer {
  padding: 20px 32px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid rgba(163, 177, 198, 0.25);
  background: #dfe4eb;
  margin-top: auto;
}

/* ================================================
   Loading
   ================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--muted);
  gap: 14px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(163, 177, 198, 0.3);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================
   Toast Notifications
   ================================================ */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ================================================
   Skeleton Loading
   ================================================ */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-subtle) 25%, #e8ecf0 50%, var(--bg-subtle) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}

.skeleton-title { width: 60%; height: 20px; }
.skeleton-text { width: 100%; }
.skeleton-text.short { width: 40%; }

.skeleton-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skeleton-table { display: flex; flex-direction: column; gap: 12px; }
.skeleton-row { display: flex; gap: 16px; }
.skeleton-row .skeleton-line { flex: 1; }

.skeleton-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.skeleton-stat-box {
  height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-subtle) 25%, #e8ecf0 50%, var(--bg-subtle) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
}

/* ================================================
   Animations
   ================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 4px rgba(26, 115, 181, 0.12); }
  50% { box-shadow: 0 0 0 7px rgba(26, 115, 181, 0.04); }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 900px) {
  .dashboard-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 768px) {
  .topbar { height: 60px; padding: 0 16px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .topbar-meta { gap: 8px; }
  .portal-link { display: none; }
  .page { padding: 28px 16px 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 16px 18px; }
  .stat strong { font-size: 26px; }
  .panel { padding: 20px; border-radius: var(--radius-lg); }
  .search-bar { flex-direction: column; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .dashboard-head h1 { font-size: 22px; }
}

/* ================================================
   Admin Dashboard — Premium Design
   ================================================ */

/* Hero Banner */
.admin-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 28px;
  padding: 0;
}

.admin-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy) 0%, #0d2847 40%, var(--blue-dark) 100%);
  z-index: 0;
}
.admin-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(26, 115, 181, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(229, 169, 26, 0.15) 0%, transparent 40%);
}

.admin-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
}

.admin-hero-left { flex: 1; }

.admin-hero .staff-eyebrow {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #93c5fd;
  margin-bottom: 12px;
  animation: adminFadeSlide 0.5s var(--ease-out) backwards;
}

.admin-hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  line-height: 1.1;
  margin-top: 4px;
  animation: adminFadeSlide 0.5s 0.1s var(--ease-out) backwards;
}

.admin-hero-desc {
  color: #94a3b8;
  font-size: 14.5px;
  margin-top: 8px;
  line-height: 1.6;
  max-width: 480px;
  animation: adminFadeSlide 0.5s 0.2s var(--ease-out) backwards;
}

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

.admin-hero-right {
  flex-shrink: 0;
  animation: adminFadeSlide 0.5s 0.3s var(--ease-out) backwards;
}

.admin-hero-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}
.admin-hero-badge i {
  font-size: 20px;
  color: #60a5fa;
}
.admin-hero-badge strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.admin-hero-badge span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

/* Stat Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: adminCardIn 0.4s var(--ease-out) backwards;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}
.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.8;
}
.admin-stat-card:hover {
  box-shadow: 8px 8px 18px rgba(163, 177, 198, 0.5), -8px -8px 18px rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.admin-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
  box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.35), -2px -2px 5px rgba(255, 255, 255, 0.75);
}
.admin-stat-card:hover .admin-stat-icon {
  transform: scale(1.08);
}

.admin-stat-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.admin-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.admin-stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.5px;
}

@keyframes adminCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Section */
.admin-section {
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.3);
}

.admin-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-section-title i {
  color: var(--blue);
  font-size: 16px;
}

/* Pipeline Grid */
.admin-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.admin-pipeline-card {
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: adminCardIn 0.4s var(--ease-out) backwards;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}
.admin-pipeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.7;
}
.admin-pipeline-card:hover {
  box-shadow: 8px 8px 18px rgba(163, 177, 198, 0.5), -8px -8px 18px rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.admin-pipeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 18px;
  transition: transform 0.3s var(--ease-out);
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.35), -3px -3px 6px rgba(255, 255, 255, 0.75);
}
.admin-pipeline-card:hover .admin-pipeline-icon {
  transform: scale(1.08);
}

.admin-pipeline-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -1px;
}

.admin-pipeline-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 600;
}

/* College Grid */
.admin-college-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.admin-college-card {
  border: none;
  border-radius: 18px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: #e4e9f0;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}
.admin-college-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 4px 0 0 4px;
}
.admin-college-card:hover {
  box-shadow: 8px 8px 18px rgba(163, 177, 198, 0.5), -8px -8px 18px rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.admin-college-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-college-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

.admin-college-info {
  flex: 1;
  min-width: 0;
}
.admin-college-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-college-code {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.admin-college-stats {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.admin-college-stat {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  background: #dfe4eb;
  border-radius: 12px;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}
.admin-college-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;
}
.admin-college-stat-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.admin-college-bar-wrap {
  height: 6px;
  background: rgba(163, 177, 198, 0.3);
  border-radius: 999px;
  overflow: hidden;
}

.admin-college-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s var(--ease-out);
  background: var(--accent);
}

/* Program Grid */
.admin-program-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.admin-program-card {
  border: none;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.25s ease;
  background: #e4e9f0;
  box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.35), -4px -4px 10px rgba(255, 255, 255, 0.75);
}
.admin-program-card:hover {
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.45), -6px -6px 14px rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
.admin-program-card.active {
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.8), 0 0 0 2px rgba(26, 115, 181, 0.2);
}

.admin-program-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-program-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.2px;
}

.admin-program-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
  animation: adminPulse 2s ease-in-out infinite;
}

@keyframes adminPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.05); }
}

.admin-program-name {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-program-stats-row {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.admin-program-stats-row strong {
  font-weight: 700;
  color: var(--ink);
}

/* Recent Applications */
.admin-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #dfe4eb;
  border: none;
  border-radius: 14px;
  transition: all 0.25s ease;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.6);
}
.admin-recent-row:hover {
  background: #e4e9f0;
  box-shadow: 5px 5px 12px rgba(163, 177, 198, 0.4), -5px -5px 12px rgba(255, 255, 255, 0.85);
  transform: translateX(2px);
}

.admin-recent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-recent-info {
  flex: 1;
  min-width: 0;
}

.admin-recent-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}

.admin-recent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.admin-recent-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.admin-recent-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.admin-recent-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.admin-recent-date {
  font-size: 11.5px;
  color: var(--muted);
}

.admin-empty {
  text-align: center;
  padding: 56px 28px;
  color: var(--muted);
}
.admin-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e4e9f0;
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.35), inset -3px -3px 6px rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}
.admin-empty-icon i {
  font-size: 24px;
  opacity: 0.35;
}
.admin-empty strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.admin-empty p {
  font-size: 13.5px;
  line-height: 1.6;
}

/* Bottom Grid (Gatekeeper + Staff) */
.admin-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Gatekeeper */
.admin-gatekeeper-section { margin-bottom: 0; }

.admin-gatekeeper-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #e4e9f0;
  border-radius: 14px;
  border: none;
  box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.35), inset -4px -4px 8px rgba(255, 255, 255, 0.75);
}

.admin-gatekeeper-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-gatekeeper-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.admin-gatekeeper-dot.open {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
  animation: adminPulse 2s ease-in-out infinite;
}
.admin-gatekeeper-dot.closed {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

.admin-gatekeeper-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

/* Toggle Button */
.admin-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  background: #e4e9f0;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.4), -4px -4px 10px rgba(255, 255, 255, 0.85);
}
.admin-toggle-btn:hover {
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.5), -6px -6px 14px rgba(255, 255, 255, 0.95);
}

.admin-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #bfc5ce;
  position: relative;
  transition: background 0.3s ease;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.5), inset -2px -2px 4px rgba(255, 255, 255, 0.6);
}
.admin-toggle-btn.on .admin-toggle-track {
  background: var(--success);
}
.admin-toggle-btn.off .admin-toggle-track {
  background: var(--line-strong);
}

.admin-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.35), -1px -1px 3px rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease;
}
.admin-toggle-btn.on .admin-toggle-thumb {
  transform: translateX(20px);
}

.admin-toggle-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
}

/* Staff Roster */
.admin-staff-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-staff-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}
.admin-staff-row:hover {
  background: #dfe4eb;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.25), inset -2px -2px 4px rgba(255, 255, 255, 0.6);
}

.admin-staff-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 2px 2px 5px rgba(163, 177, 198, 0.35), -2px -2px 5px rgba(255, 255, 255, 0.75);
}

.admin-staff-info {
  flex: 1;
  min-width: 0;
}
.admin-staff-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.admin-staff-info span {
  font-size: 12px;
  color: var(--muted);
}

.admin-staff-id {
  font-size: 11px;
  padding: 3px 10px;
  background: #dfe4eb;
  border-radius: 6px;
  color: var(--muted);
  flex-shrink: 0;
  box-shadow: inset 1px 1px 2px rgba(163, 177, 198, 0.25), inset -1px -1px 2px rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1100px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-college-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-program-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .admin-hero-content { flex-direction: column; align-items: flex-start; }
  .admin-hero-right { align-self: flex-end; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-college-grid { grid-template-columns: 1fr; }
  .admin-program-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .admin-hero-content { padding: 24px 20px; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-pipeline-grid { grid-template-columns: 1fr 1fr; }
  .admin-program-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 20px; }
  .admin-recent-row { flex-wrap: wrap; }
  .admin-recent-right { flex-direction: row; gap: 10px; align-items: center; }
}

/* ================================================
   Accessibility
   ================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 0;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (pointer: coarse) {
  .button { min-height: 44px; min-width: 44px; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================
   Detail Overlay Panel — Application Review
   ================================================ */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.detail-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  width: min(720px, 100vw);
  height: 100vh;
  background: #e4e9f0;
  box-shadow: -8px 0 40px rgba(163, 177, 198, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.detail-overlay--visible .detail-panel {
  transform: translateX(0);
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  background: #dfe4eb;
  border-bottom: 1px solid rgba(163, 177, 198, 0.25);
  flex-shrink: 0;
}

.detail-panel-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.4), -3px -3px 6px rgba(255, 255, 255, 0.85);
}

.detail-identity {
  min-width: 0;
}

.detail-identity h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-identity-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.detail-student-id {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.detail-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: #e4e9f0;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.4), -3px -3px 6px rgba(255, 255, 255, 0.85);
}
.detail-close-btn:hover {
  background: #dfe4eb;
  color: var(--ink);
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.35), inset -2px -2px 4px rgba(255, 255, 255, 0.75);
}

.detail-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-section {
  background: #e4e9f0;
  border: none;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 6px 6px 14px rgba(163, 177, 198, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.85);
}

.detail-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.25);
}

.detail-section-header i {
  font-size: 16px;
  flex-shrink: 0;
}

.detail-section-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.detail-section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #dfe4eb;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  box-shadow: inset 1px 1px 2px rgba(163, 177, 198, 0.25), inset -1px -1px 2px rgba(255, 255, 255, 0.6);
}
.detail-section-gwa {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  background: #e4e9f0;
  border: none;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}
.detail-section-gwa strong {
  font-weight: 800;
  color: #1e3a8a;
}
.detail-section-honor {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  vertical-align: middle;
}
.detail-section-honor i { font-size: 10px; }
.detail-section-honor--deans {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.detail-section-honor--presidents {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 1px solid #3b82f6;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.detail-info-card {
  background: #dfe4eb;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.detail-info-card--wide {
  grid-column: span 2;
}

.detail-info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 5px;
}

.detail-info-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.detail-info-value--accent {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

.detail-grades-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: none;
  box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.35), -4px -4px 10px rgba(255, 255, 255, 0.75);
}

.detail-grades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.detail-grades-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: #dfe4eb;
  border-bottom: 2px solid rgba(163, 177, 198, 0.25);
}

.detail-grades-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(163, 177, 198, 0.2);
  color: var(--ink);
}

.detail-grades-table tr:last-child td {
  border-bottom: none;
}

.detail-grades-table tr:hover td {
  background: #dfe4eb;
}

.detail-section--actions {
  background: none;
  border: none;
  padding: 0;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.detail-btn {
  flex: none;
  padding: 10px 20px;
  min-height: 42px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.detail-btn--approve {
  background: #0f766e;
  color: #fff;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5);
}
.detail-btn--approve:hover {
  background: #0d665e;
  transform: translateY(-1px);
  box-shadow: 5px 5px 10px rgba(163, 177, 198, 0.4), -5px -5px 10px rgba(255, 255, 255, 0.7);
}

.detail-btn--reject {
  background: #b91c1c;
  color: #fff;
  box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5);
}
.detail-btn--reject:hover {
  background: #991b1b;
  transform: translateY(-1px);
  box-shadow: 5px 5px 10px rgba(163, 177, 198, 0.4), -5px -5px 10px rgba(255, 255, 255, 0.7);
}

/* ================================================
   Registrar COE Form — Editable Fields
   ================================================ */
.registrar-coe-form { margin-top: 4px; }

.registrar-coe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.registrar-coe-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.registrar-coe-field--wide {
  grid-column: 1 / -1;
}

.registrar-coe-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.registrar-coe-field input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: #e4e9f0;
  border: none;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.45), inset -3px -3px 6px rgba(255, 255, 255, 0.85);
}

.registrar-coe-field input:focus {
  box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.5), inset -4px -4px 8px rgba(255, 255, 255, 0.9), 0 0 0 3px rgba(26, 115, 181, 0.15);
}

/* ================================================
   Enrolled Students — Registrar
   ================================================ */
.enrolled-section {
  margin-top: 24px;
  border-top: 3px solid #0f766e;
}

.enrolled-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.enrolled-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.enrolled-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.enrolled-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: #f0fdfa;
  color: #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.enrolled-info {
  min-width: 0;
}

.enrolled-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enrolled-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.enrolled-coe-id {
  font-size: 11px;
  color: #0f766e;
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
}

.enrolled-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.enrolled-btn {
  min-height: 36px !important;
  font-size: 12px !important;
  padding: 7px 14px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-sans);
}

.enrolled-btn--view {
  background: var(--blue);
  color: #fff;
}
.enrolled-btn--view:hover {
  background: #1565a0;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(26, 115, 181, 0.25);
}

.enrolled-btn--print {
  background: var(--bg-subtle);
  color: var(--ink);
  border: 1px solid var(--line);
}
.enrolled-btn--print:hover {
  background: #fff;
  border-color: var(--line-strong);
}

/* ================================================
   COE Edit Overlay — Registrar
   ================================================ */
.coe-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.coe-edit-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.coe-edit-panel {
  width: min(1400px, 100%);
  max-height: 90vh;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.coe-edit-overlay--visible .coe-edit-panel {
  transform: scale(1) translateY(0);
}

.coe-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.coe-edit-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.coe-edit-header-left > i {
  font-size: 22px;
}

.coe-edit-header-left h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.coe-edit-header-left p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.coe-edit-body {
  display: grid;
  grid-template-columns: 420px 1fr;
  flex: 1;
  overflow: hidden;
}

.coe-edit-form {
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
}

.coe-edit-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.coe-edit-section--locked {
  background: var(--bg-subtle);
  border-style: dashed;
}

.coe-edit-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.coe-edit-section-header i {
  font-size: 14px;
}

.coe-edit-section-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.coe-edit-locked-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.coe-edit-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.coe-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.coe-edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coe-edit-field--wide {
  grid-column: span 2;
}

.coe-edit-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.coe-edit-field input,
.coe-edit-field select {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.coe-edit-field input:focus,
.coe-edit-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 181, 0.12);
}

.coe-edit-disabled {
  background: var(--bg-subtle) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
}

.coe-edit-sy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coe-edit-sy-row input {
  text-align: center;
}

.coe-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  flex-shrink: 0;
}

.coe-edit-save-btn {
  background: #0f766e !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.coe-edit-save-btn:hover {
  background: #0d665e !important;
}

.coe-edit-preview {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.coe-edit-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.coe-edit-preview-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-subtle);
}

/* ================================================
   Capacity Dashboard — Chairperson
   ================================================ */
.capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.capacity-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  animation: fadeSlideUp 0.4s ease both;
}

.capacity-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.capacity-metric--enrolled::before { background: var(--success); }
.capacity-metric--pending::before { background: var(--warning); }
.capacity-metric--slots::before { background: var(--blue); }

.capacity-metric:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.capacity-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: 14px;
}

.capacity-metric-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -1px;
}

.capacity-metric-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 8px;
}

/* ================================================
   Block Overload Warnings — Chairperson
   ================================================ */
.block-overload-section {
  margin-bottom: 24px;
}

.block-overload-card {
  background: var(--surface);
  border: 2px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  animation: fadeSlideUp 0.3s ease both;
  transition: all var(--transition-fast);
}

.block-overload-card:hover {
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.1);
}

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

.block-overload-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  color: var(--danger);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--danger-border);
}

.block-overload-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--danger);
}

.block-overload-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.overload-badge {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--danger-border);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-request-block {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-request-block:hover {
  background: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

.btn-request-block:active {
  transform: translateY(0) scale(0.98);
}

/* ================================================
   Mobile Responsive — Comprehensive
   ================================================ */

/* ---- Tablet (≤900px) ---- */
@media (max-width: 900px) {
  .dashboard-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .admin-hero-content { flex-direction: column; align-items: flex-start; }
  .admin-hero-right { align-self: flex-end; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .admin-pipeline-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .admin-college-grid { grid-template-columns: 1fr; }
  .admin-program-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-bottom-grid { grid-template-columns: 1fr; }
  .admin-section-header { flex-direction: column; gap: 12px; }
  .staff-header { flex-direction: column; gap: 16px; }
  .staff-meta { align-items: flex-start; flex-direction: row; gap: 12px; }
  .capacity-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {
  /* Topbar */
  .topbar { height: 56px; padding: 0 14px; }
  .brand { gap: 8px; }
  .brand-logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.4), -3px -3px 6px rgba(255, 255, 255, 0.8); }
  .brand strong { font-size: 14px; }
  .brand small { display: none; }
  .topbar-meta { gap: 6px; }
  .portal-link { display: none; }
  #session-label {
    font-size: 11px;
    padding: 4px 10px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #change-password-button, #logout-button {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 32px;
  }

  /* Page */
  .page { padding: 20px 14px 40px; }

  /* Stats */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat strong { font-size: 24px; }
  .stat small { font-size: 10px; }

  /* Admin Dashboard */
  .admin-hero-content { padding: 20px 16px; }
  .admin-hero-title { font-size: 22px !important; letter-spacing: -0.5px; }
  .admin-hero-desc { font-size: 13px; }
  .admin-hero-badge { padding: 10px 14px; }
  .admin-hero-badge strong { font-size: 12px; }
  .admin-hero-badge span { font-size: 11px; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .admin-stat-card { padding: 14px; gap: 10px; }
  .admin-stat-icon { width: 36px; height: 36px; font-size: 14px; }
  .admin-stat-value { font-size: 18px; }
  .admin-pipeline-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .admin-pipeline-card { padding: 16px 12px; }
  .admin-pipeline-num { font-size: 24px; }
  .admin-pipeline-icon { width: 36px; height: 36px; font-size: 15px; }
  .admin-college-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 16px; margin-bottom: 14px; }
  .admin-section-title { font-size: 15px; }
  .admin-recent-row { padding: 10px 12px; }
  .admin-recent-right { flex-direction: row; gap: 8px; align-items: center; }

  /* Staff Dashboard — App rows */
  .app-row { grid-template-columns: 1fr; }
  .app-row-actions {
    justify-content: flex-start;
    margin-top: 8px;
    gap: 8px;
  }
  .app-row-actions .button {
    flex: 1;
  }
  .adviser-block-grid { grid-template-columns: 1fr; }
  .adviser-block-detail-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .adviser-students-table th:nth-child(3), .adviser-students-table td:nth-child(3) { display: none; }
  .app-row-meta {
    gap: 6px;
    font-size: 11.5px;
    flex-wrap: wrap;
  }

  /* Queue Status */
  .queue-status { flex-direction: column; gap: 8px; align-items: flex-start; padding: 12px 14px; }
  .queue-status strong { font-size: 13px; }

  /* Search */
  .admin-section-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-section-header > div:last-child { display: flex; gap: 8px; align-items: center; }
  .admin-section-header .input { width: 100% !important; }
  #queueSearch { min-height: 40px; font-size: 14px !important; }

  /* Detail Overlay — Mobile */
  .detail-panel { width: 100vw; }
  .detail-panel-header { padding: 18px 18px 16px; }
  .detail-avatar { width: 48px; height: 48px; font-size: 16px; }
  .detail-identity h2 { font-size: 18px; }
  .detail-identity-meta { gap: 8px; }
  .detail-student-id { font-size: 12px; }
  .detail-stage-badge { font-size: 11px; padding: 3px 10px; }
  .detail-panel-body { padding: 18px; gap: 16px; }
  .detail-section { padding: 16px 18px; }
  .detail-info-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .registrar-coe-grid { grid-template-columns: 1fr; }
  .detail-info-card--wide { grid-column: span 2; }
  .detail-info-value { font-size: 14px; }
  .detail-info-value--accent { font-size: 17px; }
  .detail-grades-table { font-size: 13px; }
  .detail-grades-table th { padding: 10px 12px; font-size: 10px; }
  .detail-grades-table td { padding: 9px 12px; }
  .detail-actions { gap: 8px; justify-content: flex-end; }
  .detail-btn { min-height: 38px !important; font-size: 12px !important; padding: 8px 14px !important; }

  /* Enrolled Students — Mobile */
  .enrolled-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .enrolled-row-actions { width: 100%; }
  .enrolled-btn { flex: 1; justify-content: center; min-height: 38px !important; }
  .enrolled-meta { font-size: 11px; gap: 4px; }

  /* COE Edit Overlay — Mobile */
  .coe-edit-overlay { padding: 10px; }
  .coe-edit-panel { max-height: 95vh; border-radius: var(--radius-md); }
  .coe-edit-body { grid-template-columns: 1fr; }
  .coe-edit-form { border-right: none; border-bottom: 1px solid var(--line); max-height: 50vh; padding: 16px; }
  .coe-edit-preview { max-height: 45vh; }
  .coe-edit-grid { grid-template-columns: 1fr; }
  .coe-edit-field--wide { grid-column: span 1; }
  .coe-edit-actions { flex-direction: column; gap: 8px; }
  .coe-edit-actions .button { width: 100%; }

  /* Modals */
  .modal-overlay { padding: 12px; align-items: flex-start; }
  .modal-content {
    padding: 24px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    margin-top: 16px;
  }
  .modal-content .modal-actions .button { min-height: 40px; }

  /* Toast — bottom on mobile */
  #toast-container {
    top: auto !important;
    bottom: 20px !important;
    left: 12px !important;
    right: 12px !important;
    align-items: stretch !important;
  }
  #toast-container > div {
    max-width: 100% !important;
    border-radius: var(--radius-md) !important;
  }

  /* Password change modal buttons */
  #password-change-modal .modal-content > div:last-child {
    flex-direction: column !important;
  }
  #password-change-modal .modal-content .button {
    width: 100% !important;
  }

  /* Block Folders */
  .sf-blocks-grid { grid-template-columns: 1fr; }

  /* Tables — horizontal scroll */
  .data-table { min-width: 500px; font-size: 12.5px; }
  .data-table th { padding: 10px 12px; font-size: 10px; }
  .data-table td { padding: 10px 12px; }
  .table-scroll-wrap { border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); }

  /* Buttons */
  .button { min-height: 40px; font-size: 13px; }
  .button-sm { min-height: 32px !important; font-size: 11.5px !important; padding: 6px 12px !important; }

  /* Tags */
  .tag { font-size: 10.5px; padding: 3px 8px; }

  /* Capacity Dashboard — Mobile */
  .capacity-grid { grid-template-columns: 1fr; gap: 10px; }
  .capacity-metric { padding: 18px 16px; }
  .capacity-metric-value { font-size: 26px; }

  /* Block Overload — Mobile */
  .block-overload-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }
  .block-overload-card > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  .btn-request-block { width: 100%; justify-content: center; }
}

/* ---- Small Mobile (≤480px) ---- */
@media (max-width: 480px) {
  .topbar { height: 52px; padding: 0 10px; }
  .brand { gap: 6px; }
  .brand-logo { width: 28px; height: 28px; }
  .brand strong { font-size: 13px; }
  .page { padding: 14px 10px 32px; }

  /* Stats — single column on very small */
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 12px 14px; }
  .stat strong { font-size: 22px; }

  /* Admin Dashboard */
  .admin-hero-content { padding: 16px 12px; }
  .admin-hero-title { font-size: 20px !important; }
  .admin-hero-badge { padding: 8px 10px; }
  .admin-stats-grid { grid-template-columns: 1fr !important; }
  .admin-stat-card { padding: 12px; }
  .admin-stat-value { font-size: 16px; }
  .admin-pipeline-grid { grid-template-columns: 1fr !important; }
  .admin-pipeline-card { padding: 14px 10px; }
  .admin-pipeline-num { font-size: 22px; }
  .admin-program-grid { grid-template-columns: 1fr; }
  .admin-section { padding: 12px; }
  .admin-section-title { font-size: 14px; }

  /* Capacity Dashboard — Small Mobile */
  .capacity-metric { padding: 14px 12px; }
  .capacity-metric-icon { width: 38px; height: 38px; font-size: 16px; margin-bottom: 10px; }
  .capacity-metric-value { font-size: 24px; }
  .capacity-metric-label { font-size: 11px; }

  /* Block Overload — Small Mobile */
  .block-overload-card { padding: 12px; }
  .block-overload-icon { width: 36px; height: 36px; font-size: 14px; }
  .block-overload-name { font-size: 13px; }
  .overload-badge { font-size: 10px; padding: 3px 8px; }
  .btn-request-block { font-size: 11px; padding: 8px 14px; }

  .dashboard-head h1 { font-size: 20px; }

  /* Staff Dashboard */
  .app-row { padding: 10px; gap: 8px; }
  .app-row-name { font-size: 13px; }
  .app-row-meta { font-size: 10.5px; gap: 3px; }
  .app-row-meta span { display: inline-flex; align-items: center; gap: 3px; }
  .app-row-grades { gap: 3px; }
  .app-row-grade-chip { font-size: 10px; padding: 1px 5px; }

  /* Detail Overlay — Small Mobile */
  .detail-panel-header { padding: 14px 14px 12px; }
  .detail-avatar { width: 42px; height: 42px; font-size: 14px; }
  .detail-identity h2 { font-size: 16px; }
  .detail-panel-body { padding: 14px; gap: 12px; }
  .detail-section { padding: 14px; }
  .detail-info-grid { grid-template-columns: 1fr; gap: 8px; }
  .detail-info-card--wide { grid-column: span 1; }
  .detail-info-value { font-size: 13px; }
  .detail-grades-table { font-size: 12px; }
  .detail-grades-table th { padding: 8px 10px; font-size: 9px; }
  .detail-grades-table td { padding: 8px 10px; }
  .detail-btn { min-height: 36px !important; font-size: 12px !important; padding: 6px 12px !important; }

  /* Enrolled Students — Small Mobile */
  .enrolled-row { padding: 12px; gap: 10px; }
  .enrolled-avatar { width: 36px; height: 36px; font-size: 12px; }
  .enrolled-name { font-size: 13px; }
  .enrolled-meta { font-size: 10.5px; gap: 3px; }
  .enrolled-coe-id { font-size: 10px; }
  .enrolled-btn { min-height: 34px !important; font-size: 11px !important; padding: 6px 10px !important; }

  /* COE Edit Overlay — Small Mobile */
  .coe-edit-overlay { padding: 6px; }
  .coe-edit-header { padding: 14px; }
  .coe-edit-header-left h2 { font-size: 15px; }
  .coe-edit-form { padding: 12px; gap: 14px; }
  .coe-edit-section { padding: 14px; }
  .coe-edit-preview-area { padding: 12px; }
  .coe-edit-field input,
  .coe-edit-field select { height: 36px; font-size: 13px; }

  /* Block folder grid */
  div[style*="grid-template-columns:repeat(auto-fill,minmax(320px,1fr))"],
  div[style*="grid-template-columns: repeat(auto-fill,minmax(320px,1fr))"],
  div[style*="grid-template-columns:repeat(auto-fill, minmax(320px,1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* Tables */
  .data-table { min-width: 400px; font-size: 12px; }
  .data-table th { padding: 8px 10px; font-size: 9px; }
  .data-table td { padding: 8px 10px; font-size: 11.5px; }

  /* Footer */
  .site-footer { font-size: 11px; padding: 14px 10px; }

  /* Modal */
  .modal-overlay { padding: 8px; }
  .modal-content { padding: 16px; }
  .modal-content h3 { font-size: 16px !important; }

  /* Student flow */
  .sf-header { padding: 0.6rem 0.8rem; }
  .sf-header h1 { font-size: 1rem; }
  .sf-body { padding: 0.8rem; }
  .sf-info-banner { padding: 1rem; }
  .sf-info-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .sf-block-card { min-width: 0; }
  .sf-status-card { padding: 1rem; gap: 0.8rem; }
  .sf-status-card-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .sf-confirm-card { padding: 1rem; }
  .sf-confirm-actions { flex-direction: column; }
  .sf-confirm-actions .button { width: 100%; }

  /* Toast — smaller on tiny screens */
  #toast-container > div {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }
}
