/* =========================================================================
   EASY MARKS PLUS+  —  SHARED DESIGN SYSTEM STYLESHEET
   Academic Indigo  |  Design System v1.0  |  Locked Sept 2026
   Single source of truth for color, typography, and every component.
   Link this file from every page's <head>:
   <link rel="stylesheet" href="assets/css/theme.css">
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS — color, typography, structure
   ------------------------------------------------------------------------- */
:root {
  /* Brand / Primary */
  --emp-primary: #4F46E5;
  --emp-primary-hover: #4338CA;
  --emp-primary-active: #6366F1;
  --emp-primary-tint: #EEF2FF;

  /* Sidebar */
  --emp-sidebar: #111827;
  --emp-sidebar-logo: #A5B4FC;
  --emp-sidebar-active: #6366F1;

  /* Semantic — locked 7 Sept 2026: exactly 3 status colors, no separate
     "Info" hue. Info-role components reuse the Primary Indigo tint pairing
     (see .badge-info / .alert-info / .toast-info below) rather than
     introducing a 4th independent color family. */
  --emp-success: #059669;
  --emp-success-tint: #DCFCE7;
  --emp-success-text: #065F46;

  --emp-danger: #DC2626;
  --emp-danger-tint: #FEE2E2;
  --emp-danger-text: #991B1B;

  --emp-warning: #D97706;
  --emp-warning-tint: #FEF3C7;
  --emp-warning-text: #92400E;

  --emp-neutral-tint: #F1F5F9;
  --emp-neutral-text: #475569;

  /* Neutrals */
  --emp-page-bg: #F5F7FA;
  --emp-surface: #FFFFFF;
  --emp-text: #111827;
  --emp-text-secondary: #64748B;
  --emp-text-muted: #94A3B8;
  --emp-border: #E2E8F0;

  /* Typography */
  --emp-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --emp-weight-regular: 400;
  --emp-weight-medium: 500;
  --emp-weight-semibold: 600;

  --emp-text-page-title: 28px;      --emp-text-page-title-line: 34px;
  --emp-text-section-title: 20px;   --emp-text-section-title-line: 26px;
  --emp-text-subsection-title: 16px; --emp-text-subsection-title-line: 22px;
  --emp-text-card-title: 16px;      --emp-text-card-title-line: 22px;
  --emp-text-card-value: 24px;      --emp-text-card-value-line: 30px;
  --emp-text-body-lg: 15px;         --emp-text-body-lg-line: 23px;
  --emp-text-body: 14px;            --emp-text-body-line: 21px;
  --emp-text-table: 13px;           --emp-text-table-line: 18px;
  --emp-text-table-header: 12px;    --emp-text-table-header-line: 16px;
  --emp-text-small: 12px;           --emp-text-small-line: 17px;
  --emp-text-caption: 11px;         --emp-text-caption-line: 15px;
  --emp-text-button: 13px;          --emp-text-button-line: 18px;
  --emp-text-input: 14px;           --emp-text-input-line: 20px;
  --emp-text-nav: 14px;             --emp-text-nav-line: 20px;
  --emp-text-nav-section: 11px;     --emp-text-nav-section-line: 15px;

  /* Structure */
  --emp-sidebar-w: 248px;
  --emp-mobile-breakpoint: 768px;
  --emp-radius: 8px;
  --emp-radius-lg: 10px;
  --emp-radius-pill: 999px;
}

