/* v2 design tokens — scoped under body[data-theme="v2"].
   Layered ON TOP of the v1 :root tokens in dashboard.css so the existing
   color variables stay defined for legacy CSS while v2 gets a refined palette,
   spacing scale, type scale, motion, and focus tokens. */

body[data-theme="v2"] {
  /* ── Refined surface palette (cooler, deeper, slightly higher contrast) ── */
  --bg:              #04091a;
  --bg-soft:         #081226;
  --bg-deep:         #060e1f;
  --panel:           rgba(12, 22, 42, .92);
  --panel-2:         rgba(16, 28, 52, .92);
  --panel-3:         rgba(22, 38, 66, .92);
  --panel-solid:     #0f1c36;
  --line:            rgba(157, 189, 255, .14);
  --line-strong:     rgba(157, 189, 255, .26);

  /* ── Text — slightly punchier ── */
  --text:            #eaf1fb;
  --text-strong:     #f4f8ff;
  --text-secondary:  #c9d6ea;
  --muted:           #93a3bd;
  --muted-2:         #94beee;

  /* ── Accents — keep names; tune values ── */
  --blue:            #6cb8ff;
  --blue-2:          #93dcff;
  --info-soft:       #d6eaff;
  --steel:           #4d6f9d;
  --gold:            #dabb6a;
  --gold-soft:       #f6deaa;
  --green:           #2fdfa3;
  --positive-soft:   #b3f3d7;
  --amber:           #f5c773;
  --warning-soft:    #ffe0a8;
  --red:             #f37c91;
  --danger-soft:     #ffc9d3;

  /* ── Shadows ── */
  --shadow:          0 28px 90px rgba(0, 0, 0, .42);
  --shadow-soft:     0 18px 48px rgba(0, 0, 0, .28);
  --shadow-pop:      0 8px 24px rgba(108, 184, 255, .18);

  /* ── Radii ── */
  --radius:          20px;
  --radius-sm:       12px;
  --radius-xs:       8px;
  --radius-pill:     999px;

  /* ── Spacing scale — 4px grid ── */
  --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-9:         56px;
  --space-10:        72px;

  /* ── Font families — the consolidated "clean pair" ──
     Inter for all UI text, JetBrains Mono for numbers/labels/code.
     Everything in the v2 layer should reference these tokens rather
     than re-declaring font stacks, so the typography stays consistent. */
  --font-sans:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:       'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ── Type scale ── */
  --text-xs:         11px;
  --text-sm:         13px;
  --text-md:         14px;
  --text-base:       15px;
  --text-lg:         17px;
  --text-xl:         20px;
  --text-2xl:        26px;
  --text-3xl:        34px;
  --leading-tight:   1.15;
  --leading-normal:  1.45;
  --leading-relaxed: 1.6;
  --weight-regular:  500;
  --weight-medium:   600;
  --weight-strong:   700;
  --weight-bold:     800;

  /* ── Borders ── */
  --border-subtle:   1px solid var(--line);
  --border-strong:   1px solid var(--line-strong);

  /* ── Motion ── */
  --ease-out:        cubic-bezier(.2, .8, .2, 1);
  --ease-in-out:     cubic-bezier(.65, .05, .35, 1);
  --duration-fast:   140ms;
  --duration-base:   220ms;
  --duration-slow:   360ms;

  /* ── Focus ring ── */
  --focus-ring:      #6cb8ff;
  --focus-ring-soft: rgba(108, 184, 255, .35);

  /* Base UI font for the whole v2 shell. Component rules that need the
     mono face (numbers, labels) opt in with var(--font-mono). This replaces
     the previous mix of Helvetica Neue / Manrope / Inter across the app. */
  font-family: var(--font-sans);
}

/* Reduced motion users opt out of transitions/animations entirely. */
@media (prefers-reduced-motion: reduce) {
  body[data-theme="v2"] {
    --duration-fast:  0ms;
    --duration-base:  0ms;
    --duration-slow:  0ms;
  }
}
