/* ============================================================
   TCC Registration & Records System – Main Stylesheet v4
   Design system aligned to the Tampakan Community College seal:
   deep forest green field · metallic gold · ivory
   ============================================================ */

:root {
  /* ── Brand – greens (seal field) ── */
  --tcc-green-950: #052317;
  --tcc-green-900: #0a3524;
  --tcc-green-800: #0d4530;
  --tcc-green-700: #115540;   /* primary */
  --tcc-green-600: #176849;
  --tcc-green-500: #1e7d56;
  --tcc-green-400: #3c9970;
  --tcc-green-200: #bfe0cd;
  --tcc-green-100: #d9ede1;
  --tcc-green-50:  #edf6f0;

  /* ── Brand – gold (seal metal) ── */
  --tcc-gold-700: #7c6113;
  --tcc-gold-600: #a07d1a;
  --tcc-gold-500: #c9a227;
  --tcc-gold-400: #d9b945;
  --tcc-gold-300: #e8cf7a;
  --tcc-gold-100: #f5ecc9;
  --tcc-gold-50:  #fbf7e8;

  /* ── Typography ── */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* ── Surfaces & neutrals (green-tinted) ── */
  --bg-app:          #f2f5f0;
  --surface:         #ffffff;
  --surface-subtle:  #f7f9f4;
  --surface-warm:    #faf8ef;   /* ivory – seals, banners */
  --border:          #e2e8de;
  --border-strong:   #cbd7c6;
  --text:            #1b2a21;
  --text-secondary:  #4c5f52;
  --text-muted:      #87958b;

  /* ── Feedback ── */
  --c-info:    #1768a8;
  --c-success: #177a4c;
  --c-warning: #b45309;
  --c-danger:  #c0362c;

  /* ── Elevation ── */
  --shadow-sm: 0 1px 2px rgba(16, 40, 28, .05);
  --shadow-md: 0 4px 16px rgba(16, 40, 28, .08);
  --shadow-lg: 0 16px 48px rgba(10, 35, 24, .16);
  --ring:      0 0 0 3px rgba(17, 85, 64, .15);

  /* ── Motion ── */
  --ease-out:   cubic-bezier(.23, 1, .32, 1);
  --transition: .18s var(--ease-out);

  /* ── Geometry ── */
  --sidebar-width: 264px;
  --topbar-height: 64px;
  --card-radius:   14px;
  --input-radius:  9px;

  /* ── Bootstrap brand overrides (global green) ── */
  --bs-primary:               var(--tcc-green-700);
  --bs-primary-rgb:           17, 85, 64;
  --bs-primary-text-emphasis: var(--tcc-green-800);
  --bs-primary-bg-subtle:     var(--tcc-green-50);
  --bs-primary-border-subtle: var(--tcc-green-100);
  --bs-link-color:            var(--tcc-green-600);
  --bs-link-color-rgb:        23, 104, 73;
  --bs-link-hover-color:      var(--tcc-green-800);
  --bs-link-hover-color-rgb:  13, 69, 48;
}

/* ── Dark theme (topbar switch, persisted via localStorage) ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-app:          #0d1712;
  --surface:         #15221b;
  --surface-subtle:  #1b2c23;
  --surface-warm:    #232b1f;
  --border:          #26382e;
  --border-strong:   #35503f;
  --text:            #e7efe8;
  --text-secondary:  #a9bcac;
  --text-muted:      #6d8371;

  --tcc-green-50:  #16291f;
  --tcc-green-100: #1d3528;
  --tcc-green-200: #2b4a39;
  --tcc-green-600: #3c9970;
  --tcc-gold-100:  #332b10;
  --tcc-gold-50:   #221d0d;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --ring:      0 0 0 3px rgba(60,153,112,.25);

  --bs-body-bg:            var(--bg-app);
  --bs-body-color:         var(--text);
  --bs-emphasis-color:     var(--text);
  --bs-secondary-color:    var(--text-muted);
  --bs-tertiary-bg:        var(--surface-subtle);
  --bs-border-color:       var(--border);
  --bs-border-color-translucent: var(--border);
  --bs-primary-text-emphasis: #7cc3a2;
  --bs-primary-bg-subtle:  #16291f;
  --bs-primary-border-subtle: #2b4a39;
  --bs-link-color:         #5cb98f;
  --bs-link-hover-color:   #8fd4b3;
  --bs-table-bg:           transparent;
  --bs-table-color:        var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg:   rgba(255,255,255,.02);
  --bs-table-hover-bg:     rgba(255,255,255,.03);
}
html[data-theme="dark"] .topbar-search kbd,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .card { color-scheme: dark; }
html[data-theme="dark"] .dropdown-menu {
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-color: var(--text);
  --bs-dropdown-link-color: var(--text-secondary);
  --bs-dropdown-link-hover-bg: var(--surface-subtle);
  --bs-dropdown-link-hover-color: var(--text);
  --bs-dropdown-border-color: var(--border);
}
html[data-theme="dark"] .modal-content {
  --bs-modal-bg: var(--surface);
  --bs-modal-color: var(--text);
  --bs-modal-border-color: var(--border);
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  --bs-body-bg: var(--surface-subtle);
  --bs-border-color: var(--border-strong);
}
html[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
html[data-theme="dark"] .stat-icon.green { background: #1d3528; color: #7cc3a2; }
html[data-theme="dark"] .stat-icon.gold  { background: #332b10; color: var(--tcc-gold-400); }
html[data-theme="dark"] .stat-icon.blue  { background: #16293a; color: #6aa8d8; }
html[data-theme="dark"] .stat-icon.teal  { background: #14312b; color: #5cc4b4; }
html[data-theme="dark"] .kpi-delta.up   { background: #16301f; color: #6fc59a; border-color: #2b4a39; }
html[data-theme="dark"] .kpi-delta.down { background: #331a16; color: #e08a80; border-color: #4e2b25; }
html[data-theme="dark"] .kpi-delta.flat { background: var(--surface-subtle); }
html[data-theme="dark"] .tb-item-ico.green { background: #1d3528; color: #7cc3a2; }
html[data-theme="dark"] .topbar-icon-btn:hover {
  background: #1d3528; border-color: #2b4a39; color: #7cc3a2;
}
html[data-theme="dark"] .topbar-icon-btn .notif-dot { border-color: #15221b; }
html[data-theme="dark"] .topbar-avatar-btn:hover { box-shadow: 0 0 0 3px #2b4a39; }
html[data-theme="dark"] .page-loader { background: var(--bg-app); }
html[data-theme="dark"] .pl-text { color: var(--text-secondary); }

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text);
  font-size: .9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-sans);
  letter-spacing: -.018em;
  color: var(--text);
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  letter-spacing: -.03em;
}

a { color: var(--tcc-green-600); text-decoration: none; }
a:hover { color: var(--tcc-green-800); }

::selection { background: rgba(201, 162, 39, .28); }

code, kbd, .font-monospace, .tracking-code-display .code {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--tcc-green-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3cec4; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a3b3a6; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  font-weight: 550;
  letter-spacing: .01em;
  border-radius: 9px;
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform .14s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { box-shadow: var(--ring); outline: none; }
.btn-sm  { border-radius: 7px; }
.btn-lg  { border-radius: 11px; letter-spacing: .015em; }
.btn-xs  { padding: 2px 8px; font-size: .72rem; border-radius: 6px; }

.btn-primary {
  --bs-btn-bg: var(--tcc-green-700);
  --bs-btn-border-color: var(--tcc-green-700);
  --bs-btn-hover-bg: var(--tcc-green-800);
  --bs-btn-hover-border-color: var(--tcc-green-800);
  --bs-btn-active-bg: var(--tcc-green-900);
  --bs-btn-active-border-color: var(--tcc-green-900);
  --bs-btn-disabled-bg: var(--tcc-green-700);
  --bs-btn-disabled-border-color: var(--tcc-green-700);
  /* layered depth: top inner highlight + drop shadow */
  background-image: linear-gradient(180deg, rgba(255,255,255,.12), transparent 45%);
  box-shadow: 0 1px 2px rgba(5,35,23,.18), inset 0 1px 0 rgba(255,255,255,.14);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13,69,48,.28), inset 0 1px 0 rgba(255,255,255,.14);
  }
  .btn-primary:active { transform: translateY(0) scale(.98); }
}
.btn-primary:disabled { background-image: none; box-shadow: none; }
.btn-gold { box-shadow: 0 1px 2px rgba(60,47,7,.2), inset 0 1px 0 rgba(255,255,255,.25); }
.btn:disabled, .btn.disabled { opacity: .55; box-shadow: none !important; }
.btn-outline-primary {
  --bs-btn-color: var(--tcc-green-700);
  --bs-btn-border-color: var(--tcc-green-700);
  --bs-btn-hover-bg: var(--tcc-green-700);
  --bs-btn-hover-border-color: var(--tcc-green-700);
  --bs-btn-active-bg: var(--tcc-green-800);
  --bs-btn-active-border-color: var(--tcc-green-800);
}
.btn-outline-secondary {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-bg: var(--surface-subtle);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-border-color: #aebda9;
}
.btn-gold {
  --bs-btn-bg: var(--tcc-gold-500);
  --bs-btn-border-color: var(--tcc-gold-500);
  --bs-btn-color: #3c2f07;
  --bs-btn-hover-bg: var(--tcc-gold-400);
  --bs-btn-hover-border-color: var(--tcc-gold-400);
  --bs-btn-hover-color: #2c2305;
  --bs-btn-active-bg: var(--tcc-gold-600);
  --bs-btn-active-border-color: var(--tcc-gold-600);
  --bs-btn-active-color: #fff;
}
.btn-outline-gold {
  --bs-btn-color: var(--tcc-gold-600);
  --bs-btn-border-color: var(--tcc-gold-500);
  --bs-btn-hover-bg: var(--tcc-gold-500);
  --bs-btn-hover-border-color: var(--tcc-gold-500);
  --bs-btn-hover-color: #3c2f07;
  --bs-btn-active-bg: var(--tcc-gold-600);
  --bs-btn-active-border-color: var(--tcc-gold-600);
}
.text-gold   { color: var(--tcc-gold-500) !important; }
.bg-gold     { background-color: var(--tcc-gold-500) !important; }
.bg-gold-soft{ background-color: var(--tcc-gold-50) !important; }
.border-gold { border-color: var(--tcc-gold-500) !important; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  border-radius: 10px; font-size: .875rem;
  border-left-width: 3px;
}
.alert-success { border-left-color: var(--c-success); }
.alert-danger  { border-left-color: var(--c-danger); }
.alert-warning { border-left-color: var(--c-warning); }
.alert-info    { border-left-color: var(--c-info); }
.alert .bi { vertical-align: -1px; }

/* ── Dropdowns ─────────────────────────────────────────────── */
.dropdown-menu {
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  border-radius: 12px; padding: 6px;
}
.dropdown-item {
  font-size: .85rem; border-radius: 8px; padding: 8px 12px;
}
.dropdown-item:hover { background: var(--tcc-green-50); color: var(--tcc-green-800); }
.dropdown-item:active { background: var(--tcc-green-700); color: #fff; }
.dropdown-item i { opacity: .7; }

/* ── Modals ── */
.modal-content {
  border: none; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(5,35,23,.28);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 16px 22px; }
.modal-title  { font-weight: 700; letter-spacing: -.015em; }
.modal-body   { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; }

/* ── Tooltips ── */
.tooltip-inner {
  background: var(--tcc-green-950); border-radius: 8px;
  font-size: .72rem; font-weight: 550; padding: 6px 10px;
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════ */

.dashboard-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--tcc-green-900);
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
  transition: transform .28s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }

.sidebar-brand {
  padding: 20px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(232, 207, 122, .6);
  background: #fff;
}
.brand-logo-sm { width: 34px; height: 34px; border-width: 1.5px; }
.sidebar-brand .brand-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand .brand-icon i { font-size: 1.3rem; color: var(--tcc-gold-300); }
.sidebar-brand .brand-text  { overflow: hidden; }
.sidebar-brand .brand-name  {
  font-size: .95rem; font-weight: 700; color: #fff;
  line-height: 1.2; letter-spacing: -.01em;
}
.sidebar-brand .brand-sub   {
  font-size: .7rem; color: var(--tcc-gold-300);
  text-transform: uppercase; letter-spacing: .1em; margin-top: 2px;
}

.sidebar-nav { padding: 10px 12px; flex: 1; }
.sidebar-section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--tcc-gold-300);
  padding: 18px 6px 8px;
}
.sidebar-section-label::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,.14);
}
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 2px;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
  font-weight: 550;
  border-radius: 10px;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  position: relative;
}
.sidebar-nav .nav-link i { font-size: 1rem; flex-shrink: 0; opacity: .85; }
.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
}
.sidebar-nav .nav-link.active {
  color: var(--tcc-green-950);
  background: var(--surface-warm);
  font-weight: 700;
}
.sidebar-nav .nav-link.active i { color: var(--tcc-green-800); opacity: 1; }
.sidebar-nav .nav-link .badge {
  margin-left: auto;
  font-size: .62rem;
  padding: 3px 7px;
}

.sidebar-footer {
  padding: 12px 14px 18px;
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface-warm);
  margin-bottom: 10px;
}
.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  background: var(--tcc-green-800);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700; font-size: .8rem; color: var(--tcc-gold-300);
}
.sidebar-user .user-info { overflow: hidden; min-width: 0; }
.sidebar-user .user-name {
  font-size: .85rem; font-weight: 700; color: var(--tcc-green-950);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: .7rem; color: var(--tcc-green-700);
  text-transform: uppercase; letter-spacing: .08em; margin-top: 1px;
}
.sidebar-footer .footer-actions { display: flex; gap: 6px; }
.sidebar-footer .footer-actions .btn {
  flex: 1; font-size: .78rem; padding: 7px 8px;
  border-radius: 8px;
  border-color: rgba(255,255,255,.28); color: rgba(255,255,255,.85);
}
.sidebar-footer .footer-actions .btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ── */
.topbar {
  height: var(--topbar-height);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px 0 24px;
  position: sticky;
  top: 0; z-index: 1030;
  gap: 10px;
}
/* Hamburger always visible — opens drawer on mobile, collapses rail on desktop */