/* -------------------------------------------------------------------------
   2. BASE ELEMENTS
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: var(--emp-font-family);
  font-size: var(--emp-text-body);
  font-weight: var(--emp-weight-regular);
  line-height: var(--emp-text-body-line);
  color: var(--emp-text);
  background: var(--emp-page-bg);
  margin: 0;
}

h1 { font-size: var(--emp-text-page-title); font-weight: var(--emp-weight-semibold); line-height: var(--emp-text-page-title-line); margin: 0; }
h2 { font-size: var(--emp-text-section-title); font-weight: var(--emp-weight-semibold); line-height: var(--emp-text-section-title-line); margin: 0; }
h3 { font-size: var(--emp-text-subsection-title); font-weight: var(--emp-weight-semibold); line-height: var(--emp-text-subsection-title-line); margin: 0; }

.emp-numeric,
.total-marks, .percentage, .rank, .attendance, .marks-table td.numeric {
  font-variant-numeric: tabular-nums;
}

.text-small { font-size: var(--emp-text-small); line-height: var(--emp-text-small-line); }
.text-caption { font-size: var(--emp-text-caption); line-height: var(--emp-text-caption-line); color: var(--emp-text-muted); }

/* -------------------------------------------------------------------------
   3. BUTTONS
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--emp-font-family);
  font-size: var(--emp-text-button);
  font-weight: var(--emp-weight-medium);
  line-height: var(--emp-text-button-line);
  padding: 8px 16px;
  border-radius: var(--emp-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}
.btn:disabled, .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon-only { padding: 8px; }

.btn-primary { background: var(--emp-primary); color: #FFFFFF; }
.btn-primary:hover:not(:disabled) { background: var(--emp-primary-hover); }
.btn-primary:active:not(:disabled) { background: var(--emp-primary-active); }

.btn-secondary { background: var(--emp-surface); color: var(--emp-primary); border-color: var(--emp-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--emp-primary-tint); }
.btn-secondary:active:not(:disabled) { background: #E0E1FC; }

.btn-ghost { background: transparent; color: var(--emp-text-secondary); border-color: var(--emp-border); }
.btn-ghost:hover:not(:disabled) { background: var(--emp-neutral-tint); border-color: #CBD5E1; }
.btn-ghost:active:not(:disabled) { background: #E2E8F0; }

.btn-danger { background: var(--emp-danger); color: #FFFFFF; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }
.btn-danger:active:not(:disabled) { background: #991B1B; }

.btn-loading { pointer-events: none; }
.btn-spinner {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: emp-spin 0.7s linear infinite;
}
.btn-ghost .btn-spinner, .btn-secondary .btn-spinner {
  border: 2px solid rgba(79,70,229,0.25); border-top-color: var(--emp-primary);
}
@keyframes emp-spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------------
   4. BADGES / STATUS PILLS
   ------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--emp-text-small);
  font-weight: var(--emp-weight-semibold);
  line-height: var(--emp-text-small-line);
  padding: 3px 10px;
  border-radius: var(--emp-radius-pill);
}
.badge-success { background: var(--emp-success-tint); color: var(--emp-success-text); }
.badge-warning { background: var(--emp-warning-tint); color: var(--emp-warning-text); }
.badge-danger  { background: var(--emp-danger-tint);  color: var(--emp-danger-text); }
.badge-neutral { background: var(--emp-neutral-tint); color: var(--emp-neutral-text); }
/* Info reuses the Primary Indigo tint pairing — no separate hue introduced. */
.badge-info    { background: var(--emp-primary-tint); color: var(--emp-primary); }

/* -------------------------------------------------------------------------
   5. METRIC / STAT CARDS
   ------------------------------------------------------------------------- */
.stat-card {
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-card-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.tone-primary { background: var(--emp-primary-tint); color: var(--emp-primary); }
.stat-card-icon.tone-success { background: var(--emp-success-tint); color: var(--emp-success); }
.stat-card-icon.tone-warning { background: var(--emp-warning-tint); color: var(--emp-warning); }
.stat-card-icon.tone-danger  { background: var(--emp-danger-tint);  color: var(--emp-danger); }
.stat-card-value { font-size: var(--emp-text-card-value); font-weight: var(--emp-weight-semibold); line-height: var(--emp-text-card-value-line); color: var(--emp-text); }
.stat-card-label { font-size: var(--emp-text-small); color: var(--emp-text-secondary); }

/* -------------------------------------------------------------------------
   5b. BASE LAYOUT — page shell, generic card, page title
   Added 7 Sept 2026 (Dashboard build) — these were missing even though
   several already-shipped pages (My Profile) assumed .card existed.
   Every future page should use .main-content as its body wrapper.
   ------------------------------------------------------------------------- */
.main-content {
  margin-left: var(--emp-sidebar-w);
  min-height: 100vh;
  background: var(--emp-page-bg);
  padding: 28px 32px 48px;
}
.page-title {
  font-size: var(--emp-text-page-title);
  font-weight: var(--emp-weight-semibold);
  line-height: var(--emp-text-page-title-line);
  color: var(--emp-text);
  margin: 0;
}
.card {
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 20px;
}
@media (max-width: 768px) {
  .main-content { margin-left: 0; padding: 20px; }
}

/* -------------------------------------------------------------------------
   6. TABS  (two distinct components — do not merge)
   ------------------------------------------------------------------------- */
.tabbar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--emp-border);
}
.tabbar-item {
  font-size: var(--emp-text-body);
  font-weight: var(--emp-weight-medium);
  color: var(--emp-text-secondary);
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
}
.tabbar-item:hover { color: var(--emp-text); }
.tabbar-item.active { color: var(--emp-primary); border-bottom-color: var(--emp-primary); font-weight: var(--emp-weight-semibold); }

