/* ============================================================
   FUNIL ONBOARDING — LeadsGo
   Design system do fluxo de ativação de conta (trial).
   Visual limpo, focado em um objetivo por etapa.
   Layout 100dvh: a página não rola no desktop; cada área
   se adapta à altura da tela (o chat rola por dentro).
   ============================================================ */

/* ---------- 1. Variáveis de tema ---------- */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f0;
  --text: #131a26;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Identidade LeadsGo: azul escuro, azul, grafite, preto */
  --primary: #1a3484;
  --primary-hover: #2846be;
  --primary-soft: #eff6ff;
  --primary-contrast: #ffffff;
  --brand-dark: #081b33;
  --brand-ink: #0b1f3a;
  --brand-graphite: #334e6e;
  --brand-sky: #38bdf8;

  --success: #10b981;
  --success-soft: #ecfdf5;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --warning: #2563eb;
  --warning-soft: #eff6ff;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, .16);
  --transition: .2s ease;
  color-scheme: light;
}

/* Dark desativado no trial/público — sempre light (preferência do painel não vaza). */
[data-theme="dark"] {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f0;
  --text: #131a26;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --primary: #1a3484;
  --primary-hover: #2846be;
  --primary-soft: #eff6ff;
  --primary-contrast: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, .16);
  color-scheme: light;
}

/* ---------- 2. Reset e base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }

::selection { background: var(--primary); color: #fff; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- 3. Estrutura do funil (100dvh, sem rolagem de página) ---------- */
.funil {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Topo: logo + etapas */
.funil-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }

/* Indicador de etapas */
.funil-steps { display: flex; align-items: center; gap: 8px; }
.fstep {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}
.fstep .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  transition: all var(--transition);
}
.fstep .dot .icon { width: 13px; height: 13px; display: none; }
.fstep.active { color: var(--primary); }
.fstep.active .dot {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.fstep.done { color: var(--text-muted); }
.fstep.done .dot {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}
.fstep.done .dot .num { display: none; }
.fstep.done .dot .icon { display: block; }
.fstep-line { width: 34px; height: 1.5px; background: var(--border); flex-shrink: 0; }

/* Área central: rola por dentro só quando não cabe */
.funil-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  padding: 8px 20px 22px;
}
.funil-wrap {
  width: 100%;
  max-width: 560px;
  margin: auto; /* centraliza verticalmente quando há espaço */
  animation: rise .45s ease both;
}
.funil-wrap.wide { max-width: 760px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Cabeçalho da etapa */
.step-head { text-align: center; margin-bottom: 16px; }
.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.step-head h1 { font-size: clamp(22px, 3.5vw, 27px); margin-bottom: 8px; }
.step-head p {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 520px;
  margin: 0 auto;
}
.step-head p strong { color: var(--text); font-weight: 600; }

/* ---------- 4. Card ---------- */
.funil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px 24px 20px;
}

/* ---------- 5. Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .45);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .5); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-soft); }

.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 15.5px; border-radius: 13px; }

/* Botão Google */
.btn-google {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.btn-google:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-soft); }
.btn-google .g-logo { width: 19px; height: 19px; }

/* Link de voltar */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 15px; height: 15px; }

/* ---------- 6. Formulários ---------- */
.field { margin-bottom: 13px; }
.form-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
}
.field label .opcional {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 9px;
  border-radius: 99px;
}

.input-wrap { position: relative; }
.input-wrap > .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-soft);
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap .input { padding-left: 44px; }
.input::placeholder { color: var(--text-soft); }
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-soft);
}

textarea.input { resize: vertical; min-height: 96px; line-height: 1.6; }

/* Estados de validação */
.field.invalid .input { border-color: var(--danger); }
.field.invalid .input:focus { box-shadow: 0 0 0 3.5px var(--danger-soft); }
.field.valid .input { border-color: var(--success); }
.field.valid .input:focus { box-shadow: 0 0 0 3.5px var(--success-soft); }

.check-ico {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px; height: 19px;
  color: var(--success);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.field.valid .check-ico { opacity: 1; }
.field.valid .input { padding-right: 42px; }

.msg-error, .msg-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  margin-top: 6px;
  line-height: 1.45;
}
.msg-error { color: var(--danger); display: none; }
.field.invalid .msg-error { display: flex; }
.field.invalid .msg-hint { display: none; }
.msg-hint { color: var(--text-soft); }
.msg-error .icon, .msg-hint .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* Contador do textarea */
.counter { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.counter.ok { color: var(--success); font-weight: 600; }

/* Força da senha */
.pass-meter { display: flex; gap: 6px; margin-top: 9px; }
.pass-meter i {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--border);
  transition: background var(--transition);
}
.pass-meter[data-forca="1"] i:nth-child(1) { background: var(--danger); }
.pass-meter[data-forca="2"] i:nth-child(-n+2) { background: var(--warning); }
.pass-meter[data-forca="3"] i:nth-child(-n+3) { background: var(--success); }
.pass-meter[data-forca="4"] i { background: var(--success); }
.pass-label { font-size: 12px; font-weight: 600; margin-top: 5px; color: var(--text-soft); min-height: 16px; }
.pass-label.fraca { color: var(--danger); }
.pass-label.media { color: var(--warning); }
.pass-label.forte { color: var(--success); }

