/*
 * TradeLoop design tokens.
 *
 * Dark is the default. theme.js sets data-theme="light|dark" on <html> before first paint;
 * without JavaScript the prefers-color-scheme block below still follows the system.
 * Every colour used by style.css comes from this file.
 */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d1511;
  --bg-2: #111c16;
  --surface: #16211b;
  --surface-2: #1c2a23;
  --surface-3: #25352b;
  --input-bg: #0f1813;
  --line: #2c3d33;
  --line-soft: #233229;

  --text: #eef3ea;
  --muted: #9bad9f;

  --accent: #b6d99b;
  --accent-hover: #c9e8b0;
  --on-accent: #14231a;
  --accent-ink: #b6d99b;
  --accent-soft: rgba(182, 217, 155, 0.12);
  --accent-line: rgba(182, 217, 155, 0.38);

  --gain: #8fe3a6;
  --gain-soft: rgba(143, 227, 166, 0.22);
  --loss: #f49b96;
  --loss-soft: rgba(244, 155, 150, 0.22);

  --warn-bg: #352e20;
  --warn-line: #66533b;
  --warn-text: #ebd6ab;

  --coin-bg: #2b3d30;
  --coin-fg: #b6d99b;
  --coin-eth-bg: #2c3350;
  --coin-eth-fg: #b8c4ed;
  --coin-sol-bg: #25423a;
  --coin-sol-fg: #9ce5d0;

  --glass: rgba(18, 29, 23, 0.72);
  --overlay: rgba(3, 9, 6, 0.62);
  --spot: rgba(182, 217, 155, 0.09);
  --hero-card: linear-gradient(140deg, #223a2a 0%, #16251c 70%);
  --pro-card: linear-gradient(155deg, #2a3f2b 0%, #17231c 75%);
  --chart-grid: #2f4035;

  --aurora-1: rgba(110, 196, 140, 0.30);
  --aurora-2: rgba(86, 156, 196, 0.20);
  --aurora-3: rgba(182, 217, 155, 0.22);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 34px 80px -24px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 8px 22px -8px rgba(182, 217, 155, 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f6ef;
  --bg-2: #e8efe1;
  --surface: #ffffff;
  --surface-2: #f1f5ec;
  --surface-3: #e3ecd9;
  --input-bg: #fbfcf9;
  --line: #d3dfc9;
  --line-soft: #e3eadc;

  --text: #15231b;
  --muted: #566a5b;

  --accent: #b6d99b;
  --accent-hover: #a5cc88;
  --on-accent: #14231a;
  --accent-ink: #2b6a3c;
  --accent-soft: rgba(52, 118, 68, 0.09);
  --accent-line: rgba(43, 106, 60, 0.34);

  --gain: #1c7945;
  --gain-soft: rgba(28, 121, 69, 0.18);
  --loss: #c13d36;
  --loss-soft: rgba(193, 61, 54, 0.16);

  --warn-bg: #fbf1d8;
  --warn-line: #e3cf9a;
  --warn-text: #6b531a;

  --coin-bg: #e3efd8;
  --coin-fg: #2b6a3c;
  --coin-eth-bg: #e4e8f8;
  --coin-eth-fg: #3d4e9a;
  --coin-sol-bg: #d8f0e8;
  --coin-sol-fg: #1d7a64;

  --glass: rgba(255, 255, 255, 0.74);
  --overlay: rgba(20, 38, 27, 0.38);
  --spot: rgba(52, 140, 80, 0.10);
  --hero-card: linear-gradient(140deg, #ffffff 0%, #eaf3e1 100%);
  --pro-card: linear-gradient(155deg, #f4fbec 0%, #e1eed3 100%);
  --chart-grid: #d6e1cd;

  --aurora-1: rgba(120, 200, 140, 0.30);
  --aurora-2: rgba(110, 170, 210, 0.22);
  --aurora-3: rgba(182, 217, 155, 0.45);

  --shadow-sm: 0 1px 2px rgba(30, 60, 40, 0.08);
  --shadow-md: 0 10px 28px -12px rgba(30, 70, 45, 0.22);
  --shadow-lg: 0 34px 80px -28px rgba(30, 70, 45, 0.32);
  --shadow-accent: 0 8px 22px -8px rgba(60, 130, 80, 0.45);
}

/* No-JS fallback: follow the system when theme.js has not set data-theme. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;

    --bg: #f3f6ef;
    --bg-2: #e8efe1;
    --surface: #ffffff;
    --surface-2: #f1f5ec;
    --surface-3: #e3ecd9;
    --input-bg: #fbfcf9;
    --line: #d3dfc9;
    --line-soft: #e3eadc;
    --text: #15231b;
    --muted: #566a5b;
    --accent-hover: #a5cc88;
    --accent-ink: #2b6a3c;
    --accent-soft: rgba(52, 118, 68, 0.09);
    --accent-line: rgba(43, 106, 60, 0.34);
    --gain: #1c7945;
    --gain-soft: rgba(28, 121, 69, 0.18);
    --loss: #c13d36;
    --loss-soft: rgba(193, 61, 54, 0.16);
    --warn-bg: #fbf1d8;
    --warn-line: #e3cf9a;
    --warn-text: #6b531a;
    --coin-bg: #e3efd8;
    --coin-fg: #2b6a3c;
    --glass: rgba(255, 255, 255, 0.74);
    --overlay: rgba(20, 38, 27, 0.38);
    --spot: rgba(52, 140, 80, 0.10);
    --hero-card: linear-gradient(140deg, #ffffff 0%, #eaf3e1 100%);
    --pro-card: linear-gradient(155deg, #f4fbec 0%, #e1eed3 100%);
    --chart-grid: #d6e1cd;
    --shadow-sm: 0 1px 2px rgba(30, 60, 40, 0.08);
    --shadow-md: 0 10px 28px -12px rgba(30, 70, 45, 0.22);
    --shadow-lg: 0 34px 80px -28px rgba(30, 70, 45, 0.32);
  }
}
