/* FSFY — sistema visual.
   Cinco visuais ("skins") sobre a mesma estrutura (o quinto, ciano, fica no fim do arquivo): aurora (escuro, vidro e brilho), studio (claro, editorial),
   carbono (preto, denso, de mesa de operações) e brasa (preto e laranja). Tudo é feito de tokens: trocar o visual é trocar os tokens.
   As cores dos gráficos (--s1…--s4) de cada visual foram validadas (daltonismo e contraste) contra a superfície dele. */

@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Grotesk"; src: url("/fonts/grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/fonts/mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ============ visual 2 — STUDIO (claro) — também é a base ============ */
:root {
  color-scheme: light;
  --page: #f3f4f7; --page-art: none;
  --surface: #ffffff; --surface-2: #f5f6f9; --surface-3: #eceef3;
  --card-bg: var(--surface); --card-border: rgba(15, 23, 40, .08); --card-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05); --card-blur: none;
  --side-bg: #ffffff; --side-border: rgba(15, 23, 40, .08); --side-ink: #0f1728; --side-muted: #64708a; --side-hover: rgba(15, 23, 40, .05);
  --side-active-bg: rgba(42, 120, 214, .10); --side-active-ink: #1c5cab; --side-margin: 0px; --side-radius: 0px; --side-shadow: none;
  --ink: #0f1728; --ink-2: #44506a; --muted: #717d96; --grid: #e9ecf1; --axis: #cbd1dc; --border: rgba(15, 23, 40, .09); --border-strong: rgba(15, 23, 40, .17);
  --accent: #2a78d6; --accent-ink: #1c5cab; --accent-wash: rgba(42, 120, 214, .10); --accent-contrast: #ffffff;
  --accent-grad: linear-gradient(135deg, #2a78d6, #4a3aa7); --glow: none;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --deemph: #c5cad3;
  --good: #0ca30c; --good-ink: #006300; --warn: #fab219; --warn-ink: #7a5200; --serious: #ec835a; --bad: #d03b3b; --bad-ink: #b02a2a;
  --good-wash: rgba(12, 163, 12, .10); --warn-wash: rgba(250, 178, 25, .18); --bad-wash: rgba(208, 59, 59, .09); --info-wash: rgba(42, 120, 214, .08);
  --radius: 14px; --radius-sm: 9px; --radius-xs: 7px; --pill: 999px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-num: var(--font); --label-case: none; --label-track: 0;
  --hero-bg: linear-gradient(135deg, #1f4f96 0%, #2a78d6 55%, #4a3aa7 120%); --hero-ink: #ffffff; --hero-muted: rgba(255, 255, 255, .78); --hero-line: #ffffff; --hero-chip: rgba(255, 255, 255, .16); --hero-edge: rgba(255, 255, 255, .14); --hero-up: #c8f8da; --hero-down: #ffddd6;
  --top-bg: color-mix(in srgb, var(--page) 86%, transparent);
  --row-hover: color-mix(in srgb, var(--accent) 6%, var(--surface)); --row-selected: color-mix(in srgb, var(--accent) 11%, var(--surface));
  --top-h: 65px;
}

/* ============ visual 1 — AURORA (escuro, vidro) ============ */
:root[data-skin="aurora"] {
  color-scheme: dark;
  --page: #080c18;
  --page-art: radial-gradient(900px 520px at 12% -8%, rgba(124, 108, 240, .22), transparent 62%), radial-gradient(760px 480px at 96% 4%, rgba(34, 184, 207, .14), transparent 60%), radial-gradient(900px 600px at 60% 108%, rgba(57, 135, 229, .12), transparent 60%);
  --surface: #141a2e; --surface-2: #1a2138; --surface-3: #232b47;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)) , #121829; --card-border: rgba(255, 255, 255, .085); --card-shadow: 0 12px 40px rgba(0, 0, 0, .32); --card-blur: none;
  --side-bg: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), #10162a; --side-border: rgba(255, 255, 255, .09); --side-ink: #eef1ff; --side-muted: #8d98b8; --side-hover: rgba(255, 255, 255, .06);
  --side-active-bg: linear-gradient(90deg, rgba(144, 133, 233, .32), rgba(57, 135, 229, .12)); --side-active-ink: #ffffff; --side-margin: 12px; --side-radius: 20px; --side-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  --ink: #f3f5ff; --ink-2: #b7c0dc; --muted: #8791b1; --grid: #212a45; --axis: #303b5c; --border: rgba(255, 255, 255, .09); --border-strong: rgba(255, 255, 255, .17);
  --accent: #9085e9; --accent-ink: #c3bdf6; --accent-wash: rgba(144, 133, 233, .17); --accent-contrast: #ffffff;
  --accent-grad: linear-gradient(135deg, #7c6cf0 0%, #3987e5 62%, #22b8cf 115%); --glow: 0 8px 26px rgba(124, 108, 240, .38);
  --s1: #9085e9; --s2: #d95926; --s3: #199e70; --s4: #3987e5; --deemph: #4a5478;
  --good: #0ca30c; --good-ink: #5ad65a; --warn: #fab219; --warn-ink: #fac54f; --serious: #ec835a; --bad: #d03b3b; --bad-ink: #ff9090;
  --good-wash: rgba(12, 163, 12, .17); --warn-wash: rgba(250, 178, 25, .14); --bad-wash: rgba(208, 59, 59, .2); --info-wash: rgba(144, 133, 233, .13);
  --radius: 18px; --radius-sm: 11px; --radius-xs: 8px;
  --font: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hero-bg: radial-gradient(520px 260px at 88% 0%, rgba(34, 184, 207, .32), transparent 70%), radial-gradient(560px 320px at 0% 100%, rgba(124, 108, 240, .5), transparent 72%), linear-gradient(135deg, #1b1f45, #131a33);
  --hero-ink: #ffffff; --hero-muted: rgba(226, 230, 255, .74); --hero-line: #c9c3ff; --hero-chip: rgba(255, 255, 255, .11); --hero-edge: rgba(255, 255, 255, .09); --hero-up: #86e8b2; --hero-down: #ffb4a8;
  --top-bg: color-mix(in srgb, #080c18 72%, transparent);
}

/* ============ visual 3 — CARBONO (preto, denso) ============ */
:root[data-skin="carbono"] {
  color-scheme: dark;
  --page: #090909;
  --page-art: linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  --surface: #121212; --surface-2: #191919; --surface-3: #232323;
  --card-bg: var(--surface); --card-border: rgba(255, 255, 255, .1); --card-shadow: none;
  --side-bg: #0c0c0c; --side-border: rgba(255, 255, 255, .1); --side-ink: #f4f4ef; --side-muted: #8d8d86; --side-hover: rgba(255, 255, 255, .05);
  --side-active-bg: rgba(200, 240, 74, .1); --side-active-ink: #d6f57a; --side-margin: 0px; --side-radius: 0px; --side-shadow: none;
  --ink: #f4f4ef; --ink-2: #bebeb6; --muted: #8a8a83; --grid: #242424; --axis: #363636; --border: rgba(255, 255, 255, .1); --border-strong: rgba(255, 255, 255, .22);
  --accent: #c8f04a; --accent-ink: #d6f57a; --accent-wash: rgba(200, 240, 74, .11); --accent-contrast: #0c0c0c;
  --accent-grad: linear-gradient(135deg, #c8f04a, #c8f04a); --glow: none;
  --s1: #199e70; --s2: #c98500; --s3: #3987e5; --s4: #d55181; --deemph: #4e4e49;
  --good: #0ca30c; --good-ink: #58d658; --warn: #fab219; --warn-ink: #fac54f; --serious: #ec835a; --bad: #d03b3b; --bad-ink: #ff8a8a;
  --good-wash: rgba(12, 163, 12, .17); --warn-wash: rgba(250, 178, 25, .13); --bad-wash: rgba(208, 59, 59, .2); --info-wash: rgba(200, 240, 74, .08);
  --radius: 6px; --radius-sm: 4px; --radius-xs: 3px; --pill: 4px;
  --font: "Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --font-num: "JBMono", ui-monospace, Consolas, monospace; --label-case: uppercase; --label-track: .06em;
  --hero-bg: linear-gradient(180deg, #151515, #0f0f0f); --hero-ink: #f4f4ef; --hero-muted: #9a9a92; --hero-line: #c8f04a; --hero-chip: rgba(255, 255, 255, .07); --hero-edge: rgba(255, 255, 255, .09); --hero-up: #86e8b2; --hero-down: #ffb4a8;
  --top-bg: color-mix(in srgb, #090909 82%, transparent);
}

/* ============ visual 4 — BRASA (preto e laranja) ============ */
:root[data-skin="brasa"] {
  color-scheme: dark;
  --page: #121213;
  --page-art: radial-gradient(900px 460px at 104% -12%, rgba(254, 71, 1, .13), transparent 62%), radial-gradient(760px 440px at -8% 110%, rgba(254, 71, 1, .055), transparent 60%);
  --surface: #1a1a1c; --surface-2: #222225; --surface-3: #2c2c30;
  --card-bg: linear-gradient(180deg, #1e1e20, #19191b); --card-border: rgba(255, 255, 255, .07); --card-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  --side-bg: #0b0b0c; --side-border: rgba(255, 255, 255, .07); --side-ink: #f6f6f5; --side-muted: #9c9ca1; --side-hover: rgba(255, 255, 255, .055);
  --side-active-bg: linear-gradient(90deg, rgba(254, 71, 1, .36), rgba(254, 71, 1, .08) 78%, rgba(254, 71, 1, 0)); --side-active-ink: #ffffff;
  --ink: #f6f6f5; --ink-2: #c4c4c8; --muted: #8f8f95; --grid: #29292c; --axis: #3b3b40; --border: rgba(255, 255, 255, .085); --border-strong: rgba(255, 255, 255, .17);
  --accent: #ff5a1f; --accent-ink: #ff8f57; --accent-wash: rgba(255, 90, 31, .15); --accent-contrast: #160800;
  --accent-grad: linear-gradient(135deg, #ff7d33 0%, #fe4701 100%); --glow: 0 8px 24px rgba(254, 71, 1, .32);
  --s1: #d95926; --s2: #3987e5; --s3: #199e70; --s4: #9085e9; --deemph: #505056;
  --good: #0ca30c; --good-ink: #58d658; --warn: #fab219; --warn-ink: #fac54f; --serious: #ec835a; --bad: #d03b3b; --bad-ink: #ff8a8a;
  --good-wash: rgba(12, 163, 12, .17); --warn-wash: rgba(250, 178, 25, .13); --bad-wash: rgba(208, 59, 59, .2); --info-wash: rgba(255, 255, 255, .055);
  --radius: 12px; --radius-sm: 8px; --radius-xs: 6px;
  --label-case: uppercase; --label-track: .045em;
  --hero-bg: radial-gradient(640px 340px at 98% -12%, rgba(254, 71, 1, .52), transparent 68%), radial-gradient(520px 320px at 0% 124%, rgba(255, 125, 51, .17), transparent 70%), linear-gradient(135deg, #20140f 0%, #161617 62%);
  --hero-ink: #ffffff; --hero-muted: rgba(255, 240, 232, .72); --hero-line: #ff9a66; --hero-chip: rgba(255, 255, 255, .075); --hero-edge: rgba(255, 255, 255, .09); --hero-up: #86e8b2; --hero-down: #ffb4a8;
  --top-bg: color-mix(in srgb, #121213 80%, transparent);
}

/* ============ base ============ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--page-art); pointer-events: none; }
:root[data-skin="carbono"] body::before { background-size: 44px 44px; }
a { color: var(--accent-ink); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 680; letter-spacing: -.015em; }
h2 { font-size: 15.5px; } h3 { font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--axis) transparent; }

/* ============ estrutura ============ */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px 14px; position: sticky; top: var(--side-margin); height: calc(100vh - 2 * var(--side-margin));
  margin: var(--side-margin) 0 var(--side-margin) var(--side-margin); border-radius: var(--side-radius); border: 1px solid var(--side-border); box-shadow: var(--side-shadow); overflow-y: auto; }
:root:not([data-skin="aurora"]) .side { border-width: 0 1px 0 0; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--side-ink); padding: 2px 8px 16px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad); display: grid; place-items: center; box-shadow: var(--glow); flex: none; color: var(--accent-contrast); }
:root[data-skin="carbono"] .brand .mark { border-radius: 4px; }
.brand .mark.logo { background: #000; box-shadow: 0 0 0 1px var(--side-border); overflow: hidden; } .brand .mark.logo img { width: 100%; height: 100%; display: block; }
.brand b { display: block; font-size: 15px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.brand small { display: block; font-size: 11px; color: var(--side-muted); font-weight: 500; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav .nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--side-muted); opacity: .8; padding: 14px 10px 5px; }
#nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--side-muted); font-weight: 560; position: relative; transition: background .12s, color .12s; }
#nav a:hover { color: var(--side-ink); background: var(--side-hover); text-decoration: none; }
#nav a[aria-current="page"] { color: var(--side-active-ink); background: var(--side-active-bg); }
:root[data-skin="carbono"] #nav a[aria-current="page"]::before, :root[data-skin="brasa"] #nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; background: var(--accent); }
:root[data-skin="brasa"] #nav a[aria-current="page"]::before { border-radius: 0 3px 3px 0; top: 4px; bottom: 4px; }
:root[data-skin="brasa"] #nav a[aria-current="page"] svg { color: var(--accent); }
:root[data-skin="aurora"] #nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
#nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 750; display: inline-grid; place-items: center; }
#nav svg { flex: none; }
.side-foot { margin-top: auto; padding: 14px 8px 0; font-size: 12px; color: var(--side-muted); display: grid; gap: 6px; }
.side-foot .conn { display: flex; flex-wrap: wrap; gap: 6px; }
.side-foot .conn span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--pill); background: var(--side-hover); font-size: 11.5px; }
.side-foot .conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.side-foot .conn i.off { background: var(--warn); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; position: sticky; top: 0; z-index: 30; background: var(--top-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--border); flex-wrap: wrap; min-height: var(--top-h); }
.top .titles { margin-right: auto; min-width: 0; }
.top h1 { font-size: 20px; letter-spacing: -.025em; }
.top .crumb { font-size: 12px; color: var(--muted); }
.top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#view { padding: 22px 28px 70px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; outline: none; max-width: 1640px; width: 100%; }
#view.loading > * { opacity: .5; transition: opacity .15s; }
#view > * { animation: rise .28s ease both; }
/* Recarga na mesma tela: só os números trocam, os blocos não entram de novo. */
#view.still > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #view > * { animation: none; } }

/* ============ controles ============ */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 580; white-space: nowrap; transition: background .12s, transform .06s, filter .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: var(--accent-contrast); box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent-grad); }
.btn.danger { color: var(--bad-ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--accent-wash); }
.btn.sm { height: 29px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn[disabled] { opacity: .55; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.menu-btn { display: none; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 11px; cursor: pointer; font-weight: 580; color: var(--ink-2); border-radius: calc(var(--radius-sm) - 3px); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent-wash); color: var(--accent-ink); }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="search"], select, textarea {
  height: 36px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
textarea { height: auto; padding: 8px 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; width: 100%; resize: vertical; }
label.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 580; }
label.field > span.hint { font-weight: 400; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 14px; align-items: start; }
.form-grid > .btn, .form-grid > .actions { grid-column: 1 / -1; justify-self: start; }
.form-grid > .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-grid > .check { align-self: center; padding-top: 16px; }
label.field > select, label.field > input { width: 100%; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* menus suspensos (período, visual) */
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0, 0, 0, .28); min-width: 260px; padding: 7px; }
.pop button.opt { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; border-radius: var(--radius-xs); cursor: pointer; text-align: left; }
.pop button.opt:hover { background: var(--accent-wash); }
.pop button.opt .ck { width: 16px; font-weight: 800; color: var(--accent-ink); }
.pop .custom { border-top: 1px solid var(--border); margin-top: 6px; padding: 10px 8px 6px; display: grid; gap: 8px; }
.pop .custom .row input { flex: 1; }
.pop.range-pop { width: 500px; max-width: calc(100vw - 28px); padding: 0; }
.pop.range-pop.two { width: 800px; }
.drp { display: grid; grid-template-columns: 176px minmax(0, 1fr); }
.drp-presets { display: flex; flex-direction: column; gap: 1px; border-right: 1px solid var(--border); padding: 10px 8px; }
.drp-presets button.opt { font-size: 13.5px; padding: 7px 10px; gap: 10px; }
.drp-presets .radio { position: relative; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
.drp-presets button.opt[aria-checked="true"] { background: var(--accent-wash); color: var(--accent-ink); font-weight: 650; }
.drp-presets button.opt[aria-checked="true"] .radio { border-color: var(--accent); }
.drp-presets button.opt[aria-checked="true"] .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.drp .range-calendar { padding: 14px 16px 12px; }
.drp-months { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.drp.two .drp-months { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calendar-nav .nav-gap { width: 34px; height: 1px; }
.drp-compare { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; display: grid; gap: 10px; }
.drp-compare .row { gap: 10px; }
.drp-compare .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.drp-compare .check input { width: 16px; height: 16px; accent-color: var(--accent); }
.drp-compare select { height: 32px; padding-block: 0; }
.drp-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; border-top: 1px solid var(--border); padding: 10px 14px; }
.drp-foot .calendar-actions { margin: 0; }
.drp-summary { color: var(--ink); font-weight: 650; }
.drp-summary:not(:empty)::before { content: ' · '; color: var(--muted); font-weight: 400; }
.range-trigger .cmp-tag { font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: var(--pill); background: color-mix(in srgb, var(--s2) 24%, transparent); }
.range-calendar { min-width: 0; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.calendar-title { display: inline-block; font-size: 14px; }
.calendar-title::first-letter { text-transform: uppercase; }
.calendar-nav button:disabled { opacity: .3; cursor: default; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.calendar-weekdays { color: var(--muted); font-size: 11px; padding: 4px 0 8px; }
.calendar-day { position: relative; min-width: 0; height: 36px; padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.calendar-day:hover:not(:disabled), .calendar-day.in-range { background: var(--accent-wash); color: var(--accent-ink); }
.calendar-day.preview { background: var(--accent-wash); color: var(--accent-ink); }
.calendar-day.cmp-range { background: color-mix(in srgb, var(--s2) 24%, transparent); }
.calendar-day.range-edge, .calendar-day.range-edge:hover { background: var(--accent); color: var(--accent-contrast); font-weight: 750; }
.calendar-day.is-today::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; bottom: 3px; left: calc(50% - 2px); }
.calendar-day:disabled { opacity: .25; cursor: default; }
.calendar-hint { line-height: 1.4; margin: 10px 0; }
.calendar-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calendar-inputs input { width: 100%; padding-inline: 7px; font-size: 12px; }
.calendar-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pop.skins { width: 330px; padding: 12px; display: grid; gap: 10px; }
.pop.skins h3 { font-size: 13px; }
.skin-opt { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; cursor: pointer; text-align: left; width: 100%; }
.skin-opt:hover { background: var(--surface-2); }
.skin-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }
.skin-opt b { display: block; font-size: 13.5px; } .skin-opt small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.skin-prev { height: 60px; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 22px 1fr; border: 1px solid rgba(128, 128, 128, .3); }
.skin-prev i { display: block; }
.skin-prev .p-main { padding: 7px; display: grid; gap: 5px; align-content: start; }
.skin-prev .p-card { height: 18px; border-radius: 4px; }
.skin-prev .p-bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.skin-prev .p-bars i { flex: 1; border-radius: 2px 2px 0 0; }

/* ============ cartões ============ */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); min-width: 0; }
.card > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.card > header h2 { display: inline-flex; align-items: center; gap: 9px; }
.card > header .sub { color: var(--muted); font-size: 12.5px; }
.card > .body { padding: 14px 18px 18px; }
.card > .body.flush { padding: 10px 0 0; }
.card > .body.flush > .table-wrap:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 6px 2px -6px; }
.section-title h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.section-title .sub { color: var(--muted); font-size: 12.5px; }

/* indicadores */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 15px 16px 13px; display: grid; gap: 4px; min-width: 0; box-shadow: var(--card-shadow); position: relative; overflow: hidden; align-content: start; }
.tile .label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; text-transform: var(--label-case); letter-spacing: var(--label-track); }
:root[data-skin="carbono"] .tile .label { font-size: 11px; color: var(--muted); }
.tile .label .ico { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-wash); color: var(--accent-ink); display: inline-grid; place-items: center; flex: none; }
:root[data-skin="carbono"] .tile .label .ico { border-radius: 3px; }
:root[data-skin="brasa"] .tile .label { font-size: 11.5px; }
:root[data-skin="brasa"] .tile .label .ico { background: rgba(255, 255, 255, .065); color: var(--accent); }
.tile .value { font-size: 25px; font-weight: 720; letter-spacing: -.03em; line-height: 1.2; overflow-wrap: anywhere; }
.tile .foot { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.tile .foot .badge { white-space: normal; }
.tile .spark { margin-left: auto; }
.tile.hero { grid-column: span 2; padding: 18px 20px; }
.tile.hero .value { font-size: 44px; line-height: 1.05; }
.tile.live::after { content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .tile.live::after { animation: none; } }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 680; padding: 1px 7px; border-radius: var(--pill); font-size: 11.5px; }
.delta.good { color: var(--good-ink); background: var(--good-wash); } .delta.bad { color: var(--bad-ink); background: var(--bad-wash); } .delta.flat { color: var(--muted); background: var(--surface-2); }
.pos { color: var(--good-ink); } .neg { color: var(--bad-ink); }

