/* RedData — tokens dos painéis. Fonte única de cor, tipo, espaço e movimento.
   Ver docs/DESIGN-PAINEIS.md. Nenhuma cor/medida de painel fora daqui. */
:root, [data-reddata-theme="light"] {
  color-scheme: light;
  /* cromo */
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-raised: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-muted: #72706b;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, .10);
  --brand: #CE343D;
  --focus: #CE343D;
  /* séries (ordem fixa; validada para daltonismo) */
  /* Etapas financeiras preservam as séries 1/2 mesmo sob paleta de marca. */
  --waterfall-increase: #2a78d6; --waterfall-decrease: #eb6834;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --series-other: #898781;
  /* estado (fixo) */
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --delta-good-text: #006300; --delta-bad-text: #b42626;
  /* sequencial azul 100→700 */
  --seq-100: #cde2fb; --seq-200: #9ec5f4; --seq-300: #6da7ec; --seq-400: #3987e5;
  --seq-500: #256abf; --seq-600: #184f95; --seq-700: #0d366b;
  /* divergente */
  --div-neg: #d03b3b; --div-mid: #f0efec; --div-pos: #2a78d6;
  /* tipo */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-axis: 11px; --fs-note: 12px; --fs-card: 13px; --fs-body: 14px;
  --fs-card-title: 16px; --fs-section: 20px; --fs-page: 28px; --fs-kpi: clamp(32px, 2.6vw, 44px); --fs-kpi-card: clamp(32px, 18cqw, 44px);
  /* espaço e forma */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-control: 6px; --r-card: 12px; --r-panel: 16px; --r-bar: 4px;
  --shadow-hover: 0 1px 2px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
  --stroke: 1px; --line-width: 2px; --point: 8px; --card-padding: 20px;
  --chart-height: 300px; --chart-mobile: 240px; --table-height: 420px; --map-height: 420px;
  --kpi-height: 132px; --spark-height: 36px; --row-height: 36px; --control-height: 32px;
  --fw-body: 400; --fw-label: 500; --fw-title: 600; --on-brand: #ffffff; --data-ink-dark: #0b0b0b; --data-ink-light: #ffffff;
  --period-width: 112px; --calendar-width: 280px;
  --canvas-width: 1200px; --editor-kpi-height: 180px; --editor-chart-height: 354px;
  --legend-mark: 10px; --axis-label-width: 110px; --sankey-label-width: 90px; --bubble-size: 38px; --point-small: 5px; --canvas-height: 1000px;
  /* movimento */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-enter: 400ms; --t-update: 250ms; --t-count: 600ms;
}
:root { --chart-min-height: 160px; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-raised: #242423;
    --ink: #f0efec; --ink-2: #c3c2b7; --ink-muted: #898781; --grid: #2c2c2a; --baseline: #383835;
    --border: rgba(255, 255, 255, .10); --brand: #e0525a; --focus: #e0525a;
    --waterfall-increase: #3987e5; --waterfall-decrease: #d95926;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --delta-good-text: #0ca30c; --delta-bad-text: #e66767; --div-mid: #383835;
    --shadow-hover: none;
  }
}
:root[data-theme="dark"], [data-reddata-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-raised: #242423;
  --ink: #f0efec; --ink-2: #c3c2b7; --ink-muted: #898781; --grid: #2c2c2a; --baseline: #383835;
  --border: rgba(255, 255, 255, .10); --brand: #e0525a; --focus: #e0525a;
  --waterfall-increase: #3987e5; --waterfall-decrease: #d95926;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --delta-good-text: #0ca30c; --delta-bad-text: #e66767; --div-mid: #383835;
  --shadow-hover: none;
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-enter: 0ms; --t-update: 0ms; --t-count: 0ms; }
}
:root{--bi-fields-width:248px;--bi-mobile-fields-height:240px;}
:root{--bi-more-width:440px;}
:root{--bi-expanded-chart-height:65vh;}

:root{--spark-width:160px;--kpi-max-width:360px;--menu-width:220px;--filter-list-height:240px;--delta-attention-text:#805500;}
:root[data-theme="dark"],[data-reddata-theme="dark"]{--delta-attention-text:#f3c464;}
@media(prefers-color-scheme:dark){:root:where(:not([data-theme="light"])){--delta-attention-text:#f3c464;}}

:root{--panel-sidebar-width:196px;--panel-fit-offset:230px;--panel-fit-chart-min:160px;--panel-logo-size:40px}
:root{--panel-navy:#172b43;--panel-navy-ink:#f0efec;--panel-navy-muted:#c3c2b7;--panel-soft-page:#f0f5fa}
:root{--mini-columns-height:72px}
