@font-face { font-family: "IBM Plex Sans"; src: url("fonts/plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: oklch(0.175 0.006 165);
  --panel: oklch(0.205 0.007 165);
  --panel-2: oklch(0.24 0.008 165);
  --line: oklch(0.3 0.008 165);
  --line-strong: oklch(0.4 0.01 165);
  --ink: oklch(0.95 0.005 165);
  --ink-2: oklch(0.78 0.008 165);
  --ink-3: oklch(0.68 0.008 165);
  --money: oklch(0.8 0.17 155);
  --money-ink: oklch(0.2 0.04 155);
  --money-soft: oklch(0.8 0.17 155 / 0.13);
  --warn: oklch(0.83 0.14 80);
  --warn-soft: oklch(0.83 0.14 80 / 0.12);
  --bad: oklch(0.74 0.16 25);
  --bad-soft: oklch(0.74 0.16 25 / 0.13);
  --pending: oklch(0.8 0.08 230);
  --pending-soft: oklch(0.8 0.08 230 / 0.12);
  --orange: oklch(0.76 0.16 55);
  --series-1: #4a8fe0;
  --series-2: #29ad6a;
  --radius: 8px;
  --ease-ui: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 0.9375rem/1.5 var(--sans); }
::selection { background: var(--money); color: var(--money-ink); }
h1, h2, p, ul, dl, dd, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
small { display: block; color: var(--ink-3); font-size: 0.8125rem; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--money); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 20; padding: 8px 14px; border-radius: var(--radius); background: var(--money); color: var(--money-ink); font-weight: 600; text-decoration: none; transform: translateY(-64px); }
.skip-link:focus { transform: none; }
.sprite { position: absolute; width: 0; height: 0; }
.icon { flex: none; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; letter-spacing: -0.01em; }
.strong { font-weight: 600; color: var(--ink); }
.money { color: var(--money); }
.muted { color: var(--ink-2); max-width: 72ch; }
.right { text-align: right; }

/* Marca: YENOM é MONEY ao contrário, e o N espelhado denuncia. */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; }
.logo-mark { flex: none; width: 38px; height: 38px; }
.logo-tile { fill: oklch(0.14 0.008 165); stroke: var(--line-strong); }
.logo-word { font: 700 1.5rem/1 var(--sans); letter-spacing: 0.06em; }
.logo-n { display: inline-block; margin-left: -0.06em; margin-right: 0.06em; transform: scaleX(-1); color: var(--money); }

