/* Design tokens (spec §3). Every colour, radius and font lives here. */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0a101c;
  --sidebar: #0b111d;
  --card: #0f1727;
  --card-2: #121b2d;
  --sunken: #0c1422;
  --hover: #111b2e;
  --nav-hover: #111a2b;
  --nav-active: #13213c;
  --line: #1c2638;
  --line-2: #26324a;
  --line-3: #36425a;

  /* text */
  --text: #e8edf6;
  --text-2: #9aa7bd;
  --text-3: #7a879e;  /* ≥ 4.5:1 on every dark surface (tests/test_contrast.py) */
  --on-accent: #ffffff;

  /* filled buttons: white labels keep ≥ 4.5:1 (tests/test_contrast.py) */
  --primary-bg: #2563eb;
  --primary-bg-hover: #1d4ed8;
  --success-bg: #1a7a50;
  --success-bg-hover: #166a45;

  /* blue: primary actions, active navigation, links */
  --blue: #3b82f6;
  --blue-2: #2563eb;
  --blue-soft: #122a4f;
  --blue-line: #28579e;
  --blue-text: #7fb0ff;

  /* green: success, profit, live, active */
  --green: #22c55e;
  --green-2: #16a34a;
  --green-soft: #0d2e20;
  --green-line: #1d4d36;
  --green-text: #4ade80;

  /* red: danger, stop, loss */
  --red: #ef4444;
  --red-2: #dc2626;
  --red-soft: #2a1115;
  --red-line: #6b1d24;
  --red-text: #ff6b6b;
  --red-muted: #c9b6ba;

  /* amber: pending, completed with errors */
  --amber: #f5b83d;
  --amber-soft: #3a2a0a;
  --amber-line: #6b4d10;
  --amber-text: #f5b83d;

  /* violet: admin switch */
  --violet: #7c5cff;
  --violet-soft: #221a4a;
  --violet-line: #3a2e7a;
  --violet-text: #c9bfff;

  /* broker brand colours (icons in the broker tables) */
  --brand-binance: #f0b90b;

  /* form controls */
  --input-bg: #0c1422;
  --input-line: #26324a;
  --input-text: #e8edf6;
  --placeholder: #7a879e;

  /* shape */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* focus */
  --focus-ring: 0 0 0 3px rgb(59 130 246 / 35%);

  /* layout */
  --sidebar-w: 236px;
  --topbar-h: 64px;

  /* authentication: brand panel (navy → teal) */
  --auth-brand-from: #0c1b2a;
  --auth-brand-to: #0f2a33;
  --auth-brand-text: #e8f1f4;
  --auth-brand-text-2: #9fb3bd;
  --auth-brand-accent: #34d399;
  --auth-brand-line: rgb(255 255 255 / 8%);
}

/* Light panel of the authentication screens: re-points the shared tokens so every component
   (inputs, buttons, alerts) renders light inside it. */
.theme-light {
  color-scheme: light;
  --bg: #f5f7fa;
  --card: #ffffff;
  --card-2: #f8fafc;
  --sunken: #f3f5f9;
  --hover: #f1f4f9;
  --line: #e3e8ef;
  --line-2: #d9dee7;
  --line-3: #c5ccd8;
  --text: #0f172a;
  --text-2: #5b6576;
  --text-3: #667085;
  --blue: #2563eb;
  --blue-text: #2563eb;
  --blue-soft: #eaf1ff;
  --blue-line: #bcd2fb;
  --green: #1f8a5b;
  --green-2: #1f8a5b;
  --green-soft: #e8f6ef;
  --green-line: #b9e3cd;
  --green-text: #1a7a50;
  --red-soft: #fdecec;
  --red-line: #f5c2c4;
  --red-text: #c62a31;
  --amber-soft: #fff6e5;
  --amber-line: #f3d9a4;
  --amber-text: #9a6700;
  --input-bg: #ffffff;
  --input-line: #d9dee7;
  --input-text: #0f172a;
  --placeholder: #6b7486;
  --focus-ring: 0 0 0 3px rgb(37 99 235 / 22%);
}
