/* ExamVault admin tokens — load before admin.css.
   --brand and --accent come from settings; the layout should also print the derived
   --brand-ink, --accent-ink, --accent-soft, --on-brand from App\Support\BrandColors
   in a <style>:root{...}</style> block so they're contrast-safe for any palette.
   The color-mix() fallbacks below are only used if the server values are missing. */

:root {
  --brand: #172B4D;
  --accent: #0F9D92;
  --brand-ink: var(--brand);
  --on-brand: #fff;
  --accent-ink: color-mix(in oklab, var(--accent) 78%, black);
  --accent-soft: color-mix(in oklab, var(--accent) 12%, white);

  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-alt: #EEF2F7;
  --text: #172033;
  --muted: #667085;
  --muted-2: #475467;
  --border: #E5E9F0;
  --input-border: #D0D5DD;
  --error: #B42318;
  --error-fill: #D92D20;
  --error-soft: #FEF3F2;
  --warning: #B54708;
  --warning-soft: #FFF4E0;
  --success: #067647;
  --success-soft: #ECFDF3;
  --toast: #172033;

  --font: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-tag: 6px; --r-control: 8px; --r-panel: 14px; --r-dialog: 16px; --r-pill: 999px;
  --e1: 0 1px 2px rgba(16, 24, 40, .06);
  --e2: 0 8px 24px rgba(16, 24, 40, .12);
  --e3: 0 24px 48px rgba(16, 24, 40, .2);
  --scrim: rgba(16, 24, 40, .48);

  --t-fast: 150ms; --t-std: 200ms; --t-emph: 250ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

:root[data-theme="dark"] {
  --bg: #0E1626;
  --surface: #162034;
  --surface-alt: #1D2940;
  --text: #E6EAF2;
  --muted: #98A2B3;
  --muted-2: #B4BECE;
  --border: #27344D;
  --input-border: #3A4760;
  --error: #F97066;
  --error-soft: #3B1D1D;
  --warning: #FDB022;
  --warning-soft: #3A2E17;
  --success: #75E0A7;
  --success-soft: #0F2E21;
  --accent-ink: color-mix(in oklab, var(--accent) 70%, white);
  --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--surface));
  --e1: none; --e2: 0 0 0 1px var(--border); --e3: 0 0 0 1px var(--border);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-std: 0ms; --t-emph: 0ms; }
}

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-control); }