/* Estrutura */
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.side-brand { display: block; padding: 4px 10px 20px; text-decoration: none; }
.side li a, .side-soon, .side-exit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; text-align: left; transition: background 150ms, color 150ms; }
.side li a:hover, .side-exit:hover { background: var(--panel-2); color: var(--ink); }
.side li a[aria-current] { background: var(--panel-2); color: var(--ink); font-weight: 500; }
.side li a[aria-current] .icon { color: var(--money); }
.side li a.side-later:not([aria-current]) { color: var(--ink-3); }
.side-end { margin-top: auto; padding-top: 16px; }
.side-meta { padding: 0 10px 10px; min-width: 0; }
.side-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--warn); }
.main { padding: 24px 28px 48px; min-width: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 20px; }
.page-title { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.page-sum { color: var(--ink-2); }
.page-head .tabs { margin-left: auto; }
.page-head .tabs + .search { margin-left: 0; }
.push-right { margin-left: auto; }
.section-first { margin-top: 4px; }
.section-title { margin: 32px 0 10px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; background: var(--panel); border-radius: var(--radius); }
.tabs a { padding: 4px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 0.875rem; transition: background 150ms, color 150ms; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { background: var(--panel-2); color: var(--ink); font-weight: 500; }
.tabs-steps { margin-bottom: 12px; }

.alert-line { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px; padding: 8px 12px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); text-decoration: none; }
.alert-line span { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 150ms; }
.alert-line:hover span { text-decoration-color: currentColor; }

/* Mesa: fila + mensagem */
.desk { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.queue { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; padding-right: 4px; }
.queue-group { display: flex; justify-content: space-between; padding: 12px 10px 6px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
.queue-group:first-child { padding-top: 0; }
.queue-item { display: block; padding: 9px 10px; border-radius: 6px; text-decoration: none; transition: background 150ms; }
.queue-item:hover { background: var(--panel); }
.queue-item[aria-current] { background: var(--panel-2); }
.queue-line { display: flex; justify-content: space-between; gap: 12px; }
.queue-line strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-amount { color: var(--ink-2); white-space: nowrap; }
.queue-sub { font-size: 0.8125rem; color: var(--ink-3); }
.queue-sub .num { white-space: nowrap; }
.queue-title { display: inline-flex; gap: 5px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.queue-title .icon { width: 14px; height: 14px; }
.type-verify .queue-title { color: var(--warn); }
.type-offer .queue-title { color: var(--pending); }

.pane { min-width: 0; }
.pane-back { display: none; margin-bottom: 12px; }
.pane-empty { padding: 48px 24px; color: var(--ink-2); text-align: center; background: var(--panel); border-radius: 12px; }
.composer { display: grid; gap: 16px; padding: 20px 22px; background: var(--panel); border-radius: 12px; max-width: 760px; }
.composer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.composer-name { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.composer-meta { color: var(--ink-2); overflow-wrap: anywhere; }
.composer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.composer-form { display: grid; gap: 12px; }
.composer-form textarea { field-sizing: content; }
.composer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.composer-hint { color: var(--money); }

.ledger { display: grid; gap: 2px; padding: 10px 0; border-block: 1px solid var(--line); }
.ledger > div { display: flex; justify-content: space-between; gap: 16px; }
.ledger small { display: inline; }
.ledger-total { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); font-weight: 600; }
.ledger-note { color: var(--ink-3); font-size: 0.8125rem; }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink); font: 500 0.9375rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background 150ms, border-color 150ms, color 150ms; }
.btn:hover { background: var(--panel-2); }
.btn:active { background: var(--line); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--money); border-color: var(--money); color: var(--money-ink); font-weight: 600; }
.btn-primary:hover { background: oklch(0.85 0.17 155); border-color: oklch(0.85 0.17 155); }
.btn-primary:active { background: oklch(0.74 0.16 155); }
.btn-wide { width: 100%; }
.link-quiet { padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 0.8125rem; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; transition: color 150ms; }
.link-quiet:hover { color: var(--ink); }
.row-link { font-weight: 500; }

.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
input:not([type="checkbox"]), textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; caret-color: var(--money); transition: border-color 150ms; }
input:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, textarea:focus { outline: 2px solid var(--money); outline-offset: -1px; border-color: transparent; }
textarea { display: block; resize: vertical; line-height: 1.55; }
input::placeholder { color: var(--ink-3); opacity: 1; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--money); }
.search { min-width: 260px; }
.stack { display: grid; gap: 14px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: start; }
.field-row-end { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.form-actions { display: flex; gap: 8px; }
.form-page { display: grid; gap: 28px; max-width: 720px; }
.form-page fieldset { display: grid; gap: 14px; }
.form-page legend { margin-bottom: 12px; padding: 0; font-weight: 600; }
.form-page legend small { display: inline; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.form-error { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; color: var(--bad); }
.modal .form-error { margin-bottom: 0; }

/* Status: sempre ícone e texto, nunca só cor */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.tone-good { color: var(--money); }
.badge.tone-good { background: var(--money-soft); }
.tone-warn { color: var(--warn); }
.badge.tone-warn { background: var(--warn-soft); }
.tone-bad { color: var(--bad); }
.badge.tone-bad { background: var(--bad-soft); }
.tone-pending { color: var(--pending); }
.badge.tone-pending { background: var(--pending-soft); }
.tone-orange { color: var(--orange); }
.tone-muted { color: var(--ink-3); }
.badge.tone-muted { background: var(--panel-2); padding-left: 8px; }

.notice { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 6px; }
.notice[hidden], .composer-hint[hidden] { display: none; }
.notice.tone-warn { background: var(--warn-soft); }
.notice.tone-bad { background: var(--bad-soft); }
.notice a { color: inherit; }
.pros-row > .notice { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.flash { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }

/* Tabelas */
.table-wrap { position: relative; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 6px 12px; border-bottom: 1px solid var(--line-strong); color: var(--ink-3); font-size: 0.8125rem; font-weight: 500; text-align: left; white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.num, .table td .num { white-space: nowrap; }
.table tbody tr { transition: background 150ms; }
.table tbody tr:hover { background: var(--panel); }
.inline-actions { display: inline-flex; gap: 12px; white-space: nowrap; }

/* Dashboard */
.section-note { margin: -4px 0 14px; font-size: 0.875rem; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--panel); border-radius: 12px; min-width: 0; }
.stat-lead { background: var(--panel-2); }
.stat-label { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.stat-value { margin-top: 4px; font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat small { margin-top: auto; padding-top: 6px; }
.dash-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; margin-top: 12px; }
.panel { padding: 18px 20px; background: var(--panel); border-radius: 12px; min-width: 0; }
.panel-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.panel-sub { margin-bottom: 14px; color: var(--ink-3); font-size: 0.8125rem; }
.meters { display: grid; gap: 14px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: 0.875rem; }
.meter { display: block; }
.meter-track { fill: var(--panel-2); }
.meter-fill { fill: var(--series-1); }
.meter-money .meter-fill { fill: var(--series-2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; font-size: 0.8125rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; }
.swatch-paid { background: var(--series-1); }
.swatch-recovered { background: var(--series-2); }
.chart { position: relative; }
.chart svg { display: block; }
.chart-axis { stroke: var(--line-strong); stroke-width: 1; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-text { fill: var(--ink-3); font: 400 18px var(--sans); }
.bar-paid { fill: var(--series-1); }
.bar-recovered { fill: var(--series-2); }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: oklch(1 0 0 / 0.05); }
.chart-tip { position: absolute; top: 0; left: 0; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 0.8125rem; font-weight: 500; white-space: nowrap; pointer-events: none; }
.chart-tip[hidden] { display: none; }
.chart-empty { padding: 48px 0; color: var(--ink-3); text-align: center; }
.empty-tight { padding: 4px 0; }

/* Blocos com setinha */
.accordion { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fold { background: var(--panel); border-radius: var(--radius); }
.fold > summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 500; cursor: pointer; list-style: none; border-radius: var(--radius); transition: color 150ms ease; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { color: var(--money); }
.fold > summary .icon { color: var(--ink-3); transition: transform 180ms var(--ease-ui); }
.fold[open] > summary .icon { transform: rotate(90deg); }
.fold > summary code { font-size: 0.875rem; }
.fold-note { color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.fold > textarea { field-sizing: content; }
.fold > textarea, .fold > small, .fold > .auto-list, .fold > .table-wrap { margin: 0 12px 12px; width: calc(100% - 24px); }
.fold-plain { margin-top: 8px; background: none; }
.fold-plain > summary { padding: 6px 0; color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.fold-plain > .table-wrap { margin: 0; width: 100%; }
.auto-list { display: grid; gap: 4px; }
.auto-list > div { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 12px; font-size: 0.875rem; }
.auto-list dd { color: var(--ink-2); }

/* Prospec */
.pros { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.page-action { margin-left: auto; }
.page-head .tabs:not(.mobile-tabs) + .page-action { margin-left: 0; }
@media (max-width: 640px) { .page-head .mobile-tabs + .page-action { margin-left: 0; } }
.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.modal > form { padding: 20px; }
.modal[open] { animation: modalIn 200ms var(--ease-ui); }
.modal::backdrop { background: oklch(0.1 0.005 165 / 0.65); }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
.field select:focus { outline: 2px solid var(--money); outline-offset: -1px; border-color: transparent; }
.modal input[type="date"] { color-scheme: dark; }
.choice { margin: 0; padding: 0; border: 0; min-width: 0; }
.choice legend { margin-bottom: 4px; padding: 0; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row label { position: relative; cursor: pointer; }
.choice-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-row span { display: block; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 0.875rem; transition: background 150ms, border-color 150ms, color 150ms; }
.choice-row input:checked + span { background: var(--money-soft); border-color: var(--money); color: var(--money); font-weight: 500; }
.choice-row input:focus-visible + span { outline: 2px solid var(--money); outline-offset: 2px; }
.ref-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ref-blank { display: grid; place-items: center; aspect-ratio: 8 / 5; margin-bottom: 8px; border-radius: 6px; background: var(--bg); color: var(--ink-3); font: 500 2.5rem/1 var(--mono); }
.ref-remove { position: absolute; top: 16px; right: 16px; }
.ref-remove .btn { background: var(--panel); }
.sales-gap { margin-top: 14px; }
.sales-periods { margin-bottom: 12px; }
.sale-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ref-tabs { margin-bottom: 4px; }
.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ref-card { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 2px; padding: 8px 8px 12px; background: var(--panel); border-radius: 12px; color: var(--ink); text-decoration: none; transition: background 150ms var(--ease-ui); }
.ref-card:hover { background: var(--panel-2); }
.ref-card img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; margin-bottom: 8px; border-radius: 6px; background: var(--bg); object-fit: cover; object-position: top; }
.ref-card strong { padding: 0 4px; font-weight: 600; }
.ref-card small { padding: 0 4px; color: var(--ink-3); overflow-wrap: anywhere; }
.webhook-change { margin-top: 10px; }
.fold-form { padding: 2px 12px 12px; }
.pros-form { display: grid; gap: 14px; align-content: start; }
.pros-map { min-height: 520px; border-radius: 12px; overflow: hidden; background: var(--panel); }
/* OpenStreetMap só tem mapa claro: o filtro deixa no tema do painel. */
.pros-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.6); }
.pros-map .leaflet-container { background: var(--bg); font-family: var(--sans); }
.pros-go { display: flex; gap: 8px; }
.pros-label { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.pros-inline { display: inline; font-weight: 400; }
.pros-pins { display: grid; gap: 4px; }
.pros-pin { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 0.875rem; }
.pros-pin-empty { color: var(--ink-3); font-size: 0.875rem; }
input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--money); }
.pros-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pros-row { display: grid; gap: 6px; padding: 12px 16px; background: var(--panel); border-radius: 12px; }
.pros-row-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pros-row-head strong { font-weight: 600; }
.pros-row-actions { display: flex; gap: 12px; align-items: center; }
.pros-contact { display: grid; gap: 8px; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 0.8125rem; }
.pros-contact .fold-plain { margin-top: -2px; }
.pros-contact .fold-plain > summary { padding: 2px 0; }
.pros-contact .fold-plain > textarea { margin: 6px 0 2px; width: 100%; }
.pros-facts { color: var(--ink-2); font-size: 0.875rem; }
.pros-message { field-sizing: content; }
.pros-credit { margin-top: 12px; font-size: 0.8125rem; color: var(--ink-3); }
.pros-pages { margin-top: 12px; }
.pros-detail { padding-top: 6px; }
.pros-row select { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.875rem; }
.stat-grid + .pros-list, .stat-grid + .empty { margin-top: 14px; }

/* Mineração e Monitoração */
.mine-title { flex: 1 1 320px; min-width: 0; }
.mine-summary { margin-top: 2px; color: var(--ink-2); max-width: 80ch; }
.mine-ads { display: inline-grid; justify-items: end; line-height: 1.2; }
.mine-ads small { font-size: 0.75rem; }
.mine-facts { margin: 4px 0 8px; }
.mine-move { padding-bottom: 4px; }
.form-page select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; }
.sheet th, .sheet td { padding-left: 10px; padding-right: 10px; }
.sheet-name { position: sticky; left: 0; min-width: 220px; max-width: 300px; background: var(--bg); }
.sheet tbody tr:hover .sheet-name { background: var(--panel); }
.sheet-blank { color: var(--ink-3); }
.sheet-cell { min-width: 32px; min-height: 28px; padding: 2px 6px; margin: -2px -6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background 150ms; }
.sheet-cell:hover { background: var(--panel-2); }
.sheet-cell.is-found { color: var(--ink-3); }
.sheet-cell.is-manual { text-decoration: underline dotted; text-underline-offset: 4px; }

/* Saúde e ajustes */
.checks li { display: grid; grid-template-columns: 92px minmax(180px, 280px) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks .badge { justify-self: start; }
.checks strong { font-weight: 500; }
.setup-block { margin-top: 8px; }
.copy-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.copy-line code { flex: 1 1 280px; padding: 8px 10px; border-radius: 6px; background: var(--panel); overflow-wrap: anywhere; }
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 760px; }
.settings .section-title { margin-top: 20px; }
.settings .muted { margin-bottom: 12px; }
.plain-list { margin-top: 14px; }
.plain-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.plain-list form { margin-left: auto; }

.history .section-title { margin-top: 0; }
.history-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.history-head { display: flex; justify-content: space-between; gap: 12px; }
.history-head strong { font-weight: 500; }
.is-undone { color: var(--ink-3); text-decoration: line-through; }
.is-undone small { text-decoration: none; }
.desk-order { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }

.empty { max-width: 60ch; padding: 40px 0; }
.empty h2 { margin-bottom: 6px; font-size: 1.125rem; font-weight: 600; }
.empty p { color: var(--ink-2); }
.empty p + p { margin-top: 14px; }

/* Entrada */
.bare { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.bare-box { width: min(100%, 380px); display: grid; gap: 16px; }
.bare-logo { margin-bottom: 8px; }
.bare-logo .logo-mark { width: 44px; height: 44px; }
.bare-logo .logo-word { font-size: 1.75rem; }
.bare-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }

/* Janela média: a barra não muda, e a mesa mostra uma coisa de cada vez */
@media (max-width: 1100px) {
  .main { padding: 20px 20px 40px; }
  .page-head .tabs { margin-left: 0; }
  .desk, .desk-order { grid-template-columns: minmax(0, 1fr); }
  .queue { position: static; max-height: none; padding-right: 0; }
  .desk.has-selection .queue { display: none; }
  .pane-back { display: inline-block; }
  .stat-grid, .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 1.1875rem; }
  .dash-split, .pros { grid-template-columns: minmax(0, 1fr); }
  .pros-map { min-height: 380px; }
  .checks li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .composer-side { align-items: flex-start; }
}

/* Celular: a barra continua vertical, só com os ícones */
@media (max-width: 640px) {
  .shell { grid-template-columns: 52px minmax(0, 1fr); }
  .side { padding: 16px 6px 10px; }
  .side-brand { padding: 0 0 16px; text-align: center; }
  .side .logo-mark { width: 34px; height: 34px; }
  .side .logo-word { display: none; }
  .side-meta { display: none; }
  .side li a, .side-exit { position: relative; justify-content: center; min-height: 44px; padding: 7px 0; }
  .side li a > span:not(.dot), .side-exit > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dot { position: absolute; top: 8px; right: 8px; margin: 0; }
  .main { padding: 16px 12px 40px; }
  .composer { padding: 14px; }
  .pros-row-actions, .inline-actions { flex-wrap: wrap; white-space: normal; }
  .auto-list > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fold > summary { flex-wrap: wrap; }
  .field-row, .field-row-end { grid-template-columns: minmax(0, 1fr); }
  .search { flex: 1 1 100%; min-width: 0; }
  .hide-sm { display: none; }
  input:not([type="checkbox"]), textarea, .field select, .form-page select, .pros-row select { font-size: 1rem; }
}

/* Movimento: mesmos tempos e curvas do Recupera Pix */
html { scroll-behavior: smooth; }
a { transition: text-decoration-color 150ms ease, color 150ms ease; }
.btn, .tabs a, .queue-item, input, textarea, .composer, .badge, .table tbody tr {
  transition: background-color 220ms var(--ease-ui), color 220ms var(--ease-ui),
    border-color 220ms var(--ease-ui), box-shadow 240ms var(--ease-ui),
    transform 230ms var(--ease-ui), opacity 220ms var(--ease-ui);
}
.side li a, .side-exit { transition: background .17s ease, border-color .17s ease, color .17s ease, transform .17s ease; }
@media (hover: hover) {
  .btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22); }
  .tabs a:hover { transform: translateY(-1px); }
  .queue-item:not([aria-current]):hover { transform: translateX(2px); }
}
.btn:not(:disabled):active { transform: translateY(0) scale(0.985); }
.queue-item[aria-current] { box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12); }
.notice, .composer-hint { transition: opacity 220ms var(--ease-ui); }
@starting-style {
  .notice, .composer-hint { opacity: 0; }
}
.main { transition: opacity 220ms var(--ease-ui); }
.main:focus { outline: none; }
.main[aria-busy] { opacity: 0.6; }

.view-enter { animation: viewIn 320ms var(--ease-ui) both; }
.detail-enter { animation: detailIn 280ms var(--ease-ui) both; }
.flash { animation: viewIn 280ms var(--ease-ui) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes detailIn { from { opacity: 0.35; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }


/* Tráfego */
.track-card { display: grid; gap: 4px; align-content: start; }
.track-card .copy-line code { background: var(--bg); }
.track-card .copy-line input { flex: 1 1 220px; }
.track-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; }
.track-refresh { display: flex; align-items: center; gap: 14px; }
.track-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; align-items: end; margin: 10px 0 16px; }
.track-custom { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; grid-column: 1 / -1; }
.track-custom[hidden] { display: none; }
.track-table th, .track-table td { white-space: nowrap; }
.track-table td small { white-space: nowrap; }
.track-utm { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
.track-email { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; }
.track-table tfoot td { padding: 10px 12px; border-top: 1px solid var(--line-strong); font-weight: 600; background: var(--panel-2); }
.track-table tfoot td.muted { font-weight: 400; }
.track-meta { margin-bottom: 16px; }
.track-meta .copy-line input { flex: 1 1 320px; }
.track-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.track-sub { margin: 18px 0 6px; font-size: 0.9375rem; font-weight: 600; }
.track-push { display: flex; gap: 12px; align-items: flex-start; max-width: 340px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.track-push-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--panel-2); }
.track-push-icon .logo-word { display: none; }
.track-push-icon svg { width: 26px; height: 26px; }
.track-push strong { display: block; font-size: 0.9375rem; }
.track-push div > span { display: block; color: var(--ink-2); font-size: 0.875rem; }
.track-steps { display: grid; gap: 6px; margin: 4px 0 6px; padding-left: 20px; color: var(--ink-2); }
.track-card .form-actions { flex-wrap: wrap; margin-top: 12px; }


/* Tráfego: aba Meta */
.meta-board { gap: 12px; }
.meta-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; align-items: stretch; }
.meta-levels a { display: flex; align-items: center; padding: 10px 14px; border-radius: 8px; border-bottom: 2px solid transparent; background: var(--bg); color: var(--ink-2); font-weight: 600; text-decoration: none; transition: color 150ms, border-color 150ms, background 150ms; }
.meta-levels a:hover { color: var(--ink); }
.meta-levels a[aria-current] { color: var(--money); border-bottom-color: var(--money); background: var(--panel-2); }
.meta-levels .meta-sel-chip { padding: 6px 12px; border-radius: 999px; background: var(--money); color: var(--money-ink); font-size: 0.8125rem; white-space: nowrap; align-self: center; }
.meta-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.meta-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.btn-icon { min-width: 38px; padding: 7px 10px; }
.meta-menu { position: relative; }
.meta-menu > summary { list-style: none; }
.meta-menu > summary::-webkit-details-marker { display: none; }
.meta-menu > summary .icon { width: 14px; height: 14px; transform: rotate(90deg); }
.meta-menu-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; min-width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: 0 12px 30px oklch(0 0 0 / 0.35); }
.meta-menu-list form { display: contents; }
.meta-menu-list button { padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.meta-menu-list button:hover:not(:disabled) { background: var(--line); }
.meta-menu-list button:disabled { color: var(--ink-3); cursor: not-allowed; }
.meta-untracked { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--orange); color: oklch(0.2 0.05 55); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.meta-untracked .icon { width: 14px; height: 14px; }
.meta-filters { margin: 4px 0 6px; }
.meta-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.meta-table th, .meta-table td { white-space: nowrap; }
.meta-table thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-2); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.02em; }
.meta-table thead th a { color: inherit; text-decoration: none; }
.meta-table thead th a:hover { color: var(--ink); }
.meta-table tfoot td { position: sticky; bottom: 0; background: var(--panel-2); font-weight: 600; border-top: 1px solid var(--line-strong); }
.meta-table .meta-name { position: sticky; left: 0; z-index: 1; max-width: 280px; overflow: hidden; text-overflow: ellipsis; background: var(--panel); }
.meta-table thead .meta-name, .meta-table tfoot .meta-name { z-index: 3; background: var(--panel-2); }
.meta-table tbody tr:hover .meta-name { background: var(--panel-2); }
.meta-table .meta-name a { color: var(--ink); text-decoration: none; }
.meta-table .meta-name a:hover { text-decoration: underline; }
.meta-check { width: 34px; }
.meta-neg { color: var(--bad); }
.meta-pos { color: var(--money); }
.meta-edit { padding: 0; border: 0; border-bottom: 1px dashed var(--line-strong); background: none; color: inherit; font: inherit; cursor: pointer; }
.meta-edit:hover { color: var(--money); border-bottom-color: var(--money); }
.meta-note { font-size: 0.8125rem; }
.meta-log { margin-top: 6px; }
.switch { position: relative; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background 150ms; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform 150ms var(--ease-ui); }
.switch[aria-checked="true"] { background: var(--money); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--money-ink); }
.modal-wide { width: min(900px, calc(100vw - 32px)); }
.cols-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
.cols-pick { display: grid; gap: 8px; align-content: start; }
.cols-list, .cols-order { max-height: 52vh; overflow: auto; margin: 0; padding: 0; list-style: none; }
.cols-list li { padding: 5px 4px; border-radius: 6px; }
.cols-list li:hover { background: var(--panel-2); }
.cols-order { display: grid; gap: 6px; align-content: start; padding-right: 4px; }
.cols-order li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); cursor: grab; }
.cols-order li > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.cols-order li button { padding: 0 4px; border: 0; background: none; color: var(--ink-3); font: inherit; cursor: pointer; }
.cols-order li button:hover { color: var(--ink); }
.cols-order .cols-fixed { cursor: default; color: var(--ink-3); }
.cols-order .is-dragging { opacity: 0.5; }
.cols-grip { color: var(--ink-3); }
@media (max-width: 720px) {
  .meta-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-grid { grid-template-columns: 1fr; }
  .meta-table .meta-name { max-width: 160px; }
}


