/* Roazly — painel de tráfego. Tema "Aurora": tinta azul-noite, brilho violeta, cartões de vidro finos. */
:root {
  --fz: 1.06; /* tamanho das letras do sistema inteiro */
  color-scheme: dark;
  --bg: #08080f;
  --glow-a: rgba(124, 92, 255, 0.10);
  --glow-b: rgba(192, 132, 252, 0.06);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-solid: #10101a;
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.08);
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  --card-edge: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.065);
  --border-2: rgba(255, 255, 255, 0.11);
  --text: #eeedf5;
  --text-2: #aeacc0;
  --muted: #7e7c92;
  --accent: #7c5cff;
  --accent-2: #9d85ff;
  --accent-ink: #ffffff;
  --accent-text: #a995ff;
  --accent-wash: rgba(124, 92, 255, 0.14);
  --violet: #c084fc;
  --good: #0ca30c;
  --good-text: #42c95a;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --critical-text: #f07272;
  --s1: #8b6dff;
  --s2: #ff6b9a;
  --grid: rgba(255, 255, 255, 0.06);
  --axis: rgba(255, 255, 255, 0.14);
  --col-line: rgba(255, 255, 255, 0.045);
  --f1: #c9bfff; --f2: #ab9bff; --f3: #8b7bff; --f4: #7360f0; --f5: #5d48d6; --f6: #4a36b5;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4f9;
  --glow-a: rgba(124, 92, 255, 0.14);
  --glow-b: rgba(124, 92, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(20, 16, 50, 0.04);
  --surface-3: rgba(20, 16, 50, 0.08);
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
  --card-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(20, 16, 50, 0.04), 0 8px 24px rgba(20, 16, 50, 0.05);
  --border: rgba(20, 16, 50, 0.08);
  --border-2: rgba(20, 16, 50, 0.15);
  --text: #15131f;
  --text-2: #4c4960;
  --muted: #6e6b82;
  --accent: #7c5cff;
  --accent-2: #6a4bf0;
  --accent-ink: #ffffff;
  --accent-text: #5b3fe0;
  --accent-wash: rgba(124, 92, 255, 0.12);
  --violet: #9b4ff0;
  --good-text: #087a1d;
  --critical-text: #b42727;
  --s1: #2a78d6;
  --s2: #eb6834;
  --grid: rgba(20, 16, 50, 0.07);
  --axis: rgba(20, 16, 50, 0.16);
  --col-line: rgba(20, 16, 50, 0.06);
  --f1: #b3a5ff; --f2: #9886ff; --f3: #7c66f5; --f4: #6a55f0; --f5: #5541d4; --f6: #4430b0;
  --shadow: 0 18px 50px rgba(20, 16, 50, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 520px at 8% -8%, var(--glow-a), transparent 62%),
    radial-gradient(800px 560px at 96% -4%, var(--glow-b), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, var(--glow-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: calc(14px * var(--fz))/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }
.num, table td.n, table th.n { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: calc(12px * var(--fz)); letter-spacing: 0; }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.good { color: var(--good-text); }
.bad { color: var(--critical-text); }
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app.collapsed { grid-template-columns: 80px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px 14px;
  z-index: 30;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
:root[data-theme="light"] .sidebar { background: rgba(255, 255, 255, 0.6); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, 0.26), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000));
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 12px color-mix(in srgb, var(--accent) 15%, transparent);
}
.brand-mark svg { width: 31px; height: 31px; display: block; }
.brand-name { font-weight: 900; font-size: calc(19px * var(--fz)); letter-spacing: -0.01em; line-height: 1.05; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--accent-text, var(--accent)); }
.brand-name small { display: block; font-weight: 500; font-size: calc(11px * var(--fz)); color: var(--muted); letter-spacing: 0; }
.nav-label { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; margin-right: -6px; padding-right: 6px; }
.nav .nav-label { padding-top: 14px; padding-bottom: 6px; }
.nav .nav-label:first-child { padding-top: 0; }
.nav a { padding-top: 8px; padding-bottom: 8px; }
.app.collapsed .nav .nav-label { display: block; height: 1px; padding: 0; margin: 10px 8px; background: var(--border); font-size: 0; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active {
  color: var(--text);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
}
.nav a.active svg { color: var(--accent-text); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 10px; border-radius: 16px; background: var(--card-grad);
  border: 1px solid var(--border); box-shadow: var(--card-edge); transition: border-color 0.15s;
}
.user-chip:hover, .user-chip.active { border-color: var(--border-2); }
.user-chip.active { box-shadow: var(--card-edge), 0 0 0 1px var(--accent-wash); }
.user-chip .chip-chev { width: 15px; height: 15px; flex: none; color: var(--muted); transform: rotate(180deg); }
.app.collapsed .user-chip .chip-chev { display: none; }
/* menu do perfil */
.acct-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.acct-head b { display: block; font-size: calc(13px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-head small { display: block; font-size: calc(11.5px * var(--fz)); color: var(--muted); margin-top: 1px; }
a.pop-item { text-decoration: none; }
.pop-item svg { width: 16px; height: 16px; flex: none; color: var(--text-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--violet)); color: #14121c;
  display: grid; place-items: center; font-weight: 700; font-size: calc(13px * var(--fz));
}
.user-meta { min-width: 0; flex: 1; }
.user-meta b { display: block; font-size: calc(12.5px * var(--fz)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { font-size: calc(10px * var(--fz)); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn svg { width: 17px; height: 17px; }
.collapse-btn {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px;
  background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left;
}
.collapse-btn:hover { color: var(--text); background: var(--surface-2); }
.collapse-btn svg { width: 17px; height: 17px; }
.app.collapsed .brand-name, .app.collapsed .nav-label, .app.collapsed .nav a span,
.app.collapsed .user-meta, .app.collapsed .collapse-btn span, .app.collapsed .user-chip .icon-btn { display: none; }
.app.collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapsed .nav a { justify-content: center; }
.app.collapsed .user-chip { justify-content: center; padding: 8px; }
.app.collapsed .collapse-btn { justify-content: center; }
.app.collapsed .collapse-btn svg { transform: scaleX(-1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.crumb { font-weight: 600; margin-right: auto; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: calc(13px * var(--fz)); }
.menu-btn { display: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.content { padding: 30px 32px 70px; max-width: 1360px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font: 400 calc(48px * var(--fz))/1 var(--display); letter-spacing: -0.01em; margin: 0; margin-right: auto; }
.page-head h1 small { display: block; font: 500 calc(13px * var(--fz))/1.4 var(--font); letter-spacing: 0; color: var(--muted); margin-top: 10px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 38px 0 14px; flex-wrap: wrap; }
.section-title h2 { font: 400 calc(28px * var(--fz))/1.1 var(--display); letter-spacing: -0.005em; margin: 0; }
.section-title .sp { margin-left: auto; }
.eyebrow { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 24px; padding: 11px 16px; border-radius: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(139, 123, 255, 0.08));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  font-size: calc(13px * var(--fz)); color: var(--text-2);
}
.demo-banner svg { color: var(--accent-text); }
.demo-banner b { color: var(--text); font-weight: 600; }
.demo-banner a { margin-left: auto; font-weight: 600; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  font-weight: 600; font-size: calc(13px * var(--fz)); white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: linear-gradient(180deg, #ffd25e, #ffb81f); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 4px 12px rgba(255, 184, 31, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.primary:hover { background: linear-gradient(180deg, #ffdb7a, #ffc23d); }
.btn.danger { background: rgba(208, 59, 59, 0.08); border-color: rgba(208, 59, 59, 0.4); color: var(--critical-text); }
.btn.danger:hover { background: rgba(208, 59, 59, 0.16); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: calc(12.5px * var(--fz)); border-radius: 10px; }
.btn:disabled, label.btn.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
label.btn.disabled { pointer-events: none; }
.btn.spin svg, .spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-2);
  color: var(--muted); font-size: calc(12.5px * var(--fz)); white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: border-color 0.15s, background 0.15s;
}
.pill b { color: var(--text); font-weight: 600; }
.pill:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pill.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-wash); }
.pill svg { width: 13px; height: 13px; color: var(--muted); }
.sync-state {
  display: inline-flex; align-items: center; gap: 7px; font-size: calc(12.5px * var(--fz)); color: var(--text-2);
  height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
}
.sync-state b { font-weight: 600; color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #2fd14a; flex: none; box-shadow: 0 0 0 3px rgba(47, 209, 74, 0.14); }
.dot.warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(250, 178, 25, 0.18); }
.dot.err { background: var(--critical); box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.18); }

.input, .select {
  height: 40px; padding: 0 13px; border-radius: 12px; width: 100%;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select option { background: var(--surface-solid); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search .input { padding-left: 36px; }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: calc(12px * var(--fz)); font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.hint { font-size: calc(12px * var(--fz)); color: var(--muted); margin-top: 6px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 6px 12px; border-radius: 9px; font-size: calc(12.5px * var(--fz)); font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
:root[data-theme="light"] .seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(20, 16, 50, 0.12); }

.tabs { display: flex; gap: 6px; padding: 14px 18px 0; overflow-x: auto; }
.tabs button {
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); font-weight: 600;
  padding: 8px 14px; border-radius: 10px; white-space: nowrap; font-size: calc(13px * var(--fz));
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.switch { position: relative; width: 40px; height: 23px; flex: none; display: inline-block; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--border-2); transition: background 0.2s, box-shadow 0.2s;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--text-2); transition: transform 0.2s, background 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.switch input:checked + i { background: linear-gradient(180deg, #2bbf45, #0c960c); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(17px); background: #fff; }
.switch input:disabled + i { opacity: 0.5; cursor: not-allowed; }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--accent-wash); }

.check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: calc(10.5px * var(--fz)); font-weight: 700; letter-spacing: 0.06em;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.meta { background: rgba(57, 135, 229, 0.14); color: #6aa8f0; box-shadow: inset 0 0 0 1px rgba(57, 135, 229, 0.25); }
:root[data-theme="light"] .badge.meta { color: #1f63b8; }
.badge.org { background: var(--surface-3); color: var(--text-2); }
.badge.ok { background: rgba(47, 209, 74, 0.12); color: var(--good-text); box-shadow: inset 0 0 0 1px rgba(47, 209, 74, 0.22); }
.badge.err { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); box-shadow: inset 0 0 0 1px rgba(208, 59, 59, 0.25); }
.badge.warn { background: rgba(250, 178, 25, 0.13); color: var(--warning); box-shadow: inset 0 0 0 1px rgba(250, 178, 25, 0.25); }
:root[data-theme="light"] .badge.warn { color: #8a5a00; }
.badge.accent { background: var(--accent-wash); color: var(--accent-text); }
.badge svg { width: 12px; height: 12px; }
.stage { display: inline-flex; align-items: center; gap: 7px; font-size: calc(12.5px * var(--fz)); font-weight: 600; }
.stage::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.stage.principal::before { background: var(--accent); }
.stage.bump::before { background: var(--s1); border-radius: 50%; }
.stage.upsell::before { background: var(--good); transform: rotate(45deg); }
.stage.downsell::before { background: var(--serious); }

/* ---------- cards & kpis ---------- */
.card {
  position: relative;
  background: var(--card-grad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-edge);
  backdrop-filter: blur(14px);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 0; flex-wrap: wrap; }
.card-head h3 { margin: 0; font: 400 calc(22px * var(--fz))/1.15 var(--display); letter-spacing: -0.005em; }
.card-head .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid > *, .cmp-layout > *, .code-box { min-width: 0; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

.kpi { padding: 20px 22px; display: flex; align-items: center; gap: 14px; min-height: 112px; overflow: hidden; }
.kpi::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, var(--kglow, transparent), transparent 70%); pointer-events: none;
}
.kpi.k-good { --kglow: rgba(47, 209, 74, 0.06); }
.kpi.k-bad { --kglow: rgba(208, 59, 59, 0.06); }
.kpi.k-flat { --kglow: rgba(139, 123, 255, 0.05); }
.kpi .kv { min-width: 0; flex: 1; position: relative; z-index: 1; }
.kpi .kl { font-size: calc(11.5px * var(--fz)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kpi .kn { font-size: calc(27px * var(--fz)); font-weight: 650; letter-spacing: -0.03em; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.kpi.small { min-height: 96px; padding: 16px 18px; gap: 8px; }
.kpi.small .kn { font-size: calc(23px * var(--fz)); margin-top: 5px; }
.kpi .ks { font-size: calc(12.5px * var(--fz)); color: var(--muted); margin-top: 4px; }
.kpi .ring { position: relative; z-index: 1; }
/* anel no canto superior direito; valor ocupa a largura toda embaixo dele */
.kpi.big, .kpi.small { display: block; }
.kpi.big .ring, .kpi.small .ring { position: absolute; top: 14px; right: 14px; }
.kpi.big { min-height: 158px; }
.kpi.big .kl { padding-right: 76px; }
.kpi.big .kn { font-size: calc(31px * var(--fz)); margin-top: 46px; }
.kpi.big .ring .rl { font-size: calc(11.5px * var(--fz)); padding: 0 9px; }
.kpi.small { min-height: 136px; }
.kpi.small .kl { padding-right: 62px; }
.kpi.small .kl { min-height: 2.9em; }
.kpi.small .kn { margin-top: 26px; }
.kpi.small .ring .rl { font-size: calc(10.5px * var(--fz)); padding: 0 8px; }
.ring .rl > div { max-width: 100%; white-space: nowrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: calc(12px * var(--fz)); font-weight: 600; }
.delta svg { width: 11px; height: 11px; stroke-width: 2.6; }
.delta.up-good, .delta.down-good { color: var(--good-text); }
.delta.up-bad, .delta.down-bad { color: var(--critical-text); }
.delta.flat { color: var(--muted); }

.ring { position: relative; flex: none; }
.ring > svg { transform: rotate(-90deg); overflow: visible; }
.ring .rl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: calc(11px * var(--fz)); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring .rl small { display: block; font-size: calc(9px * var(--fz)); color: var(--muted); font-weight: 500; margin-top: 1px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fz)); }
table.t th {
  text-align: left; font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.t th.sort { cursor: pointer; user-select: none; }
table.t th.sort:hover { color: var(--text); }
table.t th.sorted { color: var(--accent-text); }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background 0.12s; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t .n { text-align: right; }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--border-2); background: var(--surface-2); }
/* divisórias verticais sutis entre colunas */
table.t th + th, table.t td + td { border-left: 1px solid var(--col-line); }
table.t th[title] { cursor: help; text-decoration: underline dotted var(--axis); text-underline-offset: 4px; }
table.t.dense { font-size: calc(12.5px * var(--fz)); }
table.t.dense th, table.t.dense td { padding-left: 12px; padding-right: 12px; }
table.t.dense th { letter-spacing: 0.08em; }
table.t.dense .name-cell { max-width: 240px; }
table.t.dense .cell-tag { padding: 3px 7px; font-size: calc(12px * var(--fz)); }
/* colunas fixas (seleção, liga/desliga, nome) ao rolar a tabela para o lado */
table.t .stick { position: sticky; z-index: 1; background: var(--surface-solid); }
table.t thead .stick { z-index: 2; }
table.t .stick.s1 { left: 0; }
table.t .stick.s2 { left: 44px; }
table.t .stick.s3 { left: 132px; box-shadow: 8px 0 12px -10px rgba(0, 0, 0, 0.5); }
table.t tbody tr:hover td.stick { background: color-mix(in srgb, var(--surface-solid) 92%, var(--text) 8%); }
table.t tfoot td.stick { background: color-mix(in srgb, var(--surface-solid) 94%, var(--text) 6%); }
:root[data-theme="light"] table.t .stick.s3 { box-shadow: 8px 0 12px -10px rgba(20, 16, 50, 0.18); }
.name-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.name-cell small { display: block; font-weight: 400; color: var(--muted); font-size: calc(11.5px * var(--fz)); overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.name-cell a { text-decoration: none; }
.name-cell a:hover { color: var(--accent-text) !important; }
.cell-tag { display: inline-block; padding: 3px 8px; border-radius: 7px; font-weight: 700; font-size: calc(12.5px * var(--fz)); }
.cell-tag.good { background: rgba(47, 209, 74, 0.12); color: var(--good-text); }
.cell-tag.bad { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); }
.budget-btn {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); border-radius: 9px;
  padding: 4px 9px; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600;
}
.budget-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.table-bar { display: flex; align-items: center; gap: 10px; padding: 16px 22px; flex-wrap: wrap; }
.table-bar .search { width: 260px; max-width: 100%; }
.pager { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.bulk {
  display: flex; align-items: center; gap: 8px; padding: 10px 22px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: calc(13px * var(--fz)); flex-wrap: wrap;
}
.foot-note { font-size: calc(12px * var(--fz)); color: var(--muted); padding: 12px 22px 16px; }
.empty { padding: 44px 18px; text-align: center; color: var(--muted); }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart text { font: calc(11px * var(--fz)) var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .hover-line { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
.mini-title { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 6px; }
.mini-title b { font-size: calc(13px * var(--fz)); font-weight: 600; }
.mini-title b i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.mini-title span { font-size: calc(12px * var(--fz)); color: var(--muted); }
.mini-title .v { margin-left: auto; font-weight: 650; font-size: calc(15px * var(--fz)); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.chart-sep { height: 1px; background: var(--border); margin: 14px 0; }
.tip {
  position: fixed; z-index: 100; pointer-events: none;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--border-2); border-radius: 14px;
  box-shadow: var(--shadow); padding: 11px 13px; font-size: calc(12.5px * var(--fz)); min-width: 170px;
}
.tip .tt { font-weight: 700; margin-bottom: 7px; }
.tip .tr { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 1px 0; }
.tip .tr span { color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; }
.tip .tr b { font-variant-numeric: tabular-nums; font-weight: 600; }
.tip .sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.funnel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; padding: 18px 22px 22px; align-items: stretch; }
.funnel-svg { display: block; }
.funnel-svg .f-sep { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 5 5; opacity: 0.6; }
.funnel-svg .f-hit { fill: transparent; cursor: default; }
.funnel-svg .f-hit:hover { fill: rgba(255, 255, 255, 0.06); }
.funnel-labels { display: flex; flex-direction: column; justify-content: space-around; gap: 6px; }
.f-lab { padding: 7px 11px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.f-lab small { display: block; font-size: calc(9.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.f-lab b { font-size: calc(14.5px * var(--fz)); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.f-lab em { font-style: normal; font-size: calc(11px * var(--fz)); color: var(--accent-text); font-weight: 600; margin-left: 4px; }

.hb-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hb-fill { height: 100%; border-radius: 999px; }

/* ---------- overlays ---------- */
.popover {
  position: fixed; z-index: 90; min-width: 220px; max-width: calc(100vw - 24px);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent); backdrop-filter: blur(18px);
  border: 1px solid var(--border-2); border-radius: 16px;
  box-shadow: var(--shadow); padding: 6px; max-height: 70vh; overflow: auto;
  animation: popIn 0.14s ease-out;
}
@keyframes popIn { from { transform: translateY(-4px); opacity: 0; } }
.pop-head { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 9px 11px 6px; }
.pop-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer; padding: 9px 11px; border-radius: 10px; color: var(--text);
  font-size: calc(13px * var(--fz));
}
.pop-item:hover { background: var(--surface-2); }
.pop-item .ck { width: 16px; flex: none; color: var(--accent-text); font-weight: 800; }
.pop-item small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.pop-item.on { font-weight: 600; background: var(--accent-wash); }
.pop-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.pop-pad { padding: 8px 10px; }
.pop-scroll { max-height: 260px; overflow: auto; }
/* filtro de contas de anúncio (várias de uma vez) */
.acct-item { align-items: center; margin-bottom: 2px; }
.acct-item .cbx { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong, var(--border)); display: grid; place-items: center; }
.acct-item.on .cbx { background: var(--accent); border-color: var(--accent); }
.acct-item .cbx svg { width: 12px; height: 12px; color: #fff; stroke-width: 3; }
.acct-nm { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.acct-nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-nm small { font-size: calc(11px * var(--fz)); color: var(--muted); margin: 0 !important; }
.acct-item.on { font-weight: 400; }
.acct-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--border); }
.acct-list .acct-item { width: 100%; border-radius: 10px; }
.pop-item.acct-item .badge, .pop-item.acct-item .st { flex: none; }
.pop-item.acct-item > small { white-space: nowrap; flex: none; }
.pop-item.acct-item .acct-nm { flex: 1; }
.dim-tools { display: flex; gap: 6px; padding: 0 10px 6px; }
.dim-tools button { font: 600 calc(12px * var(--fz))/1 inherit; font-family: inherit; color: var(--accent-text, var(--accent)); background: var(--accent-wash, transparent); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; cursor: pointer; }
.dim-tools button + button { color: var(--muted); background: transparent; }
/* datas uma embaixo da outra: campo de data inteiro, sem cortar nem precisar rolar de lado */
.date-custom { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 6px 10px 10px; }
.date-custom label { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; }
.date-custom label span { font-size: calc(12px * var(--fz)); color: var(--muted); font-weight: 600; }
.date-custom .input { min-width: 0; width: 100%; padding: 0 10px; color-scheme: light dark; }
.popover { overflow-x: hidden; }

.modal-bg {
  position: fixed; inset: 0; z-index: 80; background: rgba(4, 4, 8, 0.55);
  display: grid; place-items: center; padding: 16px; backdrop-filter: blur(8px);
  animation: fade 0.15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 470px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  border: 1px solid var(--border-2);
  border-radius: 22px; box-shadow: var(--shadow), var(--card-edge); max-height: calc(100vh - 32px); overflow: auto;
  animation: modalIn 0.18s ease-out;
}
@keyframes modalIn { from { transform: translateY(10px) scale(0.98); opacity: 0; } }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 22px 24px 8px; }
.modal-head h3 { margin: 0; font: 400 calc(26px * var(--fz))/1.1 var(--display); }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 8px 24px 4px; color: var(--text-2); }
.modal-body b { color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.mode-grid button { justify-content: center; }
.mode-grid button.full { grid-column: 1 / -1; }
.mode-grid button.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-wash); color: var(--text); }
.preview-line { font-size: calc(13px * var(--fz)); padding: 11px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 4px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  font-size: calc(13px * var(--fz)); max-width: 360px; animation: toastIn 0.2s ease-out;
}
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: var(--good-text); }
.toast.err svg { color: var(--critical-text); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }
.info-i {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--border-2); color: var(--muted); font-size: calc(10px * var(--fz)); font-weight: 700; cursor: help; vertical-align: 1px;
  font-style: normal;
}
.info-i:hover { color: var(--text); border-color: var(--muted); }

/* ---------- metas ---------- */
.goal { padding: 20px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; overflow: hidden; }
.goal .gl { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.goal .gv { font-weight: 650; font-size: calc(18px * var(--fz)); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.goal .gm { font-size: calc(12px * var(--fz)); color: var(--muted); margin-top: -4px; }
.goal .gp { font-size: calc(11.5px * var(--fz)); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; color: var(--text-2); }
.goal .ring .rl { font-size: calc(14px * var(--fz)); }
.pace { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pace.ok { color: var(--good-text); }
.pace.off { color: var(--critical-text); }
.pace svg { width: 12px; height: 12px; stroke-width: 2.6; }

.cmp-list { display: flex; flex-direction: column; }
.cmp-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: calc(13px * var(--fz)); }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row span { color: var(--text-2); margin-right: auto; }
.cmp-row b { font-variant-numeric: tabular-nums; font-weight: 650; }
.cmp-row .delta { min-width: 72px; justify-content: flex-end; }

/* ---------- comparativo ---------- */
.cmp-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.palette { padding: 14px; position: sticky; top: 84px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 12px; }
.cat-grid button {
  border: 1px solid transparent; background: var(--surface-2); color: var(--muted); cursor: pointer; border-radius: 12px;
  padding: 9px 4px; font-size: calc(11.5px * var(--fz)); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: background 0.15s, color 0.15s;
}
.cat-grid button svg { width: 17px; height: 17px; }
.cat-grid button:hover { color: var(--text); background: var(--surface-3); }
.cat-grid button.on { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); color: var(--text); }
.cat-grid button.on svg { color: var(--accent-text); }
.drag-list { display: flex; flex-direction: column; gap: 7px; max-height: 540px; overflow: auto; margin-top: 12px; padding-right: 2px; }
.drag-item {
  display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: grab; font-size: calc(12.5px * var(--fz));
  transition: border-color 0.15s, transform 0.12s;
}
.drag-item:hover { border-color: var(--border-2); transform: translateX(2px); }
.drag-item.dragging { opacity: 0.5; }
.drag-item .grip { color: var(--muted); flex: none; }
.drag-item .grip svg { width: 14px; height: 14px; }
.drag-item .di { min-width: 0; flex: 1; }
.drag-item .di b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.drag-item .di small { color: var(--muted); font-variant-numeric: tabular-nums; }
.drag-item .ab { display: flex; gap: 4px; flex: none; }
.drag-item .ab button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2);
  cursor: pointer; font-weight: 700; font-size: calc(11px * var(--fz)); color: var(--text-2);
}
.drag-item .ab button:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-wash); }
.list-foot { font-size: calc(11.5px * var(--fz)); color: var(--muted); text-align: center; padding-top: 10px; }
.slot { padding: 20px; min-height: 250px; display: flex; flex-direction: column; gap: 14px; }
.slot-head { display: flex; align-items: flex-start; gap: 8px; }
.slot-head .eyebrow { color: var(--accent-text); }
.slot-head h3 { margin: 4px 0 0; font: 400 calc(24px * var(--fz))/1.15 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.slot-head .icon-btn { margin-left: auto; }
.drop {
  flex: 1; border: 1.5px dashed var(--border-2); border-radius: 16px; display: grid; place-items: center;
  text-align: center; color: var(--muted); font-size: calc(12.5px * var(--fz)); padding: 20px; min-height: 120px;
  transition: border-color 0.15s, background 0.15s;
}
.drop.over { border-color: var(--accent); background: var(--accent-wash); color: var(--text); }
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
.mini-kpis div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.mini-kpis small { display: block; font-size: calc(9.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mini-kpis b { display: block; font-size: calc(13px * var(--fz)); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- integrações / logs / ds ---------- */
.acc-row { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--border); }
.acc-row .ix { width: 22px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-row .ai { min-width: 0; flex: 1; }
.acc-row .ai b { display: block; font-weight: 600; }
.acc-row .ai small { color: var(--muted); }
.ok-ic { color: var(--good-text); width: 18px; height: 18px; flex: none; }
.code-box {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 8px 8px 13px; font-family: var(--mono); font-size: calc(12px * var(--fz));
}
.code-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.payload {
  margin: 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; font-family: var(--mono);
  font-size: calc(12px * var(--fz)); white-space: pre-wrap; word-break: break-all; color: var(--text-2);
}
.log-row td { cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font-size: calc(12px * var(--fz)); background: var(--surface-2); }
.swatch i { display: block; height: 60px; }
.swatch div { padding: 9px 11px; }
.swatch code { color: var(--muted); font-family: var(--mono); font-size: calc(10.5px * var(--fz)); }
.type-row { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.type-row:last-child { border-bottom: 0; }
.type-row code { width: 110px; flex: none; color: var(--muted); font-family: var(--mono); font-size: calc(11.5px * var(--fz)); }
.ds-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- análise IA ---------- */
.ia-wrap { display: flex; flex-direction: column; gap: 12px; }
.ia-log { padding: 22px; min-height: 360px; max-height: calc(100vh - 360px); overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.ia-empty { margin: auto; text-align: center; color: var(--text-2); }
.ia-empty svg { margin: 0 auto 8px; color: var(--accent-text); }
.ia-empty h3 { font: 400 calc(26px * var(--fz))/1.1 var(--display); margin: 0 0 6px; color: var(--text); }
.ia-msg.user { display: flex; justify-content: flex-end; }
.ia-bubble { max-width: 75%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); white-space: pre-wrap; }
.ia-msg.bot { display: flex; gap: 12px; align-items: flex-start; }
.ia-avatar { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font: italic calc(18px * var(--fz))/1 var(--display); color: var(--accent); background: var(--surface-solid); border: 1px solid var(--border-2); }
.ia-body { min-width: 0; flex: 1; line-height: 1.6; }
.ia-body p { margin: 0 0 10px; }
.ia-body ul, .ia-body ol { margin: 0 0 12px; padding-left: 20px; }
.ia-body li { margin-bottom: 4px; }
.ia-body .ia-h { font: 400 calc(22px * var(--fz))/1.2 var(--display); margin: 16px 0 8px; }
.ia-body h3.ia-h { font-size: calc(21px * var(--fz)); }
.ia-body h4.ia-h { font: 600 calc(15px * var(--fz))/1.3 var(--font); }
.ia-body code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.ia-typing { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: calc(13px * var(--fz)); }
.ia-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.ia-typing i:nth-child(2) { animation-delay: 0.2s; }
.ia-typing i:nth-child(3) { animation-delay: 0.4s; margin-right: 6px; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.ia-actions { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ia-act { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.ia-act:first-of-type { border-top: 0; }
.ia-act b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-act small { display: block; font-size: calc(12px * var(--fz)); }
.ia-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.ia-ask { padding: 12px; }
.ia-ask textarea { height: auto; min-height: 52px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.ia-ask-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ia-ask-bar .muted { margin-right: auto; }

/* ---------- públicos / criativos ---------- */
.pb-hl { margin-bottom: 4px; }
.hl-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.hl-card .kl { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hl-card .ks { font-size: calc(12px * var(--fz)); color: var(--muted); }
.hl-v { font: 400 calc(30px * var(--fz))/1.1 var(--display); letter-spacing: -0.01em; margin: 2px 0; }
.hl-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-text); margin-bottom: 8px; }
.hl-ic svg { width: 16px; height: 16px; }
.hl-card.warn { border-color: rgba(208, 59, 59, 0.35); }
.hl-card.warn .hl-ic { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); }
.g-pub { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.sb { display: flex; flex-direction: column; gap: 4px; }
.sb-row { display: grid; grid-template-columns: minmax(80px, 170px) 1fr 84px 42px; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 10px; font-size: calc(13px * var(--fz)); cursor: default; }
.sb-row:hover { background: var(--surface-2); }
.sb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.sb-t { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sb-t i { display: block; height: 100%; border-radius: 999px; background: var(--s1); }
.sb-v { text-align: right; font-weight: 650; }
.sb-s { text-align: right; font-size: calc(11.5px * var(--fz)); color: var(--muted); }
.gbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 4px 0 18px; }
.gbar i { display: block; min-width: 3px; cursor: default; }
.glist { display: flex; flex-direction: column; gap: 8px; }
.gitem { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.gitem b { display: block; font-weight: 600; }
.gitem small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.gitem > div:nth-child(2) { flex: 1; min-width: 0; }
.gdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.gmeta { display: flex; gap: 10px; font-size: calc(12px * var(--fz)); color: var(--text-2); font-variant-numeric: tabular-nums; }
.hcols { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 190px; padding-top: 6px; }
.hcol { height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 4px; }
.hcol:hover { background: var(--surface-2); }
.hcol i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--f3), color-mix(in srgb, var(--f3) 45%, transparent)); }
.hlabels { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; margin-top: 6px; font-size: calc(10.5px * var(--fz)); color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.cr2 { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, border-color 0.15s; }
.cr2:hover { transform: translateY(-2px); border-color: var(--border-2); }
.cr2-media { position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; cursor: zoom-in; background: var(--surface-2); overflow: hidden; display: block; width: 100%; }
.cr2-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.cr2:hover .cr2-media img { transform: scale(1.03); }
.cr2-media.noimg::after { content: "sem prévia"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: calc(12px * var(--fz)); }
.cr2-media::before { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent); z-index: 1; pointer-events: none; }
.cr2-rank, .cr2-type, .cr2-freq { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: calc(11.5px * var(--fz)); font-weight: 700; color: #fff; background: rgba(10, 10, 16, 0.62); backdrop-filter: blur(8px); }
.cr2-rank { top: 10px; left: 10px; color: var(--accent); }
.cr2-type { top: 10px; right: 10px; }
.cr2-type svg { width: 12px; height: 12px; }
.cr2-freq { bottom: 10px; left: 10px; }
.cr2-freq.hot { background: rgba(208, 59, 59, 0.85); }
.cr2-body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.cr2-top { display: flex; gap: 10px; align-items: flex-start; }
.cr2-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-top: 6px; flex: none; }
.cr2-dot.on { background: #2fd14a; box-shadow: 0 0 0 3px rgba(47, 209, 74, 0.15); }
.cr2-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr2-camp { display: block; font-size: calc(12px * var(--fz)); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr2-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.cr2-kpis div { background: var(--surface-solid); padding: 8px 9px; min-width: 0; }
.cr2-kpis b { white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="light"] .cr2-kpis div { background: #fff; }
.cr2-kpis small { display: block; font-size: calc(9.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cr2-kpis b { font-size: calc(13px * var(--fz)); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.section-title .sp { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
.seg { max-width: 100%; min-width: 0; overflow-x: auto; }
.seg button { white-space: nowrap; flex: none; }
.cr2-text summary { cursor: pointer; font-size: calc(12.5px * var(--fz)); color: var(--text-2); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
.cr2-text summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.cr2-text[open] summary::before { transform: rotate(90deg); }
.cr2-text summary::-webkit-details-marker { display: none; }
.cr2-text p { white-space: pre-wrap; font-size: calc(12.5px * var(--fz)); color: var(--text-2); margin: 8px 0; max-height: 180px; overflow: auto; }
.cr2-foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; font-size: calc(11.5px * var(--fz)); color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.g-ins { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ins { padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.ins > div > b { display: block; font-weight: 650; margin-bottom: 3px; }
.ins p b { color: var(--text); }
.ins p { margin: 0; font-size: calc(13px * var(--fz)); color: var(--text-2); line-height: 1.5; }
.ins-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; }
.ins-ic svg { width: 16px; height: 16px; }
.ins.good .ins-ic { background: rgba(47, 209, 74, 0.12); color: var(--good-text); }
.ins.bad .ins-ic { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); }
.ins.warn .ins-ic { background: rgba(250, 178, 25, 0.14); color: var(--warning); }
.ins.bad { border-color: rgba(208, 59, 59, 0.25); }
.setup { border-color: rgba(250, 178, 25, 0.35); margin-bottom: 8px; }
.setup b { display: inline-flex; gap: 8px; align-items: center; font-size: calc(15px * var(--fz)); }
.setup b svg { width: 16px; height: 16px; color: var(--warning); }
.setup p { margin: 8px 0; color: var(--text-2); font-size: calc(13px * var(--fz)); }
.setup ol { margin: 0; padding-left: 20px; line-height: 1.7; font-size: calc(13px * var(--fz)); color: var(--text-2); }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.vid { overflow: hidden; display: flex; flex-direction: column; }
.vid-th { aspect-ratio: 16 / 10; background: var(--surface-2); position: relative; overflow: hidden; }
.vid-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.vid-b b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-b small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.vid-a { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rt-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rt-part { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.rt-part p { margin: 6px 0 0; font-size: calc(13px * var(--fz)); line-height: 1.5; color: var(--text); }
.rt-part.hook { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.rt-part.cta { border-color: rgba(47, 209, 74, 0.35); }
.rt-sec { display: flex; flex-direction: column; gap: 3px; }
.rt-row { display: grid; grid-template-columns: 30px 90px 42px 1fr 44px; gap: 10px; align-items: center; font-size: calc(12.5px * var(--fz)); padding: 4px 6px; border-radius: 8px; }
.rt-row.hot { background: rgba(208, 59, 59, 0.08); }
.rt-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rt-bar i { display: block; height: 100%; background: var(--f3); border-radius: 999px; }
.rt-txt { color: var(--text-2); }
.off-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.off { padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform 0.15s, border-color 0.15s; }
.off:hover { transform: translateY(-2px); border-color: var(--border-2); }
.off h3 { margin: 0; font: 400 calc(24px * var(--fz))/1.15 var(--display); }
.off-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.off-p { margin: 0; font-size: calc(13px * var(--fz)); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.off-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: calc(12px * var(--fz)); color: var(--muted); }
.off-meta span { display: inline-flex; gap: 5px; align-items: center; }
.off-meta svg { width: 12px; height: 12px; }
.off-sig { display: flex; gap: 6px; align-items: center; font-size: calc(12px * var(--fz)); font-weight: 600; color: var(--good-text); }
.off-sig svg { width: 13px; height: 13px; }
.off-ed textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.empty-off h3 { margin: 0 0 6px; font: 400 calc(24px * var(--fz))/1.2 var(--display); }
@media (max-width: 700px) { .rt-parts { grid-template-columns: 1fr; } .rt-row { grid-template-columns: 28px 60px 38px 1fr; } .rt-row > span:last-child { display: none; } }
.pg-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pg-form .search { min-width: 240px; }
.pg-quick { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.pg-grid { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.phone { width: 230px; margin: 0 auto; border-radius: 30px; padding: 10px; background: #000; border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.phone img { width: 100%; display: block; border-radius: 22px; }
.pg-noshot { text-align: center; color: var(--text-2); font-size: calc(13px * var(--fz)); }
.pg-noshot > svg { width: 28px; height: 28px; margin: 6px auto 8px; color: var(--muted); }
.pg-noshot b { display: block; color: var(--text); }
.pg-noshot p { margin: 6px 0 10px; }
.pg-noshot details { text-align: left; }
.pg-noshot summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
.pg-noshot ol { padding-left: 18px; margin: 8px 0 0; line-height: 1.6; }
.pg-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.pg-title { display: block; font: 400 calc(24px * var(--fz))/1.15 var(--display); margin: 2px 0; }
.pg-url { font-size: calc(12px * var(--fz)); color: var(--muted); word-break: break-all; }
.pg-sum { display: flex; gap: 14px; font-size: calc(12.5px * var(--fz)); font-weight: 600; margin-bottom: 14px; flex-wrap: wrap; }
.pg-sum span { display: inline-flex; gap: 5px; align-items: center; }
.pg-sum svg { width: 13px; height: 13px; }
.pf-row { display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; }
.pf-row + .pf-row { border-top: 1px solid var(--border); }
.pf-n { font-size: calc(22px * var(--fz)); font-weight: 650; min-width: 64px; text-align: right; letter-spacing: -0.02em; }
.pf-row b { display: block; font-weight: 600; }
.pf-row small { font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.pf-row small.bad { color: var(--critical-text); }
@media (max-width: 900px) { .pg-grid { grid-template-columns: 1fr; } }
.notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.notes-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: calc(12.5px * var(--fz)); margin-bottom: 8px; }
.notes-head b { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fz)); }
.notes-head b svg { width: 14px; height: 14px; color: var(--accent-text); }
.notes-head .btn { margin-left: auto; }
.note { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: calc(13px * var(--fz)); }
.note .mono { color: var(--accent-text); }
.note-t { flex: 1; min-width: 0; }
.note .icon-btn { width: 28px; height: 28px; }
.tip-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); color: var(--accent-text); font-size: calc(12px * var(--fz)); max-width: 240px; }
.tip-note svg { width: 12px; height: 12px; flex: none; margin-top: 2px; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fz)); color: var(--text-2); }
.lg i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.hcols.tall { height: 200px; }
.hcol { position: relative; }
.hcol.fut i { opacity: 0.25; }
.hcol .sale { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #2fd14a; color: #062b0c; font-size: calc(10px * var(--fz)); display: grid; place-items: center; }
.bud-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 150px 44px; gap: 14px; align-items: center; padding: 10px 0; font-size: calc(13px * var(--fz)); }
.bud-row + .bud-row { border-top: 1px solid var(--border); }
.bud-total { padding-top: 0; }
.bud-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bud-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); }
.bud-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bud-bar em { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--text-2); opacity: 0.6; border-radius: 2px; }
.bud-row .num { text-align: right; }
@media (max-width: 700px) { .bud-row { grid-template-columns: 1fr 90px; } .bud-row .bud-bar { grid-column: 1 / -1; grid-row: 2; } .bud-row > span:last-child { display: none; } }
.hc { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; }
.hc + .hc { border-top: 1px solid var(--border); }
.hc b { font-weight: 650; }
.hc p { margin: 3px 0 0; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.hc .hc-fix { display: flex; gap: 6px; align-items: flex-start; color: var(--accent-text); }
.hc .hc-fix svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.hc.ok .ins-ic { background: rgba(47, 209, 74, 0.12); color: var(--good-text); }
.hc.warn .ins-ic { background: rgba(250, 178, 25, 0.14); color: var(--warning); }
.hc.err .ins-ic { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); }
.health-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: calc(12.5px * var(--fz)); font-weight: 600; text-decoration: none; }
.health-pill svg { width: 14px; height: 14px; }
.health-pill.err { background: rgba(208, 59, 59, 0.12); color: var(--critical-text); border: 1px solid rgba(208, 59, 59, 0.35); }
.health-pill.warn { background: rgba(250, 178, 25, 0.12); color: var(--warning); border: 1px solid rgba(250, 178, 25, 0.35); }
.health-pill:hover { text-decoration: none; filter: brightness(1.15); }
.cr2-vd { position: absolute; z-index: 2; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: calc(12px * var(--fz)); font-weight: 700; color: #fff; backdrop-filter: blur(8px); }
.cr2-vd svg { width: 13px; height: 13px; }
.cr2-vd.good { background: rgba(12, 140, 12, 0.85); }
.cr2-vd.bad { background: rgba(190, 45, 45, 0.88); }
.cr2-vd.warn { background: rgba(170, 115, 0, 0.88); }
.cr2-more { position: absolute; z-index: 2; bottom: 10px; right: 10px; font-size: calc(11.5px * var(--fz)); font-weight: 600; color: #fff; opacity: 0; transition: opacity 0.15s; background: rgba(10, 10, 16, 0.62); padding: 4px 9px; border-radius: 999px; }
.cr2:hover .cr2-more { opacity: 1; }
.cr2-ins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cr2-ins li { display: flex; gap: 8px; align-items: flex-start; font-size: calc(12.5px * var(--fz)); line-height: 1.45; color: var(--text-2); }
.cr2-ins li svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cr2-ins li.good svg { color: var(--good-text); }
.cr2-ins li.bad svg { color: var(--critical-text); }
.cr2-ins li.warn svg { color: var(--warning); }
.cr2-ins.big li { font-size: calc(13.5px * var(--fz)); }
.cr2-grp { display: flex; flex-direction: column; gap: 7px; }
.cr2-grp .eyebrow { font-size: calc(9.5px * var(--fz)); }
.cr2-kpis { grid-template-columns: repeat(3, 1fr) !important; }
.cr2-kpis .roas { font-style: normal; font-size: calc(11px * var(--fz)); font-weight: 600; opacity: 0.8; }
.mt { cursor: help; }
.mt-h { display: flex; justify-content: space-between; font-size: calc(12px * var(--fz)); color: var(--text-2); margin-bottom: 4px; }
.mt-h b { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text); }
.mt-h b.good { color: var(--good-text); } .mt-h b.bad { color: var(--critical-text); } .mt-h b.warn { color: var(--warning); }
.mt-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); }
.mt-bar i { display: block; height: 100%; border-radius: 999px; background: var(--muted); }
.mt-bar.good i { background: #2fd14a; } .mt-bar.warn i { background: var(--warning); } .mt-bar.bad i { background: var(--critical); }
.mt-bar em { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 2px; background: var(--text-2); opacity: 0.55; transform: translateX(-1px); }
.vz-say { margin: 0 0 10px; font-size: calc(13.5px * var(--fz)); color: var(--text-2); line-height: 1.5; }
.cr2-video { border: 1px solid var(--border); border-radius: 12px; padding: 10px 10px 8px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.cr2-vk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cr2-vk small { display: block; font-size: calc(9.5px * var(--fz)); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cr2-vk b { font-size: calc(14px * var(--fz)); font-weight: 650; font-variant-numeric: tabular-nums; }
.cr2-drop { font-size: calc(11.5px * var(--fz)); color: var(--text-2); }
.cr2-drop b { color: var(--critical-text); }
.vz { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 14px; }
.vz-chart { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px 4px; }
.vz-k { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; }
.vz-k small { display: block; font-size: calc(10px * var(--fz)); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.vz-k b { display: block; font-size: calc(18px * var(--fz)); font-weight: 650; margin: 2px 0; font-variant-numeric: tabular-nums; }
.vz-k span { font-size: calc(11px * var(--fz)); color: var(--muted); }
.vz-steps { display: flex; flex-direction: column; gap: 5px; }
.vz-step { display: grid; grid-template-columns: 90px 1fr 56px 40px; gap: 10px; align-items: center; font-size: calc(12.5px * var(--fz)); }
.vz-step > span:first-child { color: var(--text-2); }
.vz-step b { text-align: right; } .vz-step small { text-align: right; color: var(--muted); }
.cr-zoom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.cr-zoom-img img { width: 100%; border-radius: 14px; display: block; }
@media (max-width: 900px) { .g-pub, .cr-zoom { grid-template-columns: 1fr; } .sb-row { grid-template-columns: minmax(70px, 120px) 1fr 74px 36px; gap: 8px; } }

/* ---------- estratégia e regras ---------- */
.rule-card { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.rule-card + .rule-card { border-top: 1px solid var(--border); }
.rule-card .ri { min-width: 0; flex: 1; }
.rule-card .ri b { font-weight: 600; }
.rule-card .ri p { margin: 4px 0 0; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.rule-card .ra { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cond-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 80px minmax(0, 1fr) 36px; gap: 8px; margin-bottom: 8px; }
.strategy-ta { min-height: 260px; height: auto; padding: 12px 14px; line-height: 1.55; resize: vertical; font-size: calc(13.5px * var(--fz)); }
.master { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface-2); }
.master.on { border-color: rgba(47, 209, 74, 0.45); background: rgba(47, 209, 74, 0.08); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 400px; padding: 32px; }
.login-card .brand { padding: 0 0 24px; }
.login-card h1 { font: 400 calc(40px * var(--fz))/1.05 var(--display); margin: 0 0 6px; }
.login-card p { margin: 0 0 22px; color: var(--muted); font-size: calc(13px * var(--fz)); }
.road { height: 4px; border-radius: 3px; margin: 0 0 24px; background: repeating-linear-gradient(90deg, var(--accent) 0 26px, transparent 26px 44px); opacity: 0.7; }

.scrim { display: none; }

/* ---------- criativos desativados (Públicos) ---------- */
.cr-off { margin-top: 22px; }
.cr-off:empty { display: none; }
.cr-off-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-sm); cursor: pointer; color: var(--text); font: inherit;
  background: var(--surface); border: 1px dashed var(--border-2); transition: border-color 0.15s, background 0.15s; }
.cr-off-head:hover { border-color: var(--axis); background: var(--surface-2); }
.cr-off-head b { display: block; font-size: calc(14px * var(--fz)); font-weight: 650; }
.cr-off-head small { display: block; color: var(--muted); font-size: calc(12px * var(--fz)); margin-top: 2px; }
.cr-off-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.cr-off-ic svg { width: 16px; height: 16px; }
.cr-off-tg { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--fz)); font-weight: 600; color: var(--text-2); flex: none; }
.cr-off-tg svg { width: 14px; height: 14px; transition: transform 0.2s; }
.cr-off-head[aria-expanded="true"] .cr-off-tg svg { transform: rotate(180deg); }
.cr-grid-off { margin-top: 14px; }
.cr-grid-off .cr2 { opacity: 0.72; }
.cr-grid-off .cr2:hover { opacity: 1; }
.cr-grid-off .cr2-media { filter: grayscale(0.85); }
.cr-grid-off .cr2:hover .cr2-media { filter: none; }

/* ---------- mapa de calor ---------- */
.hm-bar { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.hm-bar-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-bar-top .seg { flex-wrap: nowrap; }
.hm-live { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.hm-live b { color: var(--text); font-weight: 600; }
.hm-filters { display: grid; grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr) 150px; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.hm-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-filters label span { font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hm-filters .select { height: 38px; font-size: calc(13px * var(--fz)); }
.hm-filters:has(.hm-day:not([hidden])) { grid-template-columns: 150px 210px minmax(0, 1.4fr) minmax(0, 1fr) 150px; }
.hm-filters .hm-day[hidden] { display: none; }
.hm-day-row { display: flex; align-items: center; gap: 4px; }
.hm-filters .hm-day-row input { flex: 1; min-width: 0; padding: 0 8px; color-scheme: light dark; }
.hm-day-row .icon-btn { width: 30px; height: 38px; font-size: calc(18px * var(--fz)); flex: none; }
.hm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hm-kpis .kpi { min-height: 0; }
.hm-kpis .kl { letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-insights { margin-top: 16px; padding: 4px 0; }
.hm-insights .hc { padding: 12px 20px; }
.hm-insights .hc p { margin: 2px 0 0; color: var(--text-2); font-size: calc(13px * var(--fz)); }
.hm-main { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.hm-viewer { padding: 0; overflow: hidden; }
.hm-viewer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.hm-viewer-head .icon-btn { margin-left: auto; }
.hm-legend { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: calc(11.5px * var(--fz)); color: var(--muted); border-bottom: 1px solid var(--border); }
.hm-legend i { flex: 1; height: 6px; border-radius: 3px; max-width: 160px; }
.hm-scroll { height: min(78vh, 820px); overflow-y: auto; overflow-x: hidden; padding: 18px 16px 24px 0; scrollbar-width: thin; position: relative; background: radial-gradient(120% 60% at 50% 0%, rgba(139, 123, 255, 0.06), transparent 70%); }
.hm-track { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.hm-ruler { position: relative; }
.hm-ruler span { position: absolute; right: 8px; transform: translateY(-50%); font: 600 calc(10.5px * var(--fz))/1 var(--font); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-ruler span.hi { color: var(--text); }
.hm-ruler span::after { content: ""; position: absolute; right: -8px; top: 50%; width: 5px; height: 1px; background: var(--border-2); }
.hm-phone { position: relative; border-radius: 30px; padding: 10px; background: linear-gradient(160deg, #23232f, #0d0d14); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08); }
.hm-screen { position: relative; border-radius: 21px; overflow: hidden; background: #000; }
.hm-screen img { display: block; width: 100%; height: auto; }
.hm-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hm-fold { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed rgba(255, 255, 255, 0.85); pointer-events: none; }
.hm-fold em { position: absolute; left: 10px; top: -11px; font: 700 calc(10px * var(--fz))/20px var(--font); letter-spacing: 0.08em; text-transform: uppercase; padding: 0 8px; border-radius: 6px; background: rgba(10, 10, 16, 0.85); color: #fff; font-style: normal; }
.hm-pin { position: absolute; left: 0; right: 0; height: 0; pointer-events: none; }
.hm-pin::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 28px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 35%, transparent), transparent); animation: hmPulse 1.6s ease-out 2; }
@keyframes hmPulse { from { opacity: 1; } to { opacity: 0; } }
.hm-wait { height: 100%; display: grid; place-items: center; padding: 40px 20px; text-align: center; color: var(--muted); font-size: calc(13px * var(--fz)); }
.hm-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.hm-curve svg { display: block; width: 100%; height: auto; overflow: visible; }
.hm-curve .ax { fill: var(--muted); font: 600 calc(10.5px * var(--fz)) var(--font); }
.hm-drop { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(208, 59, 59, 0.08); border: 1px solid rgba(208, 59, 59, 0.2); font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.hm-drop b { color: var(--critical-text); }
.hm-drop svg { width: 16px; height: 16px; flex: none; color: var(--critical-text); }
.hm-drop .btn { flex: none; }
.hm-el { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.hm-el + .hm-el { border-top: 1px solid var(--border); }
.hm-el:hover { background: var(--surface-2); }
.hm-el .n { font: 600 calc(11px * var(--fz)) var(--mono); color: var(--muted); text-align: center; }
.hm-el .t { min-width: 0; }
.hm-el .t b { display: block; font-weight: 600; font-size: calc(13px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-el .t small { display: block; color: var(--muted); font-size: calc(11.5px * var(--fz)); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-el .bar { height: 4px; border-radius: 2px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.hm-el .bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--violet), #c9bfff); }
.hm-el.ic .bar i { background: linear-gradient(90deg, #ff8a00, var(--accent)); }
.hm-el .v { text-align: right; font-variant-numeric: tabular-nums; }
.hm-el .v b { display: block; font-size: calc(14px * var(--fz)); font-weight: 650; }
.hm-el .v small { color: var(--muted); font-size: calc(11px * var(--fz)); }
.hm-empty { padding: 48px 24px; text-align: center; }
.hm-empty svg { width: 34px; height: 34px; color: var(--violet); margin-bottom: 10px; }
.hm-empty b { display: block; font-size: calc(15px * var(--fz)); margin-bottom: 6px; }
.hm-empty p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: calc(13px * var(--fz)); }
@media (max-width: 1180px) { .hm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .hm-main { grid-template-columns: 1fr; } .hm-side { position: static; } .hm-filters, .hm-filters:has(.hm-day:not([hidden])) { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-filters, .hm-filters:has(.hm-day:not([hidden])) { grid-template-columns: 1fr 1fr; } .hm-filters .hm-day { grid-column: 1 / -1; } .hm-filters label:nth-child(3) { grid-column: 1 / -1; grid-row: 1; } .hm-pages.seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .hm-pages.seg button { padding: 8px 6px; } .hm-live { margin-left: 0; } .hm-scroll { height: 70vh; } .hm-track { grid-template-columns: 44px minmax(0, 1fr); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .cmp-layout { grid-template-columns: 1fr; }
  .palette { position: static; }
  .drag-list { max-height: 300px; }
}
@media (max-width: 900px) {
  .app, .app.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 262px; transform: translateX(-105%); transition: transform 0.22s; box-shadow: var(--shadow); background: var(--surface-solid); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 25; backdrop-filter: blur(3px); }
  .app.collapsed .brand-name, .app.collapsed .nav-label, .app.collapsed .nav a span,
  .app.collapsed .user-meta, .app.collapsed .collapse-btn span, .app.collapsed .user-chip .icon-btn { display: revert; }
  .collapse-btn { display: none; }
  .menu-btn { display: grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 56px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: calc(40px * var(--fz)); }
}
@media (max-width: 560px) {
  .g6, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .kn { font-size: calc(21px * var(--fz)); }
  .kpi { padding: 16px; gap: 8px; min-height: 96px; }
  .kpi.big .ring, .kpi.small .ring { transform: scale(0.82); transform-origin: top right; top: 10px; right: 10px; }
  .kpi.big .kl, .kpi.small .kl { min-height: 4.4em; }
  .kpi.big .kn, .kpi.small .kn { font-size: calc(20px * var(--fz)); margin-top: 4px; }
  .kpi.big, .kpi.small { min-height: 116px; }
  .kpi.big .kl, .kpi.small .kl { padding-right: 60px; }
  .filters { width: 100%; }
  .funnel-wrap { grid-template-columns: minmax(0, 1fr) 128px; padding: 14px 16px 18px; }
  .table-bar { padding: 14px 16px; }
  .table-bar .search { width: 100%; }
  .pager { margin-left: 0; }
  .card-head { padding: 18px 16px 0; }
  .card-pad { padding: 16px; }
}

@media print {
  .sidebar, .topbar, .demo-banner, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #111; }
  .card { break-inside: avoid; backdrop-filter: none; }
}

/* ---------- Integrações: cards por plataforma + janela lateral ---------- */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.int-card {
  display: flex; align-items: flex-start; gap: 14px; text-align: left; width: 100%; min-width: 0;
  padding: 16px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--card-edge);
  transition: border-color .15s, background .15s, transform .15s;
}
.int-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-1px); }
.int-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.int-logo { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6); }
.int-logo svg { width: 22px; height: 22px; }
.int-logo.ring { box-shadow: inset 0 0 0 1px rgba(20, 16, 50, .12), 0 6px 16px -8px rgba(0, 0, 0, .6); }
.int-logo.big { width: 48px; height: 48px; border-radius: 14px; }
.int-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.int-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.int-top b { font-weight: 600; font-size: calc(14.5px * var(--fz)); }
.int-top .badge { font-size: calc(11px * var(--fz)); }
.int-desc { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
.int-line { color: var(--text-2); font-size: calc(12.5px * var(--fz)); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-go { align-self: center; flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: calc(12.5px * var(--fz)); font-weight: 600; color: var(--accent-text, var(--accent)); }
.int-go svg { width: 15px; height: 15px; }

.drawer-bg { position: fixed; inset: 0; z-index: 70; background: rgba(4, 4, 8, .5); backdrop-filter: blur(6px); animation: fade .15s ease-out; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent); border-left: 1px solid var(--border-2);
  box-shadow: var(--shadow); animation: drawerIn .2s ease-out;
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-bg.out { animation: fade .18s ease-in reverse forwards; }
.drawer-bg.out .drawer { animation: drawerIn .18s ease-in reverse forwards; }
.drawer-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font: 400 calc(26px * var(--fz))/1.1 var(--display); }
.drawer-head small { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 28px; }
.drawer-sec { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--border); }
.drawer-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.drawer-steps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: calc(13px * var(--fz)); display: grid; gap: 6px; }
.drawer-steps b { color: var(--text); }
.code-pre { margin: 8px 0 0; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font: calc(11.5px * var(--fz))/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; color: var(--text-2); }
.prod-list { display: grid; gap: 8px; }
.prod-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.prod-row .ds-row { grid-column: 1 / -1; }
.prod-row .select { flex: 1; min-width: 0; }
/* ---------- Mapa de calor: tabela de seções ---------- */
.hm-secs { margin-top: 16px; }
.hm-sec-list { display: grid; padding: 0 8px 8px; }
.hm-sec { display: grid; grid-template-columns: 28px minmax(0, 1fr) 92px 92px 92px 92px; gap: 10px; align-items: center; width: 100%; padding: 10px; text-align: left; font: inherit; color: var(--text); background: none; border: 0; border-radius: 12px; cursor: pointer; }
button.hm-sec:hover { background: var(--surface-2); }
.hm-sec + .hm-sec { border-top: 1px solid var(--border); }
.hm-sec.hd { cursor: default; font-size: calc(10.5px * var(--fz)); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 4px; padding-bottom: 6px; }
.hm-sec.worst { background: rgba(208, 59, 59, .07); }
.hm-sec .n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-size: calc(12px * var(--fz)); font-weight: 700; }
.hm-sec .nm { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-sec .nm b { font-size: calc(13.5px * var(--fz)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-sec small { color: var(--muted); font-size: calc(11.5px * var(--fz)); }
.hm-sec .bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 4px; overflow: hidden; }
.hm-sec .bar i { display: block; height: 100%; border-radius: 4px; }
.hm-sec .c { display: flex; flex-direction: column; text-align: right; }
.hm-sec .c b { font-size: calc(14px * var(--fz)); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .hm-sec { grid-template-columns: 26px repeat(4, minmax(0, 1fr)); gap: 6px 8px; }
  .hm-sec .nm { grid-column: 2 / -1; }
  .hm-sec .c { grid-row: 2; text-align: left; }
  .hm-sec .c:nth-of-type(3) { grid-column: 2; }
  .hm-sec .c:nth-of-type(4) { grid-column: 3; }
  .hm-sec .c:nth-of-type(5) { grid-column: 4; }
  .hm-sec .c:nth-of-type(6) { grid-column: 5; }
  .hm-sec .c b { font-size: calc(13.5px * var(--fz)); white-space: nowrap; }
  .hm-sec.hd { display: none; }
}

/* ---------- Design System: editor do tema ---------- */
.ds-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.flag { width: 20px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(127, 127, 127, .25); }
.cur-btn .flag { width: 22px; height: 15px; }
.pill.cur-btn { gap: 7px; }
.cur-item { display: flex; align-items: center; gap: 10px; }
.cur-item > span:not(.ck) { flex: 1; }
.cur-item .ck { order: 2; }
.cfg [data-mode] button { display: inline-flex; align-items: center; gap: 7px; }
.cfg [data-mode] svg { width: 16px; height: 16px; flex: none; }
.ds-preset { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: calc(13px * var(--fz)); color: var(--text); background: var(--surface-2); border: 1px solid var(--border); transition: border-color .15s, background .15s; }
.ds-preset:hover { border-color: var(--border-2); }
.ds-preset.on { border-color: var(--accent); background: var(--accent-wash); }
.ds-preset b { font-weight: 600; }
.ds-dots { display: inline-flex; }
.ds-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface-solid); }
.ds-dots i + i { margin-left: -4px; }
.ds-editor { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.ds-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ds-color { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; min-width: 0; }
.ds-color input[type=color] { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; }
.ds-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.ds-color input[type=color]::-webkit-color-swatch { border: 1px solid var(--border-2); border-radius: 9px; }
.ds-color input[type=color]::-moz-color-swatch { border: 1px solid var(--border-2); border-radius: 9px; }
.ds-color > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-color b { font-size: calc(13px * var(--fz)); font-weight: 600; }
.ds-color small { color: var(--muted); font-size: calc(11.5px * var(--fz)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-color .input { width: 86px; height: 30px; font-size: calc(12px * var(--fz)); padding: 0 8px; flex: none; }
.ds-range { width: 100%; accent-color: var(--accent); }
.ds-chip { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.ds-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.ds-preview { margin-bottom: 8px; }
@media (max-width: 900px) { .ds-editor { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 600px) {
  .int-grid { grid-template-columns: 1fr; }
  .drawer { width: 100vw; border-left: 0; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Comercial → Vendas ---------- */
.com-tabs { margin: 2px 0 6px; }
table.sales-t tbody tr.click { cursor: pointer; }
table.sales-t td { white-space: nowrap; }
table.sales-t .badge { margin-right: 4px; }
.sale-tl { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.sale-tl li { position: relative; display: flex; gap: 12px; align-items: baseline; padding: 0 0 14px 20px; font-size: calc(13px * var(--fz)); }
.sale-tl li::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 3px var(--surface-2); }
.sale-tl li::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.sale-tl li:last-child { padding-bottom: 0; }
.sale-tl li:last-child::after { display: none; }
.sale-tl li.ok::before { background: var(--good); }
.sale-tl li.err::before { background: var(--critical); }
.sale-tl li.c::before { background: var(--accent); }
.sale-tl .mono { color: var(--muted); font-size: calc(12px * var(--fz)); min-width: 86px; }
.sale-tl b { font-weight: 600; }
.sale-msg { width: 100%; min-height: 150px; resize: vertical; padding: 10px 12px; line-height: 1.45; font: inherit; font-size: calc(13px * var(--fz)); }
.sale-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sale-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: calc(13px * var(--fz)); color: var(--text-2); cursor: pointer; }
.cmp-row.click { cursor: pointer; }
.cmp-row.click:hover span { color: var(--text); }
.cmp-row.here { background: var(--surface-2); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.cmp-row .stage { margin-left: 6px; font-size: calc(11px * var(--fz)); }
.f-lab.f-link { cursor: pointer; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.f-lab.f-link:hover { background: var(--accent-wash); }
.pend-line { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; text-decoration: none; color: var(--text); font-size: calc(13px * var(--fz));
  background: rgba(208, 59, 59, 0.08); border: 1px solid rgba(208, 59, 59, 0.25); }
.pend-line svg { width: 16px; height: 16px; color: var(--critical-text); flex: none; }
.pend-line span { margin-right: auto; }
.pend-line em { font-style: normal; color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.pend-line:hover { background: rgba(208, 59, 59, 0.13); }
@media (max-width: 600px) { .pend-line { flex-wrap: wrap; } .pend-line em { width: 100%; padding-left: 26px; } }

/* ---------- Integrações: gateway ativo/desativado ---------- */
.int-card.off { opacity: .55; filter: grayscale(.7); }
.int-card.off:hover { opacity: .85; filter: none; }
.gw-row { display: flex; align-items: center; gap: 14px; }
.gw-row > div { flex: 1; min-width: 0; }
.gw-row b { display: block; font-size: calc(14px * var(--fz)); }
.gw-row small { display: block; color: var(--muted); font-size: calc(12.5px * var(--fz)); margin-top: 2px; }

/* ---------- celular: modo app ---------- */
.tabbar, .ptr { display: none; }
.sheet-bg { position: fixed; inset: 0; z-index: 95; background: rgba(4, 4, 8, 0.5); backdrop-filter: blur(3px); display: flex; align-items: flex-end; animation: fadeIn 0.18s ease-out; }
.sheet-bg.out { opacity: 0; transition: opacity 0.2s; }
.sheet-bg.out .sheet { transform: translateY(100%); transition: transform 0.2s ease-in; }
.sheet {
  width: 100%; max-height: 88vh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface-solid); border: 1px solid var(--border-2); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35);
  animation: sheetUp 0.26s cubic-bezier(0.2, 0.9, 0.3, 1); transition: transform 0.15s;
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-grab { width: 38px; height: 5px; border-radius: 99px; background: var(--border-2); margin: 2px auto 12px; }
.sheet-title { font-size: calc(16px * var(--fz)); font-weight: 650; margin: 0 2px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-sec { margin-bottom: 16px; }
.sheet-sec .eyebrow { margin-bottom: 8px; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 6px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; font-size: calc(15px * var(--fz)); text-align: left; cursor: pointer; }
.sheet-item:last-child { border-bottom: 0; }
.sheet-item svg { width: 19px; height: 19px; color: var(--text-2); }
.sheet-item.danger, .sheet-item.danger svg { color: var(--critical-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: calc(13px * var(--fz)); font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.more-acct { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; margin-bottom: 14px; }
.more-acct b { display: block; font-size: calc(14px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-acct small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.more-acct > svg { width: 17px; height: 17px; color: var(--muted); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.more-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 12px 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: calc(12px * var(--fz)); font-weight: 600; text-align: center; line-height: 1.25; }
.more-grid a svg { width: 22px; height: 22px; color: var(--accent-text); }
.more-grid a.on { border-color: var(--accent); background: var(--accent-wash); }
.more-list a, .more-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 6px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; font-size: calc(15px * var(--fz)); text-decoration: none; text-align: left; cursor: pointer; }
.more-list > :last-child { border-bottom: 0; }
.more-list svg { width: 19px; height: 19px; color: var(--text-2); }
.more-list .danger, .more-list .danger svg { color: var(--critical-text); }

@media (max-width: 900px) {
  /* casca: cabeçalho fixo compacto, abas embaixo, sem menu lateral */
  .menu-btn, .sidebar, .scrim { display: none !important; }
  .topbar {
    position: sticky; top: 0; z-index: 30; min-height: 0; gap: 8px; flex-wrap: nowrap;
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
    background: color-mix(in srgb, var(--bg, #07070c) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
  }
  .crumb { flex: 1; min-width: 0; font-size: calc(17px * var(--fz)); font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .filters { flex: none; width: auto; flex-wrap: nowrap; gap: 4px; margin: 0; }
  /* título grande na página; o pequeno do cabeçalho aparece ao rolar (como no iOS) */
  .topbar .crumb { opacity: 0; transform: translateY(4px); transition: opacity 0.18s, transform 0.18s; }
  .topbar.scrolled .crumb { opacity: 1; transform: none; }
  .topbar:not(.scrolled) { border-bottom-color: transparent; background: transparent; backdrop-filter: none; }
  .page-head .m-hide, .section-title .sp.m-hide { display: none; }
  /* números: cartões mais baixos, rótulo numa linha */
  .kpi, .kpi.big, .kpi.small { min-height: 0 !important; padding: 14px 14px 13px; }
  .kpi .kl, .kpi.big .kl, .kpi.small .kl { min-height: 0 !important; letter-spacing: 0.04em; white-space: normal; padding-right: 0; }
  .kpi.big .kl, .kpi.small .kl:has(+ *) { padding-right: 0; }
  .kpi.big .kn, .kpi.small .kn, .kpi .kn { margin-top: 8px !important; font-size: calc(21px * var(--fz)) !important; }
  .kpi .ks { font-size: calc(11.5px * var(--fz)); line-height: 1.35; }
  .kpi.big .ring, .kpi.small .ring { display: none; }
  .grid.g4, .grid.g6, .grid.g5, .grid.g3 { gap: 10px; }
  .topbar .icon-btn { width: 38px; height: 38px; border-radius: 12px; }
  .topbar .icon-btn.spin svg { animation: spin 0.8s linear infinite; }
  .m-filter { position: relative; }
  .m-dot { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 calc(10px * var(--fz))/16px var(--font); font-style: normal; text-align: center; }
  .m-avatar { width: 32px; height: 32px; margin-left: 4px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #14121c; font: 700 calc(13px * var(--fz)) var(--font); }
  .health-pill { font-size: 0 !important; gap: 0 !important; padding: 0 !important; width: 38px; height: 38px; justify-content: center; border-radius: 12px !important; }
  .health-pill svg { width: 18px !important; height: 18px !important; }
  .content { padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); }
  .content.enter > * { animation: pageIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  .content.enter > :nth-child(2) { animation-delay: 0.03s; } .content.enter > :nth-child(3) { animation-delay: 0.06s; } .content.enter > :nth-child(n+4) { animation-delay: 0.09s; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
  /* título de página no estilo app */
  .page-head { margin-bottom: 16px; gap: 8px; align-items: center; }
  .page-head h1 { font-size: calc(32px * var(--fz)); width: 100%; }
  .page-head h1 small { font-size: calc(12.5px * var(--fz)); margin-top: 6px; }
  .page-head .btn { height: 36px; }
  .page-head .no-print .btn, .page-head > .btn:not(.range-btn) { font-size: calc(12.5px * var(--fz)); }
  .section-title h2 { font-size: calc(22px * var(--fz)); }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; }
  /* abas embaixo */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface-solid) 86%, transparent); backdrop-filter: blur(18px) saturate(1.5);
    border-top: 1px solid var(--border);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; border: 0; background: none; cursor: pointer;
    color: var(--muted); text-decoration: none; font: 600 calc(10.5px * var(--fz))/1.1 var(--font); -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 23px; height: 23px; padding: 3px 14px; box-sizing: content-box; border-radius: 99px; transition: background 0.18s, color 0.18s; }
  .tabbar .on { color: var(--text); }
  .tabbar .on svg { background: var(--accent-wash); color: var(--accent-text); }
  .tabbar :active svg { transform: scale(0.92); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)) !important; left: 16px !important; right: 16px !important; }
  /* puxar pra atualizar */
  .ptr { display: grid; place-items: center; position: fixed; left: 50%; top: calc(56px + env(safe-area-inset-top)); z-index: 35; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); color: var(--accent-text); opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
  .ptr svg { width: 18px; height: 18px; }
  .ptr.spin svg { animation: spin 0.8s linear infinite; }
  /* janelas laterais e modais viram folhas que sobem de baixo */
  .drawer-bg { align-items: flex-end; }
  .drawer { width: 100% !important; max-width: none !important; height: auto !important; max-height: 92vh; top: auto !important; left: 0; right: 0; bottom: 0; border: 1px solid var(--border-2) !important; border-bottom: 0 !important; border-radius: 24px 24px 0 0; animation: sheetUp 0.26s cubic-bezier(0.2, 0.9, 0.3, 1) !important; padding-bottom: env(safe-area-inset-bottom); }
  .drawer-head { position: relative; padding-top: 22px; }
  .drawer-head::before { content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 99px; background: var(--border-2); }
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-width: none; border-radius: 24px 24px 0 0; margin: 0; max-height: 92vh; overflow: auto; animation: sheetUp 0.26s cubic-bezier(0.2, 0.9, 0.3, 1); padding-bottom: env(safe-area-inset-bottom); }
  .modal-foot .btn { flex: 1; height: 44px; }
  /* listas de app (Vendas, histórico) */
  .m-day { font-size: calc(12px * var(--fz)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
  .m-group { padding: 2px 0; overflow: hidden; }
  .m-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-row:last-child { border-bottom: 0; }
  .m-row:active:not(.static) { background: var(--surface-2); }
  .m-ava { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(14px * var(--fz)); background: var(--surface-3); color: var(--text-2); }
  .m-ava svg { width: 16px; height: 16px; }
  .m-ava.ok { background: rgba(52, 211, 153, 0.14); color: var(--good, #34d399); }
  .m-ava.err { background: rgba(208, 59, 59, 0.14); color: var(--critical-text); }
  .m-ava.org { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
  .m-main { flex: 1; min-width: 0; }
  .m-main b { display: block; font-size: calc(14.5px * var(--fz)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-main small { display: block; color: var(--muted); font-size: calc(12.5px * var(--fz)); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-main small .badge { font-size: calc(10px * var(--fz)); padding: 1px 6px; vertical-align: 1px; }
  .m-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
  .m-side b { font-size: calc(14.5px * var(--fz)); }
  .m-side .badge { font-size: calc(10.5px * var(--fz)); }
  /* Campanhas em cartões */
  .m-mgr { display: flex; flex-direction: column; gap: 10px; }
  .m-levels { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .m-crumb { display: flex; align-items: center; gap: 8px; font-size: calc(13.5px * var(--fz)); min-width: 0; }
  .m-crumb a { display: flex; align-items: center; gap: 2px; color: var(--accent-text); text-decoration: none; font-weight: 600; flex: none; }
  .m-crumb a svg { width: 16px; height: 16px; }
  .m-crumb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-search { width: 100%; }
  .m-sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .m-sorts::-webkit-scrollbar { display: none; }
  .m-cards { display: flex; flex-direction: column; gap: 10px; }
  .m-card { padding: 14px; }
  .m-card.off { opacity: 0.72; }
  .m-card-top { display: flex; align-items: center; gap: 10px; }
  .m-card-name { flex: 1; min-width: 0; background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
  .m-card-name b { display: block; font-size: calc(15px * var(--fz)); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-card-name small { display: block; color: var(--muted); font-size: calc(12px * var(--fz)); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
  .m-stats span { display: block; font-size: calc(10.5px * var(--fz)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .m-stats b { display: block; font-size: calc(15px * var(--fz)); margin-top: 3px; white-space: nowrap; }
  .m-stats b small { font-size: calc(11.5px * var(--fz)); color: var(--muted); font-weight: 600; }
  .m-stats .cell-tag { display: inline-block; width: auto; }
  textarea.input { height: auto !important; min-height: 150px; line-height: 1.45; }
  .m-budget { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
  .m-budget span { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
  .m-budget b { margin-left: auto; font-size: calc(14px * var(--fz)); }
  .m-budget svg { width: 15px; height: 15px; color: var(--muted); }
  .m-budget:disabled { opacity: 0.6; }
  .m-more { width: 100%; height: 44px; }
  /* números maiores e cartões mais compactos */
  .kpi.small .kn { font-size: calc(22px * var(--fz)); }
  .card { border-radius: 18px; }
  .btn, .input, .select { min-height: 40px; }
  input, select, textarea { font-size: calc(16px * var(--fz)) !important; } /* evita o zoom automático do iPhone */
}
.cfg { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.cfg-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.cfg-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; color: var(--text-2); text-decoration: none; font-size: calc(13.5px * var(--fz)); font-weight: 500; }
.cfg-nav a:hover { background: var(--surface-2); color: var(--text); }
.cfg-nav a.on { background: var(--accent-wash); color: var(--text); font-weight: 600; }
.cfg-nav a.on svg { color: var(--accent-text); }
.cfg-nav svg { width: 17px; height: 17px; flex: none; }
.cfg-nav .cfg-go { margin-left: auto; width: 14px; height: 14px; color: var(--muted); }
.cfg-nav-sep { height: 1px; background: var(--border); margin: 8px 6px; }
.cfg-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cfg-sec { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 24px; padding: 22px 24px; }
.cfg-sec-head h3 { margin: 0; font-size: calc(15px * var(--fz)); font-weight: 650; }
.cfg-sec-head p { margin: 6px 0 0; color: var(--muted); font-size: calc(13px * var(--fz)); line-height: 1.5; }
.cfg-sec-body { min-width: 0; }
.cfg-sec-body .field:last-of-type { margin-bottom: 12px; }
.cfg-form { max-width: 380px; }
.cfg-check { display: flex; gap: 10px; align-items: center; cursor: pointer; margin-bottom: 14px; font-size: calc(13.5px * var(--fz)); }
.cfg-toggle { padding: 12px 0; border-bottom: 1px solid var(--border); }
.cfg-toggle:first-child { padding-top: 0; }
.cfg-toggle:last-child { border-bottom: 0; padding-bottom: 0; }
.cfg-steps { font-size: calc(13.5px * var(--fz)); line-height: 1.55; }
.cfg-steps ol { margin: 8px 0 0; padding-left: 20px; }
.cfg-sec .acc-row .ix svg { width: 15px; height: 15px; }
@media (max-width: 1100px) { .cfg-sec { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 900px) {
  .cfg { grid-template-columns: 1fr; gap: 16px; }
  .cfg-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .cfg-nav a { flex: none; border: 1px solid var(--border); padding: 8px 12px; }
  .cfg-nav-sep, .cfg-nav .cfg-go { display: none; }
  .cfg-sec { padding: 18px 16px; }
}

/* ======================================================================
   Aurora: acabamento moderno (títulos sem serifa e compactos, brilho na cor do tema
   no item ativo, botões e abas; cartões de vidro finos). Usa só variáveis: vale para
   qualquer tema salvo e para o modo claro.
   ====================================================================== */
body {
  background:
    radial-gradient(1100px 600px at 0% -10%, var(--glow-a), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, var(--glow-b), transparent 58%),
    radial-gradient(900px 700px at 80% 120%, var(--glow-a), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* títulos */
.page-head h1 { font: 650 calc(30px * var(--fz))/1.15 var(--display); letter-spacing: -0.025em; }
.page-head h1 small { font-size: calc(13px * var(--fz)); margin-top: 6px; }
.section-title h2 { font: 650 calc(18px * var(--fz))/1.25 var(--display); letter-spacing: -0.015em; }
.card-head h3 { font: 600 calc(15px * var(--fz))/1.3 var(--display); letter-spacing: -0.01em; }
.drawer-head h3 { font: 650 calc(20px * var(--fz))/1.2 var(--display); letter-spacing: -0.02em; }
.modal-head h3 { font-weight: 650; letter-spacing: -0.015em; }
.eyebrow, .nav-label, .kpi .kl { letter-spacing: 0.1em; }
.kpi .kn { font-weight: 650; letter-spacing: -0.035em; }
/* barra lateral */
.sidebar { background: color-mix(in srgb, var(--surface-solid) 70%, transparent); }
.nav a { border-radius: 11px; font-size: calc(13.5px * var(--fz)); }
.nav a.active {
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--accent) 6%, transparent) 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent), 0 8px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.nav a.active::before { display: none; }
.nav a.active svg { color: var(--text); }
.brand-mark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
/* cartões: vidro fino, borda clara no topo, brilho discreto no canto */
.card { background: radial-gradient(520px 200px at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--card-grad); }
.card:hover { border-color: var(--border-2); }
.kpi::after { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); }
/* botões e controles */
.btn { border-radius: 11px; }
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent));
  color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 70%, #fff);
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn.primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff), color-mix(in srgb, var(--accent) 92%, #fff)); }
.pill:hover, .pill.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.seg { background: rgba(0, 0, 0, 0.22); border-color: var(--border); border-radius: 12px; }
:root[data-theme="light"] .seg { background: var(--surface-2); }
.seg button.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-2); }
.tabs button.on { background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.input:focus, .select:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.switch input:checked + i { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 80%, transparent); }
.chip.on { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 90%, transparent); }
/* status da Meta (campanha/conjunto/anúncio) */
.st-badge { display: inline-flex !important; flex-direction: row; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; font: 650 calc(10.5px * var(--fz))/1 var(--font); letter-spacing: 0.02em; white-space: nowrap; vertical-align: middle; background: var(--surface-3); color: var(--text-2); opacity: 1; }
.st-badge i { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st-badge.st-on { background: rgba(34, 197, 94, 0.13); color: var(--good-text); }
.st-badge.st-on i { box-shadow: 0 0 6px currentColor; }
.st-badge.st-learn { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
.st-badge.st-learn i { animation: stPulse 1.6s ease-in-out infinite; }
@keyframes stPulse { 50% { opacity: 0.3; } }
.st-badge.st-wait, .st-badge.st-warn { background: rgba(245, 165, 36, 0.14); color: var(--warning); }
.st-badge.st-err { background: rgba(240, 68, 102, 0.14); color: var(--critical-text); }
.st-badge.st-gone { opacity: 0.6; }
.name-cell .st-badge { margin-top: 4px; }
/* modo foco: faixa no topo de todas as telas + filtro que não se aplica na tela */
.focus-bar {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 8px 8px 14px; border-radius: 14px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: calc(13px * var(--fz)); color: var(--text-2);
}
.focus-bar > svg { width: 17px; height: 17px; color: var(--accent-text); flex: none; }
.focus-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-bar b { color: var(--text); }
.focus-bar small { color: var(--muted); margin-left: 4px; }
.pill.na { opacity: 0.45; cursor: help; }
.pill.na b { font-weight: 500; color: var(--muted); }
/* abas do celular: brilho no ativo */
.tabbar .on svg { box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 85%, transparent); }
@media (max-width: 900px) {
  .page-head h1 { font-size: calc(28px * var(--fz)); }
  .section-title h2 { font-size: calc(17px * var(--fz)); }
}

/* ---------- Páginas (Configuração → Páginas) ---------- */
.pgs-install { margin-bottom: 8px; }
.pgs-install-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.pgs-install-head h3 { margin: 4px 0 0; font-size: calc(17px * var(--fz)); }
.pgs-collect { display: inline-flex; align-items: center; gap: 10px; font-size: calc(13px * var(--fz)); }
.pgs-code { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--surface-2, rgba(255,255,255,.04)); border: 1px solid var(--border); }
.pgs-code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: calc(12.5px * var(--fz)); color: var(--accent-text); }
.pgs-steps { margin: 0; padding-left: 20px; line-height: 1.75; font-size: calc(13px * var(--fz)); color: var(--text-2); }
.pgs-steps code { font-size: calc(12px * var(--fz)); }
.pgs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.pgs-card { padding: 18px 20px; display: flex; flex-direction: column; }
.pgs-card.off { opacity: .65; }
.pgs-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pgs-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pgs-name b { font-size: calc(15.5px * var(--fz)); font-weight: 650; }
.pgs-urls { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 14px; }
.pgs-urls a { color: var(--text-2); text-decoration: none; font-size: calc(12.5px * var(--fz)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgs-urls a:hover { color: var(--accent-text); }
.pgs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.pgs-stats div { padding: 9px 10px; border-radius: 10px; background: var(--surface-2, rgba(255,255,255,.04)); border: 1px solid var(--border); min-width: 0; }
.pgs-stats b { display: block; font-size: calc(15px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgs-stats small { color: var(--muted); font-size: calc(11px * var(--fz)); }
.pgs-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.pgs-acts .sp { flex: 1; }
.pgs-check { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 4px; }
.pgs-check .hc { padding: 8px 0; }
.pgs-check .hc p { font-size: calc(13px * var(--fz)); }
.pgs-old { margin-top: 22px; }
.pgs-old summary { cursor: pointer; font-weight: 600; font-size: calc(14px * var(--fz)); }
.pgs-form textarea { resize: vertical; min-height: 70px; }
.pgs-adv { margin: 0 0 14px; }
.pgs-adv summary { cursor: pointer; font-size: calc(13px * var(--fz)); font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.pgs-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pgs-arch { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--fz)); color: var(--text-2); margin-bottom: 10px; }
@media (max-width: 600px) {
  .pgs-list { grid-template-columns: 1fr; }
  .pgs-stats { grid-template-columns: repeat(2, 1fr); }
  .pgs-dates { grid-template-columns: 1fr; }
  .pgs-acts .btn.sm { flex: 1 1 auto; }
}
.pgs-stats div:last-child b { font-size: calc(13px * var(--fz)); white-space: normal; line-height: 1.25; }

/* mapa de calor: etapas avisadas pela página (quiz) */
.hm-steps { margin-top: 16px; padding: 18px 22px; }
.hm-steps-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.hm-steps-head h3 { margin: 4px 0 0; font-size: calc(16px * var(--fz)); }
.hm-steps-list { display: flex; flex-direction: column; }
.hm-step { display: grid; grid-template-columns: minmax(150px, 1.3fr) 2fr 70px 120px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.hm-step:first-child { border-top: 0; }
.hm-step-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hm-step-name .ix { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; font-size: calc(11.5px * var(--fz)); font-weight: 700; background: var(--accent-wash); color: var(--accent-text); }
.hm-step-name b { font-weight: 600; font-size: calc(13.5px * var(--fz)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-step-bar { height: 10px; border-radius: 99px; background: var(--surface-3, rgba(255,255,255,.06)); overflow: hidden; }
.hm-step-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--accent)); }
.hm-step-num { text-align: right; line-height: 1.15; }
.hm-step-num b { display: block; font-size: calc(15px * var(--fz)); }
.hm-step-num small, .hm-step-drop small { color: var(--muted); font-size: calc(11.5px * var(--fz)); }
.hm-step-drop { line-height: 1.2; }
.hm-step-drop .down { display: block; color: var(--critical-text); font-weight: 700; font-size: calc(13px * var(--fz)); }
.hm-step-drop small { display: block; }
.hm-step.worst { background: rgba(208, 59, 59, .07); margin: 0 -22px; padding: 9px 22px; }
.hm-steps-tip { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: calc(13px * var(--fz)); color: var(--text-2); }
.hm-steps-tip svg { width: 16px; height: 16px; flex: none; color: var(--critical-text); margin-top: 1px; }
@media (max-width: 700px) {
  .hm-steps { padding: 16px; }
  .hm-step { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .hm-step-bar { grid-column: 1 / -1; order: 3; }
  .hm-step-drop { grid-column: 1 / -1; order: 4; display: flex; gap: 10px; }
  .hm-step.worst { margin: 0 -16px; padding: 9px 16px; }
}

/* editor de etapas (Páginas → Editar) */
.pgs-sted { border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 0 0 16px; }
.pgs-sted-h span { font-size: calc(12px * var(--fz)); font-weight: 600; color: var(--text-2); }
.pgs-sted-h small { color: var(--muted); font-weight: 500; }
.pgs-sted-rows { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 10px; }
.pgs-sted-rows:empty { margin: 6px 0; }
.pgs-st { display: grid; grid-template-columns: 22px 196px 1fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.pgs-st [data-s="name"] { grid-column: 2 / 4; grid-row: 1; }
.pgs-st .pgs-st-btns { grid-column: 4; grid-row: 1; }
.pgs-st [data-s="kind"] { grid-column: 2; grid-row: 2; }
.pgs-st [data-s="value"] { grid-column: 3 / 5; grid-row: 2; }
.pgs-st .ix { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: calc(11.5px * var(--fz)); font-weight: 700; background: var(--accent-wash); color: var(--accent-text); }
.pgs-st .input, .pgs-st .select { min-width: 0; height: 36px; font-size: calc(13px * var(--fz)); }
.pgs-st-btns { display: inline-flex; gap: 2px; }
.pgs-st-btns .icon-btn { width: 30px; height: 30px; font-size: calc(14px * var(--fz)); }
.pgs-card .hint svg { width: 13px; height: 13px; vertical-align: -2px; }
@media (max-width: 700px) {
  .pgs-st { grid-template-columns: 22px 1fr auto; }
  .pgs-st [data-s="name"] { grid-column: 2; }
  .pgs-st .pgs-st-btns { grid-column: 3; }
  .pgs-st [data-s="kind"] { grid-column: 2 / -1; grid-row: 2; }
  .pgs-st [data-s="value"] { grid-column: 2 / -1; grid-row: 3; }
}

/* scanner de oferta (Páginas) */
.scn { margin-bottom: 16px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%), var(--surface); }
.scn-head { display: flex; gap: 14px; align-items: flex-start; }
.scn-head h3 { margin: 3px 0 4px; font-size: calc(18px * var(--fz)); }
.scn-head p { margin: 0; font-size: calc(13.5px * var(--fz)); }
.scn-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-text); }
.scn-ic svg { width: 20px; height: 20px; }
.scn-form { display: flex; gap: 10px; margin-top: 16px; }
.scn-form .input { flex: 1; min-width: 0; }
.scn-more { margin-top: 10px; }
.scn-more summary { cursor: pointer; font-size: calc(13px * var(--fz)); font-weight: 600; color: var(--text-2); }
.scn-more textarea { margin-top: 8px; resize: vertical; }
.scn-wait { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px 8px; text-align: center; }
.scn-wait b { font-size: calc(15px * var(--fz)); }
.scn-wait small { color: var(--muted); }
.scn-res { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.scn-res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.scn-res-head h3 { margin: 0 0 2px; font-size: calc(17px * var(--fz)); }
.scn-sum { margin: 12px 0 0; font-size: calc(14px * var(--fz)); color: var(--text-2); line-height: 1.55; }
.scn-shots { display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 6px; scrollbar-width: thin; }
.scn-shots figure { margin: 0; flex: none; width: 96px; cursor: zoom-in; }
.scn-shots img { width: 96px; height: 208px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--border); display: block; }
.scn-shots figcaption { font-size: calc(11px * var(--fz)); color: var(--muted); margin-top: 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scn-pages { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.scn-pg { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.scn-pg.off { opacity: .45; }
.scn-pg-top { display: grid; grid-template-columns: auto 1fr 170px; gap: 10px; align-items: center; }
.scn-pg-top .input, .scn-pg-top .select { height: 36px; font-size: calc(13.5px * var(--fz)); min-width: 0; }
.scn-pg-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 0 28px; font-size: calc(12px * var(--fz)); color: var(--muted); }
.scn-steps { margin: 10px 0 0 28px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.scn-steps li { font-size: calc(13px * var(--fz)); }
.scn-steps li b { font-weight: 600; }
.scn-steps li small { color: var(--muted); margin-left: 6px; }
.scn-pg .hint { margin: 8px 0 0 28px; }
.scn-co-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: calc(13px * var(--fz)); }
.scn-co-row span { color: var(--text-2); }
.scn-co-row a { color: var(--accent-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scn-lead .hc { padding: 10px 0; }
.scn-lead .hc p { font-size: calc(13px * var(--fz)); }
.scn-acts { display: flex; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) {
  .scn-form { flex-direction: column; }
  .scn-pg-top { grid-template-columns: auto 1fr; }
  .scn-pg-top .select { grid-column: 2; }
  .scn-co-row { grid-template-columns: 1fr; gap: 2px; }
}

.scn-parts-box { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.scn-parts-box summary { cursor: pointer; font-size: calc(13px * var(--fz)); font-weight: 600; color: var(--text-2); }
.scn-parts-box ol { margin: 10px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; font-size: calc(12.5px * var(--fz)); }
.scn-parts-box li { break-inside: avoid; margin-bottom: 4px; }
.scn-parts-box li b { font-weight: 600; }
@media (max-width: 640px) { .scn-parts-box ol { columns: 1; } }

/* sino de pendências no topo e etiqueta de venda que falta ir ao pixel */
.bell-btn { position: relative; }
.bell-dot { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--critical, #e5484d); color: #fff; font: 700 calc(10px * var(--fz))/16px var(--font); font-style: normal; text-align: center; }
.bell-item { align-items: flex-start; }
.bell-item svg { margin-top: 2px; }
.bell-item > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bell-item b { font-weight: 600; }
.pop-item.bell-item small { margin-left: 0; white-space: normal; }
.badge.px-pend { background: var(--critical, #e5484d); color: #fff; }

/* legenda do funil dinâmico */
.funnel-labels .f-lab { align-self: center; }
.f-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 0 22px 18px; font-size: calc(12px * var(--fz)); color: var(--text-2); }
.f-legend span { display: inline-flex; align-items: center; gap: 6px; }
.f-legend i { width: 10px; height: 10px; border-radius: 3px; }
.f-legend small { color: var(--muted); }

/* dashboard personalizável */
.dash-blk { margin-top: 14px; }
.dash-blk[hidden] { display: none; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.dash-row b { flex: 1; font-weight: 600; }

@media (max-width: 600px) { .kpi .kl { letter-spacing: 0.04em; overflow-wrap: anywhere; padding-right: 0 !important; } .kpi.big .ring, .kpi.small .ring { top: auto; bottom: 10px; } }
@media (max-width: 900px) { .grid.dash-small { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .kl { white-space: normal; text-overflow: clip; overflow: visible; } .kpi.big, .kpi.small { min-height: 0; } }

/* ---------- Públicos → Quem compra (verba x compras) ---------- */
.qc .qc-read { margin-top: 14px; }
.qc .qc-read .hc span:last-child { padding-top: 5px; font-size: calc(14px * var(--fz)); }
.qc .card + .card, .qc .pb-hl + .card { margin-top: 14px; }
.qc-dims { flex-wrap: wrap; max-width: 100%; }
.qc-dims button { white-space: nowrap; }
.qc-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; padding: 12px 22px 0; font-size: calc(12px * var(--fz)); color: var(--text-2); }
.qc-legend span { display: inline-flex; gap: 6px; align-items: center; }
.qc-legend i.qc-b { display: inline-block; width: 14px; height: 8px; border-radius: 3px; }
.qc-scroll { overflow-x: auto; padding: 8px 10px 14px; -webkit-overflow-scrolling: touch; }
.qc-tbl { width: 100%; border-collapse: collapse; min-width: 720px; font-size: calc(13px * var(--fz)); }
.qc-tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: calc(11px * var(--fz)); letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.qc-tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.qc-tbl tr:last-child td { border-bottom: 0; }
.qc-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qc-seg { min-width: 170px; }
.qc-seg b { display: block; font-weight: 650; }
.qc-seg .badge { margin-top: 5px; display: inline-flex; font-size: calc(10.5px * var(--fz)); }
.qc-tbl td small { display: block; margin-top: 5px; color: var(--muted); font-size: calc(11.5px * var(--fz)); white-space: nowrap; }
.qc-bars { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.qc-b { display: block; height: 7px; border-radius: 4px; min-width: 2px; }
.qc-b.pur { background: var(--accent); }
.qc-b.sp { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.qc-more { padding: 0 22px 16px; font-size: calc(12px * var(--fz)); }

/* ---------- Checkout próprio ---------- */
.ck-top { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; justify-content: space-between; padding: 16px 20px; }
.ck-proj { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ck-conn { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ck-conn .badge { display: inline-flex; gap: 6px; align-items: center; }
.ck-tabs { margin: 18px 0 4px; flex-wrap: wrap; max-width: 100%; }
.ck-tabs button { white-space: nowrap; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ck-offer { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ck-offer.off { opacity: .6; }
.ck-offer-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ck-offer-h b { font-size: calc(15.5px * var(--fz)); }
.ck-price { font-size: calc(26px * var(--fz)); font-weight: 800; letter-spacing: -0.02em; display: flex; gap: 8px; align-items: baseline; }
.ck-price s { font-size: calc(13px * var(--fz)); color: var(--muted); font-weight: 500; }
.ck-meta { display: flex; flex-direction: column; gap: 5px; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.ck-meta span { display: flex; gap: 6px; align-items: center; }
.ck-meta svg { width: 13px; height: 13px; color: var(--muted); flex: none; }
.ck-meta i { font-style: normal; }
.ck-link { font-size: calc(12px * var(--fz)); color: var(--accent-text); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-form { display: flex; flex-direction: column; gap: 12px; }
.ck-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ck-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ck-sw .switch { margin-top: 6px; }
.ck-check { display: flex; gap: 8px; align-items: center; font-size: calc(13.5px * var(--fz)); }
.ck-bumps { border: 1px dashed var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ck-bumps-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ck-bump { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ck-bump-f { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ck-vis { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-top: 14px; }
.ck-vis-l { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ck-vis-r { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.ck-vis-sticky { position: sticky; top: 80px; width: 320px; max-width: 100%; }
.ck-sec { display: flex; flex-direction: column; gap: 10px; }
.ck-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ck-tpl { background: var(--surface-2); border: 2px solid var(--border); border-radius: 14px; padding: 10px; color: var(--text); font: 600 calc(13px * var(--fz)) var(--sans, Inter), sans-serif; display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; }
.ck-tpl.on { border-color: var(--accent); }
.ck-tpl-pv { height: 60px; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.ck-tpl-pv i { display: block; border-radius: 3px; height: 10px; }
.ck-tpl-pv.classico { background: #eef1f7; } .ck-tpl-pv.classico i:nth-child(1) { background: #12213f; } .ck-tpl-pv.classico i:nth-child(2) { background: #fff; height: 16px; }
.ck-tpl-pv.escuro { background: #0f1115; } .ck-tpl-pv.escuro i:nth-child(1) { background: #12213f; } .ck-tpl-pv.escuro i:nth-child(2) { background: #1a1d24; height: 16px; }
.ck-tpl-pv.minimal { background: #fff; border: 1px solid #e5e7eb; } .ck-tpl-pv.minimal i:nth-child(1) { background: #e5e7eb; } .ck-tpl-pv.minimal i:nth-child(2) { background: #f5f6f8; height: 16px; }
.ck-tpl-pv i:nth-child(3) { background: #1fa45a; }
.ck-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-sw2 { width: 50px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); padding: 4px; display: flex; gap: 3px; cursor: pointer; }
.ck-sw2 i { flex: 1; border-radius: 6px; }
.ck-dot { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--border); cursor: pointer; }
.ck-color { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 3px; cursor: pointer; }
.ck-tg { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.ck-tg:first-of-type { border-top: 0; }
.ck-tg b { display: block; font-size: calc(14px * var(--fz)); }
.ck-tg small { color: var(--muted); font-size: calc(12px * var(--fz)); }
.ck-dep { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 8px; }
.ck-dep textarea { grid-column: 1 / 2; }
.ck-dep .icon-btn { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.ck-table .acc-row { gap: 10px; flex-wrap: wrap; }
.ck-phone { border-radius: 30px; border: 9px solid var(--surface-3); background: var(--pg); overflow: hidden; color: var(--tx); box-shadow: var(--shadow); }
.ck-phone .pv-faixa { background: var(--ac); color: var(--br); font-size: 11.5px; font-weight: 800; text-align: center; padding: 8px; }
.ck-phone .pv-head { background: var(--hd); color: var(--ht); display: flex; align-items: center; gap: 8px; padding: 13px 14px; font-weight: 800; font-size: 14px; border-bottom: 1px solid var(--ln); }
.ck-phone .pv-head i { width: 22px; height: 22px; border-radius: 7px; background: var(--ac); }
.ck-phone .pv-head img { height: 22px; border-radius: 6px; }
.ck-phone .pv-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ck-phone .pv-card { background: var(--cd); border-radius: 12px; padding: 10px; }
.ck-phone .pv-prod { display: flex; gap: 10px; align-items: center; }
.ck-phone .pv-img { width: 40px; height: 50px; border-radius: 8px; background: var(--br); flex: none; }
.ck-phone .pv-prod small { display: block; color: var(--sb); font-size: 9.5px; font-weight: 700; }
.ck-phone .pv-prod b { display: block; font-size: 13px; }
.ck-phone .pv-prod strong { font-size: 16px; font-weight: 900; }
.ck-phone .pv-timer { border: 1.5px solid var(--ac); background: var(--cd); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; font-weight: 700; display: flex; justify-content: space-between; }
.ck-phone .pv-in { height: 30px; border-radius: 9px; background: var(--cd); border: 1px solid var(--ln); }
.ck-phone .pv-bump { background: var(--bp); border: 2px dashed var(--ac); border-radius: 11px; padding: 9px; font-size: 11.5px; font-weight: 700; }
.ck-phone .pv-btn { background: var(--bt); color: #fff; border-radius: 11px; padding: 13px 8px; text-align: center; font-weight: 800; font-size: 13px; }
.ck-phone .pv-selos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ck-phone .pv-selos span { background: var(--cd); border-radius: 8px; padding: 6px 3px; font-size: 9.5px; font-weight: 700; text-align: center; }
.ck-phone .pv-dep p { margin: 6px 0 0; font-size: 11px; color: var(--sb); }

/* checkout: campo de imagem */
.ck-img-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ck-img-pv { width: 88px; height: 88px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.ck-img-pv.wide { width: 240px; height: 80px; max-width: 100%; }
.ck-img-pv img { width: 100%; height: 100%; object-fit: cover; }
.ck-img-pv small { color: var(--muted); font-size: calc(11.5px * var(--fz)); }
.ck-img-act { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-img-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-img-btns label { cursor: pointer; }
.ck-img-btns b { font-weight: inherit; }
.ck-img details summary { cursor: pointer; font-size: calc(12.5px * var(--fz)); color: var(--text-2); }
.ck-img details input { margin-top: 6px; }
.ck-phone .pv-banner { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.ck-phone img.pv-img { object-fit: cover; }

/* checkout: funil depois da compra */
.ck-funnel { border: 1px dashed var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ck-flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.ck-node { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 7px 10px; display: inline-flex; flex-direction: column; gap: 1px; }
.ck-node small { font-size: calc(10px * var(--fz)); font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.ck-node b { font-size: calc(12.5px * var(--fz)); font-weight: 650; }
.ck-node.up { border-color: var(--accent); }
.ck-node.down { border-color: var(--warning); }
.ck-arr { color: var(--muted); font-weight: 800; }
.ck-branch { display: flex; flex-direction: column; gap: 6px; font-size: calc(12.5px * var(--fz)); }
.ck-branch .ok { color: var(--good-text); font-weight: 650; }
.ck-branch .no { color: var(--text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ck-step { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ck-step-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ck-ext summary { cursor: pointer; font-size: calc(13px * var(--fz)); color: var(--text-2); }
.ck-ext[open] { display: flex; flex-direction: column; gap: 10px; }
.ck-vid-pv video { width: 100%; height: 100%; object-fit: cover; }

/* janelas grandes no computador: alargam e dividem o conteúdo em colunas (App.modal decide quando) */
.modal.cols { max-width: none; width: min(var(--mw, 1120px), calc(100vw - 48px)); }
.modal.cols .cols-host { display: block !important; column-count: var(--cols, 2); column-gap: 32px; column-rule: 1px solid var(--border); }
.modal.cols .cols-host > * { break-inside: avoid; page-break-inside: avoid; margin-top: 0 !important; margin-bottom: 14px !important; }
.modal.cols .cols-host > [hidden] { display: none !important; }
.modal.cols .cols-host > .cols-split { break-inside: auto; page-break-inside: auto; }
.modal.cols .cols-host .field, .modal.cols .cols-host .ck-2, .modal.cols .cols-host .ck-bump, .modal.cols .cols-host .ck-flow, .modal.cols .cols-host .ck-step-h, .modal.cols .cols-host .ck-img, .modal.cols .cols-host .ck-bump-f, .modal.cols .cols-host .ck-bumps-h { break-inside: avoid; page-break-inside: avoid; }
/* dentro de um bloco que se divide, cada parte que cabe numa coluna fica inteira (título junto com os campos) */
.modal.cols .cols-host .cols-split { break-inside: auto; page-break-inside: auto; }
.modal.cols .cols-host .cols-split > *:not(.cols-split) { break-inside: avoid; page-break-inside: avoid; }
.modal.cols .cols-host .ck-step { break-inside: avoid; page-break-inside: avoid; }
.modal.cols .cols-host .ck-step-h, .modal.cols .cols-host .ck-bumps-h, .modal.cols .cols-host h3, .modal.cols .cols-host h4 { break-after: avoid; page-break-after: avoid; }

/* ---------- editor de oferta em seções (ofx) ---------- */
.ofx { display: flex; flex-direction: column; gap: 14px; }
.ofx-sec { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); break-inside: avoid; }
.ofx-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ofx-h b { display: block; font-size: 14.5px; }
.ofx-h small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 400; }
.ofx-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--accent-wash); color: var(--accent); }
.ofx-b { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ofx-b .ofx-b { padding: 0; }
.ofx .field { margin: 0; min-width: 0; }
.ofx .field > span i { font-style: normal; color: var(--muted); font-weight: 400; }
.ofx .field .hint { margin-top: 4px; }
.ofx-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.ofx-url { display: flex; align-items: stretch; }
.ofx-url > span { display: flex; align-items: center; padding: 0 10px; font-size: 12.5px; color: var(--muted); background: var(--surface-2, var(--surface-3)); border: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; white-space: nowrap; }
.ofx-url .input { border-radius: 0 10px 10px 0; min-width: 0; flex: 1; }
.ofx-suf { display: flex; align-items: center; gap: 8px; }
.ofx-suf .input { width: 90px; }
.ofx-suf span { color: var(--muted); font-size: 13px; }
.ofx-tg { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ofx-tg b { display: block; font-size: 13.5px; }
.ofx-tg small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ofx-list { display: flex; flex-direction: column; gap: 12px; }
.ofx-list:empty { display: none; }
.ofx-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2, transparent); break-inside: avoid; }
.ofx-card-h { display: flex; align-items: center; gap: 10px; }
.ofx-card-h > b { flex: 1; font-size: 13.5px; }
.ofx-card-h > b small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.ofx-card-h .hint { margin: 0; }
.ofx-mini { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ofx-card .ck-step-b { display: block; }
.ofx .ck-flow { margin: 0; }
.ofx-adv { border: 1px solid var(--border); border-radius: 14px; break-inside: avoid; }
.ofx-adv > summary { padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.ofx-adv[open] > summary { border-bottom: 1px solid var(--border); }
.ofx-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.modal.own-cols { max-width: none; width: min(var(--mw, 1120px), calc(100vw - 48px)); }
.modal.own-cols .ofx { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.modal.own-cols .ofx > .bad { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .ofx-g2 { grid-template-columns: 1fr; }
  .ofx-g2 > span:empty { display: none; }
  .ofx-b { padding: 14px; }
}

.ofx-more{border:1px dashed var(--border);border-radius:12px}
.ofx-more > summary{padding:11px 14px;cursor:pointer;font-weight:600;font-size:13px;color:var(--muted)}
.ofx-more[open] > summary{border-bottom:1px dashed var(--border)}
.ofx-more .ofx-b{padding:14px}

/* ================= Funis: construtor de funil em fluxograma ================= */
.fx { display: flex; flex-direction: column; gap: 14px; }
.fx-bar { display: flex; align-items: flex-end; gap: 10px 12px; flex-wrap: wrap; padding: 14px 16px; }
.fx-bar .field.fx-f { margin: 0; width: 200px; max-width: 100%; }
.fx-acts { display: flex; gap: 6px; align-items: center; }
.fx-acts .btn span { margin-left: 2px; }
.fx-sp { flex: 1; }
.fx-days { margin: 0; }
.fx-saved { margin: 0 4px; min-width: 52px; text-align: right; }
.content:has(.fx) { max-width: none; padding: 18px 22px 24px; }
.content:has(.fx) .page-head { margin-bottom: 14px; }
.fx-main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; height: calc(100vh - 235px); min-height: 600px; }
body.fx-full .sidebar, body.fx-full .topbar, body.fx-full .tabbar, body.fx-full .content:has(.fx) .page-head { display: none !important; }
body.fx-full .content:has(.fx) { padding: 10px 12px; }
body.fx-full .fx-main { height: calc(100vh - 140px); }
body.fx-full .app { grid-template-columns: 1fr !important; }
.fx-pal { padding: 14px 12px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.fx-pg { display: flex; flex-direction: column; gap: 7px; }
.fx-pg .eyebrow { margin: 0 2px 2px; }
.fx-blk { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: grab; user-select: none; transition: border-color .15s, transform .15s, background .15s; }
.fx-blk:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface-2)); transform: translateY(-1px); }
.fx-blk:active { cursor: grabbing; }
.fx-blk b { display: block; font-size: calc(13px * var(--fz)); font-weight: 700; }
.fx-blk small { display: block; font-size: calc(11px * var(--fz)); color: var(--muted); line-height: 1.3; }
.fx-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.fx-ic svg { width: 15px; height: 15px; }
.fx-tip { margin: auto 2px 0; line-height: 1.45; }
.fx-stage { position: relative; overflow: hidden; padding: 0; }
.fx-canvas { position: absolute; inset: 0; background-color: transparent; background-image: radial-gradient(circle, var(--border-2) 1px, transparent 1.2px); background-size: 22px 22px; }
.fx-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); z-index: 3; }
.fx-zoom span { min-width: 44px; text-align: center; font: 600 calc(12px * var(--fz)) var(--mono); color: var(--text-2); }
.fx-zoom .icon-btn { width: 30px; height: 30px; font-size: 16px; font-weight: 700; }
.fx-legend { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; font-size: calc(11px * var(--fz)); color: var(--muted); z-index: 3; }
.fx-legend i { width: 18px; height: 3px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.fx-insp { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 340px; max-width: calc(100% - 24px); padding: 16px; overflow: auto; z-index: 5; border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .18s ease; }
.fx-insp.open { transform: none; opacity: 1; pointer-events: auto; }
.fx-stage:has(.fx-insp.open) .fx-zoom { right: 364px; }
.fx-stage:has(.fx-insp.open) .fx-linksbtn { display: none; }
@media (max-width: 700px) { .fx-stage:has(.fx-insp.open) .fx-zoom { display: none; } }
.fx-linksbtn { position: absolute; top: 12px; right: 12px; z-index: 4; box-shadow: var(--shadow); }
.fx-ih .icon-btn + .icon-btn { margin-left: -4px; }
.fx-insp .field { margin-bottom: 10px; }
.fx-insp .ck-tg { margin: 4px 0 10px; }
.fx-ih { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fx-ih b { flex: 1; font-size: calc(15px * var(--fz)); }
.fx-slug { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.fx-slug span { padding: 0 8px 0 10px; font-size: calc(11.5px * var(--fz)); color: var(--muted); white-space: nowrap; }
.fx-slug .input { border: 0; border-radius: 0; background: transparent; padding-left: 0; }
.fx-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warning) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent); font-size: calc(12.5px * var(--fz)); color: var(--text-2); margin: 0 0 12px; line-height: 1.45; }
.fx-note svg { width: 15px; height: 15px; flex: none; color: var(--warning); margin-top: 1px; }
.fx-link { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.fx-link span { flex: 1; min-width: 0; font-size: calc(13px * var(--fz)); font-weight: 600; }
.fx-link small { display: block; font: 500 calc(11px * var(--fz)) var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* blocos dentro do desenho (Drawflow) */
.fx-canvas > div { position: absolute; inset: 0; }
.fx-canvas .parent-drawflow { cursor: default; }
.fx-canvas.fx-hand .parent-drawflow, .fx-canvas.fx-pan .parent-drawflow { cursor: grab; }
.fx-canvas.fx-hand .parent-drawflow:active, .fx-canvas.fx-pan .parent-drawflow:active { cursor: grabbing; }
.fx-canvas.fx-sel:not(.fx-pan) .parent-drawflow { cursor: crosshair; }
.fx-tools { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.fx-tools .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
.fx-tools .icon-btn.on { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 700px) { .fx-tools { display: none; } }
.fx-marquee { position: absolute; z-index: 6; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; pointer-events: none; }
.fx-canvas .drawflow-node.fx-multi .fx-card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 14px 34px rgba(0, 0, 0, .35); }
.fx-zoom .fx-sep { width: 1px; height: 20px; background: var(--border-2); margin: 0 2px; }
.fx-canvas .drawflow { width: 100%; height: 100%; transform-origin: 0 0; }
.fx-canvas .drawflow .drawflow-node.fx-n { width: 236px; min-height: 0; padding: 0; background: transparent; border: 0; box-shadow: none; color: var(--text); }
.fx-canvas .drawflow .drawflow-node.fx-n:hover { box-shadow: none; }
.fx-canvas .drawflow .drawflow-node .drawflow_content_node { width: 100%; }
.fx-card { --c: var(--accent); border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); padding: 11px 13px 12px; position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.fx-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.fx-canvas .drawflow-node.selected .fx-card { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent), 0 14px 34px rgba(0, 0, 0, .35); }
.fx-h { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.fx-h .fx-ic { width: 24px; height: 24px; border-radius: 8px; }
.fx-h .fx-ic svg { width: 13px; height: 13px; }
.fx-h b { font-size: calc(10.5px * var(--fz)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.fx-t { font-size: calc(14px * var(--fz)); font-weight: 700; line-height: 1.25; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fx-s { font-size: calc(12px * var(--fz)); color: var(--text-2); font-weight: 600; }
.fx-s s { color: var(--critical-text); font-weight: 500; margin-left: 3px; }
.fx-st { display: block; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border-2); font-size: calc(11.5px * var(--fz)); color: var(--text-2); }
.fx-st + .fx-st { margin-top: 2px; padding-top: 0; border-top: 0; }
.fx-st b { color: var(--good-text); }
.fx-st.muted { color: var(--muted); }
.fx-canvas .drawflow .drawflow-node .output { position: relative; }
.fx-canvas .drawflow-node.fx-upsell .output::after, .fx-canvas .drawflow-node.fx-downsell .output::after, .fx-canvas .drawflow-node.fx-cond .output::after { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); font: 700 10px var(--font); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.fx-canvas .drawflow-node.fx-upsell .output_1::after, .fx-canvas .drawflow-node.fx-downsell .output_1::after { content: 'comprou'; color: #4ade80; }
.fx-canvas .drawflow-node.fx-upsell .output_2::after, .fx-canvas .drawflow-node.fx-downsell .output_2::after { content: 'recusou'; color: #f87171; }
.fx-canvas .drawflow-node.fx-cond .output_1::after { content: 'sim'; color: #4ade80; }
.fx-canvas .drawflow-node.fx-cond .output_2::after { content: 'não'; color: #f87171; }
.fx-canvas .drawflow .drawflow-node .input, .fx-canvas .drawflow .drawflow-node .output { width: 15px; height: 15px; border: 2px solid var(--surface-solid); background: var(--text-2); box-shadow: 0 0 0 1px var(--border-2); }
.fx-canvas .drawflow .drawflow-node .output:hover, .fx-canvas .drawflow .drawflow-node .input:hover { background: var(--accent); }
.fx-canvas .drawflow .drawflow-node.fx-upsell .output_1, .fx-canvas .drawflow .drawflow-node.fx-downsell .output_1, .fx-canvas .drawflow .drawflow-node.fx-cond .output_1 { background: #22c55e; }
.fx-canvas .drawflow .drawflow-node.fx-upsell .output_2, .fx-canvas .drawflow .drawflow-node.fx-downsell .output_2, .fx-canvas .drawflow .drawflow-node.fx-cond .output_2 { background: #f87171; }
.fx-canvas .drawflow .connection .main-path { stroke: color-mix(in srgb, var(--text-2) 55%, transparent); stroke-width: 3px; }
.fx-canvas .drawflow .connection .main-path:hover, .fx-canvas .drawflow .connection .main-path.selected { stroke: var(--accent); }
.fx-canvas .drawflow-delete { background: var(--critical); border: 2px solid var(--surface-solid); color: #fff; line-height: 26px; font-family: var(--font); }
.fx-canvas .parent-node .drawflow-delete { right: -12px; top: -12px; }

@media (max-width: 1100px) {
  .fx-main { grid-template-columns: 200px minmax(0, 1fr); height: auto; min-height: 0; }
  .fx-stage { height: 72vh; min-height: 480px; }
}
@media (max-width: 700px) {
  .fx-bar .field.fx-f { width: calc(50% - 6px); }
  .fx-sp { display: none; }
  .fx-main { grid-template-columns: 1fr; }
  .fx-pal { flex-direction: row; overflow-x: auto; padding: 10px; gap: 8px; }
  .fx-pg { flex-direction: row; gap: 8px; }
  .fx-pg .eyebrow, .fx-tip, .fx-blk small { display: none; }
  .fx-blk { flex: none; padding: 7px 10px; }
  .fx-stage { height: 70vh; min-height: 420px; }
  .fx-legend { display: none; }
  .fx-insp { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; max-height: 72%; transform: translateY(calc(100% + 16px)); }
  .content:has(.fx) { padding: 12px 10px 90px; }
}

/* ilustração de cada bloco do fluxograma */
.fx-card { --fxp-bg: #12151f; --fxp-bar: #1b2030; --fxp-bd: rgba(255,255,255,.08); --fxp-ln: rgba(255,255,255,.16); --fxp-wh: rgba(255,255,255,.75); }
:root[data-theme="light"] .fx-card { --fxp-bg: #f6f7fb; --fxp-bar: #e8ebf3; --fxp-bd: rgba(15,23,42,.10); --fxp-ln: rgba(15,23,42,.14); --fxp-wh: rgba(15,23,42,.55); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .fx-card { --fxp-bg: #f6f7fb; --fxp-bar: #e8ebf3; --fxp-bd: rgba(15,23,42,.10); --fxp-ln: rgba(15,23,42,.14); --fxp-wh: rgba(15,23,42,.55); } }
.fx-pv, .fx-canvas .drawflow .fx-pv { position: static; display: block; width: 100%; height: auto; aspect-ratio: 210 / 78; overflow: hidden !important; margin: 2px 0 9px; border-radius: 8px; z-index: auto; }