.pill-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-selector-item {
  font-size: var(--emp-text-small);
  font-weight: var(--emp-weight-medium);
  color: var(--emp-text-secondary);
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-pill);
  padding: 6px 14px;
  cursor: pointer;
}
.pill-selector-item:hover { border-color: var(--emp-primary); color: var(--emp-primary); }
.pill-selector-item.active { background: var(--emp-primary); border-color: var(--emp-primary); color: #FFFFFF; }

/* -------------------------------------------------------------------------
   7. FORM ELEMENTS
   ------------------------------------------------------------------------- */
.field-label {
  display: block;
  font-size: var(--emp-text-small);
  font-weight: var(--emp-weight-medium);
  color: var(--emp-text);
  margin-bottom: 4px;
}
.field-input, .field-select, .field-textarea {
  width: 100%;
  font-family: var(--emp-font-family);
  font-size: var(--emp-text-input);
  line-height: var(--emp-text-input-line);
  color: var(--emp-text);
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius);
  padding: 8px 12px;
}
.field-textarea { resize: vertical; min-height: 72px; }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none; border-color: var(--emp-primary);
  box-shadow: 0 0 0 3px var(--emp-primary-tint);
}
.field-input.is-error, .field-select.is-error, .field-textarea.is-error {
  border-color: var(--emp-danger);
}
.field-input.is-error:focus, .field-textarea.is-error:focus {
  box-shadow: 0 0 0 3px var(--emp-danger-tint);
}
.field-input:disabled, .field-select:disabled, .field-textarea:disabled {
  background: var(--emp-neutral-tint); color: var(--emp-text-muted); cursor: not-allowed;
}
.field-help { font-size: var(--emp-text-caption); color: var(--emp-text-muted); margin-top: 4px; }
.field-error { font-size: var(--emp-text-caption); color: var(--emp-danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

.field-checkbox, .field-radio {
  width: 16px; height: 16px;
  accent-color: var(--emp-primary);
  cursor: pointer;
}
.field-checkbox:disabled, .field-radio:disabled { cursor: not-allowed; opacity: 0.5; }

/* -------------------------------------------------------------------------
   8. DATA TABLES
   ------------------------------------------------------------------------- */
.data-table-wrap {
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; font-size: var(--emp-text-table); line-height: var(--emp-text-table-line); }
.data-table thead tr { background: var(--emp-page-bg); }
.data-table th {
  text-align: left; padding: 8px 12px;
  font-size: var(--emp-text-table-header); font-weight: var(--emp-weight-medium);
  color: var(--emp-text-secondary); text-transform: uppercase; letter-spacing: 0.04em;
}
.data-table td { padding: 10px 12px; border-top: 1px solid var(--emp-border); color: var(--emp-text); }
.data-table tbody tr:hover { background: var(--emp-page-bg); }
.data-table tbody tr.is-selected { background: var(--emp-primary-tint); }
.data-table .row-actions { display: flex; gap: 6px; }
.data-table .row-actions .btn { padding: 6px; }

.table-empty {
  text-align: center; padding: 48px 24px; color: var(--emp-text-secondary);
}
.table-empty-icon { color: var(--emp-text-muted); margin-bottom: 12px; }
.table-empty-title { font-size: var(--emp-text-subsection-title); font-weight: var(--emp-weight-semibold); color: var(--emp-text); margin-bottom: 4px; }
.table-empty-body { font-size: var(--emp-text-body); margin-bottom: 16px; }

/* -------------------------------------------------------------------------
   8b. TABLE GROUP ROW (grouped-section divider inside a data-table)
   Added 15 Sept 2026 — Subjects build (Phase 6 UI Revamp). For lists that
   are naturally grouped into sections within one shared table (Subjects'
   Main/Additional/Co-Scholastic groups; any future grouped list). Renders
   as a full-width label row inside <tbody>, not a separate element outside
   the table — keeps row borders continuous instead of fragmenting the
   table into several disconnected <table> blocks per group.
   ------------------------------------------------------------------------- */
.table-group-row td {
  background: var(--emp-page-bg);
  font-size: var(--emp-text-caption);
  font-weight: var(--emp-weight-semibold);
  color: var(--emp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-top: 1px solid var(--emp-border);
}

/* -------------------------------------------------------------------------
   9. FILTER BAR
   ------------------------------------------------------------------------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--emp-surface); border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg); padding: 12px 14px;
}
.filter-bar .field-input, .filter-bar .field-select { width: auto; min-width: 160px; }
.filter-bar-spacer { flex: 1; }

/* -------------------------------------------------------------------------
   10. MODALS
   ------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
  background: var(--emp-surface); border-radius: var(--emp-radius-lg);
  width: 100%; max-width: 420px; overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--emp-border);
}
.modal-title { font-size: var(--emp-text-subsection-title); font-weight: var(--emp-weight-semibold); }
.modal-close { background: none; border: none; color: var(--emp-text-muted); cursor: pointer; padding: 4px; }
.modal-body { padding: 20px; font-size: var(--emp-text-body); color: var(--emp-text-secondary); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--emp-border); }

/* -------------------------------------------------------------------------
   11. ALERTS (inline, full-width) + TOASTS (temporary, top-right)
   ------------------------------------------------------------------------- */
.alert {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--emp-radius);
  font-size: var(--emp-text-body);
}
.alert-success { background: var(--emp-success-tint); color: var(--emp-success-text); }
.alert-warning { background: var(--emp-warning-tint); color: var(--emp-warning-text); }
.alert-danger  { background: var(--emp-danger-tint);  color: var(--emp-danger-text); }
.alert-info    { background: var(--emp-primary-tint); color: var(--emp-primary); }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: 0.7; }

.toast {
  position: fixed; top: 20px; right: 20px;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--emp-radius);
  font-size: var(--emp-text-body); background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
  z-index: 1100;
}
.toast-success { border-left: 3px solid var(--emp-success); }
.toast-warning { border-left: 3px solid var(--emp-warning); }
.toast-danger  { border-left: 3px solid var(--emp-danger); }
.toast-info    { border-left: 3px solid var(--emp-primary); }