/* Olho (mostrar senha) */
.eye-btn {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-soft);
  transition: all var(--transition);
}
.eye-btn:hover { color: var(--text); background: var(--surface-2); }
.eye-btn .icon { width: 17px; height: 17px; }
.eye-btn .ico-off { display: none; }
.eye-btn.showing .ico-on { display: none; }
.eye-btn.showing .ico-off { display: block; }
.has-eye .input { padding-right: 48px; }
.has-eye.field.valid .input { padding-right: 74px; }
.has-eye .check-ico { right: 47px; }

/* Checkbox de termos */
.field label.terms, .terms {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
  margin-bottom: 0;
}
.terms input { accent-color: var(--primary); width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.terms a { color: var(--primary); font-weight: 600; }
.terms a:hover { text-decoration: underline; }
.field.invalid .terms { color: var(--danger); }

/* Divisor "ou" */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Selo de segurança / garantias */
.safe-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-soft);
  font-weight: 500;
}
.safe-row .icon { width: 14px; height: 14px; color: var(--success); }
.safe-row .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }

/* Rodapé do card */
.funil-footer { text-align: center; margin-top: 12px; font-size: 13.5px; color: var(--text-muted); }
.funil-footer a { color: var(--primary); font-weight: 600; }
.funil-footer a:hover { text-decoration: underline; }

/* ---------- 7. Fase: perguntas da IA ---------- */
.fase { animation: rise .4s ease both; }

.empresa-resumo {
  margin: 0 0 14px;
  padding: 16px 18px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: left;
}
.empresa-resumo-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.empresa-resumo-nome {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 6px;
}
.empresa-resumo-texto {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}
.empresa-resumo-fontes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.empresa-resumo-fontes .fontes-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-right: 2px;
}
.fonte-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  cursor: default;
}
.fonte-chip .fonte-ico {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.fonte-chip.on {
  color: var(--text);
  border-color: var(--border);
  background: var(--success-soft);
}
.fonte-chip.on .fonte-ico {
  background: var(--success);
  color: #fff;
}
.fonte-chip.on .fonte-ico::before { content: '✓'; }
.fonte-chip.off {
  color: var(--text-soft);
  border-color: var(--border);
  background: var(--surface);
  opacity: .92;
}
.fonte-chip.off .fonte-ico {
  background: var(--text-soft);
  color: #fff;
}
.fonte-chip.off .fonte-ico::before { content: '✕'; }
.fonte-chip.skip {
  display: none;
}

.q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.q-num {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
}
.q-dots { display: flex; gap: 6px; }
.q-dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}
.q-dots i.on { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.q-dots i.done { background: var(--success); }

.q-titulo { font-size: 18.5px; line-height: 1.35; margin-bottom: 16px; }

.q-options { display: flex; flex-direction: column; gap: 9px; }
.q-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  transition: all .18s ease;
}
.q-option .o-dot {
  width: 19px; height: 19px;
  border-radius: 5px;
  border: 2px solid var(--text-soft);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all .18s ease;
}
.q-option .o-dot::after {
  content: '';
  width: 10px; height: 6px;
  border-radius: 0;
  border: solid transparent;
  border-width: 0 0 2px 2px;
  background: transparent;
  transform: rotate(-45deg) translate(1px, -1px);
  transition: all .18s ease;
}
.q-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.q-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.q-option.selected .o-dot {
  border-color: var(--primary);
  background: var(--primary);
}
.q-option.selected .o-dot::after {
  background: transparent;
  border-color: #fff;
}
.q-options.travado .q-option { pointer-events: none; }
.q-options.travado .q-option:not(.selected) { opacity: .55; }

.q-hint {
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--muted, var(--text-soft));
  line-height: 1.45;
}
.q-continuar {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}
.q-continuar:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.q-form { display: flex; gap: 10px; }
.q-form .input { flex: 1; border-radius: 99px; padding-left: 18px; }

.q-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 16px;
  text-align: center;
}
.q-note .icon { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------- 8. Fase: treinamento ---------- */
.treino-card { text-align: center; padding: 30px 30px 26px; }

.orb {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
  position: relative;
  margin: 0 auto;
}
.orb .icon { width: 32px; height: 32px; }
.orb::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2.5px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.treino-card > strong { display: block; font-size: 17px; margin-top: 20px; }
.t-status-ctx {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.82;
  margin-top: 6px;
}
.t-status {
  font-size: 13.5px;
  color: var(--text-muted);
  min-height: 38px;
  margin-top: 6px;
  line-height: 1.45;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  transition: opacity 0.2s ease;
}
.t-bar {
  width: 230px;
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
  margin: 16px auto 0;
}
.t-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--primary);
  transition: width .8s ease;
}

.t-checks {
  margin: 22px auto 0;
  display: inline-flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  list-style: none;
}
.t-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-soft);
  transition: color .3s ease;
}
.t-checks .icon { width: 17px; height: 17px; color: var(--border); transition: color .3s ease; }
.t-checks li.on { color: var(--text); font-weight: 600; }
.t-checks li.on .icon { color: var(--success); }

