/* ==========================================================================
   CrazyEditor Design Tokens
   Design System v1.0 — SaaS Analytics Dashboard + Glassmorphism

   This file is the SINGLE SOURCE OF TRUTH for all design tokens.
   All other CSS files reference these variables.
   DO NOT hardcode hex values in any CSS — use var(--*) instead.
   ========================================================================== */

:root {
  /* ---------- Colors: Brand ---------- */
  --color-primary: #6366F1;          /* Indigo 500 — brand main */
  --color-primary-hover: #4F46E5;    /* Indigo 600 — hover/press */
  --color-primary-light: #EEF2FF;    /* Indigo 50  — highlight bg, badge bg */
  --color-secondary: #818CF8;        /* Indigo 400 — secondary accent */

  /* ---------- Colors: CTA ---------- */
  --color-cta: #10B981;              /* Emerald 500 — call-to-action */

  /* ---------- Colors: Semantic ---------- */
  --color-success: #10B981;          /* Emerald 500 */
  --color-warning: #F59E0B;          /* Amber 500 */
  --color-error: #EF4444;            /* Red 500 */
  --color-info: #3B82F6;             /* Blue 500 */

  /* ---------- Colors: Neutral ---------- */
  --color-bg: #F8FAFC;              /* Slate 50  — page background */
  --color-surface: #FFFFFF;          /* white     — card/panel bg */
  --color-text: #1E293B;            /* Slate 800 — body text */
  --color-text-secondary: #64748B;  /* Slate 500 — helper text */
  --color-text-disabled: #94A3B8;   /* Slate 400 — disabled text */
  --color-border: #E2E8F0;          /* Slate 200 — borders */
  --color-divider: #F1F5F9;         /* Slate 100 — dividers */
  --color-overlay: rgba(15, 23, 42, 0.5); /* Slate 900 @ 50% — modal overlay */

  /* ---------- Colors: Semantic Light Backgrounds ---------- */
  --color-success-light: rgba(16, 185, 129, 0.1);
  --color-warning-light: rgba(245, 158, 11, 0.1);
  --color-error-light: rgba(239, 68, 68, 0.1);
  --color-info-light: rgba(59, 130, 246, 0.1);

  /* ---------- Colors: Semantic Dark ---------- */
  --color-error-dark: #DC2626;            /* Red 600 — danger text, error emphasis */
  --color-success-dark: #059669;          /* Emerald 600 — success text emphasis */
  --color-warning-dark: #B45309;          /* Amber 700 — warning text emphasis */
  --color-info-dark: #1E40AF;            /* Blue 800 — info text emphasis */

  /* ---------- Colors: Semantic Solid Backgrounds ---------- */
  --color-error-bg: #FEF2F2;             /* Red 50 — error section bg */
  --color-success-bg: #D1FAE5;           /* Emerald 100 — success badge bg */
  --color-warning-bg: #FEF3C7;           /* Amber 100 — warning badge bg */
  --color-info-bg: #DBEAFE;              /* Blue 100 — info badge bg */

  /* ---------- Colors: Semantic Borders ---------- */
  --color-error-border: #FECACA;          /* Red 200 — danger button border */
  --color-success-border: #6EE7B7;        /* Emerald 300 — success accent border */
  --color-warning-border: #FBBF24;        /* Amber 400 — warning accent border */

  /* ---------- Colors: Primary Extended ---------- */
  --color-primary-border: #A5B4FC;        /* Indigo 300 — hover outlines */
  --color-primary-selected: #F5F3FF;      /* Violet 50 — selected item bg */

  /* ---------- Glassmorphism ---------- */
  --glass-blur: 12px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-dark: rgba(0, 0, 0, 0.3);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);

  /* ---------- Typography: Families ---------- */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* ---------- Typography: Size Scale (Major Third 1.25) ---------- */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */

  /* ---------- Typography: Line Height ---------- */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  /* ---------- Typography: Weight ---------- */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* ---------- Spacing Scale ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---------- Border Radius ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ---------- Box Shadow ---------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* ---------- Z-Index Scale ---------- */
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-tooltip: 60;
  --z-toast: 70;

  /* ---------- Easing ---------- */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* ---------- Colors: Terminal / Code Dark ---------- */
  --terminal-bg: #1e1e1e;            /* VS Code dark background */
  --terminal-surface: #252526;        /* VS Code dark panel */
  --terminal-text: #d4d4d4;          /* VS Code dark text */
  --terminal-text-secondary: #888888; /* VS Code dark muted text */
  --terminal-accent: #8b5cf6;        /* Violet 500 — action links */

  /* ---------- Layout ---------- */
  --banner-height: 56px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 64px;
}