/* -------------------------------------------------------------------------
   12. LOADING STATES
   ------------------------------------------------------------------------- */
.inline-loader {
  display: flex; align-items: center; gap: 8px;
  color: var(--emp-text-secondary); font-size: var(--emp-text-body);
}
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--emp-border); border-top-color: var(--emp-primary);
  animation: emp-spin 0.7s linear infinite;
}
.section-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; color: var(--emp-text-secondary); gap: 12px;
}
.section-loader .spinner { width: 28px; height: 28px; border-width: 3px; }

/* -------------------------------------------------------------------------
   13. PAGINATION
   ------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; gap: 4px; }
.pagination-item {
  min-width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: var(--emp-text-small); border-radius: var(--emp-radius);
  border: 1px solid var(--emp-border); background: var(--emp-surface);
  color: var(--emp-text-secondary); cursor: pointer;
}
.pagination-item:hover { border-color: var(--emp-primary); color: var(--emp-primary); }
.pagination-item.active { background: var(--emp-primary); border-color: var(--emp-primary); color: #FFFFFF; }
.pagination-item:disabled { opacity: 0.4; cursor: not-allowed; }

/* -------------------------------------------------------------------------
   14. LARGE EMPTY STATE (full-page / full-section)
   ------------------------------------------------------------------------- */
.empty-state-lg { text-align: center; padding: 64px 24px; }
.empty-state-lg-icon { color: var(--emp-text-muted); margin-bottom: 16px; }
.empty-state-lg-title { font-size: var(--emp-text-section-title); font-weight: var(--emp-weight-semibold); margin-bottom: 6px; }
.empty-state-lg-body { font-size: var(--emp-text-body-lg); color: var(--emp-text-secondary); margin-bottom: 20px; }

/* -------------------------------------------------------------------------
   15. SIDEBAR NAVIGATION
   Added Phase 6 UI Revamp — sidebar_include.php was the first page revamped
   under the Page Revamp Protocol. Structure/role-gating logic is untouched
   (locked separately); only the visual layer lives here. This is the only
   place sidebar-related CSS should ever be edited — sidebar_include.php
   itself must never carry its own <style> block again (Rule 3).
   ------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--emp-sidebar-w);
  height: 100vh;
  background: var(--emp-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  font-family: var(--emp-font-family);
}
.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-mark {
  width: 38px; height: 38px;
  border-radius: var(--emp-radius);
  background: var(--emp-primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: var(--emp-weight-semibold);
  flex-shrink: 0;
}
.sidebar-brand-text h1 {
  font-size: 16px;
  font-weight: var(--emp-weight-semibold);
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0;
}
.sidebar-brand-text h1 span { color: var(--emp-sidebar-logo); }
.sidebar-brand-text p {
  font-size: var(--emp-text-caption);
  line-height: var(--emp-text-caption-line);
  color: #9CA3AF;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.sidebar-school {
  padding: 12px 20px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-school p {
  font-size: 10px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 2px;
}
.sidebar-school span {
  font-size: 12px;
  color: var(--emp-sidebar-logo);
  font-weight: var(--emp-weight-semibold);
}
.sidebar nav { padding: 12px 0; flex: 1; }
.nav-section {
  padding: 8px 20px 4px;
  font-size: var(--emp-text-nav-section);
  line-height: var(--emp-text-nav-section-line);
  font-weight: var(--emp-weight-semibold);
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #D1D5DB;
  text-decoration: none;
  font-size: var(--emp-text-nav);
  line-height: var(--emp-text-nav-line);
  font-weight: var(--emp-weight-medium);
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #FFFFFF; }
.nav-item:hover .nav-icon { color: #FFFFFF; }
.nav-item.active { background: rgba(99,102,241,0.12); color: #FFFFFF; }
.nav-item.active .nav-icon { color: var(--emp-sidebar-active); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--emp-sidebar-active);
  border-radius: 0 2px 2px 0;
}
.nav-item.disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.nav-icon {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}
.nav-icon svg { width: 100%; height: 100%; display: block; }
.nav-soon {
  margin-left: auto;
  background: rgba(255,255,255,0.10);
  color: #9CA3AF;
  font-size: 10px;
  font-weight: var(--emp-weight-semibold);
  padding: 1px 7px;
  border-radius: var(--emp-radius-pill);
}
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: var(--emp-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: var(--emp-weight-semibold);
  color: #FFFFFF;
  flex-shrink: 0;
}
.user-info { overflow: hidden; }
.user-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: var(--emp-weight-medium);
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info span { font-size: 11px; color: #9CA3AF; }
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(220,38,38,0.15);
  color: #FCA5A5;
  text-decoration: none;
  border-radius: var(--emp-radius);
  font-size: 12.5px;
  font-weight: var(--emp-weight-medium);
  transition: background 0.2s ease;
}
.logout-btn:hover { background: rgba(220,38,38,0.28); }
.logout-btn .nav-icon { width: 16px; height: 16px; flex: 0 0 16px; color: #FCA5A5; }

/* 768px is the project's locked mobile breakpoint (--emp-mobile-breakpoint) —
   hardcoded here because CSS custom properties cannot be used inside an
   @media condition. */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
}

