/* Design tokens — Dark theme default + Light theme via [data-theme="light"] */

:root,
[data-theme="dark"] {
  /* Backgrounds */
  --bg-0:       #0a0d12;
  --bg-1:       #0f1419;
  --bg-2:       #161b22;
  --bg-3:       #21262d;
  --bg-hover:   #2d333b;
  --border:     #30363d;
  --border-strong: #484f58;

  /* Text */
  --text-1:     #e6edf3;
  --text-2:     #8b949e;
  --text-3:     #6e7681;
  --text-faint: #484f58;

  /* Trading semantics */
  --green:      #3fb950;
  --green-bg:   #0d2818;
  --green-soft: #1f7a3e;
  --red:        #f85149;
  --red-bg:     #28100f;
  --red-soft:   #b91c1c;
  --blue:       #58a6ff;
  --blue-bg:    #0d2e4a;
  --yellow:     #e3b341;
  --yellow-bg:  #2a1f00;
  --purple:     #bc8cff;
  --purple-bg:  #1f1f3a;
  --orange:     #ffa657;
  --orange-bg:  #2a1a0a;

  /* Charts */
  --chart-grid: rgba(48,54,61,0.4);
  --chart-cross: rgba(88,166,255,0.4);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow:     0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 10px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] {
  /* Light theme — wit/grijs basis */
  --bg-0:       #ffffff;
  --bg-1:       #f8fafc;
  --bg-2:       #f1f5f9;
  --bg-3:       #e2e8f0;
  --bg-hover:   #cbd5e1;
  --border:     #cbd5e1;
  --border-strong: #94a3b8;

  --text-1:     #0f172a;
  --text-2:     #475569;
  --text-3:     #64748b;
  --text-faint: #94a3b8;

  /* Trading colors (iets aangepast voor light bg) */
  --green:      #16a34a;
  --green-bg:   #dcfce7;
  --green-soft: #22c55e;
  --red:        #dc2626;
  --red-bg:     #fee2e2;
  --red-soft:   #ef4444;
  --blue:       #2563eb;
  --blue-bg:    #dbeafe;
  --yellow:     #ca8a04;
  --yellow-bg:  #fef3c7;
  --purple:     #9333ea;
  --purple-bg:  #f3e8ff;
  --orange:     #ea580c;
  --orange-bg:  #ffedd5;

  --chart-grid: rgba(203,213,225,0.5);
  --chart-cross: rgba(37,99,235,0.4);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow:     0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 32px rgba(0,0,0,0.12);
}

/* Typography */
:root {
  --font-ui:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

/* Sizing */
:root {
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --gap:       16px;
  --gap-sm:    8px;
  --gap-lg:    24px;
  --card-pad:  20px;

  --sidebar-w:    250px;
  --topbar-h:     56px;
  --tickerbar-h:  32px;
}

/* Animation */
:root {
  --t-fast: 120ms ease-out;
  --t-base: 200ms ease-out;
  --t-slow: 360ms ease-out;
}

/* Reset basics */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; font-family: var(--font-ui); scroll-behavior: smooth; }
body {
  background-color: var(--bg-0);
  color: var(--text-1);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* Cijfers altijd monospace voor tabel-uitlijning */
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Utility colors */
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
