/* MIRA design tokens. Single source: docs/design/DESIGN-SYSTEM.md.
   Variables only, no component selectors. Dark is the :root default;
   [data-theme="light"] swaps color values only, so no component needs a
   theme exception. Custom properties cross shadow DOM, so the Analise and
   Consultoria dashboards inherit them.
   Loaded before styles.css in every MIRA document. */

:root{
  color-scheme:dark;
  --c-brand-primary:#E8421A;
  --c-brand-dark:#B52E0D;
  --c-frame:#1D1B18;
  --c-nav-text:#FFFFFF;
  --c-nav-active-bg:#E8DFD1;
  --c-nav-active-text:#1D1B18;
  --c-bento-cream:#FCF9F3;
  --c-bento-ink:#1D1B18;
  --c-on-bento-ink:#F7F3EB;
  --c-bento-coral:var(--c-bento-sand);
  --c-bento-lavender:var(--c-bento-cream);
  --c-bento-sage:var(--c-bento-sand);
  --c-bento-sand:#E8DFD1;
  --c-on-bento:#211915;
  --c-brand-star:#FF4002;

  /* Type: 6 sizes, nothing below 12px. rem follows the fluid root size. */
  --fs-label:0.75rem;    /* 12: label, meta, table header, count, unit */
  --fs-dense:0.8125rem;  /* 13: table cell, list item, compact card text */
  --fs-body:0.875rem;    /* 14: body, button, desktop input */
  --fs-title:1rem;       /* 16: card/panel title, mobile input */
  --fs-section:1.125rem; /* 18: screen title and section title */
  --fs-kpi:1.5rem;       /* 24: key number */
  --fs-hero:2.25rem;     /* 36: one hero number per block (Produção, Tarefas) */

  --fw-regular:400;
  --fw-medium:500;
  --fw-semi:600;

  --lh-none:1;     /* controls, single-line numbers */
  --lh-tight:1.2;  /* titles, KPI */
  --lh-dense:1.35; /* card and list text */
  --lh-body:1.5;   /* running text */

  --ff-sans:"Geist",system-ui,sans-serif;
  --ff-editorial:"Source Serif 4",Georgia,"Times New Roman",serif;
  --ff-mono:"Geist Mono","SFMono-Regular",Consolas,monospace;

  /* Space: 4px base, 7 steps. */
  --sp-1:0.25rem;
  --sp-2:0.5rem;
  --sp-3:0.75rem;
  --sp-4:1rem;
  --sp-5:1.5rem;
  --sp-6:2rem;
  --sp-7:3rem;

  /* Radius: large outside, smaller inside, pill for filters. */
  --r-outer:1rem;
  --r-inner:0.5rem;
  --r-pill:99rem;

  /* Control heights. */
  --h-sm:2rem;
  --h-md:2.5rem;
  --h-touch:2.75rem;

  /* Surfaces: canvas, card, inside card, pressed/selected row/skeleton. */
  --c-bg:#0F0D0C;
  --c-surface:#1F1A18;
  --c-surface-2:#29221E;
  --c-surface-3:#382E28;

  /* Lines: soft divider, control boundary (3:1 on bg and surface). */
  --c-line:#4A3E38;
  --c-line-strong:#907A70;

  /* Text. */
  --c-text:#F7F2EE;
  --c-text-2:#D8CEC8;
  --c-text-3:#BBAEA6;

  /* Accent: primary action, checked box, focus ring. */
  --c-accent:#E8DFD1;
  --c-accent-hover:#FCF9F3;
  /* Text on a colored fill: accent, accent-hover, bad. */
  --c-on-fill:#1D1B18;

  /* Selected state of pill, segment/tab and nav item (pending decision 1:
     A = accent, below; B = var(--c-text) / var(--c-surface)). */
  --c-selected:var(--c-accent);
  --c-on-selected:var(--c-on-fill);

  /* Data state, by metric polarity. "No reading" uses --c-text-3. */
  --c-good:#65D68A;
  --c-warn:#F5C45C;
  --c-bad:#FF6B8B;
  --c-info:#72B7FF;

  /* Accounts: hues apart from accent and state (pending decision 2). */
  --c-acct-porkinho:#E68BE0;
  --c-acct-homefitness:#4FCFD6;
  --c-acct-joao:#A9A2FF;

  /* Channels (Black panel): category, never state. Chip = icon in this color on a 12% tint. */
  --c-ch-ig:#F27FB0;
  --c-ch-bot:#B08CFF;
  --c-ch-wa:#A3D94F;
  --c-ch-api:#FFA45E;
  --c-ch-mail:#5CC8F0;
  --c-ch-ad:#8C8CFF;
  --c-side-organic:#3CCFB4;

  /* Cartão de painel (golden set do Rodrigo, 2026-10-06: cartões MaqVir/Consultoria do Hoje).
     Pílula sólida de variação e o raio grande do cartão; o resto usa surface/text/line. */
  --c-good-solid:#1F9D57;
  --c-bad-solid:#D63A5E;
  --c-on-solid:#FFFFFF;
  --r-board:1.75rem;

  /* Overlays. */
  --c-scrim:rgba(8,7,6,.72);
  --c-media-veil:rgba(15,13,12,.64);
  --c-on-media:#FFFFFF;

  /* Elevation: only layers that truly float. */
  --sh-pop:0 0.5rem 1.5rem rgba(0,0,0,.36);
  --sh-modal:0 1.5rem 4rem rgba(0,0,0,.5);

  /* Compatibility aliases while legacy components migrate to the canonical names. */
  --surface-bg:var(--c-bg);
  --surface-1:var(--c-surface);
  --surface-2:var(--c-surface-2);
  --surface-3:var(--c-surface-3);
  --surface-line:var(--c-line);
  --surface-line-strong:var(--c-line-strong);
  --text-1:var(--c-text);
  --text-2:var(--c-text-2);
  --text-3:var(--c-text-3);
  --perf-good:var(--c-good);
  --perf-warn:var(--c-warn);
  --perf-bad:var(--c-bad);
  --account-porkinho:var(--c-acct-porkinho);
  --account-homefitness:var(--c-acct-homefitness);
  --account-joao:var(--c-acct-joao);
  --accent-brand:var(--c-accent);
  --accent-hover:var(--c-accent-hover);
  --accent-readable:var(--c-accent);
  --text-on-accent:var(--c-on-fill);
  --sans:var(--ff-sans);
  --mono:var(--ff-mono);
}