/* -------------------------------------------------------------------------
   16. AUTH / LOGIN LAYOUT
   Added Phase 6 UI Revamp — login.php build, 7 Sept 2026.
   Split-screen: dark image panel (left) + light form card (right).
   NOTE — documented exception: the left panel uses a photographic/
   illustrative background image, which is otherwise not part of this
   design system anywhere else in the product. Explicit product-owner
   decision, 7 Sept 2026 — see Design Guidance doc for the full note.
   This layout is reusable for any future auth-style page (forgot
   password, reset password, etc.) — not single-use markup.
   ------------------------------------------------------------------------- */
.auth-split {
  min-height: 100vh;
  display: flex;
}
.auth-panel {
  flex: 0 0 42%;
  max-width: 560px;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--emp-sidebar);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.auth-panel-scrim {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(17,24,39,0.52);
}
.auth-panel-brand {
  position: relative;
  z-index: 1;
  padding: 28px 32px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-panel-brand-mark {
  width: 40px; height: 40px;
  border-radius: var(--emp-radius);
  background: var(--emp-primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: var(--emp-weight-semibold);
  flex-shrink: 0;
}
.auth-panel-brand h1 {
  font-size: 16px;
  font-weight: var(--emp-weight-semibold);
  color: #FFFFFF;
  line-height: 1.3;
}
.auth-panel-brand h1 span { color: var(--emp-sidebar-logo); }
.auth-panel-brand p {
  font-size: var(--emp-text-caption);
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.auth-panel-pitch {
  position: relative;
  z-index: 1;
  padding: 0 32px;
  margin-top: 44px;
}
.auth-panel-pitch h2 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: var(--emp-weight-semibold);
  color: #FFFFFF;
  margin-bottom: 14px;
}
.auth-panel-pitch p {
  font-size: 16px;
  line-height: 24px;
  color: rgba(255,255,255,0.75);
  max-width: 380px;
  margin-bottom: 26px;
}
.auth-panel-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.auth-panel-feature .emp-icon-wrap {
  width: 22px; height: 22px; flex-shrink: 0;
  color: var(--emp-sidebar-logo);
  margin-top: 2px;
}
.auth-panel-feature .emp-icon-wrap svg { width: 100%; height: 100%; display: block; }
.auth-panel-feature strong {
  display: block;
  font-size: 15px;
  font-weight: var(--emp-weight-medium);
  color: #FFFFFF;
}
.auth-panel-feature span {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.auth-panel-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 20px 32px 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.auth-panel-footer .eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 3px;
}
.auth-panel-footer strong {
  font-size: var(--emp-text-small);
  color: #FFFFFF;
  font-weight: var(--emp-weight-medium);
}
.auth-panel-footer span {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.auth-form-side {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--emp-page-bg);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(79,70,229,0.07) 0%, rgba(79,70,229,0) 45%),
    radial-gradient(circle at 85% 75%, rgba(99,102,241,0.06) 0%, rgba(99,102,241,0) 40%),
    radial-gradient(circle at 90% 10%, rgba(165,180,252,0.10) 0%, rgba(165,180,252,0) 35%);
  padding: 32px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 44px 44px 40px;
  box-shadow: 0 8px 32px rgba(17,24,39,0.08);
}
.auth-card h2 {
  font-size: var(--emp-text-section-title);
  margin-bottom: 6px;
}
.auth-card .auth-subtitle {
  font-size: var(--emp-text-body);
  color: var(--emp-text-secondary);
  margin-bottom: 26px;
}
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: var(--emp-text-caption);
  color: var(--emp-text-muted);
}

.input-wrap { position: relative; }
.input-wrap .field-input { padding-left: 40px; }
.input-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--emp-text-muted);
  pointer-events: none;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}
.input-icon svg { width: 100%; height: 100%; display: block; }
.alert .input-icon { flex-shrink: 0; }
.toggle-pw {
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--emp-text-muted);
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.toggle-pw:hover { color: var(--emp-text-secondary); }
.toggle-pw svg { width: 16px; height: 16px; display: block; }

@media (max-width: 768px) {
  .auth-panel { display: none; }
  .auth-form-side { padding: 20px; }
}