/* faixa principal da visão geral */
.naming-spec { display: grid; gap: 0; }
.naming-spec-row { display: grid; grid-template-columns: 96px minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 2fr); gap: 6px 16px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.naming-spec-row:first-child { border-top: 0; padding-top: 2px; }
.naming-spec-row code { overflow-wrap: anywhere; }
@media (max-width: 940px) { .naming-spec-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.naming-form { margin-bottom: 14px; }
.naming-out { display: grid; gap: 12px; }
.naming-block { display: grid; gap: 6px; min-width: 0; }
.naming-block h3 { margin: 0; }
.naming-block code.block { font-size: 13px; user-select: all; }
.naming-issues { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.naming-h { margin: 18px 0 8px; }
.limit-cell { min-width: 150px; display: grid; gap: 5px; }
.limit-cell .meter { max-width: 170px; }
/* Organização: planilhas editáveis */
.sheet-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sheet-cell { display: block; }
.sheet-cell input { width: 100%; min-width: 0; height: 30px; padding: 0 8px; font-size: 13px; }
.sheet-val { display: block; width: 100%; min-height: 28px; padding: 4px 6px; margin: -4px -6px; border: 1px dashed transparent; border-radius: var(--radius-xs); background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: text; overflow-wrap: anywhere; }
.sheet-val:hover, .sheet-val:focus-visible { border-color: var(--border-strong); background: var(--surface-2); outline: none; }
.sheet-empty { color: var(--muted); font-style: italic; font-family: var(--font); font-size: 12.5px; opacity: .8; }
table.data td.l .sheet-val { text-align: left; }
table.data td .sub { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; font-family: var(--font); }
.sheet-select { height: 30px; padding: 0 26px 0 8px; font-size: 12.5px; max-width: 220px; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sheet-plan { margin: 0; max-height: 46vh; overflow: auto; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; line-height: 1.6; }
/* Padrão de nomes: grupos do gerador */
.naming-group { margin-bottom: 6px; }
.naming-group > h3 { margin: 4px 0 10px; font-size: 13px; color: var(--ink-2); text-transform: var(--label-case); letter-spacing: var(--label-track); }
/* Cruzamento: tabela de duas dimensões */
table.xtab th { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
table.xtab td.xcell { white-space: nowrap; }
table.xtab td.xcell .sub { font-size: 11px; }
table.xtab td.x-good { background: var(--good-wash); }
table.xtab td.x-ok { background: var(--warn-wash); }
table.xtab td.x-bad { background: var(--bad-wash); }
table.xtab td.x-thin > :first-child { opacity: .55; }
table.xtab td.name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmpcell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; vertical-align: middle; }
.cmpd { display: block; font-size: 11px; font-weight: 650; line-height: 1.25; color: var(--muted); white-space: nowrap; cursor: help; font-variant-numeric: tabular-nums; }
.cmpd.up { color: var(--good-ink); } .cmpd.down { color: var(--bad-ink); }
.sumstrip .cmpd { margin-top: 1px; }
.ccard .cmpcell { align-items: flex-start; }
.cmp-note { margin-top: -6px; }
.hero { position: relative; border-radius: calc(var(--radius) + 4px); background: var(--hero-bg); color: var(--hero-ink); padding: 30px 32px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 22px 44px; align-items: center; overflow: hidden; border: 1px solid var(--card-border); box-shadow: var(--card-shadow); }
:root[data-skin="carbono"] .hero { border-top: 2px solid var(--accent); }
:root[data-skin="brasa"] .hero { border-color: rgba(255, 110, 50, .26); }
:root[data-skin="brasa"] .hero .eyebrow { color: #ffb08a; }
.hero .hmain { min-width: 0; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-muted); display: flex; align-items: center; gap: 8px; }
.hero .eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .22); display: inline-block; }
.hero .big { font-size: clamp(44px, 5.4vw, 68px); font-weight: 760; letter-spacing: -.045em; line-height: 1; margin: 14px 0 16px; font-variant-numeric: tabular-nums; }
.hero .big.neg { color: #ffb3b3; }
.hero .hmeta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hero .line { color: var(--hero-muted); font-size: 14.5px; line-height: 1.6; max-width: 540px; }
.hero .line b { color: var(--hero-ink); font-weight: 650; }
.hero .hstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.hero .hstat { background: var(--hero-chip); border: 1px solid var(--hero-edge, rgba(255, 255, 255, .09)); border-radius: var(--radius); padding: 16px 18px 15px; min-width: 0; display: grid; gap: 7px; align-content: start; backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; }
.hero .hstat span { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--hero-muted); font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.hero .hstat span svg { flex: none; opacity: .85; }
.hero .hstat b { font-size: clamp(22px, 2.2vw, 29px); font-weight: 720; letter-spacing: -.03em; line-height: 1.08; font-variant-numeric: tabular-nums; }
.hero .hstat em { font-style: normal; font-size: 12px; font-weight: 680; color: var(--hero-muted); display: block; }
.hero .hstat em.up, .hero .delta.up { color: var(--hero-up, #86e8b2); }
.hero .hstat em.down, .hero .delta.down { color: var(--hero-down, #ffb4a8); }
.hero .trend { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--hero-edge, rgba(255, 255, 255, .09)); padding-top: 14px; }
.hero .trend .cap { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--hero-muted); margin-bottom: 2px; }
.hero .trend .chart text { fill: var(--hero-muted); }
.hero .delta { background: var(--hero-chip); color: var(--hero-ink); font-size: 12.5px; padding: 4px 11px; }

/* ============ tabelas ============ */
.table-wrap { overflow-x: auto; }
.table-wrap.sticky { max-height: calc(100vh - var(--top-h) - 56px); overflow: auto; }
.table-scroll { min-width: 0; }
.table-scroll > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.table-scroll-top { padding: 5px 14px 2px; border-bottom: 1px solid var(--border); background: var(--surface); }
.table-scroll-top > span { display: block; font-size: 11px; }
.table-scroll-track { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.table-scroll-track > svg { flex: none; }
.table-scroll-slider { flex: 1; min-width: 0; width: 100%; height: 32px; margin: 0; padding: 0; border: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: ew-resize; touch-action: pan-y; }
.table-scroll-slider::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: var(--surface-3); }
.table-scroll-slider::-moz-range-track { height: 10px; border-radius: 999px; background: var(--surface-3); }
.table-scroll-slider::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: var(--scroll-thumb, 44px); height: 14px; margin-top: -2px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--accent); cursor: grab; }
.table-scroll-slider::-moz-range-thumb { width: var(--scroll-thumb, 44px); height: 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--accent); cursor: grab; }
.table-scroll-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.table-scroll-slider:active::-moz-range-thumb { cursor: grabbing; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data tr { --row: var(--surface); }
table.data th, table.data td { padding: 9px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--grid); }
table.data td { font-family: var(--font-num); }
table.data td.l, table.data td.name { font-family: var(--font); }
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 18px; }
table.data th:last-child, table.data td:last-child { padding-right: 18px; }
table.data th.l, table.data td.l { text-align: left; }
table.data thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-2); font-weight: 650; font-size: 11.5px; border-bottom: 1px solid var(--axis); user-select: none; z-index: 3; text-transform: var(--label-case); letter-spacing: var(--label-track); }
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { color: var(--ink); }
table.data thead th .arrow { display: inline-block; width: 10px; color: var(--accent-ink); }
table.data thead th[aria-sort] { color: var(--ink); }
table.data tbody tr:hover { --row: var(--row-hover); }
table.data tbody tr.selected { --row: var(--row-selected); }
table.data tbody tr:hover td, table.data tbody tr.selected td { background: var(--row); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tfoot td { font-weight: 720; border-top: 1px solid var(--axis); border-bottom: 0; background: var(--surface-2); position: sticky; bottom: 0; z-index: 2; }
table.data .pin { position: sticky; left: var(--pin-left, 0); z-index: 2; background: var(--row); }
table.data thead th.pin { z-index: 5; background: var(--surface-2); }
table.data tfoot td.pin { z-index: 4; background: var(--surface-2); }
table.data .pin-last { box-shadow: 8px 0 12px -10px rgba(0, 0, 0, .35); }
table.data .pin-r { position: sticky; right: 0; z-index: 2; background: var(--row); box-shadow: -8px 0 12px -10px rgba(0, 0, 0, .35); }
table.data thead th.pin-r, table.data tfoot td.pin-r { z-index: 5; background: var(--surface-2); }
table.data td.sel, table.data th.sel { width: 40px; min-width: 40px; max-width: 40px; padding: 0 0 0 14px !important; text-align: left; }
table.data td.name { max-width: 420px; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.table-wrap.sticky table.data td.name { max-width: 300px; }
.table-wrap.sticky table.data th, .table-wrap.sticky table.data td { padding-left: 10px; padding-right: 10px; }
.stdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--deemph); margin-right: 8px; vertical-align: 1px; flex: none; }
.stdot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-wash); }
.stdot.err { background: var(--bad); }
.btn.icon-only { width: 29px; padding: 0; justify-content: center; }
table.data.tight td.name { max-width: 250px; }
table.data.tight th, table.data.tight td { padding-left: 8px; padding-right: 8px; }
table.data td.name .sub { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
table.data td.wrap { white-space: normal; min-width: 220px; }
/* comparar VSLs: linhas de grupo, diferença contra a base e cabeçalho por vídeo */
table.data tbody tr.group td { background: var(--surface-2); color: var(--ink-2); font-family: var(--font); font-size: 11.5px; font-weight: 680; padding-top: 7px; padding-bottom: 7px; text-transform: var(--label-case); letter-spacing: var(--label-track); }
table.data tbody tr.group:hover td { background: var(--surface-2); }
table.data td .delta { display: block; font-size: 11.5px; margin-top: 1px; font-weight: 560; }
table.data td .best { font-weight: 760; color: var(--ink); }
table.data th .vhead { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
table.data th .vhead .vt { display: inline-flex; align-items: center; gap: 6px; }
table.data th .vhead .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
table.data th .vhead .sub { font-weight: 450; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11px; }
.vchip .base { font-style: normal; font-size: 11px; font-weight: 600; opacity: .75; padding: 0 6px 0 2px; }
.vchip button.mk { font-size: 11px; font-weight: 600; border-radius: var(--pill); padding: 3px 8px; opacity: .8; }
.vchip button.mk:hover { opacity: 1; }
.vsum { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.vsum .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 4px; }
.empty strong { display: block; color: var(--ink); font-size: 15.5px; }
.empty .illo { width: 150px; margin-bottom: 6px; }
.barcell { display: inline-block; height: 6px; border-radius: 3px; background: var(--s1); vertical-align: middle; margin-right: 8px; min-width: 2px; }
.pillnum { display: inline-block; padding: 1px 8px; border-radius: var(--pill); font-weight: 680; font-size: 12px; }
.pillnum.good { background: var(--good-wash); color: var(--good-ink); } .pillnum.warn { background: var(--warn-wash); color: var(--warn-ink); } .pillnum.bad { background: var(--bad-wash); color: var(--bad-ink); } .pillnum.flat { background: var(--surface-2); color: var(--muted); }

/* ============ selos / avisos ============ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--pill); font-size: 11.5px; font-weight: 680; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; font-family: var(--font); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.badge.good { background: var(--good-wash); color: var(--good-ink); } .badge.good::before { background: var(--good); }
.badge.warn { background: var(--warn-wash); color: var(--warn-ink); } .badge.warn::before { background: var(--warn); }
.badge.bad { background: var(--bad-wash); color: var(--bad-ink); } .badge.bad::before { background: var(--bad); }
.badge.info { background: var(--info-wash); color: var(--accent-ink); } .badge.info::before { background: var(--accent); }
.badge.plain::before { display: none; }
.alerts { display: grid; gap: 8px; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--card-border); background: var(--card-bg); align-items: flex-start; position: relative; overflow: hidden; }
.alert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.alert .ico { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; margin-top: 1px; background: var(--info-wash); color: var(--accent-ink); }
.alert.danger::before { background: var(--bad); } .alert.danger .ico { background: var(--bad-wash); color: var(--bad-ink); }
.alert.warn::before { background: var(--warn); } .alert.warn .ico { background: var(--warn-wash); color: var(--warn-ink); }
.alert > div:nth-child(2) { flex: 1 1 0; min-width: 0; }
.alert .t { font-weight: 660; } .alert .d { color: var(--ink-2); font-size: 12.5px; overflow-wrap: anywhere; }
.alert .acts { margin-left: auto; display: flex; align-items: center; gap: 4px; align-self: center; flex: none; }
.alert a.go { white-space: nowrap; font-weight: 620; font-size: 12.5px; padding: 4px 8px; }
.alert .x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.alert .x:hover { background: var(--surface-2); color: var(--ink); }
.alert.off { opacity: .72; }
.note { padding: 11px 14px; border-radius: var(--radius-sm); background: var(--info-wash); color: var(--ink-2); font-size: 13px; }
.note.warn { background: var(--warn-wash); }
code, .mono { font-family: ui-monospace, Consolas, "SF Mono", monospace; font-size: 12.5px; }
code.block { display: block; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-xs); overflow-x: auto; white-space: pre; }
pre.json { margin: 0; padding: 12px; background: var(--surface-2); border-radius: var(--radius-xs); overflow: auto; max-height: 460px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ============ gráficos ============ */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 14px; height: 3px; border-radius: 2px; }
.legend .swatch.box { height: 10px; width: 10px; border-radius: 3px; }
.tooltip { position: fixed; z-index: 200; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); font-size: 12.5px; min-width: 160px; max-width: 320px; }
.tooltip .tt-title { color: var(--muted); font-size: 11.5px; margin-bottom: 5px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 1px 0; }
.tooltip .tt-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tooltip .tt-row .k i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; }
.funnel { display: grid; gap: 4px; }
.funnel .frow { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 5px 0; }
.funnel .track { height: 18px; background: var(--surface-2); border-radius: 0 5px 5px 0; }
.funnel .fill { height: 18px; background: var(--s1); border-radius: 0 5px 5px 0; min-width: 2px; }
.funnel .rate { color: var(--muted); font-size: 12px; }
.funnel .drop { grid-column: 2; font-size: 11px; color: var(--muted); margin: -3px 0 -2px; }
.funnel .drop b { color: var(--ink-2); }
.meter { height: 8px; border-radius: 4px; background: var(--accent-wash); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter.warn { background: var(--warn-wash); } .meter.warn > i { background: #c98500; }
.meter.bad { background: var(--bad-wash); } .meter.bad > i { background: var(--bad); }
.meter.good { background: var(--good-wash); } .meter.good > i { background: var(--good); }
.dre { width: 100%; border-collapse: collapse; }
.dre td { padding: 8px 0; border-bottom: 1px solid var(--grid); }
.dre td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 620; font-family: var(--font-num); }
.dre tr.total td { border-top: 1px solid var(--axis); border-bottom: 0; font-weight: 740; font-size: 15.5px; padding-top: 11px; }
.dre tr.sub td:first-child { padding-left: 14px; color: var(--ink-2); }
/* lista em barras (ranking) */
.barlist { display: grid; gap: 9px; }
.barlist .bl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline; cursor: default; }
.barlist .bl .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; font-size: 13px; }
.barlist .bl .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13px; white-space: nowrap; }
.barlist .bl .v small { color: var(--muted); font-weight: 500; margin-left: 6px; font-family: var(--font); }
.barlist .bl .t { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.barlist .bl .t i { display: block; height: 100%; background: var(--s1); border-radius: 3px; min-width: 2px; }
/* barra de participação (parte do todo) */
.sharebar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; }
.sharebar i { display: block; min-width: 2px; }
/* faixa de horas */
.heat { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.heat i { display: block; height: 28px; border-radius: 3px; background: var(--surface-2); }
.heat-x { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ============ abas, modal, avisos flutuantes ============ */
.tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 9px 13px; cursor: pointer; color: var(--ink-2); font-weight: 620; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: var(--radius-xs) var(--radius-xs) 0 0; white-space: nowrap; flex: none; }
.tabs button:hover { color: var(--ink); background: var(--surface-2); }
.tabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
:root[data-skin="aurora"] .tabs { border-bottom: 0; background: rgba(255, 255, 255, .04); padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
:root[data-skin="aurora"] .tabs button { border-radius: 8px; border-bottom: 0; margin: 0; padding: 7px 13px; }
:root[data-skin="aurora"] .tabs button[aria-selected="true"] { background: var(--accent-wash); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
:root[data-skin="carbono"] .tabs button { text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.crumbs .sep { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: var(--pill); background: var(--accent-wash); color: var(--accent-ink); font-size: 12.5px; font-weight: 620; max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.chip button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 2px 5px; border-radius: 50%; }
.chip button:hover { background: var(--accent-wash); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 80; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border-strong); width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.modal > header { padding: 18px 20px 0; } .modal > .body { padding: 14px 20px; display: grid; gap: 12px; } .modal > footer { padding: 0 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 220; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: #15171c; color: #fff; padding: 11px 15px; border-radius: var(--radius-sm); box-shadow: 0 12px 34px rgba(0, 0, 0, .4); font-size: 13px; overflow-wrap: anywhere; border: 1px solid rgba(255, 255, 255, .1); }
.toast.error { background: #8f2020; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(380px, 100%); }
.login .illo { width: 160px; margin: 6px auto 0; display: block; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }
.illo { display: block; max-width: 100%; height: auto; --il-card: var(--surface); --il-line: var(--border-strong); --il-a: var(--accent); --il-a2: color-mix(in srgb, var(--accent) 45%, var(--surface)); --il-soft: var(--surface-3); --il-ink: var(--ink); --il-coin: var(--warn); --il-shadow: rgba(0, 0, 0, .14); }

/* barra de seleção (campanhas) */
.selbar { position: sticky; bottom: 16px; z-index: 25; justify-self: center; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 16px 44px rgba(0, 0, 0, .35); max-width: 100%; flex-wrap: wrap; }
:root[data-skin="carbono"] .selbar, :root[data-skin="brasa"] .selbar { border-color: var(--accent); }
.selbar b { font-size: 13.5px; }
/* filtros em pílula */
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pills button { height: 30px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--border-strong); background: transparent; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.pills button:hover { color: var(--ink); background: var(--surface-2); }
.pills button[aria-pressed="true"] { background: var(--accent-wash); border-color: transparent; color: var(--accent-ink); }
.pills button small { opacity: .75; font-weight: 600; }
.acc-live { padding: 12px 14px; display: grid; gap: 10px; }
.acc-live-head { gap: 10px; align-items: center; flex-wrap: wrap; }
.acc-pills { max-height: 108px; overflow-y: auto; }
.acc-pills button { height: 28px; padding: 0 10px; }
.acc-pills button small { background: var(--surface-2); border-radius: var(--pill); padding: 1px 7px; opacity: 1; }
/* cartões-resumo de campanha (análise) */
.vcard { display: grid; gap: 8px; }
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--surface-2); }
.verdict .t { font-weight: 680; } .verdict .d { color: var(--ink-2); font-size: 13px; }
.statline { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 18px; }
.statline div > span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: var(--label-case); letter-spacing: var(--label-track); }
.statline div b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; font-family: var(--font-num); }
.statline div em { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; }

/* relógio/fuso do painel na barra superior */
.tz-chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12.5px; white-space: nowrap; color: var(--ink-2); background: var(--surface-2); cursor: help; }
.tz-chip b { font-weight: 620; color: var(--ink); }
@media (max-width: 1340px) { .tz-chip { display: none; } }

/* barra inferior no celular */
.tabbar { display: none; }

/* ---- lista de campanhas: faixa de lucro/prejuízo, total em faixa fina e cartões ---- */
table.data tbody tr.win > td:first-child, table.data tbody tr.loss > td:first-child { background-size: 3px 100%; background-repeat: no-repeat; background-position: left top; }
table.data tbody tr.win > td:first-child { background-image: linear-gradient(var(--good), var(--good)); }
table.data tbody tr.loss > td:first-child { background-image: linear-gradient(var(--bad), var(--bad)); }
.camp-search { width: 230px; }
/* quadro de checkout (visão geral): 3 colunas x 2 linhas, como no painel do H&W */
.ckgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile.ck { box-shadow: none; background: var(--surface-2); }
.tile .label small { display: inline-block; width: 100%; text-decoration: none; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ivbar { margin-bottom: 12px; gap: 8px; }
.ivbar input[type="date"] { width: 158px; }
.sumstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.sumstrip > div { padding: 11px 16px 12px; border-left: 1px solid var(--border); min-width: 0; }
.sumstrip > div:first-child { border-left: 0; }
.sumstrip > div > span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: var(--label-case); letter-spacing: var(--label-track); }
.sumstrip b { display: block; font-size: 17px; font-weight: 720; letter-spacing: -.02em; font-family: var(--font-num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sortbar select { min-width: 150px; }
.ccards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.ccard { position: relative; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 13px 14px 12px 18px; display: grid; gap: 11px; overflow: hidden; min-width: 0; align-content: start; }
.ccard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--deemph); }
.ccard.win::before { background: var(--good); } .ccard.loss::before { background: var(--bad); }
.ccard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-wash); }
.ccard > header { display: flex; gap: 10px; align-items: flex-start; }
.ccard .cname { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: start; }
.ccard .cname strong { font-size: 14px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard .cname > span:not(.badge) { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ccard .croas { display: grid; justify-items: end; gap: 3px; flex: none; }
.ccard .croas small { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .07em; }
.ccard .croas .pillnum { font-size: 13.5px; padding: 2px 10px; }
.ccard .cmain { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.ccard .cgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.ccard .cmain > div, .ccard .cgrid > div { min-width: 0; }
.ccard .cmain > div > span:first-child, .ccard .cgrid > div > span:first-child { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cmain b, .ccard .cgrid b { display: block; font-family: var(--font-num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cmain b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.ccard .cmain .lead b { font-size: 16.5px; }
.ccard .cgrid b { font-size: 13px; font-weight: 620; }
.ccard .cgrid .barcell { display: none; }
.ccard > footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.ccard input.pick { flex: none; margin: 2px 0 0; width: 20px; height: 20px; }
.ctl { display: grid; gap: 3px; min-width: 0; }
.ctl > span { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sortbar { align-items: flex-end; }
.sortbar .btn.icon-only { font-size: 16px; }

/* explicações dos indicadores em telas de toque */
.tile .label .lt { min-width: 0; }
.hint-sheet { position: fixed; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 210; background: var(--surface-3); color: var(--ink); border: 1px solid var(--border-strong); border-radius: 14px; padding: 13px 15px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); display: grid; gap: 5px; font-size: 13.5px; line-height: 1.45; max-width: 520px; margin: 0 auto; }
.hint-sheet[hidden] { display: none; }
.hint-sheet b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); }
.hint-sheet small { color: var(--muted); font-size: 11px; }
@media (hover: none) { .tile.has-hint { cursor: pointer; } .tile.has-hint .label .lt { text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; } }
.subtools { display: none; }
.scroll { display: contents; } /* no computador a página inteira rola; no celular este miolo é quem rola (ver abaixo) */
html { -webkit-tap-highlight-color: transparent; }
button, a, select, input, label, summary { touch-action: manipulation; }

/* ============ telas menores ============ */
@media (max-width: 1100px) { .cols-2, .cols-3, .cols-2-1, .cols-1-2 { grid-template-columns: minmax(0, 1fr); } .hero { grid-template-columns: minmax(0, 1fr); } .hero .hstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hero .hstat { padding: 13px 14px 12px; } }
@media (max-width: 940px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 70; transform: translateX(-105%); transition: transform .2s; margin: 0; height: 100vh; border-radius: 0 var(--side-radius) var(--side-radius) 0; top: 0; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .icon-btn.menu-btn { display: inline-grid; }
  .top { padding: 10px 14px; gap: 8px; } #view { padding: 14px 14px 28px; gap: 14px; }
  .top h1 { font-size: 17px; } .top .crumb { display: none; } .top-tools .btn .lbl { display: none; } .top .titles { flex: 1; }
  .tile.hero { grid-column: 1 / -1; } .tile.hero .value { font-size: 36px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 13px 11px; } .tile .value { font-size: 21px; }
  .hero { padding: 22px 18px; gap: 18px; } .hero .big { margin: 12px 0 14px; } .hero .hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .hero .hstat b { font-size: 21px; }
  .funnel .frow { grid-template-columns: 112px minmax(0, 1fr) auto; }
  .table-wrap.sticky { max-height: 72vh; }
  table.data td.name { max-width: 190px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); z-index: 40; background: var(--surface); border-top: 1px solid var(--border-strong); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 620; border-radius: 10px; cursor: pointer; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }
  .selbar { bottom: 12px; }
  .alert.stack { flex-wrap: wrap; } .alert.stack > div:nth-child(2) { flex-basis: calc(100% - 44px); } .alert.stack .acts { flex-basis: 100%; padding-left: 40px; margin-left: 0; flex-wrap: wrap; }
  #toasts { bottom: 86px; }

  /* Celular como aplicativo: a página em si NÃO rola. O topo e a barra de baixo ficam parados, fora da rolagem, e só o
     miolo (#scroll) rola. Assim eles não dependem de "position: fixed", que no iPhone sai do lugar quando a tela rola
     depois de o teclado abrir e fechar (o topo sumia e a barra de baixo parava no meio da tela). */
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { display: flex; flex-direction: column; height: 100dvh; }
  #app.shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .main { flex: 1 1 auto; min-height: 0; }
  .scroll { display: block; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
  .tabbar { position: relative; flex: none; }
  .login { position: fixed; inset: 0; z-index: 300; overflow: auto; background: var(--page); min-height: 0; }

  /* topo fino: menu, título, atualizar e visual. Período e moeda vão para a faixa logo abaixo, que rola com o miolo. */
  .top { position: static; flex: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--page); min-height: 0; flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; }
  .top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-tools { flex-wrap: nowrap; flex: none; }
  .subtools { display: flex; gap: 8px; align-items: center; padding: 12px 14px 0; }
  .subtools[hidden] { display: none; }
  .subtools .pop-wrap { flex: 1; min-width: 0; }
  .subtools .pop-wrap > .btn { width: 100%; justify-content: space-between; }
  .subtools .range-trigger { min-width: 0; overflow: hidden; white-space: nowrap; }
  .subtools .range-trigger:has(.cmp-tag) .muted { display: none; }
  .subtools .range-trigger .cmp-tag { margin-left: auto; }
  .side { height: 100dvh; }

  /* menus (período, visual) abrem como folha na parte de baixo da tela, ao alcance do polegar */
  .pop, .pop.skins { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); width: auto; min-width: 0; max-height: min(72vh, 620px); overflow-y: auto; z-index: 90; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55), 0 18px 50px rgba(0, 0, 0, .4); }
  .pop button.opt { padding: 13px 12px; font-size: 15px; }
  .pop .custom .row { flex-wrap: nowrap; }
  .pop .custom .btn { height: 42px; justify-content: center; }
  .pop.range-pop, .pop.range-pop.two { width: auto; max-width: none; padding: 0; }
  .drp { grid-template-columns: minmax(0, 1fr); }
  .drp-presets { flex-direction: row; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px; scrollbar-width: none; }
  .drp-presets::-webkit-scrollbar { display: none; }
  .drp-presets button.opt { width: auto; flex: none; padding: 7px 12px; min-height: 36px; font-size: 13px; border: 1px solid var(--border); border-radius: var(--pill); white-space: nowrap; }
  .drp-presets .radio { display: none; }
  .drp .range-calendar { padding: 12px 12px 10px; }
  .drp-foot { padding: 10px 12px; position: sticky; bottom: 0; background: var(--surface); z-index: 1; } .drp-foot .calendar-actions { width: 100%; }
  .calendar-day { height: 38px; }
  .calendar-hint { min-height: 0; }
  .calendar-inputs input { font-size: 16px; }
  .calendar-actions .btn { flex: 1; justify-content: center; }

  /* tudo o que se toca com o dedo fica com pelo menos ~36–44px */
  .btn { height: 40px; } .btn.sm { height: 36px; padding: 0 12px; font-size: 13px; } .btn.icon-only { width: 38px; }
  .icon-btn { width: 40px; height: 40px; }
  .seg button { height: 34px; padding: 0 12px; }
  .pills button { height: 36px; padding: 0 14px; font-size: 13px; }
  .tabs { padding-right: 26px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
  .tabs button { padding: 12px 13px; }
  input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="search"], select { height: 42px; }
  input[type="checkbox"] { width: 20px; height: 20px; }
  .chip { padding: 6px 6px 6px 12px; } .chip button { font-size: 18px; padding: 4px 9px; }
  .alert .x { width: 38px; height: 38px; }
  .check { min-height: 36px; }

  /* janelas de confirmação sobem de baixo, com botões largos */
  .modal-back { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 88vh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal > footer { flex-wrap: wrap; } .modal > footer .btn { flex: 1 1 0; justify-content: center; height: 46px; }

  /* tabelas: mais colunas por tela, rolagem lateral suave */
  .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .table-scroll-slider { height: 42px; }
  table.data { font-size: 12.5px; }
  table.data th, table.data td, .table-wrap.sticky table.data th, .table-wrap.sticky table.data td { padding: 9px 9px; }
  table.data th:first-child, table.data td:first-child { padding-left: 14px; } table.data th:last-child, table.data td:last-child { padding-right: 14px; }
  .table-wrap.sticky table.data td.name, table.data.tight td.name { max-width: 150px; }
  .card > header { padding: 14px 14px 0; } .card > .body { padding: 12px 14px 14px; }

  /* campanhas */
  .camp-search { width: 100%; }
  /* checkout no celular: 2 colunas, cada número ao lado da sua conversão */
  .ckgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile.ck .label small { display: none; }
  .ckgrid > :nth-child(1) { order: 1; } .ckgrid > :nth-child(4) { order: 2; } .ckgrid > :nth-child(2) { order: 3; } .ckgrid > :nth-child(5) { order: 4; } .ckgrid > :nth-child(3) { order: 5; } .ckgrid > :nth-child(6) { order: 6; }
  .ivbar input[type="date"] { flex: 1 1 120px; width: auto; min-width: 0; } .ivbar .spacer { display: none; } .ivbar .seg { flex: 1 1 auto; } .ivbar .seg button { flex: 1; }
  .camp-tools .pills { flex-wrap: nowrap; min-width: 0; }
  .sumstrip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(30.5%, 1fr); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .sumstrip::-webkit-scrollbar { display: none; }
  .sumstrip > div { padding: 9px 12px 10px; scroll-snap-align: start; }
  .sumstrip b { font-size: 14px; }
  .ccards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
  .sortbar { flex-wrap: nowrap; gap: 8px; }
  .sortbar .spacer { display: none; }
  .sortbar .ctl { flex: 1 1 0; } .sortbar .ctl:last-child { flex: none; } .sortbar select { width: 100%; min-width: 0; }
  .selbar { justify-self: stretch; justify-content: center; border-radius: 16px; padding: 8px 10px; flex-wrap: wrap; gap: 8px; } .selbar b { font-size: 12.5px; white-space: nowrap; }
  .statline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* celular deitado: pouca altura, então o topo rola junto com a página */
@media (max-height: 520px) { .top { position: static; } .table-wrap.sticky { max-height: none; } }
@media print { .side, .top-tools, .menu-btn, .tabbar, .selbar { display: none !important; } .shell { grid-template-columns: 1fr; } .top { position: static; } }

/* ---- instalado como aplicativo (iPhone/Android): respeita o entalhe e a barra inferior ---- */
@supports (padding: env(safe-area-inset-top)) {
  .top { padding-top: calc(14px + env(safe-area-inset-top)); padding-left: calc(28px + env(safe-area-inset-left)); padding-right: calc(28px + env(safe-area-inset-right)); }
  .side { padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  @media (max-width: 940px) {
    .top { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }
  }
}
/* ---- Ao vivo ---- */
.live-top { gap: 12px; }
.live-status { gap: 8px; }
.livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; flex: none; }
.live-bar { height: 34px; border-radius: 8px; }
.flegend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.flegend .fl-label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 680; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.flegend .fl-label i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.flegend .fl-value { font-size: 19px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.live-kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
/* Pagamentos recusados (H&W Hub): três tabelas pequenas lado a lado */
.failed-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 18px; }
.failed-groups h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.failed-groups > div { min-width: 0; }
.live-kpis .tile .value { font-size: 21px; font-variant-numeric: tabular-nums; }
.live-tools { padding: 12px 14px; border-bottom: 1px solid var(--border); gap: 8px; }
.live-tools select { max-width: 280px; }
.live-camp { max-width: 300px; } .live-camp > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-account { color: var(--accent-ink); font-weight: 600; margin-bottom: 2px; }
.country-place { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.country-flag { width: 20px; height: 15px; object-fit: contain; flex: none; border-radius: 2px; }
.count-pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 750; display: inline-grid; place-items: center; }
.count-pill.on { background: var(--warn); color: #1d1500; }
table.data tbody tr.dim td { opacity: .55; }
table.data tbody tr.flash td { animation: flashrow 2.2s ease-out 3; }
@keyframes flashrow { 0% { background: color-mix(in srgb, var(--good) 28%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .livedot, table.data tbody tr.flash td { animation: none; } table.data tbody tr.flash td { background: var(--good-wash); } }
.modal.wide { width: min(860px, 100%); }
.live-detail { display: grid; gap: 18px 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.live-detail > .note { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.live-detail h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.timeline li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 16px; bottom: -12px; width: 2px; background: var(--border); }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; position: relative; z-index: 1; }
.warn-list { display: grid; gap: 12px; } .warn-item { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
@media (max-width: 940px) {
  .flegend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-tools select { max-width: none; flex: 1 1 140px; }
  .live-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 940px) { input[type="text"], input[type="password"], input[type="search"], input[type="date"], select, textarea { font-size: 16px; } } /* evita o zoom automático do iPhone ao tocar num campo */

/* Comparação: identidade do vídeo, momento da oferta e origem comprovada da compra. */
.vsl-compare-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.vsl-video-card { min-width: 0; padding: 20px; border: 1px solid var(--card-border); border-top: 3px solid; border-radius: var(--radius); background: var(--card-bg); box-shadow: var(--card-shadow); }
.vsl-video-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.vsl-video-heading > div { min-width: 0; }
.vsl-video-heading h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.vsl-letter { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 9px; font-size: 17px; font-weight: 750; }
.vsl-video-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vsl-video-numbers > div { display: flex; flex-direction: column; gap: 5px; }
.vsl-video-conversion { grid-column: 1 / -1; }
.vsl-video-numbers strong { font-size: clamp(26px, 3vw, 38px); font-weight: 720; letter-spacing: -.035em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.vsl-pitch-track { height: 7px; background: var(--surface-3); border-radius: 4px; margin-top: 24px; overflow: hidden; }
.vsl-pitch-track span { display: block; height: 100%; border-right: 3px solid var(--ink); opacity: .8; }
.vsl-video-meta, .vsl-video-bottom { display: flex; justify-content: space-between; gap: 12px; }
.vsl-video-meta { margin-top: 6px; }
.vsl-video-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.vsl-video-bottom b { color: var(--ink); }
.vsl-method { margin: -4px 0 0; line-height: 1.6; }
.vsl-coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.vsl-coverage > div { display: grid; gap: 5px; }
.vsl-coverage strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.vsl-coverage span { font-size: 12px; color: var(--ink-2); }
.vsl-sales-note { padding: 0 20px; line-height: 1.6; }
.vsl-sales-filters { padding: 0 20px 14px; gap: 12px; }
.vsl-sales-filters input { flex: 1 1 260px; }
.vsl-sales-filters select { flex: 0 1 240px; }
.vsl-sales-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.vsl-sale-video { max-width: 280px; min-width: 150px; white-space: normal; }
.vsl-sale-campaign { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 580px) {
  .vsl-coverage { gap: 12px; padding: 16px; }
  .vsl-coverage strong { font-size: 23px; }
  .vsl-sales-filters select { flex: 1 1 100%; }
  .vsl-sales-foot { align-items: flex-start; }
}

/* Visitantes: usa os mesmos cartões e tabela da dashboard. */
.live-switch { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-live-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.page-live-kpis .value { font-size: clamp(23px, 2.1vw, 34px); white-space: nowrap; }
.page-live-tools { flex-wrap: wrap; }
.page-live-tools input[type="search"] { flex: 1 1 240px; min-width: 160px; }
.page-live-tools select { max-width: 280px; }
.meta-cell { display: grid; justify-items: end; gap: 3px; min-width: 115px; }
.meta-value { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-bottom: 1px dashed currentColor; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; padding: 7px 5px; min-height: 36px; border-radius: 5px; }
.meta-value:hover, .meta-value:focus-visible { background: var(--surface2, #ffffff12); outline: 2px solid var(--accent, #ff7918); outline-offset: 2px; }
.meta-cell.editing { width: 240px; max-width: 100%; justify-items: stretch; gap: 9px; white-space: normal; text-align: left; padding: 8px; }
.meta-cell .field { margin: 0; min-width: 0; font-size: 12px; }
.meta-cell input { width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
.meta-cell > small { font-size: 10px; font-weight: 400; }
.meta-review { display: grid; gap: 12px; }
.meta-review p { margin: 0; }
.meta-batch-rows { display: grid; gap: 8px; max-height: 40vh; overflow-y: auto; }
.meta-batch-rows .note { display: grid; gap: 5px; overflow-wrap: anywhere; }
.ccard .meta-cell { justify-items: start; min-width: 0; }
.ccard .cgrid > div:has(.meta-cell.editing) { grid-column: 1 / -1; }
.ccard .meta-cell.editing { width: auto; padding: 8px 0; justify-items: stretch; }
@media (max-width: 580px) { .meta-value { min-height: 44px; } }
.page-live-path { max-width: 220px; min-width: 125px; overflow-wrap: anywhere; white-space: normal; }
.page-live-count { padding: 12px 20px; }
.page-live-note { margin: 0; line-height: 1.6; }
.page-live-code { width: 100%; font-family: var(--mono, monospace); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .page-live-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 580px) {
  .page-live-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-live-kpis > :last-child { grid-column: 1 / -1; }
  .page-live-tools > input, .page-live-tools > select { flex: 1 1 140px; min-width: 0; max-width: 100%; }
  .live-switch > .seg { width: 100%; }
  .live-switch > .seg > button { flex: 1; }
}

/* Saúde das páginas */
.health-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-wash); margin-bottom: 12px; }
.health-head.bad { background: var(--bad-wash); } .health-head.warn { background: var(--warn-wash); } .health-head.ok { background: var(--good-wash); }
.health-head strong { font-size: 15px; line-height: 1.4; flex: 1 1 260px; }
.health-list { display: grid; gap: 2px; }
.health-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; padding: 9px 4px; border-top: 1px solid var(--border); }
.health-item:first-child { border-top: 0; }
.health-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.health-item.bad .dot { background: var(--bad); } .health-item.warn .dot { background: var(--warn); } .health-item.ok .dot { background: var(--good); } .health-item.info .dot { background: var(--accent); }
.health-item b { font-weight: 620; } .health-item p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.health-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.health-cols h3 { margin: 0 0 8px; font-size: 13px; font-weight: 620; }
.health-errors { display: grid; gap: 6px; }
.health-errors > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--border); }
.health-errors > div:first-child { border-top: 0; }
.health-errors .mono { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.health-facts { display: flex; gap: 5px; flex-wrap: wrap; max-width: 340px; }
.health-steps td, .health-steps th { white-space: nowrap; }
.heat-tools { gap: 10px 14px; margin-bottom: 8px; }
.heat-tools .seg { max-width: 100%; overflow-x: auto; }
.heat-tools .seg button { white-space: nowrap; flex: none; }
.heat-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); align-items: start; }
.heat-layout.wide { grid-template-columns: minmax(0, 1fr); }
.heat-view { max-height: 82vh; overflow: auto; background: var(--surface-2, var(--surface)); border-radius: var(--radius-sm); }
.heat-scale { margin: 0 auto; overflow: hidden; }
.heat-stage { position: relative; transform-origin: 0 0; background: #fff; }
.heat-frame { display: block; border: 0; height: 600px; pointer-events: none; background: #fff; }
.heat-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.heat-legend { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.heat-legend i { flex: 1; max-width: 220px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2a6bff, #19c3a6, #b8e04a, #ffb020, #e8322d); }
.heat-side { display: grid; gap: 16px; min-width: 0; }
.heat-label { max-width: 260px; overflow-wrap: anywhere; white-space: normal; }
.heat-reach { display: grid; gap: 6px; }
.heat-reach > div { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.heat-reach b { text-align: right; font-weight: 580; }
@media (max-width: 900px) { .heat-layout { grid-template-columns: minmax(0, 1fr); } }

/* Regras do Gerenciador de campanhas */
.rules { display: grid; gap: 12px; min-width: 0; }
.rules input[type="search"], .rules input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; }
.rules-list { display: grid; gap: 10px; }
.rule-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.rule-card.off { opacity: .72; }
.rule-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rule-card p { margin: 0; }
.rule-targets { margin: 0; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.rule-form { display: grid; gap: 12px; }
.rule-form h3 { margin: 0; font-size: 15px; }
.rule-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.rule-block { display: grid; gap: 8px; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-size: 12.5px; overflow-wrap: anywhere; }
.rule-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.rule-results { display: grid; gap: 2px; max-height: 190px; overflow: auto; }
.rule-result { display: grid; text-align: left; gap: 1px; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; overflow-wrap: anywhere; }
.rule-result:hover, .rule-result:focus-visible { background: var(--info-wash); }
.rule-conds { display: grid; gap: 6px; }
.rule-cond { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rule-cond input { width: 110px; }
.rule-days { display: flex; flex-wrap: wrap; gap: 10px; }
.rule-day { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; text-transform: capitalize; }
.rule-log ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .rules { min-width: 0; } }

/* ---- Estúdio de criativos ---- */
.studio-how { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.studio-step { display: flex; gap: 10px; align-items: flex-start; }
.studio-step > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); font-size: 13px; }
.studio-step strong { display: block; } .studio-step span { font-size: 13px; color: var(--ink-2); }
.studio-ref { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--accent-wash); }
.studio-ref.empty-ref { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.studio-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.studio-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.studio-card header, .studio-card footer { display: flex; align-items: center; gap: 6px; } .studio-card footer { justify-content: space-between; margin-top: auto; }
.studio-card dl { margin: 0; display: grid; gap: 2px; font-size: 13px; } .studio-card dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.studio-card dd { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.studio-angles { display: grid; gap: 8px; }
.studio-angle { display: flex; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; align-items: flex-start; }
.studio-angle .pick { padding-top: 3px; } .studio-angle .body { flex: 1; min-width: 0; display: grid; gap: 4px; } .studio-angle .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.studio-angle .hook { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; } .studio-angle .acts { display: flex; gap: 2px; }
.studio-angle details summary { cursor: pointer; font-size: 12.5px; color: var(--accent-ink); }
.studio-angle pre { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 8px 0; padding: 10px; border-radius: var(--radius-xs); background: var(--accent-wash); overflow-wrap: anywhere; }
.studio-formats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.studio-format { text-align: left; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: transparent; cursor: pointer; display: grid; gap: 4px; align-content: start; }
.studio-format span { font-size: 12.5px; color: var(--muted); } .studio-format .badge { justify-self: start; }
.studio-format[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent); }
.studio-bar { position: sticky; bottom: 10px; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface, #1b1b1d); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.studio-prompts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } .studio-prompt { display: grid; gap: 6px; }
.studio-gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.studio-shot { border: 1px solid var(--card-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card-bg); display: flex; flex-direction: column; min-width: 0; }
.studio-shot.off { opacity: .55; } .studio-shot.won { border-color: var(--accent); }
.studio-shot .shot { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; background: #0000001a; cursor: zoom-in; }
.studio-shot .shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.studio-shot .shot.state { cursor: default; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 14px; text-align: center; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.studio-shot .shot.err { color: var(--neg, #e5484d); }
.studio-shot .shot.vid { position: relative; cursor: pointer; background: #000; aspect-ratio: 4 / 5; overflow: hidden; } .studio-shot .shot.vid img { position: absolute; inset: 0; } .studio-shot .shot.vid .vid-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #000000b8; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.studio-up { display: grid; gap: 6px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: var(--radius-sm); background: var(--accent-wash); } .studio-up[hidden] { display: none; } .studio-up .bar { height: 6px; border-radius: 999px; background: #00000026; overflow: hidden; } .studio-up .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.studio-shot .meta { padding: 10px 12px 4px; display: grid; gap: 3px; min-width: 0; } .studio-shot .tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.studio-shot .acts { padding: 6px 8px 10px; display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.studio-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.studio-read { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-read aside { display: grid; gap: 8px; position: sticky; top: 0; } .studio-read aside img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; } .studio-read .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.studio-read .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; min-width: 0; } .studio-read section { min-width: 0; } .studio-read section.big { grid-column: 1 / -1; }
.studio-read h4 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.studio-read p { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.studio-read pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13.5px; line-height: 1.45; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--accent-wash); border-left: 3px solid var(--accent); }
@media (max-width: 760px) { .studio-read { grid-template-columns: 1fr; } .studio-read aside { position: static; } .studio-read aside img { max-height: 46vh; object-fit: contain; } .studio-read .cols { grid-template-columns: 1fr; } }
.studio-instrs { display: grid; gap: 14px; } .studio-instrs.two { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.studio-instr { display: grid; gap: 6px; min-width: 0; } .studio-instr .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .studio-instr textarea { width: 100%; }
.studio-fold { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; } .studio-fold > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.studio-rules { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 8px 0 0; padding: 10px; border-radius: var(--radius-xs); background: var(--accent-wash); overflow-wrap: anywhere; }
.studio-progress { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 10px 0 6px; } .studio-progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.studio-progress[hidden] { display: none; }
.studio-vars { display: grid; gap: 14px; }
.studio-var { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 12px; min-width: 0; background: var(--card-bg); }
.studio-var.off { opacity: .5; border-left-color: var(--border); }
.studio-var > header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .studio-var .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.studio-var .what { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.studio-var .texts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .studio-var .texts > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.studio-var h5 { margin: 0; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.studio-var pre, .studio-var .pt { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13.5px; line-height: 1.5; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--accent-wash); }
.studio-var pre { font-weight: 600; } .studio-var textarea { width: 100%; }
.studio-var .texts.one { grid-template-columns: 1fr; } .studio-var .long { max-height: 320px; overflow: auto; } .studio-var pre.long { font-weight: 500; } .studio-var.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (max-width: 760px) { .studio-var .texts { grid-template-columns: 1fr; } }
.studio-notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
@media (max-width: 640px) { .studio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .studio-prompts { grid-template-columns: 1fr; } .studio-instrs.two { grid-template-columns: 1fr; } }

/* ---- Hoje nas contas ---- */
.today-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.today-stat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: baseline; gap: 8px; }
.today-stat b { font-size: 22px; line-height: 1; } .today-stat span { font-size: 12.5px; color: var(--muted); }
.today-stat.bad { border-color: color-mix(in srgb, #e5484d 55%, transparent); background: color-mix(in srgb, #e5484d 9%, transparent); } .today-stat.bad b { color: #ff6b6f; }
.today-stat.warn { border-color: color-mix(in srgb, #e9a23b 55%, transparent); background: color-mix(in srgb, #e9a23b 9%, transparent); } .today-stat.warn b { color: #e9a23b; }
.today-stat.good { border-color: color-mix(in srgb, #2fb67c 55%, transparent); background: color-mix(in srgb, #2fb67c 9%, transparent); } .today-stat.good b { color: #2fb67c; }
.today-quiet { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, #2fb67c 9%, transparent); font-size: 13.5px; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.today-row { display: flex; gap: 12px; padding: 8px 10px; border-radius: var(--radius-xs); border-left: 3px solid var(--border-strong); background: color-mix(in srgb, var(--ink) 3%, transparent); min-width: 0; }
.today-row.bad { border-left-color: #e5484d; } .today-row.warn { border-left-color: #e9a23b; } .today-row.good { border-left-color: #2fb67c; }
.today-row time { flex: none; min-width: 46px; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.today-row > div { min-width: 0; display: grid; gap: 2px; } .today-row .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============ visual 5 — CIANO (preto e azul ciano) ============ */
:root[data-skin="ciano"] {
  color-scheme: dark;
  --page: #04070a;
  --page-art: radial-gradient(980px 520px at 102% -14%, rgba(34, 211, 238, .13), transparent 62%), radial-gradient(760px 460px at -10% 108%, rgba(14, 165, 233, .08), transparent 60%);
  --surface: #0b1116; --surface-2: #101920; --surface-3: #17232c;
  --card-bg: linear-gradient(180deg, rgba(103, 232, 249, .045), rgba(255, 255, 255, .012) 42%), #0a1014; --card-border: rgba(125, 225, 245, .11); --card-shadow: 0 14px 38px rgba(0, 0, 0, .42);
  --side-bg: linear-gradient(180deg, rgba(103, 232, 249, .04), rgba(255, 255, 255, .008)), #070b0e; --side-border: rgba(125, 225, 245, .11); --side-ink: #eef9fb; --side-muted: #8499a3; --side-hover: rgba(103, 232, 249, .07);
  --side-active-bg: linear-gradient(90deg, rgba(34, 211, 238, .24), rgba(34, 211, 238, .05) 80%, rgba(34, 211, 238, 0)); --side-active-ink: #ffffff; --side-margin: 12px; --side-radius: 20px; --side-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --ink: #eef9fb; --ink-2: #b6c9d1; --muted: #7f949e; --grid: #15212a; --axis: #2a3b46; --border: rgba(150, 225, 240, .1); --border-strong: rgba(150, 225, 240, .2);
  --accent: #22d3ee; --accent-ink: #67e8f9; --accent-wash: rgba(34, 211, 238, .13); --accent-contrast: #021519;
  --accent-grad: linear-gradient(135deg, #5eead4 0%, #22d3ee 46%, #0ea5e9 100%); --glow: 0 8px 26px rgba(34, 211, 238, .3);
  --s1: #1fb8d3; --s2: #e0703a; --s3: #2fb380; --s4: #9085e9; --deemph: #40525c;
  --good: #0ca30c; --good-ink: #5fe08a; --warn: #fab219; --warn-ink: #fac54f; --serious: #ec835a; --bad: #d03b3b; --bad-ink: #ff8f8f;
  --good-wash: rgba(34, 197, 94, .15); --warn-wash: rgba(250, 178, 25, .13); --bad-wash: rgba(208, 59, 59, .2); --info-wash: rgba(34, 211, 238, .09);
  --radius: 16px; --radius-sm: 11px; --radius-xs: 8px;
  --font: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hero-bg: radial-gradient(640px 340px at 98% -14%, rgba(34, 211, 238, .42), transparent 68%), radial-gradient(520px 320px at 0% 124%, rgba(14, 165, 233, .2), transparent 70%), linear-gradient(135deg, #071a20 0%, #080d11 62%);
  --hero-ink: #ffffff; --hero-muted: rgba(226, 248, 252, .74); --hero-line: #67e8f9; --hero-chip: rgba(255, 255, 255, .075); --hero-edge: rgba(125, 225, 245, .14); --hero-up: #86e8b2; --hero-down: #ffb4a8;
  --top-bg: color-mix(in srgb, #04070a 72%, transparent);
}
/* peças mais modernas neste visual: menu flutuante, botões e campos arredondados, brilho fino no topo dos cartões */
:root[data-skin="ciano"] .side { border-width: 1px; }
:root[data-skin="ciano"] #nav a { border-radius: 12px; }
:root[data-skin="ciano"] #nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .16); }
:root[data-skin="ciano"] #nav a[aria-current="page"] svg { color: var(--accent); filter: drop-shadow(0 0 6px rgba(34, 211, 238, .55)); }
:root[data-skin="ciano"] #nav .nav-group { color: var(--accent-ink); opacity: .62; }
:root[data-skin="ciano"] .btn { height: 38px; padding: 0 15px; border-radius: 12px; border-color: var(--border-strong); background: rgba(255, 255, 255, .03); font-weight: 620; transition: background .14s, border-color .14s, box-shadow .14s, transform .06s, filter .12s; }
:root[data-skin="ciano"] .btn:hover { background: rgba(103, 232, 249, .08); border-color: rgba(103, 232, 249, .42); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
:root[data-skin="ciano"] .btn.primary { background: var(--accent-grad); border-color: transparent; font-weight: 720; }
:root[data-skin="ciano"] .btn.primary:hover { background: var(--accent-grad); box-shadow: 0 10px 30px rgba(34, 211, 238, .4); }
:root[data-skin="ciano"] .btn.ghost { background: transparent; border-color: transparent; }
:root[data-skin="ciano"] .btn.ghost:hover { background: var(--accent-wash); box-shadow: none; }
:root[data-skin="ciano"] .btn.sm { height: 31px; padding: 0 12px; border-radius: 10px; }
:root[data-skin="ciano"] .seg { border-radius: 12px; background: rgba(255, 255, 255, .03); }
:root[data-skin="ciano"] .seg button { border-radius: 9px; }
:root[data-skin="ciano"] .seg button[aria-pressed="true"] { background: var(--accent-wash); color: #fff; box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .28); }
:root[data-skin="ciano"] input[type="text"], :root[data-skin="ciano"] input[type="number"], :root[data-skin="ciano"] input[type="date"], :root[data-skin="ciano"] input[type="password"], :root[data-skin="ciano"] input[type="search"], :root[data-skin="ciano"] select, :root[data-skin="ciano"] textarea { border-radius: 11px; background-color: rgba(255, 255, 255, .03); }
:root[data-skin="ciano"] .card, :root[data-skin="ciano"] .tile { background-image: linear-gradient(90deg, transparent, rgba(103, 232, 249, .5), transparent), var(--card-bg); background-size: 62% 1px, auto; background-position: 50% 0, 0 0; background-repeat: no-repeat; }
:root[data-skin="ciano"] .tile { transition: border-color .16s, transform .16s; }
:root[data-skin="ciano"] .tile:hover { border-color: rgba(103, 232, 249, .3); transform: translateY(-1px); }
:root[data-skin="ciano"] .tile .label { font-size: 12px; color: var(--muted); }
:root[data-skin="ciano"] .tile .label .ico { border-radius: 9px; background: rgba(34, 211, 238, .12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .18); }
:root[data-skin="ciano"] .hero { border-color: rgba(103, 232, 249, .26); }
:root[data-skin="ciano"] .hero .eyebrow { color: #a5f3fc; }
:root[data-skin="ciano"] .tabs { border-bottom: 0; background: rgba(255, 255, 255, .03); padding: 4px; border-radius: 13px; border: 1px solid var(--border); }
:root[data-skin="ciano"] .tabs button { border-radius: 10px; border-bottom: 0; margin: 0; padding: 7px 14px; }
:root[data-skin="ciano"] .tabs button[aria-selected="true"] { background: var(--accent-wash); color: #fff; box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .3); }
:root[data-skin="ciano"] .selbar { border-color: var(--accent); }
:root[data-skin="ciano"] .badge { font-weight: 620; }
:root[data-skin="ciano"] .pop, :root[data-skin="ciano"] .modal { border-color: rgba(125, 225, 245, .18); box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(34, 211, 238, .05); }
:root[data-skin="ciano"] .brand .mark { border-radius: 12px; }
@media (max-width: 940px) { :root[data-skin="ciano"] { --side-margin: 0px; --side-radius: 0px; } }

/* miniatura do criativo no Gerenciador (abas Anúncios, Criativos e Versões) */
.thumbrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumbrow .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.adthumb { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; background: #000; cursor: zoom-in; display: block; }
.adthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adthumb.vid { cursor: pointer; } .adthumb.vid i { position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: #000000c0; color: #fff; }
.adthumb.none { background: transparent; border-style: dashed; cursor: default; opacity: .5; }
.adthumb:hover:not(.none) { border-color: var(--accent); }
.ccard > header .adthumb { width: 52px; height: 52px; }

/* largura ajustável da coluna do nome (alça na borda direita do cabeçalho) */
table.data .col-grip { position: absolute; top: 0; bottom: 0; right: -5px; width: 12px; cursor: col-resize; touch-action: none; z-index: 6; }
table.data .col-grip::after { content: ''; position: absolute; top: 22%; bottom: 22%; left: 5px; width: 2px; border-radius: 2px; background: var(--muted); opacity: .45; }
table.data .col-grip:hover::after, table.data .col-grip.on::after { background: var(--accent); opacity: 1; top: 8%; bottom: 8%; }
.table-wrap table.data.namew td.name { width: var(--name-w) !important; min-width: var(--name-w) !important; max-width: var(--name-w) !important; }

/* botão com ação em andamento (pausar, ativar): giro e texto, sem aceitar outro clique */
.btn.working { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: progress; opacity: .9; }
.btn.working .spin { width: 12px; height: 12px; flex: none; }