:root[data-theme="light"]{
  color-scheme:light;

  --c-bg:#F7F3EB;
  --c-surface:#FCF9F3;
  --c-surface-2:#E8DFD1;
  --c-surface-3:#DDD2C1;

  --c-line:rgba(34,25,21,.16);
  --c-line-strong:rgba(34,25,21,.52);

  --c-text:#211915;
  --c-text-2:#5F514A;
  --c-text-3:#66564E;

  --c-accent:#1D1B18;
  --c-accent-hover:#38332B;
  --c-on-fill:#FFFFFF;

  --c-good:#06703A;
  --c-warn:#8A5B00;
  --c-bad:#B3123F;
  --c-info:#1561A6;

  --c-acct-porkinho:#9C2A8C;
  --c-acct-homefitness:#0A6E7A;
  --c-acct-joao:#5B48C8;

  --c-ch-ig:#B0245F;
  --c-ch-bot:#6A3FD0;
  --c-ch-wa:#4A6B07;
  --c-ch-api:#A04A06;
  --c-ch-mail:#0B6190;
  --c-ch-ad:#3D3FC4;
  --c-side-organic:#0B6B5C;

  --c-good-solid:#0B7A3E;
  --c-bad-solid:#C21B48;

  --c-scrim:rgba(33,25,21,.40);

  --sh-pop:0 0.5rem 1.5rem rgba(54,37,29,.14);
  --sh-modal:0 1.5rem 4rem rgba(54,37,29,.22);
}