/* -------------------------------------------------------------------------
   17. DASHBOARD
   Added 7 Sept 2026 — page header (welcome + meta + notification bell +
   avatar), module card grid, section headers, quote card.
   Module cards ship icon-based for now — approved mockup used per-card
   photography, but generating quality assets for 17+ modules is its own
   separate pass (see Design Guidance tracker). This CSS supports both:
   .module-card-photo is unused today but ready for that follow-up without
   restructuring the page.
   ------------------------------------------------------------------------- */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dash-header-welcome h1 { margin-bottom: 4px; }
.dash-header-welcome p {
  font-size: var(--emp-text-body);
  color: var(--emp-text-secondary);
}
.dash-header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.dash-header-date {
  text-align: right;
  font-size: var(--emp-text-small);
  color: var(--emp-text-secondary);
  line-height: 1.4;
}
.dash-header-date strong { display: block; color: var(--emp-text); font-weight: var(--emp-weight-medium); }

.notif-bell {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--emp-text-secondary);
  cursor: pointer;
  text-decoration: none;
}
.notif-bell:hover { background: var(--emp-neutral-tint); }
.notif-bell svg { width: 19px; height: 19px; }
.notif-bell-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 17px; height: 17px;
  border-radius: var(--emp-radius-pill);
  background: var(--emp-danger);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: var(--emp-weight-semibold);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--emp-page-bg);
}
.notif-panel {
  position: absolute;
  top: 50px; right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  box-shadow: 0 12px 32px rgba(17,24,39,0.14);
  z-index: 50;
  display: none;
}
.notif-panel.open { display: block; }
.notif-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--emp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--emp-text-small);
  font-weight: var(--emp-weight-semibold);
}
.notif-panel-header a { font-weight: var(--emp-weight-medium); font-size: var(--emp-text-caption); color: var(--emp-primary); text-decoration: none; }
.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--emp-border);
  text-decoration: none;
  color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--emp-neutral-tint); }
.notif-item.unread { background: var(--emp-primary-tint); }
.notif-item-title { font-size: var(--emp-text-small); font-weight: var(--emp-weight-medium); color: var(--emp-text); margin-bottom: 2px; }
.notif-item-message { font-size: var(--emp-text-caption); color: var(--emp-text-secondary); }
.notif-item-time { font-size: var(--emp-text-caption); color: var(--emp-text-muted); margin-top: 4px; }
.notif-empty { padding: 28px 16px; text-align: center; font-size: var(--emp-text-small); color: var(--emp-text-muted); }

.dash-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--emp-primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: var(--emp-weight-semibold);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.dash-stats .stat-card {
  flex: 1 1 220px;
}
@media (max-width: 1100px) {
  .dash-stats .stat-card { flex-basis: calc(50% - 8px); }
}

.dash-section {
  margin-bottom: 32px;
}
.dash-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.dash-section-header .heading-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-section-header h2 {
  display: inline-block;
  font-size: 17px;
  font-weight: var(--emp-weight-semibold);
  color: var(--emp-primary);
  background: var(--emp-primary-tint);
  padding: 5px 14px;
  border-radius: var(--emp-radius);
}
.dash-section-header p {
  font-size: var(--emp-text-small);
  color: var(--emp-text-secondary);
}
.dash-section-header .view-all {
  font-size: var(--emp-text-small);
  font-weight: var(--emp-weight-medium);
  color: var(--emp-primary);
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
}

