/* Camada 1 (primitiva) → 2 (semântica) → 3 (componente). Claro é padrão; dark via [data-theme="dark"]. */
:root {
  --blue-600: #206bc4;
  --blue-700: #1a569d;
  --green-600: #2fb344;
  --red-600: #d63939;
  --amber-500: #f59009;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1d273b;
  --ink-2: #49566c;
  --muted: #6b7a90;
  --line: #e4e7ee;
  --line-soft: #eef1f6;

  --primary: var(--blue-600);
  --primary-hover: var(--blue-700);
  --primary-soft: #e8effa;
  --primary-2: #4a9be8;
  --ok: var(--green-600);
  --ok-soft: #e6f6ea;
  --err: var(--red-600);
  --err-soft: #fdecec;
  --warn: var(--amber-500);
  --warn-soft: #fdf3e3;

  --btn-fg: #ffffff;
  --card-bg: var(--surface);
  --input-bg: var(--surface);
  --topbar-bg: rgba(255, 255, 255, .86);
  --sidebar-bg: #101c33;
  --sidebar-fg: #c3cede;
  --sidebar-active: #ffffff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(16, 28, 51, .06);
  --shadow-md: 0 4px 16px rgba(16, 28, 51, .08);
  --shadow-lg: 0 12px 32px rgba(16, 28, 51, .14);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --side-w: 264px;
  --side-w-fold: 76px;
  --top-h: 60px;
}

[data-theme="dark"] {
  --bg: #121a2c;
  --surface: #1a2438;
  --surface-2: #1f2a42;
  --ink: #e8edf5;
  --ink-2: #c3cede;
  --muted: #8b99b0;
  --line: #2b3a55;
  --line-soft: #243252;

  --primary-soft: #1e3a5f;
  --ok-soft: #173d27;
  --err-soft: #4a2222;
  --warn-soft: #4a3a17;

  --topbar-bg: rgba(18, 26, 44, .86);
  --sidebar-bg: #0b1222;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
}

/* Acentos alternativos (perfil → Aparência). */
:root[data-accent="green"] {
  --primary: #1f9d55;
  --primary-hover: #178244;
  --primary-soft: #e3f4e9;
  --primary-2: #4cc38a;
}

:root[data-accent="purple"] {
  --primary: #7048e8;
  --primary-hover: #5a38c4;
  --primary-soft: #ece7fb;
  --primary-2: #9d7ff0;
}

[data-theme="dark"][data-accent="green"] { --primary-soft: #173d27; }
[data-theme="dark"][data-accent="purple"] { --primary-soft: #2c2350; }
