/**
 * TheOldBear design tokens — source of truth for the clean rebuild.
 * Load this file before any other tb-ds stylesheets.
 */

:root {
  /* —— Colours: deep navy workspace —— */
  --tb-color-bg-base: #050a12;
  --tb-color-bg-raised: #0a1424;
  --tb-color-bg-panel: #0f1c30;
  --tb-color-bg-panel-hover: #132238;
  --tb-color-bg-inset: #070f1a;

  --tb-color-border-subtle: rgba(148, 163, 184, 0.14);
  --tb-color-border-strong: rgba(148, 163, 184, 0.22);
  --tb-color-border-accent: rgba(45, 212, 191, 0.28);

  --tb-color-text-primary: #e8eef7;
  --tb-color-text-secondary: #94a3b8;
  --tb-color-text-muted: #7c8c9f;
  --tb-color-text-inverse: #062016;

  --tb-color-accent: #2dd4bf;
  --tb-color-accent-dim: rgba(45, 212, 191, 0.12);
  --tb-color-accent-strong: #14b8a6;
  --tb-color-focus-ring: rgba(45, 212, 191, 0.45);

  /* —— RAG / status —— */
  --tb-color-status-red: #fb7185;
  --tb-color-status-red-bg: rgba(251, 113, 133, 0.12);
  --tb-color-status-amber: #fbbf24;
  --tb-color-status-amber-bg: rgba(251, 191, 36, 0.12);
  --tb-color-status-green: #34d399;
  --tb-color-status-green-bg: rgba(52, 211, 153, 0.12);
  --tb-color-status-blue: #60a5fa;
  --tb-color-status-blue-bg: rgba(96, 165, 250, 0.12);
  --tb-color-status-neutral: #94a3b8;
  --tb-color-status-neutral-bg: rgba(148, 163, 184, 0.1);

  /* —— Spacing scale (rem) —— */
  --tb-space-0: 0;
  --tb-space-1: 0.25rem;
  --tb-space-2: 0.5rem;
  --tb-space-3: 0.75rem;
  --tb-space-4: 1rem;
  --tb-space-5: 1.25rem;
  --tb-space-6: 1.5rem;
  --tb-space-8: 2rem;
  --tb-space-10: 2.5rem;
  --tb-space-12: 3rem;

  /* —— Radius —— */
  --tb-radius-sm: 8px;
  --tb-radius-md: 12px;
  --tb-radius-lg: 16px;
  --tb-radius-xl: 20px;
  --tb-radius-pill: 999px;

  /* —— Typography —— */
  --tb-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tb-font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;

  --tb-text-xs: 0.6875rem;
  --tb-text-sm: 0.8125rem;
  --tb-text-base: 0.9375rem;
  --tb-text-md: 1rem;
  --tb-text-lg: 1.125rem;
  --tb-text-xl: 1.25rem;
  --tb-text-2xl: 1.5rem;
  --tb-text-3xl: 1.875rem;

  --tb-font-normal: 400;
  --tb-font-medium: 600;
  --tb-font-bold: 700;
  --tb-font-heavy: 800;

  --tb-leading-tight: 1.2;
  --tb-leading-snug: 1.35;
  --tb-leading-normal: 1.5;
  --tb-leading-relaxed: 1.6;

  --tb-tracking-tight: -0.02em;
  --tb-tracking-wide: 0.06em;

  /* —— Shadows —— */
  --tb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --tb-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --tb-shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.35);
  --tb-shadow-inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* —— Z-index scale —— */
  --tb-z-base: 0;
  --tb-z-dropdown: 100;
  --tb-z-sticky: 200;
  --tb-z-overlay: 300;
  --tb-z-modal: 400;
  --tb-z-toast: 500;

  /* —— Dashboard / card rhythm —— */
  --tb-dash-gap: var(--tb-space-4);
  --tb-dash-gap-lg: var(--tb-space-6);
  --tb-dash-card-pad: var(--tb-space-5);
  --tb-dash-card-radius: var(--tb-radius-lg);
  --tb-dash-card-border: 1px solid var(--tb-color-border-subtle);
  --tb-dash-kpi-min-height: 7.5rem;
  --tb-dash-section-gap: var(--tb-space-8);
  --tb-dash-content-max: min(100%, 90rem);
  --tb-dash-sidebar-width: 14.5rem;
  --tb-dash-topbar-height: 4.5rem;
}
