/* ------------------------------------------------------------------
   Design tokens.
   Tema escuro e o padrao; [data-theme="light"] redefine as mesmas
   variaveis. Nenhum componente usa cor literal - sempre var(--...).
   ------------------------------------------------------------------ */

:root,
:root[data-theme="dark"] {
  --bg: #0e1116;
  --bg-elevated: #161b22;
  --bg-sunken: #0a0d12;
  --surface: #1b222c;
  --surface-hover: #222b37;
  --border: #262f3d;
  --border-strong: #35415280;

  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --text-faint: #6b7785;

  --accent: #ff8a3d;
  --accent-strong: #ff6b12;
  --accent-soft: #ff8a3d22;
  --accent-text: #12161c;

  --positive: #3fb96b;
  --positive-soft: #3fb96b1f;
  --negative: #ef5a5a;
  --negative-soft: #ef5a5a1f;
  --warning: #e0b341;
  --warning-soft: #e0b3411f;
  --info: #4aa3ff;

  --good: #3fb96b;
  --warn: #e0b341;
  --crit: #ef5a5a;

  /* Serie categorica: composicao de custo e categorias financeiras. */
  --s1: #ff8a3d;
  --s2: #4aa3ff;
  --s3: #3fb96b;
  --s4: #e0b341;
  --s5: #d55181;
  --s6: #a78bfa;
  --s7: #38bdf8;
  --s8: #94a3b8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --header-height: 64px;
  --content-max: 1440px;
}

:root[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-elevated: #ffffff;
  --bg-sunken: #eaeef3;
  --surface: #ffffff;
  --surface-hover: #f2f5f9;
  --border: #dde3ea;
  --border-strong: #c4ced9;

  --text: #16202c;
  --text-muted: #5b6672;
  --text-faint: #8a949e;

  --accent: #e2670f;
  --accent-strong: #c85708;
  --accent-soft: #e2670f18;
  --accent-text: #ffffff;

  --positive: #1f8a4c;
  --positive-soft: #1f8a4c15;
  --negative: #cf3636;
  --negative-soft: #cf363615;
  --warning: #b07d0a;
  --warning-soft: #b07d0a15;
  --info: #1f6fd0;

  --good: #1f8a4c;
  --warn: #b07d0a;
  --crit: #cf3636;

  --s1: #e2670f;
  --s2: #1f6fd0;
  --s3: #1f8a4c;
  --s4: #b07d0a;
  --s5: #d1477f;
  --s6: #7c5cd6;
  --s7: #0d8fbf;
  --s8: #6b7785;

  --shadow-sm: 0 1px 2px rgba(16, 32, 48, .08);
  --shadow-md: 0 6px 20px rgba(16, 32, 48, .1);
  --shadow-lg: 0 20px 50px rgba(16, 32, 48, .16);
}