.dash-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-grid > .module-card,
.dash-grid > .dash-quote-card {
  flex: 1 1 220px;
  max-width: 280px;
}
@media (max-width: 640px) {
  .dash-grid > .module-card,
  .dash-grid > .dash-quote-card {
    flex-basis: 100%;
    max-width: none;
  }
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.module-card:hover {
  border-color: var(--emp-primary);
  box-shadow: 0 6px 20px rgba(79,70,229,0.12);
  transform: translateY(-1px);
}
.module-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--emp-radius);
  background: var(--emp-primary-tint);
  color: var(--emp-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.module-card-icon svg { width: 22px; height: 22px; }
.module-card-title { font-size: var(--emp-text-body); font-weight: var(--emp-weight-medium); color: var(--emp-text); }
.module-card-desc { font-size: var(--emp-text-small); color: var(--emp-text-secondary); margin-top: 2px; }
.module-card-body { padding: 26px 4px 0; }

/* Photo + icon-badge combo, matching the originally approved mockup.
   Added 7 Sept 2026 (photo swap-in pass). Icon badge overlaps the photo's
   bottom-left corner only — .module-card-body's top padding is sized to
   clear the badge's protrusion so it never overlaps the title text.
   Cards with no photo yet (Fee Records / Defaulter Reports / Exam
   Occasion Setup — their source images had an unrelated banner baked in,
   regeneration pending) simply omit .module-card-photo and fall back to
   the icon-only layout above. */
.module-card-photo {
  width: 100%; height: 100px;
  border-radius: var(--emp-radius);
  background-size: cover;
  background-position: center;
  position: relative;
}
.module-card-photo .module-card-icon {
  position: absolute;
  left: 12px; bottom: -18px;
  width: 38px; height: 38px;
  box-shadow: 0 2px 8px rgba(17,24,39,0.18);
  border: 2px solid var(--emp-surface);
}

.dash-quote-card {
  background: linear-gradient(160deg, var(--emp-sidebar) 0%, #1E2536 100%);
  border-radius: var(--emp-radius-lg);
  padding: 28px 24px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.dash-quote-mark { font-size: 34px; color: var(--emp-sidebar-logo); line-height: 1; margin-bottom: 6px; }
.dash-quote-text { font-size: 19px; font-weight: var(--emp-weight-semibold); line-height: 1.35; }
.dash-quote-sub { font-size: var(--emp-text-small); color: rgba(255,255,255,0.6); margin-top: 16px; }

.dash-help-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--emp-primary-tint);
  border-radius: var(--emp-radius-lg);
  padding: 16px 20px;
  flex-wrap: wrap;
}
.dash-help-bar-text { display: flex; align-items: center; gap: 12px; }
.dash-help-bar-text svg { width: 22px; height: 22px; color: var(--emp-primary); flex-shrink: 0; }
.dash-help-bar-text strong { display: block; font-size: var(--emp-text-small); color: var(--emp-text); }
.dash-help-bar-text span { font-size: var(--emp-text-small); color: var(--emp-text-secondary); }

@media (max-width: 768px) {
  .dash-header-right { width: 100%; justify-content: space-between; }
  .notif-panel { right: -60px; width: 300px; }
}

/* -------------------------------------------------------------------------
   18. PAGE HEADER (icon badge + title + subtitle)
   Added 15 Sept 2026 — School Setup build (Phase 6 UI Revamp). Generic and
   reusable: any page with a settings/gear-style icon next to an h1 and a
   one-line description should use this rather than inventing its own.
   Replaces the old per-page .topbar pattern (school_setup.php's own dead
   local CSS) — .main-content + .page-header is now the standard page top.
   ------------------------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header-main { display: flex; align-items: flex-start; gap: 14px; }
.page-header-icon {
  width: 44px; height: 44px;
  border-radius: var(--emp-radius);
  background: var(--emp-primary-tint);
  color: var(--emp-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.page-header-icon svg { width: 24px; height: 24px; }
.page-header-text h1 { margin-bottom: 2px; }
.page-header-text p { font-size: var(--emp-text-body); color: var(--emp-text-secondary); }
/* Optional right-aligned context slot — added 15 Sept 2026, Subjects build.
   Existing pages (Dashboard, School Setup, Login) don't include this markup
   and are unaffected; .page-header-main + justify-content:space-between on
   the parent absorbs it only when present. */
.page-header-context {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--emp-text-small); color: var(--emp-text-secondary);
  white-space: nowrap; padding-top: 6px;
}
.page-header-context .sep { color: var(--emp-border); }

/* -------------------------------------------------------------------------
   19. SEGMENTED TAB BAR (page-level section switcher)
   Added 15 Sept 2026 — School Setup build. Distinct from Section 6's
   .tabbar (an underline-style tab for switching views *within* a card).
   This is a pill/segmented control for switching between a page's major
   sub-sections — School Setup's Profile / Sessions / Classes / Sections,
   and any future page with the same top-level-tab structure.
   ------------------------------------------------------------------------- */
