/* ========================================
   Design Tokens - Trade Manager
   ======================================== */

:root {
  /* === Colors === */

  /* Background layers */
  --bg-base: #0a0e14;
  --bg-surface: #131920;
  --bg-elevated: #1a2230;
  --bg-hover: #222d3d;

  /* Borders */
  --border-subtle: #2a3545;
  --border-default: #3a4555;
  --border-strong: #4a5565;

  /* Text */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0e14;

  /* Brand / Primary */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-muted: rgba(59, 130, 246, 0.15);
  --primary-glow: rgba(59, 130, 246, 0.4);

  /* Semantic colors */
  --success: #22c55e;
  --success-hover: #16a34a;
  --success-muted: rgba(34, 197, 94, 0.15);
  --success-glow: rgba(34, 197, 94, 0.4);

  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --warning-glow: rgba(245, 158, 11, 0.4);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-muted: rgba(239, 68, 68, 0.15);
  --danger-glow: rgba(239, 68, 68, 0.4);

  /* === Typography === */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Font sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 0.9375rem; /* 15px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.375rem;    /* 22px */
  --text-2xl: 1.75rem;    /* 28px */
  --text-3xl: 2.25rem;    /* 36px */

  /* Font weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* === Spacing === */

  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */

  /* === Layout === */

  --header-height: 64px;
  --panel-gap: var(--space-5);
  --card-padding: var(--space-5);
  --border-radius-sm: 6px;
  --border-radius: 10px;
  --border-radius-lg: 14px;
  --border-radius-xl: 20px;

  /* === Effects === */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* === Z-index layers === */

  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-tooltip: 250;
  --z-modal: 300;
  --z-toast: 400;
}

/* Light theme overrides */
[data-theme="light"] {
  --bg-base: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #e2e8f0;

  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  --border-strong: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-muted: rgba(37, 99, 235, 0.12);
  --primary-glow: rgba(37, 99, 235, 0.3);

  --success: #16a34a;
  --success-hover: #15803d;
  --success-muted: rgba(22, 163, 74, 0.12);

  --warning: #d97706;
  --warning-hover: #b45309;
  --warning-muted: rgba(217, 119, 6, 0.12);

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-muted: rgba(220, 38, 38, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}