/* ═══════════════════════════════════════════════════════════════════════
   ALYSIAN UI — DESIGN TOKENS
   Single source of truth for all colors, spacing, typography, shadows.
   NEVER hardcode these values in component CSS — always use var(--xxx).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── SURFACE ───────────────────────────────────────────── */
  --bg:              #fafafc;  /* page background — very subtle gray */
  --card:            #ffffff;  /* elevated surface (tables, panels) */
  --surface-subtle:  #f8fafc;  /* zebra row, table header, disabled input */
  --surface-hover:   #fafbff;  /* row hover */
  --surface-hover-2: #f1f5f9;  /* button active */

  /* ── TEXT ──────────────────────────────────────────────── */
  --text:            #111827;  /* primary body text */
  --text-strong:     #0f172a;  /* strongest text (headings) */
  --text-muted:      #6b7280;  /* secondary / meta */
  --text-faint:      #94a3b8;  /* hint, placeholder, timestamp */
  --text-on-navy:    #ffffff;  /* text on navy surfaces */

  /* ── BRAND ─────────────────────────────────────────────── */
  --primary:         #0a003e;  /* Alysian navy — use for action only */
  --primary-strong:  #070029;  /* hover / pressed */
  --primary-faint:   #f0f5ff;  /* active tab / selected tint */
  --primary-glow:    #e0e7ff;  /* extra-subtle navy tint */
  --accent:          #3b82f6;  /* bright blue accent (variance col, resize grip) */
  --accent-deep:     #1e3a8a;  /* deep accent (gradient 2nd stop) */

  /* ── BORDERS ───────────────────────────────────────────── */
  --border:          #e9eef8;  /* default border (inputs, cards, rows) */
  --border-strong:   #cbd5e1;  /* stronger border (outline buttons) */
  --border-faint:    #f1f5f9;  /* barely-there separator */

  /* ── STATUS ────────────────────────────────────────────── */
  --success:         #16a34a;  --success-bg: #dcfce7;  --success-surface: #f0fdf4;
  --warning:         #d97706;  --warning-bg: #fef3c7;  --warning-surface: #fffbeb;
  --danger:          #dc2626;  --danger-bg:  #fee2e2;  --danger-surface:  #fef2f2;
  --info:            #2563eb;  --info-bg:    #dbeafe;  --info-surface:    #eff6ff;

  /* ── RADII (pill vs box vs input) ──────────────────────── */
  --radius-sm:       6px;      /* small chips, row-action buttons */
  --radius-md:       8px;      /* inputs, selects, cards-of-cards */
  --radius-lg:       12px;     /* main cards, panels */
  --radius-xl:       16px;     /* modals, big containers */
  --radius-pill:     999px;    /* pills, tabs, status tags, action buttons */

  /* ── SHADOWS (minimal, consultancy-style) ──────────────── */
  --shadow-sm:       0 1px 3px rgba(16,24,40,0.04), 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md:       0 4px 6px rgba(16,24,40,0.04), 0 2px 4px rgba(16,24,40,0.06);
  --shadow-lg:       0 10px 15px rgba(16,24,40,0.08), 0 4px 6px rgba(16,24,40,0.05);
  --shadow-xl:       0 20px 50px rgba(0,0,0,0.25); /* modal only */

  /* ── TRANSITION ────────────────────────────────────────── */
  --transition:      all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* ── TYPOGRAPHY ────────────────────────────────────────── */
  --font-ui:         Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand:      Montserrat, var(--font-ui); /* marketing surfaces (PPTX) */

  /* Font sizes — stick to this scale */
  --fs-xxs:   9px;   /* uppercase kicker labels */
  --fs-xs:    10px;  /* table headers, small meta */
  --fs-sm:    11px;  /* tag, card body, table cell */
  --fs-base:  12px;  /* button labels, stepper */
  --fs-body:  13px;  /* form input, primary UI text */
  --fs-md:    14px;  /* secondary headings */
  --fs-lg:    16px;  /* page title small, section heading */
  --fs-xl:    18px;  /* big numbers, KPI values */
  --fs-2xl:   22px;  /* page title */

  /* Font weights */
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  /* Line heights */
  --lh-tight: 1.25;
  --lh-base:  1.4;
  --lh-loose: 1.5;

  /* Letter spacing (uppercase kickers) */
  --tracking-wide:  0.06em;
  --tracking-wider: 0.08em;

  /* ── SPACING (4px-base scale — never invent other values) ── */
  --space-1:   4px;
  --space-2:   6px;
  --space-3:   8px;
  --space-4:   10px;
  --space-5:   12px;
  --space-6:   14px;
  --space-7:   16px;
  --space-8:   20px;
  --space-9:   24px;
  --space-10:  28px;
  --space-11:  32px;
  --space-12:  40px;

  /* ── Z-INDEX stack ─────────────────────────────────────── */
  --z-sticky:   100;
  --z-dropdown: 1000;
  --z-modal:    10000;
  --z-overlay:  100000;  /* expand view, PDF overlay */
  --z-toast:    200000;
}

/* Global reset + font stack */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