.tab-segment {
  display: flex;
  gap: 4px;
  background: var(--emp-surface);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 6px;
  margin-bottom: 24px;
}
.tab-segment-item {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--emp-radius);
  font-size: var(--emp-text-body);
  font-weight: var(--emp-weight-medium);
  color: var(--emp-text-secondary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tab-segment-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.tab-segment-item:hover { background: var(--emp-neutral-tint); color: var(--emp-text); }
.tab-segment-item.active { background: var(--emp-primary); color: #FFFFFF; }
@media (max-width: 768px) {
  .tab-segment-item span { display: none; }
}

/* -------------------------------------------------------------------------
   20. TOGGLE SWITCH
   Added 15 Sept 2026 — School Setup build. First page needing an on/off
   control (NEP 2020 Compatible, Show Rank, Show Pass/Fail Result). Checked
   state uses --emp-success (green) rather than --emp-primary — matches how
   "on/enabled/showing" already reads as a positive state elsewhere in the
   product (badge-success, check icons), not a brand-color statement.
   ------------------------------------------------------------------------- */
.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.toggle-switch-track {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: var(--emp-border);
  border-radius: var(--emp-radius-pill);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.toggle-switch-track::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(17,24,39,0.25);
  transition: transform 0.15s ease;
}
.toggle-switch input:checked + .toggle-switch-track { background: var(--emp-success); }
.toggle-switch input:checked + .toggle-switch-track::before { transform: translateX(18px); }
.toggle-switch input:focus-visible + .toggle-switch-track { box-shadow: 0 0 0 3px var(--emp-primary-tint); }
.toggle-switch input:disabled + .toggle-switch-track { opacity: 0.5; cursor: not-allowed; }

.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle-row-text { display: flex; flex-direction: column; }
.toggle-row-label { font-size: var(--emp-text-body); font-weight: var(--emp-weight-medium); color: var(--emp-text); }
.toggle-row-help { font-size: var(--emp-text-caption); color: var(--emp-text-muted); margin-top: 1px; }

/* -------------------------------------------------------------------------
   21. FORM GRID (multi-column labeled-field layout)
   Added 15 Sept 2026 — School Setup build. Wraps .field-label/.field-input
   (Section 7) into a responsive 2 or 3 column layout for forms like School
   Profile, Add Session, Add Class, Add Section.
   Built with Flexbox, NOT CSS Grid — caught via a rendered proof render
   during this same build where grid-template-columns produced a single
   stacked column. Same root cause already documented for .dash-stats/
   .dash-grid (Dashboard build, 7-8 Sept): Grid does not render reliably in
   this stack. Flexbox + calc() is the project's established safe pattern —
   do not switch this back to Grid.
   ------------------------------------------------------------------------- */
.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 20px;
}
.form-grid .field-group { flex: 1 1 calc(50% - 10px); min-width: 200px; }
.form-grid.cols-3 .field-group { flex: 1 1 calc(33.333% - 14px); }
.field-group { display: flex; flex-direction: column; }
.field-group.full { flex-basis: 100% !important; }
@media (max-width: 900px) {
  .form-grid .field-group { flex-basis: 100%; }
}

/* -------------------------------------------------------------------------
   22. DASHED ADD PANEL (inline "add new record" form container)
   Added 15 Sept 2026 — School Setup build. The light-indigo dashed-border
   treatment for an inline add-form at the bottom of a list/table — Add
   Session, Add Class, Add Section, and any future "add new X" pattern.
   ------------------------------------------------------------------------- */
.add-panel {
  background: var(--emp-primary-tint);
  border: 1.5px dashed var(--emp-primary-active);
  border-radius: var(--emp-radius-lg);
  padding: 20px 22px;
  margin-top: 16px;
}
.add-panel-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2px;
}
.add-panel-header svg { width: 18px; height: 18px; color: var(--emp-primary); flex-shrink: 0; }
.add-panel-title { font-size: var(--emp-text-subsection-title); font-weight: var(--emp-weight-semibold); color: var(--emp-primary); }
.add-panel-desc { font-size: var(--emp-text-small); color: var(--emp-text-secondary); margin-bottom: 16px; }

/* -------------------------------------------------------------------------
   23. CARD HEADER (icon badge + title + description, inside a .card)
   Added 15 Sept 2026 — Subjects build (Phase 6 UI Revamp). Smaller sibling
   of Section 18's Page Header — same icon-badge-plus-text idea at card
   scale, for the header row of a section card (e.g. the Subjects table
   card, the Assessment Structure term cards, Co-Scholastic term cards).
   Uses --emp-text-card-title, reserved in Section 1's tokens since 7 Sept
   but never wired to a component until now.
   ------------------------------------------------------------------------- */
.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--emp-border);
}
.card-header-main { display: flex; align-items: center; gap: 12px; }
.card-header-icon {
  width: 36px; height: 36px;
  border-radius: var(--emp-radius);
  background: var(--emp-primary-tint);
  color: var(--emp-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-header-icon svg { width: 20px; height: 20px; }
.card-header-title { font-size: var(--emp-text-card-title); font-weight: var(--emp-weight-semibold); line-height: var(--emp-text-card-title-line); color: var(--emp-text); }
.card-header-desc { font-size: var(--emp-text-small); color: var(--emp-text-secondary); margin-top: 1px; }
.card-body-flush { padding: 0; }

/* -------------------------------------------------------------------------
   24. COMPONENT PANEL (expandable nested sub-list inside a table row)
   Added 15 Sept 2026 — Subjects build (Phase 6 UI Revamp). First instance
   of a "drill into one row" pattern — a subject's Theory/Practical
   components, shown inline below the subject row rather than a modal.
   Server-rendered via a GET param + page reload (matches the project's
   existing no-JS-required navigation pattern), not a JS accordion — so
   this is pure display CSS, no toggle/animation logic needed.
   ------------------------------------------------------------------------- */
.component-panel {
  background: var(--emp-page-bg);
  border: 1px solid var(--emp-border);
  border-radius: var(--emp-radius-lg);
  padding: 16px 18px;
  margin: 4px 12px 14px;
}
.component-panel-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.component-panel-header svg { width: 18px; height: 18px; color: var(--emp-primary); flex-shrink: 0; }
.component-panel-title { font-size: var(--emp-text-subsection-title); font-weight: var(--emp-weight-semibold); color: var(--emp-text); }
.component-panel-desc { font-size: var(--emp-text-caption); color: var(--emp-text-muted); }

.component-add-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--emp-border);
}
.component-add-row .field-group { flex: 1; }
.component-add-row .field-group.shrink { flex: 0 0 auto; }
