/* variables.css — design token. Dark mode default (stile Perplexity/Claude). */

:root,
:root[data-theme="dark"] {
  /* superfici */
  --bg-app: #0e1014;
  --bg-sidebar: #15181e;
  --bg-elevated: #1b1f27;
  --bg-elevated-2: #232833;
  --bg-input: #1b1f27;
  --bg-hover: #232833;
  --bg-active: #2b3140;

  /* testo */
  --text: #e7eaf0;
  --text-muted: #9aa3b2;
  --text-faint: #6b7280;

  /* bordi */
  --border: #272c36;
  --border-strong: #353b48;

  /* brand / accenti */
  --accent: #6ea8fe;        /* azzurro "secchione" */
  --accent-strong: #4f8cff;
  --accent-soft: rgba(110, 168, 254, 0.14);

  /* badge contesto */
  --sg: #f0b429;            /* Stock Gain - oro/Miami */
  --sg-soft: rgba(240, 180, 41, 0.16);
  --fe: #5ad19a;           /* Finanza Efficace - verde/NY */
  --fe-soft: rgba(90, 209, 154, 0.16);
  --both: #b794f6;         /* Entrambi - viola */
  --both-soft: rgba(183, 148, 246, 0.16);

  /* stati */
  --ok: #5ad19a;
  --warn: #f0b429;
  --danger: #ff6b6b;
  --warn-soft: rgba(240, 180, 41, 0.16);
  --danger-soft: rgba(255, 107, 107, 0.16);

  /* misure */
  --sidebar-w: 280px;
  --sidebar-w-collapsed: 0px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --gap: 16px;
  --maxw-content: 760px;

  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-fast: 120ms ease;
  --t: 200ms ease;
}

/* Tema chiaro: stessi token, valori tarati per fondo bianco (contrasto + ombre leggere). */
:root[data-theme="light"] {
  /* superfici */
  --bg-app: #ffffff;
  --bg-sidebar: #f5f6f8;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #f0f2f5;
  --bg-input: #ffffff;
  --bg-hover: #eef0f4;
  --bg-active: #e4e8ef;

  /* testo */
  --text: #1a1d23;
  --text-muted: #5a6270;
  --text-faint: #8b93a1;

  /* bordi */
  --border: #e3e6eb;
  --border-strong: #d3d8e0;

  /* brand / accenti (più scuri per leggibilità su bianco) */
  --accent: #2f6fed;
  --accent-strong: #2563eb;
  --accent-soft: rgba(47, 111, 237, 0.10);

  /* badge contesto (scuriti per contrasto su bianco) */
  --sg: #b97e00;
  --sg-soft: rgba(185, 126, 0, 0.14);
  --fe: #1a9e6a;
  --fe-soft: rgba(26, 158, 106, 0.14);
  --both: #7c5cd6;
  --both-soft: rgba(124, 92, 214, 0.14);

  /* stati */
  --ok: #1a9e6a;
  --warn: #b97e00;
  --danger: #d64545;
  --warn-soft: rgba(185, 126, 0, 0.14);
  --danger-soft: rgba(214, 69, 69, 0.12);

  /* ombre leggere */
  --shadow: 0 8px 30px rgba(16, 24, 40, 0.12);
  --shadow-sm: 0 2px 10px rgba(16, 24, 40, 0.08);
}
