/* PageForge AI — interface do builder. Verde só em CTA/estados; base branco+grafite. */
:root {
  --emerald: #10b981;
  --emerald-deep: #047857;
  --emerald-ink: #043c2c;
  --ink: #0b0f0e;
  --ink-2: #111827;
  --paper: #ffffff;
  --bg: #f6f7f7;
  --surface: #ffffff;
  --line: #e3e6e5;
  --line-2: #eef0ef;
  --text: #101614;
  --text-soft: #59635e;
  --text-faint: #6b736e;
  --danger: #b42318;
  --warn: #a1610a;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(11, 15, 14, .05), 0 8px 24px rgba(11, 15, 14, .06);
  --shadow-2: 0 12px 40px rgba(11, 15, 14, .14);
  --container: 1160px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--emerald-deep); }
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--emerald-deep); outline-offset: 2px; border-radius: 6px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-soft); }
.tiny { font-size: .82rem; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .96rem;
  min-height: 46px; padding: 0 1.25rem;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--b); color: #fff; cursor: pointer;
  text-decoration: none; transition: transform .12s var(--ease), background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--primary { --b: var(--emerald); color: #04241a; font-weight: 700; }
.btn--primary:hover { background: var(--emerald-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }
.btn--sm { min-height: 38px; font-size: .86rem; padding: 0 .9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; }
.brand__name b { font-weight: 800; }
.brand__name span { font-weight: 800; color: var(--emerald-deep); }
.brand__ai { font-size: .62rem; font-weight: 800; letter-spacing: .14em; color: var(--text-faint); border: 1px solid var(--line); border-radius: 5px; padding: 1px 4px; margin-left: .35rem; vertical-align: 2px; }

/* ---------- health banner ---------- */
.banner {
  background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c3a06;
  font-size: .88rem; padding: .55rem 0;
}
.banner code { background: #ffedd5; padding: 1px 6px; border-radius: 5px; font-size: .92em; }

/* ---------- views ---------- */
.view { display: none; }
.view.is-active { display: block; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- landing ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero__kicker { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.7rem); max-width: 16ch; margin-top: .5rem; }
.hero__sub { font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); color: var(--text-soft); max-width: 46ch; }
.hero__cta { margin-top: 1.8rem; display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.hero__note { font-size: .85rem; color: var(--text-faint); margin-top: 1rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 2.5rem 0; }
.steps__item { background: var(--surface); padding: 1.2rem 1.1rem; }
.steps__n { font-weight: 800; color: var(--emerald-deep); font-size: .8rem; letter-spacing: .08em; }
.steps__item h3 { font-size: 1rem; margin: .4rem 0 .2rem; }
.steps__item p { font-size: .88rem; color: var(--text-soft); margin: 0; }

.pitch { background: var(--ink); color: #e9ece9; border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 3rem); margin-bottom: 3rem; }
.pitch h2 { color: #fff; font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem); }
.pitch ul { margin: 1rem 0 0; padding-left: 1.1rem; columns: 2; column-gap: 2rem; }
.pitch li { margin-bottom: .5rem; font-size: .92rem; }

/* ---------- wizard ---------- */
.wizard { padding: 1.6rem 0 4rem; }
.wizard__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.stepper { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.stepper__b {
  font-size: .82rem; font-weight: 600; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .85rem; cursor: pointer;
}
.stepper__b.is-current { border-color: var(--ink); color: var(--ink); }
.stepper__b.is-done { color: var(--emerald-deep); border-color: #a7f3d0; background: #ecfdf5; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow-1); }
.panel + .panel { margin-top: 1.2rem; }
.panel h2 { font-size: 1.25rem; }
.panel__lead { color: var(--text-soft); font-size: .92rem; margin-top: -.2rem; }

.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-weight: 400; color: var(--text-faint); font-size: .82rem; }
.field input[type=text], .field input[type=url], .field textarea, .field select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .8rem; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--emerald-deep); box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); outline: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.choice__c { position: relative; }
.choice__c input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__c span {
  display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .8rem .9rem; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice__c span small { display: block; font-weight: 400; color: var(--text-soft); font-size: .8rem; margin-top: .2rem; }
.choice__c input:checked + span { border-color: var(--emerald); background: #ecfdf5; }
.choice__c input:focus-visible + span { outline: 2.5px solid var(--emerald-deep); outline-offset: 2px; }

.wizard__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }

/* summary rail */
.rail { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-1); }
.rail h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.rail dl { margin: .6rem 0 0; font-size: .86rem; }
.rail dt { color: var(--text-faint); margin-top: .6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.rail dd { margin: .1rem 0 0; word-break: break-word; }

/* ---------- generating ---------- */
.gen { text-align: center; padding: 3rem 0 4rem; }
.gen__spin { width: 46px; height: 46px; margin: 0 auto 1.4rem; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--emerald); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen__stages { list-style: none; padding: 0; margin: 1.4rem auto 0; max-width: 340px; text-align: left; font-size: .9rem; }
.gen__stages li { padding: .32rem 0 .32rem 1.6rem; position: relative; color: var(--text-faint); }
.gen__stages li::before { content: "○"; position: absolute; left: 0; }
.gen__stages li.is-active { color: var(--text); font-weight: 600; }
.gen__stages li.is-active::before { content: "◐"; color: var(--emerald-deep); }
.gen__stages li.is-done { color: var(--text-soft); }
.gen__stages li.is-done::before { content: "●"; color: var(--emerald); }

/* ---------- preview ---------- */
.preview { padding: 1.2rem 0 4rem; }
.pv-toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; box-shadow: var(--shadow-1); position: sticky; top: 72px; z-index: 20; }
.pv-devices { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.pv-devices button { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 600; color: var(--text-soft); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; }
.pv-devices button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.pv-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.pv-stage { margin-top: 1rem; background: #dfe3e1; border-radius: var(--radius); padding: 1rem; display: flex; justify-content: center; overflow: auto; }
.pv-frame-wrap { background: #fff; box-shadow: var(--shadow-2); border-radius: 8px; overflow: hidden; transition: width .25s var(--ease); width: 100%; max-width: 100%; }
.pv-frame-wrap[data-device="tablet"] { max-width: 768px; }
.pv-frame-wrap[data-device="mobile"] { max-width: 390px; }
.pv-frame-wrap iframe { width: 100%; height: 78vh; border: 0; display: block; background: #fff; }

.notices { margin-top: 1rem; display: grid; gap: .5rem; }
.notice { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; background: var(--surface); }
.notice--warn { border-left-color: var(--warn); }
.notice--err { border-left-color: var(--danger); }
.notice--ok { border-left-color: var(--emerald); }
.notice--info { border-left-color: var(--ink-2); }

.editbar { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-1); }
.editbar h3 { font-size: .95rem; margin-bottom: .5rem; }
.editbar__row { display: flex; gap: .5rem; flex-wrap: wrap; }
.editbar textarea { width: 100%; min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.5; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem; }
.chip { font: inherit; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .8rem; cursor: pointer; }
.chip:hover { border-color: var(--ink); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #aab3ad; font-size: .85rem; padding: 2.5rem 0; margin-top: auto; }
.foot a { color: #d6ddd7; }
.foot__in { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-size: .88rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .wizard__grid { grid-template-columns: 1fr; }
  .rail { position: static; order: -1; }
  .pitch ul { columns: 1; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pv-toolbar { position: static; }
  .pv-frame-wrap iframe { height: 70vh; }
  .hero__cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ========================================================================
   PROSPECÇÃO / LEADS / DASHBOARD  (Fase 1 — Máquina de Leads integrada)
   ======================================================================== */
.topbar__in { gap: 1rem; }
.mainnav { display: flex; gap: .2rem; margin-left: auto; margin-right: .5rem; }
.mainnav a {
  font-size: .88rem; font-weight: 600; color: var(--text-soft); text-decoration: none;
  padding: .5rem .7rem; border-radius: 8px; white-space: nowrap;
}
.mainnav a:hover { color: var(--ink); background: var(--bg); }
.mainnav a.is-on { color: var(--emerald-deep); background: #ecfdf5; }
.navtoggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.1rem; width: 40px; height: 40px; cursor: pointer; }

.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1rem; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2rem; }
.kpi { background: var(--surface); padding: 1.1rem 1.2rem; text-decoration: none; display: flex; flex-direction: column; gap: .2rem; }
.kpi:hover { background: #fbfdfc; }
.kpi__n { font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.kpi__l { font-size: .82rem; color: var(--text-soft); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 3rem; }
.dash-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; text-decoration: none; box-shadow: var(--shadow-1); transition: transform .12s var(--ease), border-color .12s; }
.dash-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.dash-card h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: .4rem; }
.dash-card p { font-size: .9rem; color: var(--text-soft); margin: 0 0 .8rem; }
.dash-card__go { font-size: .85rem; font-weight: 700; color: var(--emerald-deep); }

/* prospecção */
.prospect h1, #view-leads h1, #view-projetos h1, #view-config h1, .lead-detail h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); margin-top: 1.2rem; }
.prospect { padding-bottom: 4rem; }
.prospect-form { margin: 1.2rem 0 1.5rem; }
.prospect-form .btn { margin-top: .4rem; }
.prospect-adv summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--text-soft); margin: .3rem 0; }
.prospect-status { font-size: .85rem; color: var(--text-soft); margin-left: .8rem; }
.prospect-loading { text-align: center; padding: 2.5rem 0; }
.prospect-loading .gen__spin { margin: 0 auto 1rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 .8rem; font-size: .9rem; }

.lead-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: .6rem; }
.lead-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.lead-card__top h3 { font-size: 1.02rem; margin: 0; }
.lead-card__meta { font-size: .82rem; color: var(--text-faint); margin: .15rem 0 0; }
.lead-card__score { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.score-num { font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--ink); }
.temp { font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.temp--quente { background: #fef2f2; color: #b42318; }
.temp--morno { background: #fffbeb; color: #a1610a; }
.temp--frio { background: #eff6ff; color: #1e5eb4; }
.lead-card__facts { list-style: none; padding: 0; margin: 0; font-size: .84rem; color: var(--text-soft); display: grid; gap: .25rem; }
.lead-card__facts li::before { content: "· "; color: var(--text-faint); }
.lead-card__angle { color: var(--emerald-deep); }
.lead-card__contacts { font-size: .82rem; }
.lead-card__contacts a { font-weight: 600; }
.lead-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .2rem; }
.chip--on { background: #ecfdf5; color: var(--emerald-deep); border-color: #a7f3d0; }
.lead-status { font-size: .78rem; color: var(--text-faint); display: inline-flex; align-items: center; gap: .3rem; }
.lead-status select { font: inherit; font-size: .82rem; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 7px; background: #fff; }

.leads-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.leads-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.lead-filter-b { font: inherit; font-size: .8rem; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--text-soft); border-radius: 999px; padding: .35rem .75rem; cursor: pointer; }
.lead-filter-b.is-on { border-color: var(--ink); color: var(--ink); }
.lead-filter-b b { color: var(--emerald-deep); }

.lead-detail { padding-bottom: 4rem; }
.cfg-list { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; font-size: .9rem; margin: .6rem 0 0; }
.cfg-list dt { color: var(--text-faint); font-weight: 600; }
.cfg-list dd { margin: 0; }

.projects-list { margin-top: 1.2rem; }

@media (max-width: 900px) {
  .mainnav { position: absolute; top: 62px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: .5rem; display: none; z-index: 40; box-shadow: var(--shadow-1); }
  .mainnav.is-open { display: flex; }
  .navtoggle { display: block; }
  .topbar .btn--primary { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ========================================================================
   EDITOR VISUAL · ANTES×DEPOIS · IMPECCABLE QA  (Fase 2)
   ======================================================================== */
.pf-ed-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--ink); color: #fff; display: flex; align-items: center; gap: .7rem;
  padding: .55rem .9rem; font-size: .84rem; box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.pf-ed-bar strong { font-weight: 800; }
.pf-ed-hint { color: #9aa5a0; }
.pf-ed-sp { flex: 1; }
.pf-ed-bar button { all: unset; background: #1f2937; color: #fff; font: 600 .82rem/1 var(--font); padding: .5rem .8rem; border-radius: 8px; cursor: pointer; }
.pf-ed-bar button:hover { background: #374151; }
.pf-ed-bar button[disabled] { opacity: .4; cursor: not-allowed; }
.pf-ed-bar .pf-ed-primary { background: var(--emerald); color: #04241a; font-weight: 800; }
.pf-ed-panel {
  position: fixed; top: 52px; right: 16px; z-index: 9999; width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 1rem; font-size: .84rem;
}
.pf-ed-panel h4 { margin: .3rem 0 .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.pf-ed-panel label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.pf-ed-panel input[type=color] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; }
.pf-ed-panel select { flex: 1; max-width: 150px; font: inherit; font-size: .8rem; padding: .25rem; border: 1px solid var(--line); border-radius: 6px; }
body:has(.pf-ed-bar) .topbar { display: none; }

/* Antes × Depois */
.compare { padding: 1.2rem 0 4rem; }
.compare-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.compare-head h1 { margin: .2rem 0 0; font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.compare-tabs { display: flex; gap: .4rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.compare-tabs button { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 600; color: var(--text-soft); padding: .4rem .9rem; border-radius: 999px; cursor: pointer; }
.compare-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare-cols[data-mode="antes"] { grid-template-columns: 1fr; }
.compare-cols[data-mode="antes"] [data-side="depois"] { display: none; }
.compare-cols[data-mode="depois"] { grid-template-columns: 1fr; }
.compare-cols[data-mode="depois"] [data-side="antes"] { display: none; }
.compare-col { background: #dfe3e1; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.compare-lb { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-size: .78rem; font-weight: 800; letter-spacing: .04em; background: #fff; border-bottom: 1px solid var(--line); }
.compare-lb a { margin-left: auto; font-size: .78rem; }
.compare-lb .dot { width: 9px; height: 9px; border-radius: 50%; }
.compare-lb .dot.o { background: var(--danger); }
.compare-lb .dot.n { background: var(--emerald); }
.compare-col iframe, #compareOldWrap iframe { width: 100%; height: 74vh; border: 0; background: #fff; display: block; }
.compare-empty { height: 74vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 2rem; color: var(--text-soft); }
.compare-empty strong { color: var(--danger); font-size: 1.05rem; }

/* Impeccable QA report */
.qa-report { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--emerald); border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .86rem; }
.qa-report__head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.qa-dim { font-size: .76rem; font-weight: 600; color: var(--text-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.qa-fixes { color: var(--emerald-deep); margin: .5rem 0 0; font-size: .82rem; }
.qa-findings { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .82rem; color: var(--text-soft); }

@media (max-width: 900px) {
  .compare-cols { grid-template-columns: 1fr; }
  .compare-cols[data-mode="lado"] .compare-col iframe { height: 50vh; }
}

/* ========================================================================
   PIPELINE COMERCIAL  (Fase 3)
   ======================================================================== */
.kpis { grid-template-columns: repeat(9, 1fr); }
.pipeline-bar { display: flex; flex-wrap: wrap; gap: .3rem; }
.pipe { font: 600 .78rem/1 var(--font); border: 1px solid var(--line); background: #fff; color: var(--text-soft); border-radius: 999px; padding: .4rem .7rem; cursor: pointer; }
.pipe.done { color: var(--emerald-deep); border-color: #a7f3d0; background: #ecfdf5; }
.pipe.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cm-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0 .2rem; }
.cm-ok { font-size: .9rem; }
.cm-hist { margin-top: .8rem; font-size: .84rem; }
.cm-hist summary { cursor: pointer; font-weight: 600; color: var(--text-soft); }
.cm-hist ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--text-soft); }
#ldCommercial .panel { margin-top: 1.2rem; }
#cmProposalBox, #cmEmailBox, #cmContractBox, #cmDemoMsg { margin-top: .6rem; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* ========================================================================
   EXPERIÊNCIA COMPLETA (Task 4) — onboarding, dashboard, lead, config
   ======================================================================== */

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .82rem; color: var(--text-faint); padding-top: 1rem; padding-bottom: .2rem; }
.crumbs a { color: var(--text-soft); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--emerald-deep); }
.crumbs i { color: var(--line); font-style: normal; }
.crumbs span { color: var(--text); font-weight: 600; }

/* modal / onboarding */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11, 15, 14, .55); backdrop-filter: blur(3px); }
.modal__box { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-2); max-width: 620px; width: 100%; padding: clamp(1.5rem, 4vw, 2.4rem); max-height: 90vh; overflow-y: auto; }
.modal__x { position: absolute; top: .7rem; right: .9rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text-faint); }
.modal__x:hover { color: var(--ink); }
.ob-paths { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.2rem 0 1rem; }
.ob-path { text-align: left; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: .35rem; transition: border-color .15s, background .15s; }
.ob-path:hover { border-color: var(--emerald); background: #ecfdf5; }
.ob-path strong { font-size: .98rem; }
.ob-path span { font-size: .85rem; color: var(--text-soft); }
.ob-path em { font-size: .76rem; color: var(--text-faint); font-style: normal; }
.ob-hide { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-soft); }

/* dashboard */
.dash-hero { padding: 1.6rem 0 .5rem; }
.dash-hero__in { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.dash-hero h1 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem); margin: .3rem 0 .3rem; }
.dash-hero__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.dash-sections { margin-bottom: 3rem; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; align-items: start; }
.dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-1); }
.dash-panel h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: .7rem; display: flex; align-items: center; gap: .4rem; }
.dash-panel h3 b { color: var(--emerald-deep); }
.dash-lead { display: flex; flex-direction: column; padding: .5rem 0; border-top: 1px solid var(--line-2); text-decoration: none; }
.dash-lead:first-of-type { border-top: 0; }
.dash-lead__name { font-weight: 600; font-size: .9rem; color: var(--ink); }
.dash-lead__meta { font-size: .78rem; color: var(--text-soft); }
.dash-lead:hover .dash-lead__name { color: var(--emerald-deep); }
.dash-more { display: inline-block; margin-top: .6rem; font-size: .8rem; font-weight: 700; color: var(--emerald-deep); text-decoration: none; }

.empty-state { text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.4rem 1.5rem; margin-top: 1.2rem; }
.empty-state h3 { font-size: 1.1rem; }
.empty-state p { max-width: 44ch; margin: 0 auto 1rem; }

/* lead detail */
.lead-hd { margin: 1.2rem 0 1rem; }
.lead-hd h1 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); margin-bottom: .1rem; }
.lead-hd__badges { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0; }
.stage-badge { font-size: .74rem; font-weight: 800; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; }
.stage-badge--fechado { background: var(--emerald-deep); }
.stage-badge--perdido { background: var(--danger); }
.stage-track { height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; max-width: 420px; }
.stage-track span { display: block; height: 100%; background: var(--emerald); border-radius: 999px; transition: width .3s var(--ease); }
.lead-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.lead-secnav { display: flex; flex-wrap: wrap; gap: .3rem; position: sticky; top: 68px; z-index: 15; background: rgba(246, 247, 247, .92); backdrop-filter: blur(6px); padding: .5rem 0; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.lead-secnav a { font-size: .8rem; font-weight: 600; color: var(--text-soft); text-decoration: none; padding: .35rem .7rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.lead-secnav a:hover { color: var(--ink); border-color: var(--line); background: #fff; }
#view-lead .panel { scroll-margin-top: 120px; }
#view-lead .panel + .panel, #view-lead section + section { margin-top: 1.1rem; }
.site-embed, .redesign-thumb { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.site-embed iframe { width: 100%; height: 440px; border: 0; display: block; background: #f1f3f2; }
.redesign-row { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; align-items: start; }
.redesign-thumb { width: 100%; height: 220px; border: 1px solid var(--line); pointer-events: none; }
.hist-list { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.hist-list li { padding: .4rem 0; border-top: 1px solid var(--line-2); color: var(--text-soft); }
.hist-list li:first-child { border-top: 0; }
.hist-list span { color: var(--text-faint); font-variant-numeric: tabular-nums; margin-right: .4rem; }

/* config */
.cfg-savebar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1rem 0 1.4rem; }
.intg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; margin-top: 1rem; }
.intg-card { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius-sm); padding: .9rem 1rem; background: var(--bg); }
.intg-card--ok { border-left-color: var(--emerald); }
.intg-card--mid { border-left-color: var(--warn); }
.intg-card--off { border-left-color: var(--text-faint); }
.intg-card__hd { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.intg-card p { margin: .2rem 0 0; }
.intg-badge { font-size: .64rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.intg-card--ok .intg-badge { background: #ecfdf5; color: var(--emerald-deep); }
.intg-card--mid .intg-badge { background: #fffbeb; color: var(--warn); }
.intg-card--off .intg-badge { background: #f1f3f2; color: var(--text-soft); }

.chip--danger { color: var(--danger); border-color: #f3c9c4; }
.chip--danger:hover { border-color: var(--danger); background: #fef2f2; }
.mock-tag { position: absolute; top: .6rem; right: .6rem; font-size: .6rem; font-weight: 800; letter-spacing: .06em; background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; padding: 1px 6px; border-radius: 5px; }
.lead-card { position: relative; }

@media (max-width: 720px) {
  .ob-paths { grid-template-columns: 1fr; }
  .redesign-row { grid-template-columns: 1fr; }
  .redesign-thumb { height: 180px; }
  .lead-secnav { top: 60px; overflow-x: auto; flex-wrap: nowrap; }
  .dash-hero__in { flex-direction: column; }
  .dash-hero__actions .btn { flex: 1; }
  .site-embed iframe { height: 46vh; }
}
