/* Design tokens v2 — premium dark. Consumed as CSS variables; no build step.
   Rule kept from ADR 0001: status is never colour-only (dot + label + shape). */
:root {
  /* — brand + semantics ————————————————————————————— */
  --brand-300: #b9a6ff;
  --brand-400: #a78bfa;
  --brand: #7c5cff;
  --brand-600: #6a45f0;
  --brand-soft: rgba(124, 92, 255, 0.16);
  --brand-glow: rgba(124, 92, 255, 0.45);

  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --crit: #f43f5e;
  --crit-soft: rgba(244, 63, 94, 0.14);
  --info: #22d3ee;
  --info-soft: rgba(34, 211, 238, 0.14);
  --idle: #8b95a7;

  /* — surfaces ———————————————————————————————————— */
  --bg-0: #05070d;
  --bg-1: #0a0e18;
  --bg-2: #101627;
  --bg-3: #161e33;
  --bg-elev: #0d1322;
  --glass: rgba(255, 255, 255, 0.032);
  --glass-2: rgba(255, 255, 255, 0.055);

  /* — lines ——————————————————————————————————————— */
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --line-brand: rgba(124, 92, 255, 0.35);

  /* — text ———————————————————————————————————————— */
  --fg: #eaeef8;
  --fg-2: #c3cadb;
  --fg-dim: #8b95a7;
  --fg-faint: #808b9e;

  /* — space (4pt) ————————————————————————————————— */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* — radius —————————————————————————————————————— */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-2xl: 32px; --r-pill: 999px;

  /* — type ———————————————————————————————————————— */
  --font-ui: "Inter", "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --fs-4xl: 44px;
  --lh-tight: 1.15;
  --lh-body: 1.55;

  /* — motion —————————————————————————————————————— */
  --t-micro: 140ms;
  --t-layout: 240ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* — elevation ——————————————————————————————————— */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-brand: 0 12px 34px rgba(124, 92, 255, 0.28);

  /* — layout —————————————————————————————————————— */
  --side-w: 264px;
  --side-rail: 76px;
  --top-h: 64px;
  --content-max: 1680px;

  /* — z ——————————————————————————————————————————— */
  --z-sticky: 10; --z-nav: 40; --z-drawer: 60; --z-drop: 100; --z-sheet: 200; --z-modal: 300; --z-toast: 400; --z-palette: 500;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-micro: 0ms; --t-layout: 0ms; }
}

/* numbers align; identifiers are monospace by contract */
.num, .kpi-value, td.num, .dt td.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mono, .tun-name, .ip { font-family: var(--font-mono); font-size: 0.95em; }

/* focus is always visible and never colour-only */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
::selection { background: var(--brand-soft); color: var(--fg); }
