/* ── Design Tokens ─────────────────────────────────────────────────
   Single source of truth for all visual values.
   Theme files (themes/dark.css, themes/light.css) override these.
   NEVER put component rules here — tokens only.                    */

:root {
  /* ── Surface ── */
  --color-bg:             #0d1117;
  --color-surface:        #161b22;
  --color-surface-hover:  #21262d;
  --color-surface-subtle: #161b22;
  --color-overlay:        rgba(0,0,0,0.6);

  /* ── Border ── */
  --color-border:        #30363d;
  --color-border-active: #58a6ff;

  /* ── Text ── */
  --color-text:          #e6edf3;
  --color-text-muted:    #8b949e;
  --color-text-secondary: #8b949e;
  --color-text-inverse:  #ffffff;

  /* ── Brand / Accent ── */
  --color-accent:        #58a6ff;
  --color-accent-hover:  #79b8ff;
  --color-accent-subtle: rgba(88,166,255,0.12);

  /* ── Semantic ── */
  --color-error:         #f85149;
  --color-error-hover:   #ff6e67;
  --color-success:       #3fb950;
  --color-danger:        #ff0000;
  --color-danger-hover:  #ff3333;

  /* ── Badges ── */
  --color-badge-success-bg:   rgba(63,185,80,0.15);
  --color-badge-success-text: #3fb950;
  --color-badge-info-bg:      rgba(88,166,255,0.15);
  --color-badge-info-text:    #58a6ff;
  --color-badge-warning-bg:   rgba(227,179,65,0.15);
  --color-badge-warning-text: #e3b341;
  --color-badge-error-bg:     rgba(248,81,73,0.15);
  --color-badge-error-text:   #f85149;
  --color-badge-purple-bg:    rgba(163,113,247,0.15);
  --color-badge-purple-text:  #a371f7;

  /* ── Row tints (import preview tables) ── */
  --color-row-confirmed: rgba(63,185,80,0.06);
  --color-row-mapped:    rgba(88,166,255,0.05);
  --color-row-imported:  rgba(63,185,80,0.04);
  --color-row-pending:   rgba(248,81,73,0.05);

  /* ── Layout ── */
  --content-max-width: 1120px;

  /* ── Spacing scale ── */
  --space-2xs: 0.125rem;
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  0.75rem;
  --space-lg:  1rem;
  --space-xl:  1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;
  --space-tab-gap: 0.4rem;

  /* ── Typography ── */
  --font-family:    'DM Sans', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.8125rem;
  --font-size-base: 0.875rem;
  --font-size-md:   0.9rem;
  --font-size-lg:   0.95rem;
  --font-size-xl:   1.1rem;
  --font-size-2xl:  1.25rem;
  --font-size-3xl:  1.35rem;
  --font-size-4xl:  1.75rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semi:   600;
  --font-weight-bold:   700;

  /* ── Border radius ── */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-pill: 999px;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.12);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.2);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.3);

  /* ── Z-index ── */
  --z-dropdown: 5;
  --z-modal:    10;
  --z-toast:    20;

  /* ── Transitions ── */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
}