/* Topbar right actions */
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
  position: relative; flex-shrink: 0;
}
.topbar-icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--text);
  border-color: var(--border-strong);
}
.topbar-icon-btn:active { transform: scale(.92); }
.topbar-icon-btn .notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-danger); border: 2px solid #fff;
}
.topbar-user-btn {
  cursor: pointer;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.topbar-user-btn:hover { border-color: var(--border-strong) !important; box-shadow: var(--shadow-sm); }

.page-content { padding: 26px 24px; flex: 1; animation: pageIn .28s var(--ease-out); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page-content { animation: none; }
}

/* ── Page Header ── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px; gap: 12px; flex-wrap: wrap;
}
.page-header-info h4 {
  font-weight: 700; margin-bottom: 3px; color: var(--text);
  font-size: 1.3rem; letter-spacing: -.02em;
}
.page-header-info p { color: var(--text-secondary); margin: 0; font-size: .86rem; }
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Breadcrumb (standalone, below page header) ── */
.page-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-muted);
  margin-bottom: 20px; margin-top: -12px;
  flex-wrap: wrap;
}
.page-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--tcc-green-600); }
.page-breadcrumb .bc-sep { color: #bcc9bd; font-size: .65rem; }
.page-breadcrumb .bc-current { color: var(--text); font-weight: 500; }

/* ── Stat Cards ── */
.stat-card {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none !important;
  color: inherit !important;
  height: 100%;
}
@media (hover: hover) and (pointer: fine) {
  a.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.3rem;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 2px rgba(16,40,28,.06);
}
.stat-icon.green  { background: var(--tcc-green-100); color: var(--tcc-green-700); }
.stat-icon.gold   { background: var(--tcc-gold-100);  color: var(--tcc-gold-600); }
.stat-icon.yellow { background: #fdf3d0; color: #92600a; }
.stat-icon.blue   { background: #e0eefb; color: #1768a8; }
.stat-icon.teal   { background: #d3f0e9; color: #0f766e; }
.stat-icon.purple { background: #ede9fe; color: #6d28d9; }
.stat-icon.red    { background: #fde3e3; color: #c0362c; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-icon.grey,
.stat-icon.gray   { background: #e7ebe7; color: var(--text-secondary); }
.stat-info .stat-label {
  font-size: .68rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px;
  font-weight: 600;
}
.stat-info .stat-value {
  font-size: 1.7rem; font-weight: 750; color: var(--text);
  line-height: 1.05; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-info .stat-sub { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* ── Content Cards ── */
.content-card {
  background: var(--surface);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.content-card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-subtle) 100%);
}
.content-card-header h5 {
  margin: 0; font-size: .92rem; font-weight: 650;
  color: var(--text); letter-spacing: -.01em;
  display: flex; align-items: center; gap: 4px;
}
.content-card-header h5 > i {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--tcc-green-50); border: 1px solid var(--tcc-green-100);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; color: var(--tcc-green-700);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  margin-right: 6px;
}
.content-card-header-right { display: flex; align-items: center; gap: 8px; }
.content-card-body { padding: 20px; }

/* ── Status quick tabs (chip row above lists) ── */
.status-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.status-tabs .btn {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 6px 14px;
}
.status-tabs .btn .badge { border-radius: 999px; }
.status-tabs .spacer { flex: 1; }

/* ── Tables ── */
.table-responsive { border-radius: 0 0 var(--card-radius) var(--card-radius); }
.table-responsive::-webkit-scrollbar { height: 8px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.table-responsive::-webkit-scrollbar-track { background: var(--surface-subtle); }
.table { margin-bottom: 0; }
.table thead th {
  background: var(--surface-subtle);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 var(--border-strong);
  padding: 11px 16px;
  white-space: nowrap;
}
.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  font-size: .85rem;
  border-bottom: 1px solid #eff3ec;
}
.table tbody tr { transition: background var(--transition); }
@media (hover: hover) and (pointer: fine) {
  .table tbody tr:hover { background: var(--tcc-green-50); }
}
.table tbody tr:last-child td { border-bottom: 0; }
.table .row-name { font-weight: 600; font-size: .85rem; }
.table .row-sub  { color: var(--text-muted); font-size: .7rem; }
.table .num      { font-variant-numeric: tabular-nums; text-align: right; }

/* List footer (range + pagination inside a card) */
.table-responsive:has(+ .list-footer) { border-radius: 0; }
.list-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}
.list-footer-range { color: var(--text-muted); font-size: .78rem; }

/* ── Progress breakdown rows ── */
.progress-row { display: flex; align-items: center; margin-bottom: 10px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-row-label { font-size: .8rem; color: var(--text-secondary); flex-shrink: 0; }
.progress-row-track {
  flex: 1; margin: 0 10px; height: 8px; border-radius: 4px;
  background: var(--tcc-green-50); overflow: hidden;
}
.progress-row-bar {
  height: 100%; border-radius: 4px; position: relative;
  transition: width .5s var(--ease-out);
}
.progress-row-bar::after {
  content: ''; position: absolute; inset: 0; border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 55%);
}
.progress-row-val { width: 34px; text-align: right; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Tracking-code chip (click to copy) ── */
.ui-code {
  font-family: var(--font-mono);
  font-size: .78rem; font-weight: 600;
  background: var(--tcc-green-50);
  border: 1px solid var(--tcc-green-200);
  color: var(--tcc-green-800);
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16,40,28,.05);
  cursor: copy;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background var(--transition), border-color var(--transition), transform .12s;
}
.ui-code i { font-size: .65rem; opacity: .55; transition: opacity var(--transition); }
@media (hover: hover) {
  .ui-code:hover { background: var(--tcc-green-100); border-color: var(--tcc-green-300); }
  .ui-code:hover i { opacity: 1; }
}
.ui-code:active { transform: scale(.96); }
.ui-code.copied { background: var(--tcc-green-700); color: #fff; border-color: var(--tcc-green-700); }
.ui-code.copied i { opacity: 1; }

/* ── Badges ── */
.badge {
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .7rem;
  letter-spacing: .015em;
}
.bg-teal   { background-color: #0f766e !important; }
.bg-purple { background-color: #6d28d9 !important; }

/* Soft status badges — tinted surface, colored text, thin ring */
.badge.bg-light { border: 1px solid var(--border); color: var(--text-secondary) !important; }
.badge-soft { border: 1px solid transparent; font-weight: 600; }
.badge-soft-primary   { background: var(--tcc-green-50);  color: var(--tcc-green-700); border-color: var(--tcc-green-200); }
.badge-soft-success   { background: #e7f5ec;            color: #177a4c;              border-color: #bfe3cc; }
.badge-soft-info      { background: #e3f1f4;            color: #0e7490;              border-color: #bbe0e8; }
.badge-soft-warning   { background: var(--tcc-gold-50); color: var(--tcc-gold-700);  border-color: var(--tcc-gold-300); }
.badge-soft-danger    { background: #fbe9e7;            color: #c0362c;              border-color: #f0c5c0; }
.badge-soft-secondary { background: #eef1ee;            color: #5a6b60;              border-color: #d5dcd4; }
.badge-soft-teal      { background: #ddf3ee;            color: #0f766e;              border-color: #b5e2da; }
.badge-soft-dark      { background: #e4eae4;            color: var(--tcc-green-900); border-color: #c9d4c8; }

/* ── Status Timeline ── */
.status-timeline { position: relative; padding-left: 26px; }
.status-timeline::before {
  content: ''; position: absolute; left: 8px; top: 10px; bottom: 10px;
  width: 2px; background: var(--border); border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -21px; top: 7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--tcc-green-600);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--tcc-green-600);
}
.timeline-item:first-child .timeline-dot { background: var(--text-muted); box-shadow: 0 0 0 2px var(--text-muted); }
.timeline-item:last-child .timeline-dot  { background: var(--c-success); box-shadow: 0 0 0 2px var(--c-success); }
.timeline-content {
  background: var(--surface-subtle); border-radius: 10px;
  padding: 11px 14px; border: 1px solid #eaf0e6;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.timeline-item:hover .timeline-content {
  border-color: var(--tcc-green-200);
  box-shadow: var(--shadow-sm);
}
.timeline-remarks {
  border-top: 1px solid var(--border); margin-top: 7px; padding-top: 7px;
}

/* ── Forms ── */
.form-label { font-size: .83rem; font-weight: 550; color: var(--text-secondary); margin-bottom: 5px; }
.form-control, .form-select {
  font-size: .875rem;
  font-family: var(--font-sans);
  border-radius: var(--input-radius);
  border: 1px solid var(--border-strong);
  padding: 9px 13px;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(16,40,28,.05);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-control:hover, .form-select:hover { border-color: #aebda9; }
.form-control::placeholder { color: #a3b3a6; }
.form-control:focus, .form-select:focus {
  border-color: var(--tcc-green-600);
  box-shadow: var(--ring), inset 0 1px 2px rgba(16,40,28,.05);
  outline: none;
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px rgba(192, 54, 44, .1);
}
.input-group-text {
  border-color: var(--border-strong);
  border-radius: var(--input-radius);
  color: var(--text-muted);
  background: var(--surface-subtle);
}
.required-mark { color: var(--c-danger); }
.form-text { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.form-section-title {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--tcc-green-700);
  border-bottom: 2px solid var(--tcc-green-100);
  padding-bottom: 7px; margin-bottom: 16px; margin-top: 8px;
}
.form-check-input {
  width: 1.05em; height: 1.05em; cursor: pointer;
  border: 1.5px solid var(--border-strong);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.form-check-label { cursor: pointer; }
.form-check-input:checked {
  background-color: var(--tcc-green-700); border-color: var(--tcc-green-700);
  animation: checkPop .2s var(--ease-out);
}
.form-check-input:focus   { box-shadow: var(--ring); border-color: var(--tcc-green-600); }
@keyframes checkPop {
  0%   { transform: scale(.8); }
  60%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Selectable doc-type cards (document request form) */
.doc-type-card { transition: all .18s; font-size: .82rem; position: relative; }
.doc-type-card:hover {
  border-color: var(--tcc-green-400) !important;
  transform: translateY(-2px);
}
.doc-type-card.selected {
  background: var(--tcc-green-50) !important;
  border-color: var(--tcc-green-600) !important;
  color: var(--tcc-green-800);
  box-shadow: 0 0 0 1px var(--tcc-green-600);
}
.doc-type-card.selected::after {
  content: '\F26B';
  font-family: 'bootstrap-icons';
  position: absolute; top: 7px; right: 10px;
  color: var(--tcc-green-600); font-size: .85rem;
}

/* Document request form */
.dreq-sec-sub {
  font-size: .74rem; font-weight: 500; color: var(--text-secondary, #5a6e62);
}
.dreq-opts { display: flex; gap: 8px; }
.dreq-opt {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 6px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border, #d7e0d5); border-radius: 8px;
  font-size: .8rem; font-weight: 600; color: var(--text-secondary, #5a6e62);
  transition: all .15s; background: var(--surface, #fff);
}
.dreq-opt i { font-size: .9rem; }
.dreq-opt:hover { border-color: var(--tcc-green-400, #2f8f6a); }
.dreq-opt:has(input:checked) {
  background: var(--tcc-green-50, #eef5ef);
  border-color: var(--tcc-green-600, #176849);
  color: var(--tcc-green-800, #0d4530);
  box-shadow: 0 0 0 1px var(--tcc-green-600, #176849);
}

/* Numbered section badge (multi-part forms) */
.section-num {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--tcc-green-700); color: #fff;
  border-radius: 50%; font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Filter Bar ── */
.filter-bar {
  background: var(--surface);
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  padding: 14px 18px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.filter-bar:focus-within { border-color: var(--tcc-green-200); }
.filter-form {
  display: flex; flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.filter-field { flex: 1 1 170px; min-width: 150px; }
.filter-actions {
  display: flex; gap: 8px;
  margin-left: auto; align-self: flex-end;
}
.filter-bar .form-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 700;
  margin-bottom: 5px;
}
/* every control in the bar shares one height — guaranteed alignment */
.filter-bar .form-control,
.filter-bar .form-select,
.filter-bar .input-group,
.filter-bar .input-group-text,
.filter-bar .btn {
  height: 38px;
  font-size: .85rem;
}
.filter-bar .input-group { width: 100%; }
.filter-bar .input-group-text {
  padding: 0 11px;
  background: var(--surface-subtle);
  border-right: 0;
  color: var(--text-muted);
}
.filter-bar .input-group .form-control { border-left: 0; }
.filter-bar .input-group .form-control:focus { border-left: 0; }
.filter-bar .btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px; font-weight: 600; white-space: nowrap;
}
.filter-bar .btn i { font-size: .9em; }

/* ── Detail rows ── */
.detail-row { display: flex; flex-wrap: wrap; gap: 0; }
.detail-item {
  flex: 0 0 50%;
  padding: 11px 16px 11px 0;
  border-bottom: 1px solid #eff3ec;
  transition: background var(--transition), padding var(--transition);
}
@media (hover: hover) {
  .detail-item:hover { background: var(--tcc-green-50); padding-left: 8px; border-radius: 6px; }
}
.detail-item.full { flex: 0 0 100%; }
.detail-item:last-child,
.detail-item.last { border-bottom: 0; }
.detail-label {
  font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); margin-bottom: 3px;
  font-weight: 650;
}
.detail-value { font-size: .875rem; color: var(--text); font-weight: 500; line-height: 1.45; }

/* ── Issued-document verification slip (print) ── */
.verify-slip { max-width: 640px; margin: 0 auto; }
.verify-slip .card { border-radius: var(--radius-xl); }
.verify-slip-head {
  padding: 26px 24px 22px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--tcc-green-950), var(--tcc-green-800));
  border-bottom: 3px solid var(--tcc-gold-500);
}
.verify-slip-seal {
  width: 62px; height: 62px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.55); margin-bottom: 10px;
  background: #fff;
}

/* ── Verification banner (QR verify / public verify results) ── */
.verify-banner {
  padding: 18px 20px; color: #fff;
  position: relative; overflow: hidden;
}
.verify-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 50%);
  pointer-events: none;
}
.verify-banner.good { background: linear-gradient(135deg, var(--tcc-green-800), var(--tcc-green-600)); }
.verify-banner.bad  { background: linear-gradient(135deg, #6b1a1a, #a13232); }
.verify-banner.info { background: linear-gradient(135deg, var(--tcc-green-900), var(--tcc-green-700)); }
.verify-banner-title { font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.verify-banner-code  { opacity: .78; font-size: .8rem; font-family: var(--font-mono); }
.verify-banner .badge { background: rgba(255,255,255,.22); }

/* ── Pagination ── */
.pagination { gap: 3px; }
.page-link {
  border-radius: 7px !important; font-size: .8rem;
  padding: 5px 11px; color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all var(--transition);
}
.page-link:hover {
  background: var(--tcc-green-50); color: var(--tcc-green-700);
  border-color: var(--tcc-green-200);
}
.page-link:focus-visible { box-shadow: var(--ring); }
.page-item.active .page-link {
  background: var(--tcc-green-700); border-color: var(--tcc-green-700); color: #fff;
}
.page-item.disabled .page-link { color: #bcc9bd; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-muted); }
.empty-state > i {
  font-size: 1.6rem; display: inline-flex;
  align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--tcc-green-50); color: var(--tcc-green-400);
  border: 1px solid var(--tcc-green-100);
  margin-bottom: 14px;
}
.empty-state h6 { color: var(--text-secondary); font-weight: 650; margin-bottom: 6px; }
.empty-state p  { margin: 0 auto 14px; font-size: .85rem; max-width: 340px; }

/* ── Avatar ── */
.avatar-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; flex-shrink: 0;
  background-image: linear-gradient(160deg, rgba(255,255,255,.18), transparent 55%);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(16,40,28,.18);
}

/* ── Password Strength ── */
.strength-wrap .strength-bar {
  height: 5px; border-radius: 3px;
  transition: width .35s, background .35s;
}
.requirement { font-size: .75rem; display: flex; align-items: center; gap: 4px; }
.requirement i { font-size: .7rem; }
.req-ok   { color: var(--c-success); }
.req-fail { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   STEP WIZARD  (unified — used by pre_registration & track)
   ════════════════════════════════════════════════════════════ */
.step-progress {
  display: flex; align-items: flex-start;
  justify-content: center; gap: 0;
  margin-bottom: 28px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 70px; position: relative;
}
.step-item::after {
  content: ''; position: absolute; top: 18px; left: 50%;
  width: 100%; height: 2px; background: var(--border); z-index: 0;
}
.step-item:last-child::after { display: none; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: #dfe7de; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  position: relative; z-index: 1;
  transition: all .3s; border: 2px solid transparent;
}
/* active = current step (brand green) */
.step-item.active .step-circle {
  background: var(--tcc-green-700); color: #fff;
  box-shadow: 0 0 0 4px rgba(17, 85, 64, .15);
  border-color: var(--tcc-green-700);
}
/* completed / done = past step (success) */
.step-item.completed .step-circle,
.step-item.done      .step-circle {
  background: var(--c-success); color: #fff; border-color: var(--c-success);
}
.step-item.completed::after,
.step-item.done::after { background: var(--c-success); }
/* negative = declined / needs correction */
.step-item.neg .step-circle { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }

.step-label { font-size: .68rem; color: var(--text-muted); margin-top: 7px; text-align: center; line-height: 1.3; font-weight: 500; }
.step-item.active    .step-label { color: var(--tcc-green-700); font-weight: 650; }
.step-item.completed .step-label,
.step-item.done      .step-label { color: var(--c-success); font-weight: 600; }
.step-item.neg       .step-label { color: var(--c-danger); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   PUBLIC PORTAL
   ════════════════════════════════════════════════════════════ */

/* Portal Nav */
.portal-nav {
  background: rgba(7, 38, 26, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0;
  transition: box-shadow .25s;
}
.portal-nav.scrolled { box-shadow: 0 8px 28px rgba(3,20,13,.45); }
.portal-nav .container { min-height: 64px; display: flex; align-items: center; }

.portal-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.portal-brand .brand-logo { transition: transform .3s; }
.portal-brand:hover .brand-logo { transform: scale(1.06) rotate(-3deg); }
.portal-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.portal-brand-name {
  color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: -.01em;
}
.portal-brand:hover .portal-brand-name { color: var(--tcc-gold-300); }
.portal-brand-sub {
  color: rgba(255,255,255,.55); font-size: .82rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .05em;
}

.portal-nav .nav-link {
  position: relative;
  color: rgba(255,255,255,.72) !important;
  font-size: .84rem; font-weight: 550; padding: 8px 14px !important;
  border-radius: 8px; transition: color .18s, background .18s;
}
.portal-nav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.08); }
.portal-nav .nav-link.active-page {
  color: #fff !important; font-weight: 650;
}
.portal-nav .nav-link.active-page::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--tcc-gold-400);
}
.nav-ghost {
  color: rgba(255,255,255,.78); font-size: .84rem; font-weight: 600;
  text-decoration: none; padding: 8px 14px; border-radius: 8px;
  transition: color .18s, background .18s;
}
.nav-ghost:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-ghost.active-page { color: #fff; }

.portal-nav .btn-portal {
  background: var(--tcc-gold-500); color: var(--tcc-green-950) !important;
  font-weight: 700; border: none; font-size: .8rem;
  border-radius: 9px; padding: 8px 16px;
  transition: background .18s, transform .18s;
}
.portal-nav .btn-portal:hover {
  background: var(--tcc-gold-400); transform: translateY(-1px);
}
.portal-nav .navbar-toggler { border: 1px solid rgba(255,255,255,.3); }
.portal-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero */
.portal-hero {
  background:
    radial-gradient(1200px 520px at 85% -20%, rgba(201, 162, 39, .22), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(30, 125, 86, .35), transparent 55%),
    linear-gradient(140deg, var(--tcc-green-950) 0%, var(--tcc-green-800) 55%, var(--tcc-green-700) 100%);
  color: #fff;
  padding: 72px 0 100px;
  position: relative;
  overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.portal-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 72px; background: var(--bg-app);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.portal-hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -.03em;
}
.portal-hero .lead { font-weight: 400; color: rgba(255,255,255,.85); }
.hero-logo {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(232, 207, 122, .6);
  box-shadow: 0 0 0 4px rgba(255,255,255,.1), var(--shadow-md);
  background: #fff;
}

/* Portal Cards */
.portal-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
  overflow: hidden; background: var(--surface);
}
@media (hover: hover) and (pointer: fine) {
  .portal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
  }
}
.portal-card h5 { letter-spacing: -.015em; }
.portal-card-icon {
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 6px rgba(16,40,28,.08);
}
.portal-card-icon.green  { background: var(--tcc-green-100); color: var(--tcc-green-700); }
.portal-card-icon.gold   { background: var(--tcc-gold-100);  color: var(--tcc-gold-600); }
.portal-card-icon.blue   { background: #e0eefb; color: #1768a8; }
.portal-card-icon.purple { background: #ede9fe; color: #6d28d9; }

/* Uniform page header for student/portal pages */
.portal-page-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.portal-head-icon {
  width: 48px; height: 48px; flex-shrink: 0; margin: 0;
  border-radius: 13px; font-size: 1.2rem;
  background: var(--tcc-green-800); color: var(--tcc-gold-300);
  box-shadow: 0 2px 8px rgba(10,53,36,.18);
}
.portal-head-text h3 { font-size: 1.25rem; letter-spacing: -.015em; }
@media (max-width: 575.98px) {
  .portal-page-head { gap: 10px; }
  .portal-head-icon { width: 42px; height: 42px; border-radius: 11px; }
  .portal-page-head .ms-auto { margin-left: 0 !important; width: 100%; }
}

/* Document type item (student portal) */
.doc-item {
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition), box-shadow var(--transition);
}
@media (hover: hover) and (pointer: fine) {
  .doc-item:hover {
    border-color: var(--tcc-green-500) !important;
    background: var(--tcc-green-50) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }
}
.doc-icon {
  width: 38px; height: 38px;
  background: var(--tcc-green-100);
  color: var(--tcc-green-700);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

/* How-it-works step circles (portal landing) */
.hiw-num {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  box-shadow: var(--shadow-sm);
}
.hiw-pill {
  display: inline-block; border-radius: 20px; padding: 3px 14px;
  font-size: .7rem; font-weight: 700; color: #fff; opacity: .75;
}
.hiw-1 .hiw-num, .hiw-1 .hiw-pill { background: var(--tcc-green-800); }
.hiw-2 .hiw-num, .hiw-2 .hiw-pill { background: var(--tcc-green-600); }
.hiw-3 .hiw-num, .hiw-3 .hiw-pill { background: var(--tcc-gold-600); }
.hiw-4 .hiw-num, .hiw-4 .hiw-pill { background: var(--tcc-gold-500); }

/* Quick-track CTA band */
.portal-cta { background: linear-gradient(135deg, var(--tcc-green-50), var(--tcc-gold-50)); }
.portal-cta-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--tcc-green-100); color: var(--tcc-green-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

/* Student account — ID card + record slips */
.acct-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(10,30,20,.08));
  border: 1px solid var(--border, #e2e8e0);
}
.acct-id {
  background: var(--tcc-green-950, #052317);
  color: #fff; padding: 22px 24px;
  border-top: 4px solid var(--tcc-gold-500, #c9a227);
}
.acct-id-label {
  font-size: .66rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tcc-gold-400, #d9b945);
  margin-bottom: 14px;
}
.acct-id-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.acct-mono {
  width: 62px; height: 62px; border-radius: 12px; flex-shrink: 0;
  background: var(--tcc-green-800, #0d4530);
  border: 1.5px solid var(--tcc-gold-500, #c9a227);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.35rem; color: var(--tcc-gold-300, #e8cf7a);
  letter-spacing: .03em;
}
.acct-id-main { flex: 1; min-width: 200px; }
.acct-name {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em;
  margin: 0 0 4px; color: #fff;
}
.acct-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: .8rem; color: rgba(255,255,255,.72);
}
.acct-meta i { color: var(--tcc-gold-400, #d9b945); }
.acct-stats {
  display: flex; gap: 22px; flex-shrink: 0;
  padding-left: 20px; border-left: 1px solid rgba(255,255,255,.14);
}
.acct-stat { text-align: center; }
.acct-stat-n {
  display: block; font-size: 1.5rem; font-weight: 800; line-height: 1;
  color: var(--tcc-gold-300, #e8cf7a);
}
.acct-stat-l {
  display: block; font-size: .62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.6); margin-top: 4px;
}
.acct-tabs {
  display: flex; border-top: 1px solid var(--border, #e2e8e0);
  background: var(--surface-subtle, #f7f9f4);
  overflow-x: auto; scrollbar-width: none;
}
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 13px 20px; font-size: .85rem; font-weight: 600;
  color: var(--text-secondary, #5a6e62); text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  white-space: nowrap; flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.acct-tab:hover { color: var(--tcc-green-700, #115540); }
.acct-tab.active {
  color: var(--tcc-green-800, #0d4530);
  border-bottom-color: var(--tcc-gold-500, #c9a227);
  background: #fff;
}
.acct-tab-end { margin-left: auto; }
.acct-tab i { font-size: .95rem; }

/* Record slips */
.slip-list { display: flex; flex-direction: column; gap: 10px; }
.slip {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface-warm, #faf8ef);
  border: 1px solid var(--border, #e2e8e0);
  border-left: 4px solid var(--tcc-green-600, #176849);
  border-radius: 10px; padding: 12px 16px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.slip:hover {
  transform: translateY(-2px); color: inherit;
  border-color: var(--tcc-green-400, #2f8f6a);
  box-shadow: 0 6px 16px rgba(10, 53, 36, .1);
}
.slip-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px dashed var(--border-strong, #ccd8cc);
}
.slip-code {
  font-family: var(--font-mono, monospace);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  color: var(--tcc-green-800, #0d4530);
}
.slip-date { font-size: .72rem; color: var(--text-secondary, #5a6e62); }
.slip-body { display: flex; align-items: center; gap: 14px; }
.slip-main { flex: 1; min-width: 0; }
.slip-title { font-size: .88rem; font-weight: 650; }
.slip-sub { font-size: .74rem; color: var(--text-secondary, #5a6e62); margin-top: 2px; }
.slip-status { flex-shrink: 0; }
.slip-arrow { color: var(--text-secondary, #5a6e62); flex-shrink: 0; }

@media (max-width: 575.98px) {
  .acct-id { padding: 18px 16px; }
  .acct-stats {
    width: 100%; border-left: 0; padding-left: 0;
    border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px;
    gap: 0;
  }
  .acct-stat { flex: 1; }
  .acct-stat-l { font-size: .58rem; }
  .acct-tabs { width: 100%; }
  .acct-tab { flex: 1; justify-content: center; padding: 11px 4px; font-size: .72rem; gap: 4px; min-width: 0; }
  .acct-tab-end { margin-left: 0; }
  .acct-tab i { display: none; }
}

/* Portal breadcrumb strip */
.portal-crumbs {
  background: #fff; border-bottom: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
}

/* Large tracking-code search input */
.track-input {
  border-radius: 10px !important;
  border: 2px solid var(--tcc-green-200) !important;
  text-transform: uppercase;
}
.track-input:focus { border-color: var(--tcc-green-600) !important; }

/* Tracking */
.tracking-code-display {
  background: linear-gradient(135deg, var(--tcc-green-800), var(--tcc-green-600));
  color: #fff; border-radius: 14px; padding: 20px 24px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--shadow-sm);
  border-bottom: 3px solid var(--tcc-gold-500);
}
.tracking-code-display .code {
  font-family: var(--font-mono);
  font-size: 1.45rem; font-weight: 700; letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.qr-container {
  background: #fff; border: 1px solid var(--border);
  border-top: 3px solid var(--tcc-gold-400);
  border-radius: 14px; padding: 16px; display: inline-block;
  box-shadow: var(--shadow-md);
}

/* QR Code output */
#qrcode-output canvas,
#qrcode-output img,
[id^="qrcode-"] canvas,
[id^="qrcode-"] img { display: block; margin: 0 auto; }

/* Scan area */
.scan-area {
  border: 2px dashed var(--tcc-green-200); border-radius: 14px;
  padding: 24px; text-align: center;
  background: var(--tcc-green-50);
}

/* Portal footer */
.portal-footer {
  background: var(--tcc-green-900);
  color: rgba(255,255,255,.7);
  border-top: 3px solid var(--tcc-gold-500);
}
.portal-footer .container { padding-inline: 20px; }
.portal-footer .small { font-size: .85rem; }
.portal-footer a.btn-outline-light { border-color: rgba(255,255,255,.3); }
.portal-footer a.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }

/* Auth / standalone pages */
.page-shell {
  min-height: 100vh;
  background: var(--bg-app);
  display: flex; flex-direction: column;
}
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 40px 0;
  background:
    radial-gradient(ellipse 60% 45% at 85% 0%, rgba(201,162,39,.14), transparent),
    linear-gradient(150deg, var(--tcc-green-50) 0%, var(--bg-app) 55%, var(--tcc-gold-50) 100%);
}
.auth-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  background: var(--surface);
  overflow: hidden;
}
.auth-brand {
  background: linear-gradient(140deg, var(--tcc-green-800), var(--tcc-green-950));
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  border-bottom: 3px solid var(--tcc-gold-500);
}
.auth-brand img {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; background: #fff;
  border: 3px solid rgba(232, 207, 122, .55);
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.auth-brand-icon {
  width: 72px; height: 72px; margin-bottom: 12px;
  background: rgba(255,255,255,.14); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════════════════════
   PROGRESS STEPS  (used in track.php for submission progress)
   ════════════════════════════════════════════════════════════ */
.progress-steps {
  display: flex; align-items: flex-start;
  overflow-x: auto; padding: 4px 0 16px;
  scrollbar-width: thin;
}
.prog-step {
  flex: 1; min-width: 80px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.prog-step::after {
  content: ''; position: absolute; top: 18px; left: 50%;
  width: 100%; height: 3px; background: var(--border); z-index: 0;
}
.prog-step:last-child::after { display: none; }
.prog-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: #dfe7de; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
  position: relative; z-index: 1;
  transition: all .4s; border: 2px solid transparent;
}
.prog-step.done  .prog-circle { background: var(--c-success); color: #fff; border-color: var(--c-success); }
.prog-step.done::after { background: var(--c-success); }
.prog-step.active .prog-circle {
  background: var(--tcc-green-700); color: #fff;
  border-color: var(--tcc-green-700);
  animation: stepPulse 2.2s ease-out infinite;
}
@keyframes stepPulse {
  0%   { box-shadow: 0 0 0 0 rgba(17,85,64,.35); }
  70%  { box-shadow: 0 0 0 9px rgba(17,85,64,0); }
  100% { box-shadow: 0 0 0 0 rgba(17,85,64,0); }
}
@media (prefers-reduced-motion: reduce) {
  .prog-step.active .prog-circle { animation: none; box-shadow: 0 0 0 5px rgba(17,85,64,.15); }
}
.prog-step.neg .prog-circle { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.prog-label { font-size: .68rem; color: var(--text-muted); margin-top: 8px; text-align: center; line-height: 1.3; font-weight: 500; white-space: nowrap; }
.prog-step.done   .prog-label { color: var(--c-success); font-weight: 600; }
.prog-step.active .prog-label { color: var(--tcc-green-700); font-weight: 700; }
.prog-step.neg    .prog-label { color: var(--c-danger); font-weight: 600; }

/* Tracking info table */
.info-table tr { border-bottom: 1px solid #eff3ec; }
.info-table tr:last-child { border-bottom: 0; }
.info-table td {
  padding: 8px 0; border: none; font-size: .875rem; vertical-align: top;
}
.info-table td:first-child { color: var(--text-secondary); width: 44%; padding-right: 12px; font-size: .8rem; }
.info-table td:last-child { font-weight: 500; color: var(--text); }

/* ════════════════════════════════════════════════════════════
   BACK BUTTON  (consistent style across all pages)
   ════════════════════════════════════════════════════════════ */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: .82rem; font-weight: 550;
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-back:hover { background: #e6ece2; color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.btn-back i { font-size: .8rem; }

/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ════════════════════════════════════════════════════════════ */
.toast-container-fixed {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}

/* ════════════════════════════════════════════════════════════
   CONFIRM DIALOG OVERLAY
   ════════════════════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(6, 25, 17, .5);
  backdrop-filter: blur(2px);
  z-index: 2000; display: none;
  align-items: center; justify-content: center;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: #fff; border-radius: 16px;
  padding: 28px 28px 22px; max-width: 400px; width: 92%;
  box-shadow: var(--shadow-lg);
  animation: confirmIn .2s var(--ease-out);
}
@keyframes confirmIn {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.confirm-box h6 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.confirm-box p  { font-size: .875rem; color: var(--text-secondary); margin-bottom: 20px; }
.confirm-box .confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ════════════════════════════════════════════════════════════
   APPLICANT CARD (view_registration)
   ════════════════════════════════════════════════════════════ */
.applicant-card .content-card-body { padding-top: 1.25rem; }
.applicant-row {
  display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
}
.applicant-photo { flex-shrink: 0; }
.ap-photo-btn {
  display: block; border: 0; padding: 0; background: none; cursor: zoom-in;
  border-radius: 10px;
}
.ap-photo-btn img {
  width: 108px; height: 108px; object-fit: cover; display: block;
  border-radius: 10px;
  border: 3px solid var(--tcc-gold-300, #e8cf7a);
  box-shadow: 0 4px 14px rgba(10, 53, 36, .14);
  transition: transform .18s var(--ease-out, ease), box-shadow .18s ease;
}
.ap-photo-btn:hover img {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 22px rgba(10, 53, 36, .2);
}
.ap-photo-empty {
  width: 108px; height: 108px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-subtle, #f7f9f4);
  border: 1.5px dashed var(--border-color, #d7e0d5);
  color: var(--text-secondary, #5a6e62);
  font-weight: 800; font-size: 1.6rem; letter-spacing: .04em;
}
.applicant-main { flex: 1; min-width: 220px; }
.ap-name {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--text-primary, #12261c); line-height: 1.15;
}
.ap-prog {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 10px;
}
.ap-prog .badge { font-weight: 600; letter-spacing: .03em; }
.ap-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-secondary, #5a6e62);
}
.ap-meta i { color: var(--tcc-green-600, #176849); }
.applicant-status {
  margin-left: auto; text-align: right; flex-shrink: 0;
  padding-left: 14px; border-left: 1px dashed var(--border-color, #d7e0d5);
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.ap-status-label {
  font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-secondary, #5a6e62);
}
.ap-status-date { font-size: .75rem; color: var(--text-secondary, #5a6e62); }

/* Student topbar context (page title + date) */
.stu-topbar-context { display: flex; flex-direction: column; min-width: 0; }
.stu-topbar-title {
  font-size: .95rem; font-weight: 700; color: var(--text-primary, #12261c);
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stu-topbar-sub {
  font-size: .72rem; color: var(--text-secondary, #5a6e62); margin-top: 1px;
}

/* Student dashboard — hero + quick tiles */
.stu-hero {
  background: var(--tcc-green-950, #052317); color: #fff;
  border-radius: 16px; padding: 22px 24px; margin-bottom: 18px;
  border-top: 4px solid var(--tcc-gold-500, #c9a227);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.stu-hero-label {
  font-size: .66rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tcc-gold-400, #d9b945);
  margin-bottom: 6px;
}
.stu-hero-name {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em;
  margin: 0 0 4px; color: #fff;
}
.stu-hero-meta { font-size: .82rem; color: rgba(255,255,255,.72); }
.stu-hero-no {
  margin-left: auto; font-size: .8rem; font-weight: 700;
  color: var(--tcc-gold-300, #e8cf7a); letter-spacing: .05em;
  border: 1px dashed rgba(217,185,69,.45); border-radius: 8px; padding: 8px 14px;
}
.quick-tile {
  display: flex; align-items: center; gap: 13px; height: 100%;
  background: #fff; border: 1px solid var(--border, #e2e8e0);
  border-radius: 14px; padding: 15px 16px;
  text-decoration: none; color: inherit;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.quick-tile:hover {
  transform: translateY(-2px); color: inherit;
  border-color: var(--tcc-green-400, #2f8f6a);
  box-shadow: 0 8px 20px rgba(10, 53, 36, .1);
}
.quick-tile-ico {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--tcc-green-800, #0d4530); color: var(--tcc-gold-300, #e8cf7a);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.quick-tile-label { font-size: .88rem; font-weight: 700; color: var(--text-primary, #12261c); }
.quick-tile-sub { font-size: .74rem; color: var(--text-secondary, #5a6e62); margin-top: 1px; }

/* ── Track page ── */
.track-btn { border-radius: 10px; white-space: nowrap; }
.track-help { padding: 18px 16px; }
.track-help .quick-tile-sub { line-height: 1.45; margin-top: 3px; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.show { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.25); }
  .main-content { margin-left: 0; }
  .applicant-status {
    margin-left: 0; padding-left: 0; border-left: 0;
    text-align: left; align-items: flex-start;
    border-top: 1px dashed var(--border-color, #d7e0d5);
    padding-top: 12px; width: 100%;
  }
  .ap-photo-btn img, .ap-photo-empty { width: 88px; height: 88px; }
  .topbar .btn-sidebar-toggle { display: flex !important; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(6, 25, 17, .5); z-index: 1039;
  }
  .sidebar-overlay.show { display: block; }
  .detail-item { flex: 0 0 100%; }
  .page-content { padding: 16px; }
  .page-header { margin-bottom: 16px; }
  .filter-bar { padding: 12px 14px; }
}

@media (max-width: 767.98px) {
  .portal-hero { padding: 48px 0 76px; }
  .progress-steps { justify-content: flex-start; }
  .step-progress  { overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; }
  .content-card-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }
}

@media (max-width: 575.98px) {
  .stat-card { padding: 14px 16px; gap: 10px; }
  .stat-icon { width: 42px; height: 42px; font-size: 1.15rem; }
  .stat-info .stat-value { font-size: 1.45rem; }
  .topbar { padding: 0 14px; }
  .page-content { padding: 12px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ── Print ── */
@media print {
  /* Long bond paper (Philippine legal) */
  @page { size: 8.5in 14in; margin: 12mm 14mm; }
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: 10pt; background: #fff !important; }

  .sidebar, .topbar, .btn, .filter-bar, nav,
  .page-header-actions, .sidebar-overlay, .status-tabs,
  .page-loader, .modal, .modal-backdrop, .dropdown,
  #docViewModal, iframe { display: none !important; }

  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; animation: none !important; }
  .dashboard-wrapper { display: block; }

  /* Cards → document sections */
  .content-card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .content-card-header {
    padding: 8px 14px !important;
    background: #f2f5f2 !important;
    border-bottom: 1px solid #bbb !important;
  }
  .content-card-header h5 { font-size: .78rem !important; text-transform: uppercase; letter-spacing: .05em; }
  .content-card-body { padding: 12px 14px !important; }
  .alert { border: 1px solid #ccc !important; background: #f5f5f5 !important; }
  .badge, .status-badge, .badge-soft-success, .badge-soft-secondary {
    border: 1px solid #666 !important; background: #fff !important; color: #000 !important;
  }
  .table { font-size: 9pt; }
  .table th { background: #f2f5f2 !important; color: #333 !important; font-size: 8pt; text-transform: uppercase; letter-spacing: .04em; }
  .detail-row, .detail-item { break-inside: avoid; }
  .detail-item { flex: 0 0 50% !important; padding: 7px 14px 7px 0 !important; }
  .detail-item.full { flex: 0 0 100% !important; }

  /* QR block prints clean */
  .qr-container img, .qr-container canvas, .qr-container table { margin: 0 auto; }

  /* ── Print-only header / footer ── */
  .print-header {
    border-bottom: 3px double var(--tcc-green-800);
    padding-bottom: 10px; margin-bottom: 14px;
  }
  .ph-brand { display: flex; align-items: center; gap: 12px; }
  .ph-seal { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
  .ph-school { font-size: 15pt; font-weight: 800; color: var(--tcc-green-900); letter-spacing: -.01em; }
  .ph-addr { font-size: 8pt; color: #555; margin-top: 1px; }
  .ph-meta { margin-left: auto; text-align: right; }
  .ph-photo {
    width: 52px; height: 52px; object-fit: cover;
    border: 1px solid #999; border-radius: 3px; display: inline-block;
  }
  .ph-doc { font-size: 9pt; font-weight: 700; letter-spacing: .09em; color: #333; }
  .ph-code { font-family: var(--font-mono); font-weight: 700; font-size: 10.5pt; margin-top: 2px; }
  .ph-date { font-size: 7.5pt; color: #666; margin-top: 2px; }

  /* Tabular report (master list print) */
  .report-filters { font-size: 8pt; color: #555; margin-bottom: 8px; font-family: var(--font-mono); }
  .report-table {
    width: 100%; border-collapse: collapse; font-size: 8.5pt;
    page-break-inside: auto;
  }
  .report-table thead { display: table-header-group; }
  .report-table th {
    border: 1px solid #888; background: #eef1ec !important;
    padding: 5px 6px; font-size: 7.5pt; text-transform: uppercase;
    letter-spacing: .05em; color: #333;
  }
  .report-table td {
    border: 1px solid #aaa; padding: 4px 6px;
    vertical-align: top; break-inside: avoid;
  }
  .report-table td.num { text-align: right; color: #666; }
  .report-table td.mono { font-family: var(--font-mono); font-size: 8pt; }
  .report-table tbody tr:nth-child(even) td { background: #f6f8f5 !important; }

  .print-footer { margin-top: 26px; }
  .pf-row { display: flex; gap: 80px; margin-bottom: 12px; }
  .pf-sig { flex: 1; text-align: center; font-size: 8pt; color: #333; }
  .pf-line { border-top: 1px solid #000; margin-bottom: 4px; height: 30px; }
  .pf-note {
    text-align: center; font-size: 7.5pt; color: #666;
    border-top: 1px solid #ccc; padding-top: 6px;
    font-family: var(--font-mono);
  }
}

/* ═══════════════════════════════════════════════════════════
   Landing Page (student/index.php)
   ═══════════════════════════════════════════════════════════ */

/* Hero — light, airy, subtle blueprint grid */
.lp-hero {
  position: relative;
  display: flex; align-items: center;
  min-height: calc(100vh - 67px); /* full screen minus portal nav (64px + 3px border) */
  padding: 88px 0 96px;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(201,162,39,.10), transparent 60%),
    radial-gradient(700px 340px at 85% 10%, rgba(30,125,86,.10), transparent 60%),
    linear-gradient(180deg, #f7faf7 0%, var(--tcc-green-50) 100%);
  overflow: hidden;
}
.lp-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(17,85,64,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,85,64,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.lp-hero .container { position: relative; z-index: 2; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tcc-green-900); color: var(--tcc-gold-300);
  font-size: .76rem; font-weight: 600; letter-spacing: .02em;
  padding: 7px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(5,35,23,.18);
}
.hero-pill i { font-size: .8rem; }

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.06;
  color: var(--tcc-green-950);
  margin: 22px auto 18px; max-width: 780px;
}
.hero-title .accent {
  color: var(--tcc-green-600);
  position: relative; white-space: nowrap;
}
.hero-title .accent::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 6px;
  height: 10px; background: var(--tcc-gold-300); z-index: -1;
  border-radius: 3px; opacity: .55;
}
.hero-sub {
  font-size: 1.08rem; color: var(--text-muted);
  max-width: 620px; margin: 0 auto 36px;
}

/* Big track box — the hero's focal input */
.hero-box {
  display: flex; align-items: center; gap: 4px;
  max-width: 620px; margin: 0 auto;
  background: #fff; border-radius: 16px;
  border: 1px solid var(--border);
  padding: 8px; box-shadow: 0 18px 44px rgba(5,35,23,.12);
}
.hero-box > i { color: var(--text-muted); font-size: 1.1rem; padding: 0 8px 0 14px; }
.hero-box input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: .95rem; padding: 12px 6px; min-width: 0;
  font-family: var(--font-mono); text-transform: uppercase;
}
.hero-box input::placeholder { font-family: var(--font-body); text-transform: none; color: #a8b8ae; }
.hero-box .btn { border-radius: 11px; padding: 12px 24px; font-weight: 700; white-space: nowrap; }

.hero-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 22px;
}

/* Floating glass chips — decorative product nod on the hero */
.hero-float {
  position: absolute; z-index: 1;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(17,85,64,.14);
  border-radius: 13px; padding: 10px 14px;
  box-shadow: 0 14px 34px rgba(5,35,23,.12);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  color: var(--tcc-green-800); letter-spacing: .02em;
  animation: floaty 7s ease-in-out infinite;
}
.hero-float i { color: var(--tcc-gold-600); font-size: .95rem; }
.hero-float small {
  display: block; font-family: var(--font-body); font-size: .6rem;
  font-weight: 600; color: var(--text-muted); letter-spacing: .04em;
}
.hero-float.left  { left: 4%;  top: 24%; transform: rotate(-4deg); animation-delay: .8s, .85s; }
.hero-float.right { right: 4%; top: 34%; transform: rotate(3.5deg); animation-delay: 0s, 1s; }
.hero-float.left2 { left: 7%; bottom: 16%; transform: rotate(3deg); animation-delay: 1.6s, 1.15s; }
.hero-float.right2 { right: 6%; bottom: 22%; transform: rotate(-3deg); animation-delay: 2.4s, 1.3s; }
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}
@media (max-width: 1199.98px) { .hero-float { display: none; } }

/* Trust row under the chips */
.hero-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px;
  margin-top: 30px;
}
.hero-trust span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 550; color: var(--text-muted);
}
.hero-trust i { color: var(--tcc-green-600); font-size: .8rem; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--border);
  color: var(--text-body); font-size: .8rem; font-weight: 550;
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  transition: border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.lp-chip i { color: var(--tcc-green-600); font-size: .85rem; }
.lp-chip:hover {
  border-color: var(--tcc-green-500); color: var(--tcc-green-700);
  transform: translateY(-1px); box-shadow: 0 6px 16px rgba(5,35,23,.08);
}

/* Stats strip */
.lp-stats { padding: 40px 0; background: #fff; border-bottom: 1px solid var(--border); }
.lp-stat { text-align: center; }
.lp-stat-num {
  font-size: 2rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--tcc-green-800); font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.lp-stat-num .plus { color: var(--tcc-gold-600); }
.lp-stat-label {
  font-size: .76rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em; margin-top: 4px;
}

/* Sections */
.lp-section { padding: 76px 0; }
.lp-section.alt { background: #fff; }
.lp-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--tcc-gold-600); margin-bottom: 12px;
}
.lp-title {
  font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 800;
  letter-spacing: -0.025em; color: var(--tcc-green-950);
  margin-bottom: 10px;
}
.lp-sub { color: var(--text-muted); max-width: 560px; margin: 0 auto 44px; }

/* Feature cards (icon-tile grid) */
.feature-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 24px; height: 100%;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-4px); border-color: var(--tcc-green-200);
  box-shadow: 0 16px 34px rgba(5,35,23,.09);
}
.feat-tile {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 16px;
}
.feat-tile.green  { background: var(--tcc-green-100); color: var(--tcc-green-700); }
.feat-tile.gold   { background: var(--tcc-gold-100);  color: var(--tcc-gold-600); }
.feat-tile.teal   { background: #d7f0f3; color: #0e7490; }
.feat-tile.purple { background: #ede9fe; color: #6d28d9; }
.feat-tile.orange { background: #fdeeda; color: #b45309; }
.feat-tile.red    { background: #fde8e8; color: #b91c1c; }
.feature-card h5 { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.feature-card p  { color: var(--text-muted); font-size: .85rem; margin-bottom: 18px; flex: 1; }
.feat-link {
  font-size: .82rem; font-weight: 650; color: var(--tcc-green-700);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.feat-link i { transition: transform .18s; }
.feat-link:hover { color: var(--tcc-green-800); }
.feat-link:hover i { transform: translateX(3px); }

/* How-it-works step cards */
.hiw-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 22px; height: 100%; position: relative;
  transition: transform .2s, box-shadow .2s;
}
.hiw-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(5,35,23,.08); }
.hiw-step-num {
  position: absolute; top: 18px; right: 20px;
  font-size: 2.1rem; font-weight: 800; line-height: 1;
  color: var(--tcc-green-100); -webkit-text-stroke: 1px var(--tcc-green-200);
}
.hiw-card .feat-tile { margin-bottom: 14px; }
.hiw-card h6 { font-weight: 700; margin-bottom: 6px; }
.hiw-card p  { color: var(--text-muted); font-size: .82rem; margin: 0; }

/* Document picker tiles */
.doc-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 14px 16px; height: 100%; text-align: center;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.doc-tile:hover {
  transform: translateY(-3px); border-color: var(--tcc-green-400);
  box-shadow: 0 10px 24px rgba(5,35,23,.08);
}
.doc-tile-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--tcc-green-50); color: var(--tcc-green-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.doc-tile-name { font-size: .8rem; font-weight: 650; line-height: 1.25; }
.doc-tile-meta { font-size: .68rem; color: var(--text-muted); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 56px 32px; text-align: center;
  background:
    radial-gradient(500px 220px at 85% 15%, rgba(201,162,39,.35), transparent 60%),
    linear-gradient(135deg, var(--tcc-green-900), var(--tcc-green-600) 65%, var(--tcc-green-500));
  color: #fff; box-shadow: 0 24px 50px rgba(5,35,23,.25);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000, transparent 80%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.cta-band p  { color: rgba(255,255,255,.82); max-width: 480px; margin: 0 auto 26px; }
.btn-gold {
  background: var(--tcc-gold-500); color: var(--tcc-green-950);
  border: none; font-weight: 700;
}
.btn-gold:hover, .btn-gold:focus { background: var(--tcc-gold-400); color: var(--tcc-green-950); }
.btn-ghost-light {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.35); font-weight: 600;
}
.btn-ghost-light:hover { background: rgba(255,255,255,.2); color: #fff; }

@media (max-width: 767.98px) {
  .lp-hero { padding: 56px 0 64px; }
  .lp-section { padding: 52px 0; }
  .hero-box { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  .hero-box > i { display: none; }
  .hero-box .btn { width: 100%; }
}

/* ── Scroll reveal (landing sections) — only hidden when JS is alive ── */
.js .reveal {
  opacity: 0; transform: rotate(var(--tilt, 0deg)) translateY(22px);
  transition: opacity .55s cubic-bezier(.22,.68,.32,1), transform .55s cubic-bezier(.22,.68,.32,1);
  transition-delay: var(--rd, 0s);
}
.js .reveal.in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }

/* ── Hero entrance (runs on page load) ── */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero-anim {
  animation: heroUp .7s cubic-bezier(.22,.68,.32,1) backwards;
}
.hero-anim.d0 { animation-delay: .05s; }
.hero-anim.d1 { animation-delay: .14s; }
.hero-anim.d2 { animation-delay: .24s; }
.hero-anim.d3 { animation-delay: .34s; }
.hero-anim.d4 { animation-delay: .44s; }
.hero-anim.d5 { animation-delay: .54s; }
.hero-float { animation: floaty 7s ease-in-out infinite, heroFade .9s ease .65s backwards; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero-float { animation: none; }
  .hero-anim { opacity: 1 !important; animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   Split-screen Auth (staff + student login)
   ═══════════════════════════════════════════════════════════ */
.auth-split {
  display: grid; grid-template-columns: 7fr 3fr;
  min-height: 100vh;
}

/* Left showcase panel */
.auth-show {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 56px 40px; color: #fff;
  background:
    radial-gradient(520px 260px at 90% 8%, rgba(201,162,39,.22), transparent 60%),
    linear-gradient(105deg, rgba(6,38,27,.9) 0%, rgba(13,69,48,.74) 55%, rgba(13,69,48,.42) 100%),
    url('../images/763907380_122117045967389150_4219642318318615129_n.jpg') center 38%/cover no-repeat,
    linear-gradient(150deg, var(--tcc-green-950) 0%, var(--tcc-green-800) 60%, var(--tcc-green-700) 100%);
}
.auth-show::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 20%, transparent 80%);
}
.auth-show > * { position: relative; }
.auth-show-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-show-brand img {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid rgba(232,207,122,.5); background: #fff;
}
.auth-show-brand .name { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.auth-show-brand .sub  { font-size: .68rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .1em; }
.auth-show .lede, .auth-feat .t, .auth-feat .s { text-shadow: 0 1px 8px rgba(4,28,19,.7); }
.auth-show h2 { text-shadow: 0 2px 14px rgba(4,28,19,.75);
  color: #fff;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.15; margin-bottom: 14px;
}
.auth-show h2 .accent { color: var(--tcc-gold-400); }
.auth-show .lede { color: rgba(255,255,255,.75); font-size: .95rem; max-width: 400px; margin-bottom: 32px; }
.auth-feat { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.auth-feat:last-child { margin-bottom: 0; }
.auth-feat-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tcc-gold-300); font-size: 1.05rem;
}
.auth-feat .t { font-weight: 650; font-size: .88rem; }
.auth-feat .s { font-size: .78rem; color: rgba(255,255,255,.62); margin-top: 1px; }
.auth-show-foot {
  margin-top: 34px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .72rem; color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.auth-show-foot .lock { display: inline-flex; align-items: center; gap: 6px; }

/* Showcase copy column */
.auth-show-copy { min-width: 0; max-width: 520px; }

/* Right form panel */
.auth-panel {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(30,125,86,.06), transparent 55%),
    var(--bg-app);
}
.auth-panel::after {
  content: ''; position: absolute; right: -70px; bottom: -70px;
  width: 330px; height: 330px; pointer-events: none;
  background: url('../images/school_logo.png') center/contain no-repeat;
  opacity: .045;
}
.auth-form { position: relative; z-index: 1; margin: auto 0; }
.auth-panel { overflow-y: auto; }

/* Section divider labels inside long forms (register) */
.auth-sec {
  display: flex; align-items: center; gap: 10px;
  font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--text-muted); margin: 18px 0 10px;
}
.auth-sec::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* Slim password strength meter */
.pw-meter {
  height: 5px; border-radius: 3px; background: var(--border); overflow: hidden;
}
.pw-meter > i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  transition: width .3s var(--ease-out), background .3s;
}
.pw-meter-label { font-size: .68rem; font-weight: 650; margin-top: 5px; min-height: 1em; }
.pw-match { font-size: .7rem; margin-top: 4px; min-height: 1em; }

/* Brand shown on the form panel when the showcase is hidden (mobile) */
.auth-mobile-brand {
  display: none; flex-direction: column; align-items: center;
  text-align: center; margin-bottom: 28px;
}
.auth-mobile-brand img {
  width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid var(--tcc-gold-300); background: #fff;
  box-shadow: 0 8px 20px -8px rgba(11,53,36,.35); margin-bottom: 10px;
}
.auth-mobile-brand .name { font-weight: 750; font-size: .95rem; color: var(--tcc-green-900); }
.auth-mobile-brand .sub {
  font-size: .66rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .12em; margin-top: 2px;
}
.auth-form { width: 100%; max-width: 400px; }
.auth-form .eyebrow {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--tcc-gold-600); margin-bottom: 8px;
}
.auth-form h1 {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em;
  color: var(--tcc-green-950); margin-bottom: 6px;
}
.auth-form .sub { color: var(--text-muted); font-size: .88rem; margin-bottom: 30px; }
.auth-form .form-floating > .form-control { border-radius: 12px; }
.auth-form .form-floating > label { color: var(--text-muted); }
.pwd-wrap { position: relative; }
.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  z-index: 5; border: 0; background: transparent; color: var(--text-muted);
  padding: 6px 10px; border-radius: 8px; font-size: .95rem;
}
.pwd-toggle:hover { color: var(--tcc-green-700); background: var(--tcc-green-50); }
.auth-alt {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border);
  text-align: center; font-size: .84rem; color: var(--text-muted);
}
.auth-alt a { font-weight: 650; color: var(--tcc-green-700); text-decoration: none; }
.auth-alt a:hover { color: var(--tcc-green-800); text-decoration: underline; }

/* Entrance animation — form column */
.auth-form > * {
  animation: heroUp .55s cubic-bezier(.22,.68,.32,1) backwards;
}
.auth-form > *:nth-child(1) { animation-delay: .05s; }
.auth-form > *:nth-child(2) { animation-delay: .12s; }
.auth-form > *:nth-child(3) { animation-delay: .19s; }
.auth-form > *:nth-child(4) { animation-delay: .26s; }
.auth-form > *:nth-child(5) { animation-delay: .33s; }
.auth-form > *:nth-child(6) { animation-delay: .40s; }
.auth-form > *:nth-child(7) { animation-delay: .47s; }
.auth-show-brand,
.auth-show-copy > *,
.auth-show-foot {
  animation: heroUp .6s cubic-bezier(.22,.68,.32,1) backwards;
}
.auth-show-copy > *:nth-child(1) { animation-delay: .15s; }
.auth-show-copy > *:nth-child(2) { animation-delay: .25s; }
.auth-show-copy > *:nth-child(3) { animation-delay: .35s; }
.auth-show-copy > *:nth-child(4) { animation-delay: .43s; }
.auth-show-copy > *:nth-child(5) { animation-delay: .51s; }
.auth-show-foot { animation-delay: .6s; }

@media (max-width: 1199.98px) {
  .auth-show { padding: 40px 36px 34px; }
  .auth-show .lede { margin-bottom: 26px; }
}
@media (max-width: 991.98px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-show { display: none; }
  .auth-mobile-brand { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-form > *,
  .auth-show-brand, .auth-show-copy > *,
  .auth-show-visual, .auth-show-foot,
  .auth-chip { opacity: 1 !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Paper Form — TCC-RRMO-FORM-001 style (pre_registration.php)
   ═══════════════════════════════════════════════════════════ */
.paper-form {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-md); overflow: hidden;
}
.pf-head { position: relative; text-align: center; padding: 26px 28px 20px; border-bottom: 1px dashed var(--border-strong); }
.pf-code {
  position: absolute; top: 14px; right: 18px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 650;
  color: var(--text-muted); letter-spacing: .08em;
}
.pf-seal { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--tcc-gold-300); margin-bottom: 8px; }
.pf-school { font-weight: 800; font-size: 1.2rem; color: var(--tcc-green-900); letter-spacing: -.01em; }
.pf-addr { font-size: .7rem; color: var(--text-secondary); }
.pf-title { font-weight: 800; letter-spacing: .1em; font-size: .92rem; margin-top: 12px; color: var(--tcc-green-950); }
.adm-type { display: flex; gap: 22px; flex-wrap: wrap; font-size: .82rem; padding-top: 10px; align-items: center; }
.adm-type .form-check-input { border-radius: 3px; border-width: 1.5px; }
.adm-type .form-check-label { font-size: .78rem; font-weight: 600; color: var(--text-secondary); }
.pf-body { padding: 20px 30px 30px; }

/* Green section bars like the printed form */
.sec-bar {
  background: linear-gradient(90deg, var(--tcc-green-800), var(--tcc-green-600));
  color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 7px;
  margin: 24px 0 16px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.sec-bar:first-child { margin-top: 0; }
.sec-bar-sub { font-weight: 500; letter-spacing: .06em; text-transform: none; opacity: .75; }

/* Numbered field labels matching the form's item numbers */
.f-label { font-size: .78rem; font-weight: 650; color: var(--text); margin-bottom: 8px; }
.fnum { color: var(--tcc-gold-600); font-weight: 800; margin-right: 3px; }
.fam-grid .fnum { color: var(--tcc-gold-600); }

/* Instructions box */
.instruct {
  font-size: .68rem; color: var(--text-secondary);
  background: var(--surface-warm); border: 1px solid var(--tcc-gold-100);
  border-radius: 8px; padding: 12px 16px; margin-top: 16px; line-height: 1.7;
}
.instruct b { color: var(--tcc-gold-700); margin-right: 2px; }

/* Family / schools grids */
.fam-grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.fam-grid th {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); font-weight: 700; padding: 6px 10px;
  border-bottom: 1px solid var(--border-strong);
}
.fam-grid td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fam-grid tbody tr:last-child td { border-bottom: 0; }
.fam-grid td:first-child { width: 190px; }
.life-check { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 500; color: var(--text-secondary); }

/* Photo upload box (2x2) */
.photo-box {
  border: 1.5px dashed var(--border-strong); border-radius: 12px;
  min-height: 190px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--text-muted); font-size: .75rem; text-align: center;
  padding: 14px; background: var(--surface-subtle); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
@media (hover: hover) {
  .photo-box:hover { border-color: var(--tcc-green-500); background: var(--tcc-green-50); }
}
.photo-box img { max-width: 110px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.photo-box small { font-size: .64rem; color: var(--text-muted); }

/* Certification footer */
.pf-foot { border-top: 1px dashed var(--border-strong); margin-top: 24px; padding-top: 20px; }

/* ═══════════════════════════════════════════════════════════
   Page-load entrance — staggered rise on every page
   Staff/registrar: .page-content children
   Portal pages:    .container.py-4 / .py-5 children
   (Landing page has its own hero/reveal system; auth pages
   use .auth-anim — both are intentionally excluded.)
   ═══════════════════════════════════════════════════════════ */
@keyframes pgRise {
  from { opacity: 0; transform: translateY(14px); }
}
/* Entrance waits for .loaded so the page loader can't cover it */
html.js:not(.loaded) .page-content > *,
html.js:not(.loaded) .container.py-4 > *,
html.js:not(.loaded) .container.py-5 > * { opacity: 0; }
html.js.loaded .page-content > *,
html.js.loaded .container.py-4 > *,
html.js.loaded .container.py-5 > * {
  animation: pgRise .55s var(--ease-out) backwards;
}
html.js.loaded .page-content > *:nth-child(2),
html.js.loaded .container.py-4 > *:nth-child(2),
html.js.loaded .container.py-5 > *:nth-child(2) { animation-delay: .05s; }
html.js.loaded .page-content > *:nth-child(3),
html.js.loaded .container.py-4 > *:nth-child(3),
html.js.loaded .container.py-5 > *:nth-child(3) { animation-delay: .10s; }
html.js.loaded .page-content > *:nth-child(4),
html.js.loaded .container.py-4 > *:nth-child(4),
html.js.loaded .container.py-5 > *:nth-child(4) { animation-delay: .15s; }
html.js.loaded .page-content > *:nth-child(5),
html.js.loaded .container.py-4 > *:nth-child(5),
html.js.loaded .container.py-5 > *:nth-child(5) { animation-delay: .20s; }
html.js.loaded .page-content > *:nth-child(6),
html.js.loaded .container.py-4 > *:nth-child(6),
html.js.loaded .container.py-5 > *:nth-child(6) { animation-delay: .25s; }
html.js.loaded .page-content > *:nth-child(n+7),
html.js.loaded .container.py-4 > *:nth-child(n+7),
html.js.loaded .container.py-5 > *:nth-child(n+7) { animation-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
  html.js .page-content > *,
  html.js .container.py-4 > *,
  html.js .container.py-5 > * { opacity: 1 !important; animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Component polish — pass 2
   ═══════════════════════════════════════════════════════════ */

/* Alerts slide in when they appear (flash messages, notices) */
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
}
html.js .page-content .alert,
html.js .container .alert {
  animation: alertIn .4s var(--ease-out) backwards;
}

/* Consistent keyboard focus ring (inputs keep their box-shadow ring) */
a:focus-visible, button:focus-visible, .btn:focus-visible,
.nav-link:focus-visible, .ui-code:focus-visible, summary:focus-visible {
  outline: 2px solid var(--tcc-green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Detail-label gets a tick accent on hover for scannability */
@media (hover: hover) {
  .detail-item:hover .detail-label { color: var(--tcc-green-700); }
}

@media (prefers-reduced-motion: reduce) {
  html.js .page-content .alert,
  html.js .container .alert { animation: none !important; }
  .form-check-input:checked { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Page Loader — school seal + spinning progress arc
   Shown on first paint, dismissed by JS on window.load.
   CSS fallback (plAutoHide) guarantees it never traps the page.
   ═══════════════════════════════════════════════════════════ */
.page-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(900px 500px at 50% 38%, var(--tcc-green-50), var(--bg-app) 70%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  transition: opacity .45s var(--ease-out);
  animation: plAutoHide .5s ease 5s forwards;   /* no-JS safety */
}
.page-loader.done {
  opacity: 0; pointer-events: none;
  animation: none;
}
.page-loader.done .pl-ring { transform: scale(1.06); }

/* ── Ring: single gold arc around the seal ── */
.pl-ring {
  position: relative; width: 96px; height: 96px;
  transition: transform .45s var(--ease-out);
}
.pl-ring svg.pl-arc-svg {
  position: absolute; inset: 0;
  transform: rotate(-90deg);
}
.pl-arc {
  fill: none; stroke: var(--tcc-gold-500); stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 60 216;              /* ~22% arc of r=44 */
  animation: plSpin 1.15s cubic-bezier(.45,.1,.55,.9) infinite;
  transform-origin: center;
}
@keyframes plSpin {
  to { transform: rotate(360deg); }
}
/* faint inner track */
.pl-track {
  fill: none; stroke: var(--tcc-green-100); stroke-width: 4;
}
/* the seal */
.pl-logo {
  position: absolute; inset: 22px;
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; background: #fff;
  box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(16,40,28,.14);
}

/* caption */
.pl-text {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
}
.pl-text b { color: var(--tcc-green-700); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .pl-arc { animation-duration: 2.4s; }
}

/* ── Compact how-it-works strip (landing) ── */
.hiw-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 26px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 26px 34px;
  box-shadow: var(--shadow-sm);
}
.hiw-strip-item { display: flex; align-items: center; gap: 14px; }
.hiw-strip-item b { font-size: .9rem; font-weight: 700; color: var(--text); }
.hiw-strip-item span { font-size: .78rem; color: var(--text-secondary); }
.hiw-num {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--tcc-green-700), var(--tcc-green-900));
  color: var(--tcc-gold-300); font-weight: 800; font-size: .95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), var(--shadow-sm);
}
.hiw-arrow { color: var(--tcc-gold-500); font-size: 1.05rem; }
@media (max-width: 767.98px) {
  .hiw-strip { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 22px; }
  .hiw-arrow { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Shadcn-style dashboard widgets
   ═══════════════════════════════════════════════════════════ */

/* KPI card — label + delta chip / big number / trend caption */
.kpi-card {
  display: block; height: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
@media (hover: hover) {
  a.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label {
  font-size: .72rem; font-weight: 650; color: var(--text-secondary);
  letter-spacing: .01em;
}
.kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.kpi-delta i { font-size: .62rem; }
.kpi-delta.up   { background: #e7f5ec; color: #177a4c; border-color: #bfe4cd; }
.kpi-delta.down { background: #fdeaea; color: #c0362c; border-color: #f3c9c5; }
.kpi-delta.flat { background: #eef1ee; color: var(--text-secondary); border-color: #dde3de; }
.kpi-value {
  font-size: 1.9rem; font-weight: 780; letter-spacing: -.03em;
  color: var(--text); line-height: 1.15; margin: 8px 0 10px;
  font-variant-numeric: tabular-nums;
}
.kpi-trend { font-size: .74rem; color: var(--text-secondary); font-weight: 550; }
.kpi-trend i { color: var(--tcc-green-600); margin-right: 3px; }

/* Chart card — segmented range tabs top-right */
.chart-card .content-card-body { padding: 18px 20px 12px; }
.chart-tabs {
  display: inline-flex; gap: 2px;
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-radius: 9px; padding: 3px;
}
.chart-tabs button {
  border: 0; background: transparent; border-radius: 7px;
  font-size: .72rem; font-weight: 600; color: var(--text-secondary);
  padding: 5px 12px; cursor: pointer; transition: all .15s;
}
.chart-tabs button:hover { color: var(--text); }
.chart-tabs button.active {
  background: var(--surface); color: var(--text); font-weight: 700;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.chart-wrap { position: relative; height: 300px; }
@media (max-width: 767.98px) { .chart-wrap { height: 220px; } }

/* Chart legends + donut center label */
.legend-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 3px;
  margin-right: 7px; vertical-align: 1px; flex: 0 0 auto;
}
.chart-legend { list-style: none; margin: 0; padding: 0; }
.chart-legend li {
  display: flex; align-items: center; gap: 2px;
  padding: 7px 2px; font-size: .82rem;
  border-bottom: 1px solid var(--border);
}
.chart-legend li:last-child { border-bottom: 0; }
.chart-legend .legend-label { flex: 1; color: var(--text-secondary); font-weight: 550; }
.chart-legend .legend-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-legend .legend-val em { font-style: normal; font-weight: 500; color: var(--text-muted); margin-left: 5px; font-size: .74rem; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.donut-center strong { font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.donut-center span { font-size: .68rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }

/* Tabbed table card (Registrations / Documents) */
.tbl-tabs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.tbl-tabs .ttab {
  border: 0; background: transparent; border-radius: 8px;
  font-size: .8rem; font-weight: 600; color: var(--text-secondary);
  padding: 7px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.tbl-tabs .ttab:hover { color: var(--text); background: rgba(255,255,255,.7); }
.tbl-tabs .ttab.active {
  background: var(--surface); color: var(--text); font-weight: 700;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.tbl-tabs .ttab .count {
  font-size: .62rem; font-weight: 700; border-radius: 999px;
  padding: 1px 7px; background: var(--tcc-green-100); color: var(--tcc-green-800);
}
.tbl-tabs .ttab.active .count { background: var(--tcc-green-700); color: #fff; }
.tbl-tabs .ttab-spacer { flex: 1; }
.tbl-pane { display: none; }
.tbl-pane.show { display: block; }
.tbl-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--border);
  font-size: .74rem; color: var(--text-muted);
}

/* Dashboard loader covers only the content area — sidebar/topbar persistent */
.page-loader.dash-loader {
  position: fixed;
  left: var(--sidebar-width);
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  inset: var(--topbar-height) 0 0 var(--sidebar-width);
}
@media (max-width: 991.98px) {
  .page-loader.dash-loader { inset: var(--topbar-height) 0 0 0; }
}

/* ── Topbar enhancements ── */
/* Gold accent seam under the bar */
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg,
    var(--tcc-green-600) 0%, var(--tcc-green-500) 45%,
    var(--tcc-gold-500) 100%);
  opacity: .55;
  pointer-events: none;
}
.topbar { box-shadow: 0 1px 8px rgba(17,43,29,.04); }

/* Global search */
.topbar-search {
  align-items: center; gap: 9px;
  height: 38px; padding: 0 12px 0 14px;
  flex: 1 1 320px; max-width: 540px; margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.topbar-search:focus-within {
  background: var(--surface);
  border-color: var(--tcc-green-400);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
  color: var(--tcc-green-600);
}
.topbar-search i { font-size: .85rem; flex-shrink: 0; }
.topbar-search input {
  border: 0; outline: 0; background: none; flex: 1; min-width: 0;
  font-size: .84rem; color: var(--text);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search kbd {
  font-family: inherit; font-size: .65rem; line-height: 1;
  padding: 3px 5px; border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted);
  flex-shrink: 0;
}

/* Theme switch (light ↔ dark) */
.theme-switch {
  border: 0; background: none; padding: 0; cursor: pointer; flex-shrink: 0;
}
.ts-track {
  display: flex; align-items: center;
  width: 42px; height: 24px; border-radius: 999px;
  background: #e3e9e2; border: 1px solid var(--border-strong);
  padding: 2px;
  transition: background var(--transition), border-color var(--transition);
}
.ts-knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); color: var(--tcc-gold-600);
  display: flex; align-items: center; justify-content: center;
  font-size: .55rem;
  box-shadow: 0 1px 3px rgba(16,40,28,.25);
  transform: translateX(0);
  transition: transform .22s var(--ease-out), background var(--transition), color var(--transition);
}
html[data-theme="dark"] .ts-track { background: var(--tcc-green-800); border-color: var(--tcc-green-600); }
html[data-theme="dark"] .ts-knob  { transform: translateX(18px); background: #122019; color: var(--tcc-gold-400); }
.theme-switch:focus-visible .ts-track { box-shadow: 0 0 0 3px rgba(45,106,79,.2); }

/* Bare avatar button */
.topbar-avatar-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  border-radius: 50%; flex-shrink: 0; line-height: 0;
  transition: box-shadow var(--transition);
}
.topbar-avatar-btn:hover { box-shadow: 0 0 0 3px var(--tcc-green-200); }
.topbar-avatar-btn:focus-visible { box-shadow: 0 0 0 3px rgba(45,106,79,.3); outline: none; }

/* Pulsing notification dot */
.notif-dot.pulse::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--c-danger);
  opacity: .6;
  animation: notifPing 1.8s ease-out infinite;
}
@keyframes notifPing {
  0%   { transform: scale(.5); opacity: .7; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* User button avatar ring on hover */
.topbar-avatar-btn .avatar-circle { transition: box-shadow var(--transition); }

@media (prefers-reduced-motion: reduce) {
  .notif-dot.pulse::before { animation: none; opacity: 0; }
}

/* ── Collapsible sidebar → desktop icon rail ── */
@media (min-width: 992px) {
  .sidebar { transition: transform .28s var(--ease-out), width .28s var(--ease-out); }
  .main-content { transition: margin-left .28s var(--ease-out); }
  .page-loader.dash-loader { transition: inset .28s var(--ease-out); }

  html.sidebar-collapsed { --sidebar-width: 78px; }
  html.sidebar-collapsed .sidebar { overflow: visible; }

  /* Brand: seal only */
  html.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 18px 10px 16px; }
  html.sidebar-collapsed .sidebar-brand .brand-text { display: none; }

  /* Section labels collapse to hairline dividers */
  html.sidebar-collapsed .sidebar-section-label {
    font-size: 0; padding: 0;
    height: 0; margin: 10px 12px 8px;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  html.sidebar-collapsed .sidebar-section-label::after { display: none; }

  /* Nav links: centered icons, labels hidden, tooltip on hover */
  html.sidebar-collapsed .sidebar-nav { padding: 12px 8px; }
  html.sidebar-collapsed .sidebar-nav .nav-link {
    justify-content: center;
    font-size: 0; gap: 0;
    padding: 11px 0;
  }
  html.sidebar-collapsed .sidebar-nav .nav-link i { font-size: 1.05rem; margin: 0; }
  html.sidebar-collapsed .sidebar-nav .nav-link .badge { display: none; }
  html.sidebar-collapsed .sidebar-nav .nav-link::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 14px); top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: var(--tcc-green-950);
    color: #fff;
    font-size: .75rem; font-weight: 500;
    line-height: 1.3; white-space: nowrap;
    padding: 6px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--shadow-md);
    opacity: 0; pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 1060;
  }
  html.sidebar-collapsed .sidebar-nav .nav-link:hover::after,
  html.sidebar-collapsed .sidebar-nav .nav-link:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  /* Footer: avatar centered, action buttons stacked icon-only */
  html.sidebar-collapsed .sidebar-user { justify-content: center; padding: 9px; }
  html.sidebar-collapsed .sidebar-user .user-info { display: none; }
  html.sidebar-collapsed .sidebar-footer .footer-actions { flex-direction: column; }
  html.sidebar-collapsed .sidebar-footer .footer-actions .btn { flex: none; }
  html.sidebar-collapsed .sidebar-footer .footer-actions span { display: none !important; }
}

/* ── Topbar: refined header cluster & dropdowns ── */
.topbar {
  background: rgba(255,255,255,.86);
}
html[data-theme="dark"] .topbar { background: rgba(19,28,23,.88); }

.tb-user-name {
  font-size: .78rem; font-weight: 600; color: var(--text);
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tb-user-name.full { max-width: none; font-size: .82rem; }

/* Icon buttons: quieter, hover turns green */
.topbar-icon-btn {
  border-radius: 10px;
  text-decoration: none;
}
.topbar-icon-btn:hover {
  background: var(--tcc-green-50);
  border-color: var(--tcc-green-300);
  color: var(--tcc-green-700);
}
.topbar-icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(45,106,79,.18);
  border-color: var(--tcc-green-400);
}

/* Shared dropdown panel */
.topbar-menu {
  min-width: 264px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(10,30,20,.14), 0 2px 6px rgba(10,30,20,.06);
  animation: tbMenuIn .16s var(--ease-out);
}
@keyframes tbMenuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.tb-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 6px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
}
.tb-menu-head.user-head {
  text-transform: none; letter-spacing: 0;
  gap: 10px; justify-content: flex-start;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.tb-count {
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700;
  background: var(--surface-subtle); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tb-count.has-items {
  background: var(--c-danger); color: #fff; border-color: var(--c-danger);
}
.tb-user-detail { min-width: 0; }
.tb-user-mail {
  font-size: .68rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 170px;
}
.tb-role-badge {
  display: inline-block; margin-top: 4px;
  font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--tcc-green-700);
  background: var(--tcc-green-50);
  border: 1px solid var(--tcc-green-200);
  border-radius: 5px; padding: 2px 7px;
}

/* Menu rows */
.tb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: .8rem; font-weight: 500;
  transition: background .12s ease;
}
.tb-item:hover { background: var(--surface-subtle); color: var(--text); }
.tb-item:focus-visible { background: var(--tcc-green-50); outline: none; }
.tb-item-ico {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.tb-item-ico.warn   { background: rgba(217,164,25,.12); color: #a5790e; }
.tb-item-ico.info   { background: rgba(13,110,253,.1);  color: #0a58ca; }
.tb-item-ico.green  { background: var(--tcc-green-50);  color: var(--tcc-green-700); }
.tb-item-ico.gold   { background: rgba(217,164,25,.12); color: #a5790e; }
.tb-item-ico.danger { background: rgba(198,40,40,.08);  color: var(--c-danger); }
.tb-item.danger .tb-item-text { color: var(--c-danger); }
.tb-item-text { flex: 1; min-width: 0; }
.tb-item-n {
  font-size: .68rem; font-weight: 700;
  min-width: 22px; height: 18px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-item-n.warn { background: rgba(217,164,25,.15); color: #8f6707; }
.tb-item-n.info { background: rgba(13,110,253,.12); color: #0a58ca; }
.tb-item.unread { background: rgba(13,110,253,.05); }
.tb-item-sub { font-size: .72rem; color: var(--text-muted); margin-top: 1px; font-weight: 400; }
.tb-sep { height: 1px; background: var(--border); margin: 4px 8px; }
.tb-empty {
  padding: 22px 10px; text-align: center;
  font-size: .78rem; color: var(--text-muted);
}
.tb-empty i { display: block; font-size: 1.15rem; color: var(--c-success); margin-bottom: 4px; }
.tb-menu-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 4px; padding: 8px;
  border-top: 1px solid var(--border);
  font-size: .74rem; font-weight: 600;
  color: var(--tcc-green-700); text-decoration: none;
  border-radius: 0 0 9px 9px;
}
.tb-menu-foot:hover { background: var(--tcc-green-50); color: var(--tcc-green-700); }

/* ═══ Modernized landing ═══ */
/* Hero split: copy left, slip visual right */
.lp-hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
}
.hero-title { margin: 22px 0 18px; }
.hero-sub   { margin: 0 0 36px; }
.hero-box   { margin: 0; }
.hero-chips { justify-content: flex-start; }
.lp-hero-copy { max-width: 620px; }

@media (max-width: 991.98px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .lp-hero-copy { max-width: 640px; margin: 0 auto; text-align: center; }
  .hero-chips { justify-content: center; }
  .hero-box { margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
}

/* ── Registration slip visual ── */
.lp-hero-visual { position: relative; display: flex; justify-content: center; }
.slip-card {
  position: relative;
  width: min(380px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px 24px;
  box-shadow:
    0 30px 60px -18px rgba(5,35,23,.22),
    0 4px 12px rgba(5,35,23,.06);
  transform: rotate(1.5deg);
  transition: transform .4s var(--ease-out);
}
.lp-hero-visual:hover .slip-card { transform: rotate(0deg); }
.slip-head { display: flex; align-items: center; gap: 10px; }
.slip-seal {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--tcc-gold-300);
  box-shadow: 0 0 0 2px rgba(232,207,122,.3);
  object-fit: cover; background: #fff;
}
.slip-school { font-size: .8rem; font-weight: 750; color: var(--tcc-green-900); letter-spacing: -.01em; }
.slip-doc {
  font-size: .62rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em;
}
.slip-live {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--tcc-green-700); background: var(--tcc-green-50);
  border: 1px solid var(--tcc-green-200); border-radius: 999px;
  padding: 3px 9px;
}
.slip-live i { font-size: .6rem; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.slip-code {
  margin: 16px 0 14px;
  font-family: var(--font-mono);
  font-size: .92rem; font-weight: 700; letter-spacing: .04em;
  color: var(--tcc-green-800);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 9px 14px;
  text-align: center;
}
.slip-steps { list-style: none; margin: 0; padding: 0; }
.slip-steps li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px;
  font-size: .8rem;
}
.slip-steps li + li { border-top: 1px solid var(--border); }
.slip-steps i { font-size: .9rem; width: 18px; text-align: center; }
.slip-steps li.done i { color: var(--c-success); }
.slip-steps li.done { color: var(--text-secondary); }
.slip-steps li.now { color: var(--tcc-green-800); font-weight: 650; }
.slip-steps li.now i { color: var(--tcc-gold-600); }
.slip-steps em {
  margin-left: auto; font-style: normal;
  font-size: .68rem; color: var(--text-muted);
}
.slip-divider {
  border-top: 2px dashed var(--border-strong);
  margin: 12px -24px 16px;
  opacity: .5;
}
.slip-foot { display: flex; align-items: center; gap: 14px; }
.slip-qr {
  width: 86px; height: 86px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #fff;
}
.slip-qr img, .slip-qr canvas, .slip-qr table { width: 100% !important; height: 100% !important; }
.slip-qr-note b { display: block; font-size: .8rem; color: var(--text); }
.slip-qr-note span { font-size: .72rem; color: var(--text-muted); line-height: 1.45; }

/* floating verification badge */
.slip-float {
  position: absolute; right: -8px; bottom: 34px;
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 16px 36px rgba(5,35,23,.16);
  transform: rotate(-2deg);
  animation: floaty 6s ease-in-out infinite;
}
.slip-float-ico {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tcc-green-50); color: var(--tcc-green-600);
  font-size: .95rem;
}
.slip-float b { display: block; font-size: .76rem; color: var(--text); }
.slip-float span { font-size: .64rem; color: var(--text-muted); }
@media (max-width: 575.98px) { .slip-float { right: 0; bottom: -14px; } }

/* ── Services: intro left, stacked rows right ── */
.svc-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: 48px; align-items: start;
}
.svc-intro .lp-eyebrow { margin-bottom: 10px; }
.svc-intro .lp-title { margin-bottom: 14px; }
.lp-sub-side {
  color: var(--text-muted); font-size: .95rem;
  line-height: 1.6; max-width: 340px;
  margin-bottom: 26px;
}
.svc-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.svc-row {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px;
  color: inherit; text-decoration: none;
  transition: background .15s ease;
}
.svc-row + .svc-row { border-top: 1px solid var(--border); }
.svc-row:hover { background: var(--surface-subtle); }
.svc-row .feat-tile { margin: 0; flex-shrink: 0; }
.svc-body { flex: 1; min-width: 0; }
.svc-body b { display: block; font-size: .92rem; color: var(--text); margin-bottom: 3px; }
.svc-body span { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.svc-arrow {
  color: var(--text-muted); font-size: 1rem; flex-shrink: 0;
  transition: transform .18s ease, color .18s ease;
}
.svc-row:hover .svc-arrow { transform: translateX(4px); color: var(--tcc-green-600); }
@media (max-width: 991.98px) {
  .svc-grid { grid-template-columns: 1fr; gap: 32px; }
  .lp-sub-side { max-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .slip-float, .slip-live i { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   Landing v5 — "the page is the object": registrar's case-file
   Flat fills only; paper = --surface-warm, ink = --tcc-green-950,
   accent = --tcc-gold-500. No gradients, no resting shadows.
   ═══════════════════════════════════════════════════════════ */

/* ── Hero: autoplay photo carousel + centered actions ── */
.doss-hero {
  position: relative;
  background: var(--tcc-green-950);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 96px;
  overflow: clip;
}
.hero-carousel { position: absolute; inset: 0; z-index: 0; }
.hc-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.07);
  transition: opacity 1.1s ease, transform 6.5s linear;
}
.hc-slide.on { opacity: 1; transform: scale(1); }
.hc-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(9, 26, 18, .66) 0%,
    rgba(9, 26, 18, .55) 45%,
    rgba(13, 36, 25, .82) 78%,
    var(--tcc-green-950) 100%);
}
.doss-top, .doss-foot { position: relative; z-index: 1; }
.doss-top {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.doss-title {
  margin: 0 auto;
  font-size: clamp(58px, 8vw, 116px);
  font-weight: 800; letter-spacing: -0.035em; line-height: .98;
  text-transform: uppercase;
  color: #fdfbf2;
  max-width: 12ch;
}
.doss-sub {
  margin: 26px auto 0;
  max-width: 46ch;
  font-size: 1.25rem; line-height: 1.5;
  color: #cfe0d2;
}

/* hero foot: carousel controls */
.doss-foot {
  display: flex; align-items: center; justify-content: center;
  margin-top: 48px;
  padding-bottom: 40px;
}

.hc-ui {
  display: flex; align-items: center;
  gap: 18px;
}
.hc-dots { display: flex; gap: 8px; }
.hc-dot {
  width: 26px; height: 4px; border: 0; padding: 0;
  border-radius: 3px; background: rgba(255,255,255,.32);
  cursor: pointer; transition: background .25s ease, width .25s ease;
}
.hc-dot.on { background: var(--tcc-gold-300, #e8c04b); width: 40px; }
.hc-dot:hover { background: rgba(255,255,255,.6); }
.hc-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(9, 26, 18, .35); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, transform .2s ease;
}
.hc-arrow:hover { background: rgba(9, 26, 18, .6); transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .hc-slide { transition: none; }
}

/* hero entrance */
@keyframes dossUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.doss-top { animation: dossUp .65s cubic-bezier(.22,.68,.32,1) backwards; }
.doss-foot { animation: dossUp .65s cubic-bezier(.22,.68,.32,1) .3s backwards; }

/* ── Landing sections: shared ── */
.lp-sec { background: var(--surface-warm); padding: 110px 0; }
.lp-sec.lp-alt { background: #fff; }
.lp-head { max-width: 640px; margin-bottom: 48px; }
.lp-head h2 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  letter-spacing: -.03em; color: var(--tcc-green-950); margin: 0 0 12px;
}
.lp-head p { font-size: 1.1rem; color: var(--text-secondary); margin: 0; }
.lp-narrow { max-width: 780px; }

/* ── Services: card grid ── */
.lp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.lp-card {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 26px 24px;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.lp-card:hover {
  transform: translateY(-3px);
  border-color: var(--tcc-green-600);
  box-shadow: 0 10px 28px rgba(9, 26, 18, .08);
}
.lp-card-tag {
  font-size: .78rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--tcc-gold-600);
}
.lp-card b { font-size: 1.25rem; font-weight: 750; color: var(--tcc-green-950); letter-spacing: -.01em; }
.lp-card-desc { font-size: .95rem; line-height: 1.55; color: var(--text-secondary); flex: 1; }
.lp-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.lp-card-val { font-size: 1rem; font-weight: 700; color: var(--tcc-green-800); }
.lp-card-foot i { color: var(--text-muted); transition: transform .18s ease, color .18s ease; }
.lp-card:hover .lp-card-foot i { transform: translateX(4px); color: var(--tcc-green-600); }

/* ── Fees: accordion bars ── */
.fee-bar {
  background: #fff;
  margin-bottom: 6px;
}
.fee-bar summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 14px 18px;
  cursor: pointer; list-style: none;
  font-size: 1rem; font-weight: 600; color: var(--tcc-green-950);
}
.fee-bar summary::-webkit-details-marker { display: none; }
.fee-bar summary i { font-size: 1.15rem; color: var(--tcc-gold-600); transition: transform .2s; }
.fee-bar[open] summary i { transform: rotate(45deg); }
.fee-items { list-style: none; margin: 0; padding: 2px 18px 18px; }
.fee-items li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 7px 0; font-size: 1rem;
}
.fee-name { flex: 1; color: var(--text); }
.fee-meta { font-size: .85rem; color: var(--text-secondary); white-space: nowrap; }
.fee-price { font-weight: 700; color: var(--tcc-green-800); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.fee-cta a { font-weight: 650; color: var(--tcc-green-700); }
.fees-note { font-size: .9rem; color: var(--text-secondary); margin-top: 22px; }

/* ── Journey: drag row of moments ── */
.lp-journey { overflow: hidden; }
.jrny-head-in { margin-bottom: 0; }
.jrny-head {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.jrny-head h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.025em; color: var(--tcc-green-950); margin: 0; }
.jrny-btns {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  display: flex; gap: 8px;
}
.jrny-btns button {
  width: 48px; height: 48px; border: 0; cursor: pointer;
  background: var(--tcc-green-900); color: var(--surface-warm);
  font-size: 1.05rem;
  transition: background .18s, transform .12s;
}
.jrny-btns button:hover { background: var(--tcc-green-600); }
.jrny-btns button:active { transform: scale(.94); }
.jrny-progress { height: 6px; background: var(--tcc-green-100); margin-bottom: 44px; }
.jrny-progress span { display: block; height: 100%; width: 0; background: var(--tcc-green-800); transition: width .12s linear; }
.jrny-row {
  display: flex; gap: 32px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(20px, calc((100vw - 1120px) / 2)) 12px;
  scrollbar-width: none;
}
.jrny-row::-webkit-scrollbar { display: none; }
.jrny-col {
  flex: 0 0 280px; scroll-snap-align: start;
  margin: 0; display: flex; flex-direction: column;
}
.jrny-col figcaption b { display: block; font-size: 1.1rem; font-weight: 700; color: var(--tcc-green-950); }
.jrny-col figcaption p { font-size: .94rem; color: var(--text-secondary); margin: 6px 0 0; max-width: 30ch; }
.jrny-col img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block;
}

/* pickup appointment card (track page) */
.pickup-card {
  background: var(--tcc-green-50);
  border: 1px solid var(--tcc-green-100);
  border-radius: 12px;
  padding: 18px 20px;
}

/* ── Questions: accordion ── */
.lp-acc-a { padding: 2px 18px 18px; }
.lp-acc-a p {
  font-size: 1rem; line-height: 1.6; color: #44564a;
  max-width: 60ch; margin: 0;
}

/* ── CTA: closing panel ── */
.lp-cta { background: var(--tcc-green-950); padding: 110px 0 0; overflow: hidden; }
.lp-cta-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
  background: var(--tcc-green-900);
  border-radius: 18px;
  padding: 56px;
}
.lp-cta-copy { max-width: 34ch; }
.lp-cta-copy h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12;
  font-weight: 800; letter-spacing: -.025em; color: #fdfbf2; margin: 0 0 14px;
}
.lp-cta-copy p { font-size: 1.1rem; line-height: 1.55; color: #c3d6c8; margin: 0; }
.lp-cta-side {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-width: 260px;
}
.lp-cta-btn {
  display: flex; align-items: center; justify-content: center;
  height: 56px; width: 100%;
  background: var(--tcc-gold-500); color: var(--tcc-green-950);
  font-size: 1.05rem; font-weight: 700; text-decoration: none;
  border-radius: 10px;
  transition: background .18s, transform .12s;
}
.lp-cta-btn:hover { background: var(--tcc-gold-400); color: var(--tcc-green-950); }
.lp-cta-btn:active { transform: scale(.98); }
.lp-cta-alt {
  font-size: .95rem; font-weight: 600; color: #c3d6c8;
  text-decoration: none;
}
.lp-cta-alt:hover { color: #fdfbf2; text-decoration: underline; text-underline-offset: 3px; }
.reply-qr { width: 72px; height: 72px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 4px; }
.reply-qr img, .reply-qr canvas, .reply-qr table { width: 100% !important; height: 100% !important; }
.pg-credits {
  font-size: .82rem; color: #7d9a89;
  padding-top: 40px; padding-bottom: 36px; margin: 0 auto;
}

/* Page frame: 20px margins everywhere on the landing sections */
.doss-hero .container, .lp-sec .container, .lp-cta .container { padding-inline: 20px; }

/* Secondary text on the landing page: keep ≥7:1 against paper */
.lp-card-desc, .fee-meta, .fees-note, .jrny-col figcaption p, .lp-head p { color: #44564a; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .lp-cta-panel { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
  .lp-cta-side { align-items: stretch; width: 100%; max-width: 340px; }
  .lp-cta-side .reply-qr { align-self: center; }
}
@media (max-width: 575.98px) {
  .doss-hero { padding-top: 64px; }
  .doss-title { font-size: 17vw; }
  .doss-sub { font-size: 1.15rem; }
  .lp-sec { padding: 76px 0; }
  .lp-cta { padding-top: 76px; }
  .jrny-col { flex-basis: 72vw; }
  .jrny-btns { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   AI ASSISTANT WIDGET (TCC Assist · Groq)
   ══════════════════════════════════════════════════════════════ */
.ai-rail {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 1070;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 5px 14px;
  background: linear-gradient(160deg, #1d6a44 0%, var(--forest, #1a5c3a) 55%, #123f2a 100%);
  color: var(--gold, #e8c04b);
  border-radius: 12px 0 0 12px; cursor: grab;
  border: 1px solid rgba(232, 192, 75, .35); border-right: 0;
  box-shadow: -6px 0 18px rgba(10, 40, 25, .26);
  transition: transform .2s ease, box-shadow .2s ease;
  touch-action: none; user-select: none;
}
.ai-rail.dragging { cursor: grabbing; transition: none; box-shadow: -16px 0 40px rgba(10, 40, 25, .5); }
.ai-rail::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 12px 0 0 12px; pointer-events: none;
  background: radial-gradient(circle at 50% 18%, rgba(232,192,75,.22), transparent 55%);
}
.ai-rail:hover, .ai-rail:focus-visible { transform: translateY(-50%) translateX(-6px); box-shadow: -14px 0 34px rgba(10, 40, 25, .42); outline: none; }

.ai-rail-tip {
  position: absolute; right: calc(100% + 12px); top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #123f2a; color: #fff; font-size: .78rem; font-weight: 600;
  padding: 7px 12px; border-radius: 9px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 8px 20px rgba(10, 35, 22, .3);
}
.ai-rail-tip::after {
  content: ''; position: absolute; left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #123f2a;
}
.ai-rail:hover .ai-rail-tip, .ai-rail:focus-visible .ai-rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

.ai-owl { width: 34px; height: 34px; display: block; transition: transform .25s ease; transform-origin: 50% 80%; }
.ai-rail:hover .ai-owl { transform: rotate(-6deg); }
.ai-pupil { transform-box: fill-box; transform-origin: center; animation: aiBlink 4.5s ease-in-out infinite; }
@keyframes aiBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.ai-rail-label {
  font-size: .58rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; writing-mode: vertical-rl;
  opacity: .85;
}

.ai-panel {
  position: fixed; right: 0; top: 0; z-index: 1071;
  width: min(400px, 100vw); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: #fff;
  box-shadow: -24px 0 64px rgba(10, 35, 22, .3);
  border-left: 1px solid rgba(15, 50, 32, .12);
  animation: aiPanelIn .25s ease;
}
@keyframes aiPanelIn { from { opacity: .4; transform: translateX(40px); } to { opacity: 1; transform: none; } }

.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(120deg, #123f2a, #1a5c3a);
  color: #fff;
}
.ai-head-id { display: flex; align-items: center; gap: 10px; }
.ai-dot {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: rgba(232, 192, 75, .18); border: 1px solid rgba(232, 192, 75, .45);
  display: flex; align-items: center; justify-content: center;
}
.ai-dot svg { display: block; }
.ai-title { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.ai-sub { font-size: .7rem; opacity: .75; }
.ai-close {
  background: none; border: 0; color: rgba(255, 255, 255, .7);
  font-size: .95rem; padding: 6px; border-radius: 8px;
}
.ai-close:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.ai-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-subtle, #f4f6f4);
  overscroll-behavior: contain;          /* keep wheel inside the panel */
  scrollbar-width: thin;
  scrollbar-color: rgba(26,92,58,.35) transparent;
}
.ai-msgs::-webkit-scrollbar { width: 8px; }
.ai-msgs::-webkit-scrollbar-track { background: transparent; }
.ai-msgs::-webkit-scrollbar-thumb {
  background: rgba(26,92,58,.3); border-radius: 4px;
}
.ai-msgs::-webkit-scrollbar-thumb:hover { background: rgba(26,92,58,.5); }
.ai-msg {
  max-width: 82%; padding: 9px 13px; border-radius: 14px;
  font-size: .86rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.ai-user {
  align-self: flex-end; background: var(--forest, #1a5c3a); color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-assistant {
  align-self: flex-start; background: #fff; color: #22392e;
  border: 1px solid rgba(15, 50, 32, .1); border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(10, 30, 20, .06);
}
.ai-thinking { opacity: .6; font-style: italic; }

.ai-form {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(15, 50, 32, .1); background: #fff;
}
.ai-input {
  flex: 1; border: 1px solid rgba(15, 50, 32, .18); border-radius: 10px;
  padding: 9px 12px; font-size: .87rem; outline: none;
}
.ai-input:focus { border-color: var(--forest, #1a5c3a); box-shadow: 0 0 0 3px rgba(26, 92, 58, .12); }
.ai-send {
  width: 42px; border: 0; border-radius: 10px; flex-shrink: 0;
  background: var(--forest, #1a5c3a); color: var(--gold, #e8c04b); font-size: 1rem;
  transition: background .15s ease;
}
.ai-send:hover { background: #123f2a; }

.ai-mic {
  width: 42px; border: 1px solid rgba(15, 50, 32, .18); border-radius: 10px; flex-shrink: 0;
  background: #fff; color: var(--forest, #1a5c3a); font-size: 1rem;
  transition: all .15s ease;
}
.ai-mic:hover { border-color: var(--forest, #1a5c3a); background: rgba(26, 92, 58, .06); }
.ai-mic.listening {
  background: #b3261e; border-color: #b3261e; color: #fff;
  animation: aiMicPulse 1.1s ease-in-out infinite;
}
@keyframes aiMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); }
  50%      { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); }
}

.ai-voice-toggle {
  background: none; border: 0; color: rgba(255, 255, 255, .55);
  font-size: .95rem; padding: 6px; border-radius: 8px;
}
.ai-voice-toggle:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.ai-voice-toggle.on { color: var(--gold, #e8c04b); }

@media (max-width: 575.98px) {
  .ai-rail { padding: 12px 6px 14px; }
  .ai-owl { width: 32px; height: 32px; }
  .ai-rail-label { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — extended coverage
   ══════════════════════════════════════════════════════════════ */

/* Dashboard footer follows theme instead of hardcoded white */
.dash-footer { background: var(--surface); border-color: var(--border) !important; }

/* Remap Bootstrap surface/text utilities to theme tokens in dark mode
   (covers cards, badges, note boxes, headers that use bg-white/bg-light/text-dark) */
html[data-theme="dark"] .bg-white { background-color: var(--surface) !important; }
html[data-theme="dark"] .bg-light { background-color: var(--surface-subtle) !important; }
html[data-theme="dark"] .text-dark { color: var(--text) !important; }

/* Dark-mode refinements for shared components */
html[data-theme="dark"] .card,
html[data-theme="dark"] .content-card {
  background: var(--surface);
  border-color: var(--border);
}
html[data-theme="dark"] .card-header { border-color: var(--border); }
html[data-theme="dark"] .alert-info {
  background: #12272c; border-color: #1d4a55; color: #8fd4e8;
}
html[data-theme="dark"] .pagination .page-link {
  background: var(--surface); border-color: var(--border); color: var(--text-secondary);
}
html[data-theme="dark"] .pagination .page-item.active .page-link {
  background: var(--tcc-green-700); border-color: var(--tcc-green-700); color: #fff;
}
html[data-theme="dark"] .pagination .page-item.disabled .page-link {
  background: var(--surface-subtle); color: var(--text-muted);
}
html[data-theme="dark"] .input-group-text {
  background: var(--surface-subtle); border-color: var(--border); color: var(--text-muted);
}
html[data-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-border-color: var(--border-strong);
}

/* AI assistant widget — dark */
html[data-theme="dark"] .ai-panel { background: var(--surface); border-left-color: var(--border); }
html[data-theme="dark"] .ai-msgs  { background: var(--bg-app); }
html[data-theme="dark"] .ai-assistant {
  background: var(--surface-subtle); color: var(--text);
  border-color: var(--border);
}
html[data-theme="dark"] .ai-form { background: var(--surface); border-top-color: var(--border); }
html[data-theme="dark"] .ai-input {
  background: var(--bg-app); color: var(--text); border-color: var(--border);
}
html[data-theme="dark"] .ai-input::placeholder { color: var(--text-muted); }
html[data-theme="dark"] .ai-mic {
  background: var(--bg-app); color: var(--text-secondary); border-color: var(--border);
}
html[data-theme="dark"] .ai-mic:hover { border-color: var(--tcc-green-600); background: var(--surface-subtle); }
html[data-theme="dark"] .ai-mic.listening { background: #b3261e; border-color: #b3261e; color: #fff; }

/* Dark mode — readability fixes */
html[data-theme="dark"] {
  /* Bootstrap subtle/emphasis tokens used by status pills, muted blocks */
  --bs-secondary-bg:           var(--surface-subtle);
  --bs-secondary-bg-subtle:    var(--surface-subtle);
  --bs-secondary-text-emphasis: var(--text);
  --bs-tertiary-color:         var(--text-muted);
  --bs-success-bg-subtle:      #12301f;
  --bs-success-text-emphasis:  #6fc59a;
  --bs-success-border-subtle:  #2b4a39;
  --bs-danger-bg-subtle:       #331a16;
  --bs-danger-text-emphasis:   #e08a80;
  --bs-danger-border-subtle:   #4e2b25;
  --bs-warning-bg-subtle:      #332b10;
  --bs-warning-text-emphasis:  #e6c04a;
  --bs-warning-border-subtle:  #4e3d12;
  --bs-info-bg-subtle:         #12272c;
  --bs-info-text-emphasis:     #8fd4e8;
  --bs-info-border-subtle:     #1d4a55;
}

/* Text that was near-invisible on dark surfaces */
html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .form-select::placeholder { color: var(--text-muted); }
html[data-theme="dark"] .page-breadcrumb .bc-sep  { color: var(--text-muted); }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly],
html[data-theme="dark"] .form-select:disabled {
  background-color: var(--surface-subtle); color: var(--text-muted);
  border-color: var(--border); opacity: 1;
}
html[data-theme="dark"] code { color: #8fd4b3; }
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-text { color: var(--text-secondary); }
html[data-theme="dark"] .form-label { color: var(--text); }
html[data-theme="dark"] .list-group {
  --bs-list-group-bg: var(--surface);
  --bs-list-group-color: var(--text);
  --bs-list-group-border-color: var(--border);
}
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .popover {
  --bs-offcanvas-bg: var(--surface); --bs-offcanvas-color: var(--text);
  --bs-popover-bg: var(--surface); --bs-popover-body-color: var(--text);
}

/* Pastel icon chips → dark variants (all hues, not just green/gold) */
html[data-theme="dark"] .stat-icon.yellow,
html[data-theme="dark"] .portal-card-icon.gold { background: #332b10; color: var(--tcc-gold-400, #e8c04b); }
html[data-theme="dark"] .stat-icon.purple,
html[data-theme="dark"] .portal-card-icon.purple { background: #241c38; color: #a78bfa; }
html[data-theme="dark"] .stat-icon.red    { background: #331a16; color: #e08a80; }
html[data-theme="dark"] .stat-icon.orange { background: #33200f; color: #f0a35e; }
html[data-theme="dark"] .portal-card-icon.blue { background: #16293a; color: #6aa8d8; }
html[data-theme="dark"] .portal-card-icon { background: #1d3528; color: #7cc3a2; }

/* Soft pastel note/info tiles that kept light backgrounds */
html[data-theme="dark"] .feat-tile.teal   { background: #14312b; color: #5cc4b4; }
html[data-theme="dark"] .feat-tile.purple { background: #241c38; color: #a78bfa; }
html[data-theme="dark"] .feat-tile.orange { background: #33200f; color: #f0a35e; }
html[data-theme="dark"] .feat-tile.red    { background: #331a16; color: #e08a80; }

/* Table headers keep themed contrast */
html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent;
}
html[data-theme="dark"] .table th { color: var(--text-muted); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }

/* ══════════════════════════════════════════════════════════════
   SMOOTHNESS PASS — motion polish for shell + components
   ══════════════════════════════════════════════════════════════ */

/* Global theme fade: light ↔ dark glides instead of snapping */
body, .card, .content-card, .topbar, .dash-footer, .dropdown-menu,
.modal-content, .form-control, .form-select, .table, .page-content,
.ai-panel, .ai-msgs, .ai-form, .ai-input, .alert, .pagination .page-link,
.input-group-text, .btn {
  transition: background-color .28s ease, color .28s ease,
              border-color .28s ease, box-shadow .28s ease;
}

/* ── Sidebar ── */
.sidebar-nav .nav-link {
  transition: background .22s ease, color .22s ease, transform .22s ease;
}
.sidebar-nav .nav-link::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; border-radius: 3px;
  background: var(--tcc-gold-300, #e8c04b);
  transform: translateY(-50%);
  transition: height .22s ease;
}
.sidebar-nav .nav-link:hover { transform: translateX(3px); }
.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before { height: 60%; }
.sidebar-nav .nav-link i { transition: transform .22s ease, color .22s ease, opacity .22s ease; }
.sidebar-nav .nav-link:hover i { transform: scale(1.12); }
.sidebar-nav .nav-link.active { transition: background .25s ease, color .25s ease; }
.sidebar-user { transition: transform .22s ease, box-shadow .22s ease; }
.sidebar-user:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.sidebar-section-label { transition: color .2s ease; }

/* ── Topbar ── */
.topbar {
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background-color .28s ease, box-shadow .28s ease;
}
.topbar-icon-btn, .topbar-user-btn, .topbar-avatar-btn {
  transition: transform .18s ease, box-shadow .18s ease,
              background-color .18s ease, border-color .18s ease;
}
.topbar-user-btn:hover, .topbar-avatar-btn:hover { transform: translateY(-1px); }

/* ── Buttons ── */
.btn {
  transition: transform .16s ease, box-shadow .16s ease,
              background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { transition: box-shadow .15s ease; }

/* ── Cards / tables / rows ── */
.card, .content-card { transition: box-shadow .24s ease, transform .24s ease,
                                  background-color .28s ease, border-color .28s ease; }
.table tbody tr { transition: background-color .15s ease; }
.quick-tile, .doc-card, .delivery-tile, .record-slip, .feat-tile, .stat-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease,
              background-color .28s ease;
}

/* ── Dropdowns & modals ── */
.dropdown-menu { animation: ddIn .16s ease; transform-origin: top center; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.fade .modal-dialog { transition: transform .25s ease-out, opacity .2s ease; }

/* ── Inputs ── */
.form-control, .form-select { transition: border-color .16s ease, box-shadow .16s ease,
                                          background-color .28s ease, color .28s ease; }

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .sidebar-nav .nav-link, .sidebar-nav .nav-link i, .sidebar-user,
  .topbar-icon-btn, .topbar-user-btn, .topbar-avatar-btn, .btn,
  .card, .content-card, .quick-tile, .doc-card, .delivery-tile,
  .record-slip, .feat-tile, .stat-card, .dropdown-menu {
    transition: none !important; animation: none !important;
  }
}

/* AI reply formatting */
.ai-msg ul, .ai-msg ol { margin: 2px 0; padding-left: 18px; }
.ai-msg li { margin: 2px 0; }
.ai-msg .ai-h { font-weight: 700; margin: 4px 0 2px; }
.ai-msg .ai-gap { height: 6px; }
.ai-msg code {
  font-family: var(--font-mono, ui-monospace, Consolas, monospace);
  font-size: .8em; background: rgba(15, 50, 32, .08);
  padding: 1px 5px; border-radius: 4px; color: inherit;
}
.ai-msg pre {
  background: #123f2a; color: #d9efe2; font-size: .78rem;
  padding: 8px 10px; border-radius: 8px; margin: 4px 0;
  overflow-x: auto; font-family: var(--font-mono, ui-monospace, Consolas, monospace);
}
.ai-msg pre code { background: none; padding: 0; color: inherit; }
html[data-theme="dark"] .ai-msg code { background: rgba(255,255,255,.1); }
