/* Design tokens for chatbridge-v2 admin.
 *
 * THEME CORRECTION (AK #14997 / vm-cx1 #14998/#15008): the warm-ink
 * "control-room" theme read as heavy/odd/decorative. New direction = lift v1's
 * (chatbridge-online) ACTUAL visual language: GitHub-dark — cool neutral
 * surfaces, blue accent + links, green primary buttons, subtle borders, quiet
 * chrome, system fonts (no decorative serif). Calm, professional, FAMILIAR.
 * Token NAMES are unchanged so every component recolors in place; only VALUES
 * move from warm-ink → v1 cool-neutral. Still dark-only (v1 is dark; "light"
 * here = airy/quiet, not a light palette).
 */
:root {
  /* ── surface (GitHub cool-dark, v1 #0d1117 family) ───────────────── */
  --bg:            #0d1117;
  --bg-soft:       #0d1117;
  --bg-elev:       #161b22;
  --card:          #161b22;
  --card-soft:     #0d1117;

  /* ── ink (cool, not paper-warm) — WCAG AA on --bg ────────────────── */
  --ink:           #e6edf3;
  --ink-soft:      #c9d1d9;
  --ink-mid:       #b1bac4;
  --muted:         #8b949e;   /* v1 muted family, AA-tuned (5.0:1 on --bg) */
  --ink-faint:     #6e7681;

  /* ── lines (subtle, v1 #30363d) ──────────────────────────────────── */
  --hairline:      #21262d;
  --hairline-strong: #30363d;

  /* ── signature (accent — focus, links, active nav, brand). v1 BLUE,
        replacing the warm-tan that read as "odd". ─────────────────── */
  --signature:     #1f6feb;
  --signature-soft: rgba(31, 111, 235, 0.15);
  --signature-tint: rgba(31, 111, 235, 0.08);

  /* ── action (green primary button — GitHub green, calmer than the old
        bright #22C55E; white text on solid). Reserved for THE CTA. ── */
  --go:            #238636;
  --go-hover:      #2ea043;
  --go-on-go:      #ffffff;
  --go-soft:       rgba(35, 134, 54, 0.15);

  /* ── state colors (GitHub semantic — never decorative) ───────────── */
  --good:          #3fb950;
  --good-soft:     rgba(63, 185, 80, 0.15);
  --warn:          #d29922;
  --warn-soft:     rgba(210, 153, 34, 0.15);
  --danger:        #f85149;
  --danger-soft:   rgba(248, 81, 73, 0.15);
  --info:          #58a6ff;
  --info-soft:     rgba(88, 166, 255, 0.14);

  /* legacy aliases (for unchanged JS that may reference old names) */
  --accent:        var(--signature);
  --accent-soft:   var(--signature-soft);
  --accent-15:     var(--signature-soft);
  --good-15:       var(--good-soft);
  --warn-15:       var(--warn-soft);
  --danger-15:     var(--danger-soft);

  /* v1 chat-port aliases — ported v1 chat CSS resolves onto these. */
  --panel:         var(--card);
  --text:          var(--ink);
  --border:        var(--hairline-strong);
  --mono:          var(--font-mono);

  /* ── type — system fonts (v1 uses pure system; the decorative serif is
        neutralised to sans so "brand"/empty-state headers read clean) ── */
  --font-serif:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* legacy alias */
  --font-display:  var(--font-sans);
  --font-body:     var(--font-sans);

  /* ── type scale (calmer hierarchy — smaller headings, v1-tight) ──── */
  --size-h1:        18px;
  --size-h2:        15px;
  --size-h3:        14px;
  --size-body:      14px;
  --size-small:     13px;
  --size-tiny:      12px;
  --size-mono:      12.5px;
  --size-mono-small: 11.5px;
  --size-mono-tiny: 10.5px;

  /* ── spacing (4px base, dense scale) ─────────────────────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-10: 56px;

  /* ── radius (v1 ~6px, restrained) ────────────────────────────────── */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;

  /* ── shell (lighter chrome — shorter header, v1 ~36-44px) ────────── */
  --sidebar-w:     200px;
  --side-panel-w:  420px;
  --header-h:      48px;

  /* ── motion ──────────────────────────────────────────────────────── */
  --ease:    cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast:  150ms var(--ease);
  --t-med:   220ms var(--ease);

  /* Min viewport — desktop-only */
  --min-viewport: 1280px;
}
