/* Author: MSK — design tokens for Nikhil's Auto Trading Bot (Minimalism & Swiss Style).
   One source of truth for the dashboard (app.css) and the login page (login.css). Light by default,
   dark when the device asks for it. Components use these semantic names only, never raw values. */
:root{
  color-scheme:light dark;

  /* colour: surfaces and ink */
  --bg:#ffffff;          /* page */
  --card:#ffffff;        /* panels and cards */
  --card2:#f5f5f5;       /* quiet surface: inputs, stats, table heads */
  --line:#e5e5e5;        /* hairline rules */
  --line2:#0a0a0a;       /* strong rules (Swiss black line) */
  --txt:#0a0a0a;         /* ink */
  --mut:#525252;         /* secondary text   (7.8:1 on --bg) */
  --faint:#6b6b6b;       /* tertiary text    (5.3:1 on --bg) */

  /* colour: single accent = ink; meaning colours for money and states */
  --accent:var(--txt);
  --accent-ink:var(--bg);  /* text on the accent */
  --up:#047857;          /* profit           (5.5:1) */
  --down:#b91c1c;        /* loss             (6.5:1) */
  --warn:#92400e;        /* attention        (7.1:1) */
  --info:#1d4ed8;        /* links            (6.7:1) */
  --danger:#b91c1c;      /* kill switch / destructive fill */
  --danger-ink:#ffffff;  /* text on danger   (6.5:1) */

  /* interaction states */
  --hover-bg:#f2f2f2;
  --active-bg:var(--txt);
  --active-ink:var(--bg);
  --focus:var(--txt);
  --focus-w:2px;
  --disabled:.4;
  --stale:.45;
  --scrim:rgba(0,0,0,.32);

  /* typography */
  --font:"Helvetica Neue",Helvetica,Arial,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --fs-xs:12px; --fs-sm:13px; --fs-md:15px; --fs-lg:20px; --fs-xl:28px; --fs-2xl:40px;
  --fw-regular:400; --fw-medium:500; --fw-bold:700;
  --lh:1.5; --lh-tight:1.1;
  --track-label:.08em;   /* uppercase labels */
  --track-display:-.02em;

  /* spacing (4px base) */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px;

  /* shape and depth: Swiss = square corners, rules not shadows */
  --radius:0; --radius-sm:0; --radius-round:50%;
  --shadow:none;
  --rule:1px solid var(--line);
  --rule-strong:2px solid var(--line2);

  /* motion and layout */
  --t:200ms;
  --hdr-h:60px;
  --tap:44px;            /* minimum touch target */
  --page-max:1320px;
}

@media (prefers-color-scheme:dark){
  :root{
    --bg:#0a0a0a; --card:#0a0a0a; --card2:#161616;
    --line:#262626; --line2:#f5f5f5;
    --txt:#f5f5f5; --mut:#a3a3a3; --faint:#8f8f8f;
    --up:#34d399; --down:#f87171; --warn:#fbbf24; --info:#93c5fd;
    --danger:#dc2626; --danger-ink:#ffffff;
    --hover-bg:#1a1a1a;
    --scrim:rgba(0,0,0,.6);
  }
}

/* Chart (livechart.js): candle and indicator lines, TradingView's familiar colours, readable in each theme. */
:root{--candle-up:#089981;--candle-down:#f23645;--chart-1:#2962ff;--chart-2:#ef6c00;--chart-3:#8e24aa;--chart-4:#00796b}
@media (prefers-color-scheme:dark){
  :root{--candle-up:#26a69a;--candle-down:#ef5350;--chart-1:#7ea6ff;--chart-2:#ffb74d;--chart-3:#ce93d8;--chart-4:#4db6ac}
}