/* ---------- 8.5 Tela: análise do negócio ---------- */
.analise-card { padding: 24px 24px 22px; }

/* "Documento" da empresa sendo varrido pela IA */
.doc-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 17px;
  text-align: left;
}
.doc-head { display: flex; align-items: center; gap: 11px; }
.doc-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.doc-ico .icon { width: 18px; height: 18px; }
.doc-head strong { display: block; font-size: 14.5px; }
.doc-site {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.doc-site .icon { width: 13px; height: 13px; }
.doc-sobre {
  margin-top: 11px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Faixa de "scan" descendo pelo documento */
.scan-band {
  position: absolute;
  left: 0; right: 0;
  height: 46px;
  top: -60px;
  background: linear-gradient(to bottom, transparent, var(--primary-soft) 42%, var(--primary-soft) 58%, transparent);
  border-bottom: 1.5px solid var(--primary);
  opacity: .85;
  animation: scanDown 1.7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanDown {
  0%   { top: -60px; }
  100% { top: 115%; }
}

/* Status da análise */
.a-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  min-height: 20px;
}
.a-status .spinner.dark { width: 14px; height: 14px; }

/* Descobertas (chips que aparecem em etapas) */
.a-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.a-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: all .35s ease;
}
.a-chip .icon { width: 12px; height: 12px; }
.a-chip.on {
  opacity: 1;
  transform: none;
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}

/* ---------- 9. Fase: chat (altura adaptativa, sem rolar a página) ---------- */
.funil-main.chat-mode { padding-top: 6px; padding-bottom: 16px; }
.funil-main.chat-mode .funil-wrap {
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.funil-main.chat-mode .back-link,
.funil-main.chat-mode .step-tag { display: none !important; }
.funil-main.chat-mode .step-head { margin-bottom: 8px; }
.funil-main.chat-mode .step-head h1 { font-size: clamp(21px, 3vw, 26px); }
.funil-main.chat-mode .step-head p { display: none; }
.funil-main.chat-mode .chat-body { min-height: 280px; }

.cta-bar {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.cta-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-soft);
  margin-bottom: 12px;
  text-align: center;
  flex-shrink: 0;
}
.cta-note .icon { width: 14px; height: 14px; flex-shrink: 0; }

#faseChat { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.chat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.chat-head strong { display: block; font-size: 14.5px; }
.chat-head .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.chat-head .status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.chat-badge {
  margin-left: auto;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

.chat-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
  min-height: 130px;
  overflow-y: auto;
  background: var(--surface-2);
}
.chat-body::-webkit-scrollbar { width: 8px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

.msg { display: flex; gap: 9px; max-width: 86%; animation: msgIn .3s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg .mini-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  overflow: hidden;
}
.msg .mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.bubble {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.msg.ia { align-self: flex-start; }
.msg.ia + .msg.ia { margin-top: -6px; }
.msg.ia-seq .mini-avatar--spacer { visibility: hidden; pointer-events: none; }
.msg.ia .bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
}
.msg.eu { align-self: flex-end; }
.msg.eu .bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }

/* Digitando... */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-soft);
  animation: bounce 1.1s infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: none; opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Caixa de entrada do chat */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.chat-input input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: 14.5px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.chat-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chat-input input::placeholder { color: var(--text-soft); }
.send-btn {
  width: 45px; height: 45px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .45);
}
.send-btn:hover { background: var(--primary-hover); transform: scale(1.05); }
.send-btn .icon { width: 19px; height: 19px; margin-left: -2px; }

/* ---------- 10. Sucesso (bem-vindo) ---------- */
.success-orb {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
  margin: 4px auto 20px;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.success-orb .icon { width: 38px; height: 38px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.next-steps { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; text-align: left; }
.next-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.next-item .n-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.next-item .n-ico .icon { width: 18px; height: 18px; }
.next-item strong { display: block; font-size: 14px; }
.next-item span { font-size: 12.5px; color: var(--text-muted); }
.next-item .n-num {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ---------- 11. Spinner do botão ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner.dark { border-color: var(--border); border-top-color: var(--primary); }

/* ---------- 12. Responsivo ---------- */
@media (max-width: 640px) {
  .funil-top { padding: 12px 18px; }
  .brand span { display: none; }
  .fstep .lbl { display: none; }
  .fstep.active .lbl { display: inline; }
  .fstep-line { width: 22px; }

  .funil-main { padding: 8px 14px 18px; }
  .funil-main.chat-mode { padding: 4px 12px 12px; }
  .funil-card { padding: 20px 16px 16px; }
  .form-duo { grid-template-columns: 1fr; gap: 0; }

  .cta-bar { grid-template-columns: 1fr; }
  .msg { max-width: 94%; }
  .btn { white-space: normal; text-align: center; }
  .q-titulo { font-size: 17px; }
}


/* Brand wordmark */
.brand img.brand-logo-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
}
.brand span:not(.sr-only) { display: none; }