/* Tema claro (escolhido em Tráfego › Resumo › Aparência) */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.975 0.004 165);
  --panel: oklch(1 0 0);
  --panel-2: oklch(0.95 0.005 165);
  --line: oklch(0.9 0.006 165);
  --line-strong: oklch(0.8 0.008 165);
  --ink: oklch(0.22 0.01 165);
  --ink-2: oklch(0.4 0.01 165);
  --ink-3: oklch(0.52 0.01 165);
  --money: oklch(0.6 0.15 155);
  --money-ink: oklch(0.99 0.01 155);
  --money-soft: oklch(0.6 0.15 155 / 0.12);
  --bad: oklch(0.56 0.19 25);
  --bad-soft: oklch(0.56 0.19 25 / 0.1);
  --warn: oklch(0.62 0.14 70);
  --pending: oklch(0.55 0.12 240);
}
:root[data-theme="light"] .logo-tile { fill: oklch(0.2 0.01 165); }
:root[data-theme="light"] .chart-hit:hover { fill: oklch(0 0 0 / 0.04); }
:root[data-theme="light"] .modal::backdrop { background: oklch(0.2 0.01 165 / 0.35); }

/* Tráfego: Resumo */
:root { --c1: #2f6fea; --c2: #36b4e5; --c3: #e6b422; --c4: #e5466b; --c5: #c03fbf; }
.summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.summary.is-editing { grid-template-columns: 240px minmax(0, 1fr); }
.summary-main { display: grid; gap: 16px; min-width: 0; align-content: start; }
.summary-title { display: flex; align-items: center; gap: 6px; }
.summary-title .panel-title { margin-right: 6px; }
.summary-palette { position: sticky; top: 12px; align-self: start; max-height: calc(100dvh - 24px); overflow: auto; padding: 16px; border-radius: 12px; background: var(--panel); }
.palette-list { display: grid; gap: 6px; margin: 6px 0 10px; padding: 0; list-style: none; }
.palette-list button { width: 100%; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--ink); font: 600 0.875rem var(--sans); text-align: left; cursor: pointer; }
.palette-list button:hover:not(:disabled) { border-color: var(--money); }
.palette-list button:disabled { color: var(--ink-3); cursor: default; opacity: 0.6; }
.summary-editbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--pending-soft); }
.summary-editbar p { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.summary-editbar form { display: contents; }
.theme-menu .meta-menu-list { min-width: 150px; }
.theme-label { margin: 2px 10px 4px; color: var(--ink-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.multi { position: relative; }
.multi > summary { display: flex; align-items: center; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); cursor: pointer; list-style: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.multi > summary::-webkit-details-marker { display: none; }
.multi-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 6px; max-height: 300px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: 0 12px 30px oklch(0 0 0 / 0.3); }
.widget-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(108px, auto); grid-auto-flow: row dense; gap: 14px; }
.widget { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px; border-radius: 12px; background: var(--panel); }
.widget[data-w="2"] { grid-column: span 2; }
.widget[data-w="3"] { grid-column: span 3; }
.widget[data-w="4"] { grid-column: span 4; }
.widget[data-h="2"] { grid-row: span 2; }
.w-head { display: flex; align-items: flex-start; gap: 8px; }
.w-title { flex: 1; margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.widget:not(.wt-money):not(.wt-pct):not(.wt-ratio):not(.wt-int) .w-title { font-size: 1rem; color: var(--ink); }
.w-help { position: relative; display: inline-grid; place-items: center; flex: none; color: var(--ink-3); cursor: default; outline: none; }
.w-help:hover, .w-help:focus-visible { color: var(--ink); }
.w-help:focus-visible svg { outline: 2px solid var(--money); outline-offset: 2px; border-radius: 50%; }
.tip { position: absolute; z-index: 40; top: calc(100% + 8px); left: -10px; display: none; gap: 6px; width: max-content; max-width: min(520px, 80vw); padding: 12px 14px; border-radius: 6px; background: oklch(0.13 0.005 260); color: oklch(0.98 0 0); font: 600 0.8125rem/1.5 var(--sans); text-align: left; white-space: normal; box-shadow: 0 12px 30px oklch(0 0 0 / 0.4); pointer-events: none; }
.tip strong { font-weight: 700; }
.tip span { font-weight: 600; }
.w-help:hover .tip, .w-help:focus-visible .tip { display: grid; }
.tip.is-flipped { left: auto; right: -6px; }
.w-value { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.widget.is-neg .w-title, .widget.is-neg .w-value { color: var(--bad); }
.w-empty { margin: auto 0; color: var(--ink-3); font-size: 0.875rem; }
.w-edit { display: none; gap: 4px; }
.is-editing .w-edit { display: flex; position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px; border-radius: 8px; background: var(--panel-2); box-shadow: 0 4px 14px oklch(0 0 0 / 0.25); }
.is-editing .w-help { visibility: hidden; }
.w-edit button { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font: 600 0.875rem var(--sans); cursor: pointer; }
.w-edit button:hover { border-color: var(--money); }
.is-editing .widget { outline: 1px dashed var(--line-strong); cursor: grab; }
.widget.is-dragging { opacity: 0.45; }
.w-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.w-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 52px; align-items: center; gap: 10px; font-size: 0.875rem; }
.w-list-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-list-pct { text-align: right; color: var(--ink-2); }
.w-ring-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.w-ring-fg { fill: none; stroke: var(--c1); stroke-width: 3; stroke-linecap: round; }
.w-approval { display: grid; gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.w-approval li { display: grid; grid-template-columns: 1fr auto 56px; align-items: center; gap: 10px; }
.w-approval .num { text-align: right; }
.w-donut { display: grid; justify-items: center; gap: 10px; margin: auto 0; }
.w-donut svg { width: min(200px, 100%); }
.w-donut-bg { fill: none; stroke: var(--line); stroke-width: 14; }
.w-seg { fill: none; stroke-width: 14; }
.w-seg-c1 { stroke: var(--c1); }
.w-seg-c2 { stroke: var(--c2); }
.w-seg-c3 { stroke: var(--c3); }
.w-seg-c4 { stroke: var(--c4); }
.swatch-c1 { background: var(--c1); }
.swatch-c2 { background: var(--c2); }
.swatch-c3 { background: var(--c3); }
.swatch-c4 { background: var(--c4); }
.swatch-spend { background: var(--line-strong); }
.swatch-profit { background: var(--c3); }
.w-donut-label { fill: var(--ink-2); font: 500 9px var(--sans); }
.w-donut-total { fill: var(--ink); font: 700 14px var(--sans); }
.w-funnel { display: grid; grid-template-rows: auto 1fr auto; position: relative; flex: 1; min-height: 220px; }
.w-funnel svg { position: absolute; inset: 26px 0 26px 0; width: 100%; height: calc(100% - 52px); }
.w-funnel-heads, .w-funnel-pcts, .w-funnel-counts { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.w-funnel-heads { font-size: 0.8125rem; font-weight: 600; }
.w-funnel-pcts { position: relative; align-self: center; color: oklch(1 0 0); font-weight: 700; text-shadow: 0 0 3px oklch(0.15 0.05 280), 0 0 6px oklch(0.15 0.05 280 / 0.8); }
.w-funnel-counts { position: relative; color: var(--ink-2); font-weight: 600; }
.w-funnel-sep { stroke: oklch(1 0 0 / 0.35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fun-stop-a { stop-color: var(--c1); }
.fun-stop-b { stop-color: var(--c5); }
.w-bars { flex: 1; display: flex; align-items: flex-end; }
.w-bars svg { width: 100%; height: auto; }
.w-bar-pct { font-size: 11px; }
.w-axis-label { font-size: 11px; }
.bar-neg { fill: var(--bad); }
.bar-spend { fill: var(--line-strong); }
.line-profit { stroke: var(--c3); stroke-width: 2.5; }
@media (max-width: 1100px) {
  .widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget[data-w="3"], .widget[data-w="4"] { grid-column: span 2; }
  .summary.is-editing { grid-template-columns: minmax(0, 1fr); }
  .summary-palette { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .widget-grid { grid-template-columns: minmax(0, 1fr); }
  .widget[data-w] { grid-column: span 1; }
}

/* Tráfego: Notificações */
.notify-grid .notify-connect { grid-column: 1 / -1; }
.report-hour { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 420px; padding: 4px 0; cursor: pointer; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-look { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); transition: background 150ms; }
.switch-look::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform 150ms var(--ease-ui); }
.switch-input:checked + .switch-look { background: var(--money); }
.switch-input:checked + .switch-look::after { transform: translateX(16px); background: var(--money-ink); }
.switch-input:focus-visible + .switch-look { outline: 2px solid var(--money); outline-offset: 2px; }
.report-styles { display: grid; gap: 8px; max-width: 420px; }
.report-style { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 600; cursor: pointer; }
.report-style input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 0; accent-color: var(--money); }
.report-style:has(input:checked) { border-color: var(--money); color: var(--money); background: var(--money-soft); }

.integ-more, .integ-test { margin-top: 16px; }
.integ-gap { margin-top: 18px; }
.integ-more .copy-line code { font-size: 0.8125rem; }

.diag-result { display: grid; gap: 8px; }
.modal-body { padding: 20px; }
.diag-points { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.diag-points li { padding: 8px 12px; border-radius: 8px; background: var(--bg); }

/* Tráfego: Taxas */
.costs .track-card { gap: 6px; }
.costs-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.costs-row .track-sub { margin: 0; }
.costs-list { display: grid; gap: 6px; margin: 4px 0 8px; padding: 0; list-style: none; }
.costs-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 8px; background: var(--bg); font-size: 0.875rem; }
.costs-list li small { display: block; }
.costs-empty { margin: 4px 0 8px; padding: 18px 14px; border-radius: 8px; background: var(--bg); color: var(--ink-3); font-size: 0.875rem; }
.costs-products { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.drawer { width: min(460px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; border-width: 0 0 0 1px; }
.drawer[open] { animation: drawerIn 220ms var(--ease-ui); }
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Tráfego: Regras */
.rules-table td { vertical-align: middle; }
.rules-table small { max-width: 34ch; white-space: normal; }
.rules-menu .meta-menu-list { left: auto; right: 0; }
.menu-link { padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.menu-link:hover { background: var(--line); }
.rules-sim { margin-bottom: 16px; border: 1px solid var(--pending); }
.rule-modal .field-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.inline-pair { display: flex; gap: 8px; }
.inline-pair > * { min-width: 0; }
.inline-pair input { flex: 1; }
.inline-pair select { flex: none; width: auto; }
.conds { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--bg); }
.cond-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.cond-row select { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; }
small.inline { display: inline; margin-left: 6px; }
@media (max-width: 640px) { .cond-row { grid-template-columns: 1fr 1fr; } }

/* Avisos no canto e confirmação dentro do YENOM */
.toasts { position: fixed; z-index: 100; top: 16px; right: 16px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--money); border-radius: 10px; background: var(--panel-2); color: var(--ink); font-size: 0.875rem; font-weight: 500; box-shadow: 0 10px 30px oklch(0 0 0 / 0.35); pointer-events: auto; cursor: pointer; animation: toastIn 220ms var(--ease-ui) both; }
.toast.tone-bad { border-left-color: var(--bad); }
.toast .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.toast.tone-good .icon { color: var(--money); }
.toast.tone-bad .icon { color: var(--bad); }
.toast.is-leaving { animation: toastOut 200ms ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.confirm-modal { width: min(420px, calc(100vw - 32px)); }
.confirm-text { margin: 0; color: var(--ink-2); white-space: pre-line; }

/* Painel da Prospec: anotações */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.note-card { display: flex; flex-direction: column; gap: 10px; }
.note-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.note-head .panel-title { overflow-wrap: anywhere; }
.note-actions { display: flex; gap: 6px; flex: none; }
.note-body { margin: 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.note-meta { color: var(--ink-3); }
.note-modal { width: min(640px, calc(100vw - 32px)); }
.note-modal textarea { min-height: 220px; resize: vertical; }
@media (max-width: 560px) { .note-grid { grid-template-columns: minmax(0, 1fr); } }

/* Painel da Prospec: guia de abordagem */
.guide { max-width: 900px; }
.guide-index { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.guide-index a { padding: 4px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 0.8125rem; text-decoration: none; }
.guide-index a:hover { color: var(--ink); background: var(--panel-2); }
.guide-section { scroll-margin-top: 16px; }
.guide-body { display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); line-height: 1.6; }
.guide-body p { margin: 0; }
.guide-body strong { color: var(--ink); }
.guide-sub { margin: 8px 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.guide-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; list-style: disc; }
.guide-list li { display: list-item; }
.guide-list li::marker { color: var(--money); }
.guide-msg { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-left: 3px solid var(--money); border-radius: 8px; background: var(--panel); }
.guide-msg p { flex: 1; color: var(--ink); white-space: pre-wrap; }
.guide-msg .btn { flex: none; }
.guide-table td { vertical-align: top; color: var(--ink-2); }
.guide-table th { white-space: normal; }
.guide-help { margin-bottom: 16px; }
.guide-help p { margin: 0 0 6px; }
.guide-help code { padding: 1px 5px; border-radius: 4px; background: var(--panel); color: var(--ink); font-size: 0.8125rem; }
.guide-edit-section { margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; }
.guide-edit-section textarea { resize: vertical; font-size: 0.875rem; line-height: 1.5; }
@media (max-width: 640px) { .guide-msg { flex-direction: column; } }

/* Painel da Prospec: preços */
.price-page > section:first-child .section-title, .price-edit > p:first-child { margin-top: 0; }
.price-table td { vertical-align: top; }
.price-table td.muted { max-width: 52ch; }
.price-main { font-weight: 600; }
.price-note { margin-top: 8px; font-size: 0.8125rem; }
.show-sm { display: none; }
.price-rules { display: grid; gap: 10px; margin: 0; }
.price-rules > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-rules dt { font-weight: 600; }
.price-rules dd { margin: 0; color: var(--ink-2); }
.price-rows { display: grid; gap: 8px 10px; align-items: start; }
.price-rows-3 { grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr) 150px; }
.price-rows-2 { grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr); }
.price-col-label { color: var(--ink-3); font-size: 0.8125rem; }
.price-rows textarea { min-height: 40px; resize: vertical; }
.price-reset { margin-top: 28px; }
@media (max-width: 640px) {
  .show-sm { display: block; margin-top: 2px; color: var(--ink-3); font-weight: 400; }
  .price-rules > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .price-rows-3, .price-rows-2 { grid-template-columns: minmax(0, 1fr); }
  .price-col-label { display: none; }
}

/* Tráfego: seções embaixo do item na barra da esquerda */
.side-sub { list-style: none; margin: 2px 0 6px 19px; padding: 0 0 0 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.side .side-sub a { padding: 6px 10px; font-size: 0.9375rem; color: var(--ink-3); gap: 9px; }
.side .side-sub .icon { width: 16.5px; height: 16.5px; flex: none; }
.side .side-count { margin-left: auto; padding-left: 8px; color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.side .side-sub a[aria-current] .icon { color: var(--money); }
.side .side-sub a:hover { color: var(--ink); }
.side .side-sub a[aria-current] { background: var(--panel-2); color: var(--ink); font-weight: 500; box-shadow: inset 2px 0 0 var(--money); }
.side-sub-enter li { animation: sideDrop 220ms cubic-bezier(.2, .8, .2, 1) both; }
.side-sub-enter li:nth-child(2) { animation-delay: 25ms; }
.side-sub-enter li:nth-child(3) { animation-delay: 50ms; }
.side-sub-enter li:nth-child(4) { animation-delay: 75ms; }
.side-sub-enter li:nth-child(5) { animation-delay: 100ms; }
.side-sub-enter li:nth-child(6) { animation-delay: 125ms; }
.side-sub-enter li:nth-child(7) { animation-delay: 150ms; }
@keyframes sideDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.page-title-sub { color: var(--ink-3); font-weight: 400; }
/* No computador as seções ficam na barra; as abas no topo só aparecem no celular (barra só com ícones). */
.mobile-tabs { display: none; }
@media (max-width: 640px) {
  .side-sub { display: none; }
  .mobile-tabs { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
