/* ============================================================
   RampFlow — Design tokens
   Paleta: roxo da marca (extraído do logo) como único acento,
   fundo neutro quente (estilo Claude), tipografia serif no
   título de saudação + sans-serif no restante da interface.
   ============================================================ */

:root {
  --purple-900: #3E1670;
  --purple-700: #5B21B6; /* cor de marca extraída do logo */
  --purple-500: #7C4DDC;
  --purple-200: #DCD3FE;
  --purple-100: #EFE9FD;
  --purple-050: #F7F4FE;

  --ink: #1C1B1F;
  --ink-soft: #55534F;
  --ink-faint: #8B887F;

  --paper: #FAF8F4;
  --surface: #FFFFFF;
  --border: #E8E4DB;
  --border-soft: #F0EDE5;

  --danger: #A3271E;
  --danger-bg: #FBEDEB;
  --success: #2F6E4B;
  --success-bg: #EBF5EF;
  --warn: #B5690A; /* laranjado discreto — usado só no card de Alerta de erros do admin */
  --warn-bg: #FBF1E4;

  /* Acento verde-lima — usado com moderação nas páginas institucionais,
     pra dar mais vida aos CTAs principais sem abandonar o roxo da marca. */
  --lime: #C4F135;
  --lime-dark: #9FCB1E;
  --lime-ink: #263300;
  --lime-text: #5E7A00; /* variante escura, usada como cor de texto (contraste em fundo claro) */

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(28, 27, 31, 0.06);
  --shadow-md: 0 4px 16px rgba(28, 27, 31, 0.08);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  /* Fonte usada nas páginas institucionais (landing, "Conheça o RampFlow",
     "Plataforma") — mesma família adotada pelo n8n no site deles. */
  --font-lp: 'Geist', 'Geist Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 12px; color: var(--ink-soft); }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--purple-700);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-900); }
.btn-primary:disabled { background: var(--ink-faint); cursor: not-allowed; }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--ink-faint); }

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

.btn-lime {
  background: var(--lime);
  color: var(--lime-ink);
}
.btn-lime:hover { background: var(--lime-dark); }

.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 15px; }

/* ---------- Formulários ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field { margin-bottom: 18px; }
.field small.help {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-100);
}
textarea { resize: vertical; min-height: 90px; }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ============================================================
   Telas de autenticação (landing, login, signup, "começar")
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.brand-mark img { width: 32px; height: 32px; border-radius: 8px; }
.brand-mark span {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.auth-card h1 { font-size: 20px; }
.auth-card .sub { font-size: 13.5px; margin-bottom: 22px; }

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.auth-switch a { color: var(--purple-700); font-weight: 500; }

/* .landing-page (marketing homepage) rules now live in the
   "Landing page (redesign 19/08)" block near the end of this file. */

.comecar-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.comecar-page .logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 24px; }
.comecar-page h1 { font-family: var(--font-display); font-size: 28px; font-weight: 500; max-width: 520px; }
.comecar-page h1.welcome-greeting { font-weight: 700; }
.comecar-page p { max-width: 460px; margin-bottom: 28px; }
.link-saiba-mais {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-block;
}
.link-saiba-mais:hover { color: var(--ink); }
/* Dentro da barra de ações do CSV (obs2, 19/08) o link fica lado a lado
   com os botões, sem a margem superior pensada pra tela de boas-vindas. */
.report-page .link-saiba-mais { margin-top: 0; }

/* ============================================================
   Shell do painel (sidebar + área principal)
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 4px;
}
.sidebar .brand img { width: 26px; height: 26px; border-radius: 7px; }
.sidebar .brand span { font-weight: 600; font-size: 15px; }

.sidebar .brand-company {
  /* Pedido do Cristopher (21/08, reforçado depois): nome da empresa com um
     selo verde-lima discreto em TODAS as telas (a `companyName` já vem
     global de `attachUser`/`res.locals`, herdada por qualquer
     `include('partials/sidebar', ...)` mesmo quando a chamada não repassa
     essa variável explicitamente — conferido renderizando a página
     inteira, não só o partial isolado). O selo em si estava correto, só
     baixo demais de opacidade (14%) pra ler como "lime" numa tela normal —
     aumentado um pouco e com uma borda fina da mesma cor, ainda discreto,
     mas inequívoco. */
  margin: 0 10px 16px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lime-text);
  background: rgba(196, 241, 53, 0.24);
  border: 1px solid rgba(159, 203, 30, 0.45);
  border-radius: 6px;
  display: inline-block;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.sidebar .nav-item:hover { background: var(--border-soft); color: var(--ink); }
.sidebar .nav-item.active { background: var(--purple-100); color: var(--purple-900); }
.sidebar .nav-item .icon { width: 18px; text-align: center; opacity: 0.85; }
.sidebar .nav-item-badge { margin-left: auto; font-size: 11px; opacity: 0.75; }

.sidebar .nav-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 12px 4px;
}

.sidebar .user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  margin-top: 10px;
}
.sidebar .user-box .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--purple-700); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.sidebar .user-box .who { min-width: 0; }
.sidebar .user-box .who .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-box .who .email { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar form.sair-form { margin-top: 4px; }
.sidebar .nav-item.button-like { width: 100%; background: none; border: none; text-align: left; cursor: pointer; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main-header {
  display: none;
}

.main-content {
  flex: 1;
  padding: 32px 40px 60px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.page-title { margin-bottom: 4px; }
.page-sub { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 28px; }

/* ---------- Tela central de criação de campanha (chat) ---------- */

.chat-hero {
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.chat-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  margin-bottom: 6px;
}
.chat-hero .hint { color: var(--ink-faint); font-size: 14px; margin-bottom: 30px; }

/* Aviso de boas-vindas, só pra quem ainda não tem nenhuma campanha (nem
   rascunho) — pedido do Cristopher, 22/08, ver checklist item 4.21. */
.first-campaign-banner {
  background: var(--lime);
  color: var(--lime-ink);
  border-radius: 14px;
  padding: 14px 24px;
  margin-bottom: 22px;
  max-width: 520px;
}
.first-campaign-banner-title { font-weight: 700; font-size: 16px; }
.first-campaign-banner-sub { font-size: 13.5px; margin: 4px 0 0; color: var(--lime-ink); opacity: 0.85; }

.chat-box {
  width: 100%;
  max-width: 640px;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow-sm);
}
.chat-input-row textarea {
  border: none;
  padding: 8px 0;
  min-height: 24px;
  max-height: 160px;
  resize: none;
  box-shadow: none !important;
}
.chat-input-row textarea:focus { box-shadow: none; }
.chat-send-btn {
  background: var(--purple-700);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-send-btn:disabled { background: var(--border); cursor: not-allowed; }

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--ink-soft);
}
.chip:hover { border-color: var(--purple-500); color: var(--purple-900); background: var(--purple-050); }

/* ---------- Barra fixa com as escolhas já feitas no chat ---------- */

.choices-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--paper);
  padding: 10px 0;
}
.choices-bar .choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.choices-bar .choice-pill strong { color: var(--ink); font-weight: 600; }

/* ---------- Conversa em andamento ---------- */

.chat-thread {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.bubble {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.5;
}
.bubble-bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--ink);
}
.bubble-user {
  align-self: flex-end;
  background: var(--purple-700);
  color: #fff;
}

.chat-thread-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
}

/* ---------- Cards genéricos ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 18px;
}
.card h2 { font-size: 16px; }

.option-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option-card:hover { border-color: var(--purple-500); background: var(--purple-050); }
.option-card .opt-title { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.option-card .opt-desc { font-size: 13px; color: var(--ink-faint); margin: 0; }
.option-card input[type="radio"] { display: none; }
.option-card.selected { border-color: var(--purple-700); background: var(--purple-050); box-shadow: 0 0 0 1px var(--purple-700); }

/* ---------- Tabela / lista de campanhas ---------- */

.campaign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--surface);
}
.campaign-row .meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.status-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-rascunho { background: var(--border-soft); color: var(--ink-soft); }
/* Pedido do Cristopher (21/08): status das campanhas em "Minhas campanhas"
   com o mesmo verde-lima discreto do selo da empresa na sidebar — troca o
   roxo/verde-sucesso antigos por um único tom lime suave pros estados
   normais do fluxo (pronta / conectada / publicada). Estados de erro ou que
   precisam de revisão continuam com `.status-rascunho` (cinza), de
   propósito — verde ali passaria a ideia errada de "tudo certo". */
.status-aguardando,
.status-conectado {
  background: rgba(196, 241, 53, 0.16);
  color: var(--lime-text);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-faint);
}

/* ---------- Geração da campanha (loading) ---------- */

.gerando-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gerando-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--purple-100);
  border-top-color: var(--purple-700);
  animation: rf-spin 0.8s linear infinite;
  margin-bottom: 24px;
}
@keyframes rf-spin {
  to { transform: rotate(360deg); }
}

.progress-track {
  width: 100%;
  max-width: 360px;
  height: 8px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
  margin-top: 22px;
}
.progress-fill {
  height: 100%;
  background: var(--purple-700);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-pct {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-weight: 600;
}

/* Card "o que você me contou" ao lado da tela de loading (pedido do
   Cristopher, 23/08) — reaproveita a mesma animação de flutuação leve
   (hv-float) já usada no card da landing page, pra manter consistência
   visual em vez de inventar uma animação nova. */
.gerando-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.gerando-layout .gerando-wrap {
  flex: 1 1 360px;
}
.gerando-resumo-card {
  flex: 0 1 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  animation: hv-float 5s ease-in-out infinite;
}
.gerando-resumo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.gerando-resumo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(196, 241, 53, 0.25);
}
.gerando-resumo-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gerando-resumo-item dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.gerando-resumo-item dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 820px) {
  .gerando-layout { flex-direction: column-reverse; gap: 28px; }
  .gerando-wrap { min-height: auto !important; }
  .gerando-resumo-card { width: 100%; flex-basis: auto; animation: none; }
}

/* ---------- Popup de upsell/upgrade (créditos esgotados) ---------- */

.upsell-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 31, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.upsell-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(28, 27, 31, 0.25);
}
.upsell-modal h2 { margin-bottom: 4px; font-size: 20px; }
.upsell-sub { color: var(--ink-soft); margin-bottom: 18px; }
.upsell-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
}
.upsell-close:hover { color: var(--ink); }

.upsell-avulso {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--purple-050);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.upsell-avulso-title { font-weight: 600; font-size: 14.5px; }
.upsell-avulso-desc { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

.upsell-divider {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 4px 0 16px;
  position: relative;
}

.upsell-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.upsell-plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
}
.upsell-plan-card.destaque {
  /* Pedido do Cristopher (21/08): mesmo acento verde-lima discreto usado
     no plano em destaque da landing page (ver .lp-price-card.lp-destaque),
     em vez do roxo que estava aqui antes. */
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 1px var(--lime-dark);
  background: rgba(196, 241, 53, 0.06);
}
.upsell-plan-name { font-weight: 600; font-size: 13.5px; }
.upsell-plan-price { font-weight: 700; font-size: 16px; color: var(--purple-700); margin: 4px 0 2px; }
.upsell-plan-credits { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 6px; }
.upsell-plan-desc { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 12px; min-height: 44px; }

.upsell-note { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 0; }

@media (max-width: 640px) {
  .upsell-plans { grid-template-columns: 1fr; }
  .upsell-avulso { flex-direction: column; align-items: flex-start; }
}

/* ---------- Resultado da campanha (visualizador paginado) ---------- */

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.report-toolbar-title { font-weight: 700; font-size: 16px; }
.report-toolbar-sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

.report-viewer {
  position: relative;
  padding: 0 52px 44px;
}

.report-pages .report-page {
  min-height: 360px;
}

.report-nav-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.report-nav-btn:hover:not(:disabled) { border-color: var(--purple-500); color: var(--purple-700); }
.report-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.report-nav-left { left: 0; }
.report-nav-right { right: 0; }

.report-pager {
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .report-viewer { padding: 0 8px 44px; }
  .report-nav-btn { position: static; transform: none; margin: 0 6px; }
}

/* ---------- Resultado da campanha ---------- */

.result-banner {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-500));
  color: #fff;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}
.result-banner .rb-title { font-weight: 700; font-size: 18px; }
.result-banner .rb-sub { opacity: 0.85; font-size: 13.5px; margin-top: 3px; }

.consultant-md h2 { font-size: 15px; margin-top: 20px; color: var(--purple-900); }
.consultant-md h2:first-child { margin-top: 0; }
.consultant-md h3 { font-size: 13.5px; margin-top: 16px; color: var(--ink); }
.consultant-md p { font-size: 14px; }
.consultant-md li { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.consultant-md strong { color: var(--ink); }
.consultant-md hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.consultant-md blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--purple-500);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}
.consultant-md table.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.consultant-md table.md-table th,
.consultant-md table.md-table td {
  border: 1px solid var(--border);
  padding: 7px 10px;
  text-align: left;
}
.consultant-md table.md-table th {
  background: var(--surface);
  color: var(--purple-900);
  font-weight: 600;
}
.consultant-md table.md-table td { color: var(--ink-soft); }

.keyword-pill {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  margin: 0 6px 6px 0;
  color: var(--ink-soft);
  background: var(--surface);
}

.issue-list { margin: 0; padding-left: 20px; }
.issue-list li { font-size: 13.5px; color: var(--danger); margin-bottom: 6px; }

/* ---------- Orientações ---------- */

.glossary-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.glossary-item:last-child { border-bottom: none; }
.glossary-item .termo { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; color: var(--purple-900); }

.tag-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin: 30px 0 4px;
}
.tag-section-title:first-of-type { margin-top: 0; }

ul.simple-list, ol.simple-list { margin: 0; padding-left: 20px; }
ul.simple-list li, ol.simple-list li { margin-bottom: 8px; color: var(--ink-soft); font-size: 14px; }

/* ---------- Responsivo (rápido, para telas menores) ---------- */

@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar .brand { padding: 6px 10px; }
  .sidebar nav { flex-direction: row; }
  .sidebar .user-box, .nav-divider { display: none; }
  .main-content { padding: 22px 18px 40px; }
}

/* ============================================================
   Landing page (redesign 19/08) — página institucional/marketing
   Estrutura: header fixo com âncoras > hero > sobre > plataforma
   > soluções > preços > FAQ > footer. Página única, sem imagens
   externas (composição visual feita só com CSS/SVG inline).
   ============================================================ */

html { scroll-behavior: smooth; }

.lp { background: var(--paper); color: var(--ink); font-family: var(--font-lp); }
.lp section { scroll-margin-top: 76px; }
.lp-nav a.is-active { color: var(--purple-900); background: var(--purple-050); }

.lp-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.lp-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.lp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; margin-right: auto; }
.lp-logo img { width: 30px; height: 30px; border-radius: 8px; }
.lp-nav { display: flex; align-items: center; gap: 6px; }
.lp-nav a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.lp-nav a:hover { background: var(--purple-050); color: var(--purple-900); }
.lp-header-actions { display: flex; align-items: center; gap: 10px; }
.lp-header-actions .btn { padding: 9px 16px; font-size: 13.5px; }

/* ---------- Hero ---------- */
/* Preenche a altura da tela abaixo do header fixo (como no Claude): o
   header aparece, o hero ocupa o resto da tela, e só ao rolar é que
   aparece a seção de Preços. Restrito a telas maiores (ver media query
   de 980px mais abaixo) pra não forçar altura artificial no mobile. */

.lp-hero { padding: 32px 28px; overflow: hidden; }
.lp-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 981px) {
  .lp-hero { min-height: calc(100vh - 68px); display: flex; align-items: center; }
  .lp-hero-inner { width: 100%; }
}
.lp-hero-copy .lp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--purple-700);
  background: var(--purple-100);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.lp-hero-copy h1 { font-family: var(--font-lp); font-size: 45px; line-height: 1.12; font-weight: 600; max-width: 640px; margin-bottom: 20px; }
.lp-hero-copy p.lead { max-width: 540px; font-size: 17px; line-height: 1.62; margin-bottom: 30px; }
.lp-hero-copy .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lp-hero-note { display: block; margin-top: 16px; font-size: 12.5px; color: var(--ink-faint); }

.hero-visual { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; }
.hv-blob { position: absolute; border-radius: 50%; filter: blur(38px); opacity: 0.55; }
.hv-blob-1 { width: 260px; height: 260px; background: var(--purple-200); top: -30px; left: -20px; }
.hv-blob-2 { width: 220px; height: 220px; background: var(--purple-100); bottom: -20px; right: -10px; }

.hv-card {
  position: relative;
  z-index: 2;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px;
  animation: hv-float 5s ease-in-out infinite;
}
@keyframes hv-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hv-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.hv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.hv-card-title { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ink-faint); }

.hv-chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.hv-bubble { font-size: 12.5px; line-height: 1.4; padding: 8px 11px; border-radius: 12px; max-width: 88%; }
.hv-bubble-bot { background: var(--purple-050); color: var(--ink-soft); border-bottom-left-radius: 4px; align-self: flex-start; }
.hv-bubble-user { background: var(--purple-700); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }

.hv-metrics { display: flex; justify-content: space-between; border-top: 1px solid var(--border-soft); padding-top: 12px; margin-bottom: 12px; }
.hv-metric { display: flex; flex-direction: column; gap: 2px; }
.hv-metric-value { font-family: var(--font-lp); font-size: 16px; font-weight: 600; color: var(--ink); }
.hv-metric-value.hv-metric-lime { color: var(--lime-text); }
.hv-metric-label { font-size: 10.5px; color: var(--ink-faint); }

.hv-progress { height: 5px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.hv-progress-fill { display: block; height: 100%; width: 78%; border-radius: 999px; background: linear-gradient(90deg, var(--purple-500), var(--purple-700)); }

.hv-orbit { position: absolute; inset: 0; z-index: 1; animation: hv-spin 26s linear infinite; }
@keyframes hv-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.hv-node {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-sm);
  animation: hv-counter-spin 26s linear infinite;
}
@keyframes hv-counter-spin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.hv-node-google { top: 6%; left: 48%; background: var(--purple-700); }
.hv-node-meta { top: 62%; left: 4%; background: var(--purple-500); }
.hv-node-ia { top: 68%; left: 82%; background: var(--lime); color: var(--lime-ink); }

/* ---------- Seções genéricas ---------- */

.lp-section { padding: 68px 28px; border-top: 1px solid var(--border-soft); }
.lp-section.lp-alt { background: var(--surface); }
.lp-section-inner { max-width: 1180px; margin: 0 auto; }
.lp-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--purple-700); margin-bottom: 10px; }
.lp-section-title { font-family: var(--font-lp); font-size: 28px; font-weight: 600; max-width: 640px; margin-bottom: 14px; }
.lp-title-lg { font-size: 34px; max-width: 760px; }
.lp-section-lead { font-size: 15px; line-height: 1.7; max-width: 720px; color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- Páginas legais (Privacidade / Termos de uso) ----------
   Criadas em 21/08 como pré-requisito pra verificação do OAuth do
   Google (a tela de "app não verificado" só sai depois da RampFlow
   ter política de privacidade e termos publicados, hospedados no
   domínio verificado e linkados no app). Layout mais estreito que o
   das outras lp-section pra ficar confortável de ler texto corrido. */
.lp-legal { max-width: 760px; margin: 0 auto; }
.lp-legal-updated { font-size: 13px; color: var(--ink-faint); margin-bottom: 28px; }
.lp-legal h2 { font-size: 20px; margin-top: 36px; margin-bottom: 10px; }
.lp-legal h2:first-of-type { margin-top: 0; }
.lp-legal h3 { font-size: 15.5px; margin-top: 20px; margin-bottom: 8px; }
.lp-legal p { font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 12px; }
.lp-legal ul { margin: 0 0 14px; padding-left: 20px; }
.lp-legal li { font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 6px; }
.lp-legal strong { color: var(--ink); }
.lp-legal a { color: var(--purple-700); }

/* ---------- Sobre ---------- */

.lp-sobre-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; margin-top: 32px; align-items: start; }
.lp-sobre-text h3 { font-size: 16px; font-weight: 600; margin: 26px 0 8px; }
.lp-sobre-text p { font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.lp-sobre-text .lp-callout {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--purple-050);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--purple-900);
  line-height: 1.6;
}
.lp-stat-cards { display: flex; flex-direction: column; gap: 14px; }
.lp-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.lp-stat-card .lp-stat-value { font-family: var(--font-lp); font-size: 21px; font-weight: 600; color: var(--purple-900); }
.lp-stat-card .lp-stat-label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Plataforma ---------- */

.lp-platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.lp-platform-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lp-platform-card:hover { border-color: var(--purple-500); transform: translateY(-2px); }
.lp-platform-card .lp-card-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--purple-100); color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.lp-platform-card h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 8px; }
.lp-platform-card p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 0; }
.lp-platform-card .lp-card-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--purple-700); }

/* ---------- Soluções ---------- */

.lp-solucoes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.lp-solution-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.lp-solution-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.lp-solution-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; background: var(--purple-100); color: var(--purple-700); }
.lp-solution-badge.lp-badge-soon { background: var(--border-soft); color: var(--ink-faint); }
.lp-solution-card > p.lp-solution-lead { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }
.lp-solution-card ul.simple-list { margin-top: 8px; }
.lp-solution-card ul.simple-list li strong { color: var(--ink); }

/* ---------- Preços ---------- */

.lp-pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; align-items: stretch; }
.lp-price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.lp-price-card.lp-destaque { border: 2px solid var(--purple-700); box-shadow: var(--shadow-md); transform: translateY(-6px); }
.lp-price-badge {
  position: absolute; top: -13px; left: 24px;
  background: var(--purple-700); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 999px;
}
.lp-price-name { font-size: 14px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 10px; }
.lp-price-value { font-family: var(--font-lp); font-size: 30px; font-weight: 600; color: var(--ink); }
.lp-price-value .lp-price-suffix { font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; color: var(--ink-faint); margin-left: 4px; }
.lp-price-credits { font-size: 13px; color: var(--purple-700); font-weight: 600; margin: 6px 0 14px; }
.lp-price-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 18px; }
.lp-price-features { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.lp-price-features li { font-size: 13px; color: var(--ink-soft); padding-left: 20px; position: relative; }
.lp-price-features li::before { content: '✓'; position: absolute; left: 0; color: var(--lime-text); font-weight: 700; }
.lp-price-card .btn { width: 100%; text-align: center; }
.lp-avulso-note {
  margin-top: 26px;
  padding: 16px 20px;
  background: var(--purple-050);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--purple-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.lp-compare-note { margin-top: 18px; font-size: 13px; color: var(--ink-faint); }
.lp-compare-note a { color: var(--purple-700); font-weight: 600; text-decoration: none; }
.lp-compare-note a:hover { text-decoration: underline; }

/* ---------- Página institucional simples (Conheça / Plataforma) ---------- */

.lp-hero-simple { padding-top: 56px; padding-bottom: 12px; border-top: none; }

/* ---------- Tabela comparativa (Conheça o RampFlow) ---------- */

.lp-compare-table-wrap { margin-top: 28px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.lp-compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.lp-compare-table th, .lp-compare-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.lp-compare-table th { font-weight: 700; color: var(--ink-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; background: var(--paper); }
.lp-compare-table td:first-child { font-weight: 600; color: var(--ink); }
.lp-compare-table tbody tr:last-child td { border-bottom: none; }
.lp-compare-table tbody tr td:nth-child(4) { color: var(--purple-900); font-weight: 600; }

/* ---------- FAQ ---------- */

.lp-faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.lp-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 20px; }
.lp-faq-item summary { cursor: pointer; padding: 16px 0; font-size: 15px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--purple-700); flex-shrink: 0; }
.lp-faq-item[open] summary::after { content: '–'; }
.lp-faq-item p { font-size: 14px; line-height: 1.7; color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

/* ---------- Footer ---------- */

.lp-footer { padding: 40px 28px; border-top: 1px solid var(--border); }
.lp-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.lp-footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.lp-footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.lp-footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-footer-nav a { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.lp-footer-nav a:hover { color: var(--purple-700); }
.lp-footer-note { font-size: 12.5px; color: var(--ink-faint); }

@media (max-width: 980px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { height: 340px; }
  .lp-sobre-grid { grid-template-columns: 1fr; }
  .lp-platform-grid { grid-template-columns: 1fr 1fr; }
  .lp-solucoes-grid { grid-template-columns: 1fr; }
  .lp-pricing-grid { grid-template-columns: 1fr; }
  .lp-price-card.lp-destaque { transform: none; }
}

@media (max-width: 700px) {
  .lp-nav { display: none; }
  .lp-header-inner { padding: 12px 18px; }
  .lp-hero { padding: 40px 18px 28px; }
  .lp-hero-copy h1 { font-size: 30px; }
  .lp-section { padding: 48px 18px; }
  .lp-platform-grid { grid-template-columns: 1fr; }
}

/* ---------- Performance (dashboard de campanhas publicadas) ---------- */

.perf-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.perf-metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.perf-metric-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.perf-metric-value.perf-metric-lime { color: var(--lime-text); }
.perf-metric-label { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }

.perf-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 4px; }
.perf-chart-bar { flex: 1; background: var(--lime); border-radius: 3px 3px 0 0; min-height: 2px; }
.perf-chart-caption { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-faint); margin-top: 8px; }

.perf-warning-card { border-color: var(--lime-dark); background: #FFF9E8; }
.perf-warning-card .status-pill { margin-bottom: 10px; }

/* ---------- Admin ---------- */

.admin-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.admin-subnav a { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-faint); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-subnav a:hover { color: var(--ink); }
.admin-subnav a.active { color: var(--purple-700); border-bottom-color: var(--purple-700); }

.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.admin-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink-faint); font-weight: 600; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--border-soft); }
.admin-table td .meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; white-space: normal; }
.admin-table-compact th, .admin-table-compact td { padding: 8px 12px; }

/* Cards clicáveis da visão geral do admin (21/08) — cada card expande, no
   lugar, uma tabela com os dados por trás do número, em vez de forçar
   navegar pra outra tela pra cada consulta rápida. (Cheguei a desenhar uma
   v2 em formato de tiles quadrados lado a lado, tipo os do Google Ads, mas
   o Cristopher confirmou que esse formato em lista, visto limpo numa aba
   anônima, já ficou bom — mantido como está, só trocada a cor do alerta.) */
.admin-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.admin-card:hover { border-color: var(--lime-dark); }
.admin-card.is-open { border-color: var(--lime-dark); }
.admin-card.admin-card-has-alert { border-left: 3px solid var(--warn); }
.admin-card-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.admin-card-toggle:hover { background: var(--border-soft); }
.admin-card-main { display: flex; align-items: baseline; gap: 12px; }
.admin-card-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.admin-card-value.admin-card-lime { color: var(--lime-text); }
.admin-card-value.admin-card-danger { color: var(--warn); }
.admin-card-label { font-size: 13px; color: var(--ink-faint); }
.admin-card-caret { font-size: 18px; color: var(--ink-faint); transition: transform 0.15s ease; }
.admin-card.is-open .admin-card-caret { transform: rotate(90deg); color: var(--lime-text); }
.admin-card-panel { border-top: 1px solid var(--border-soft); padding: 16px 20px 20px; background: #FAFAF7; }
.admin-card-panel[hidden] { display: none; }

.admin-camp-row { cursor: pointer; }
.admin-camp-row:hover td { background: var(--border-soft); }
.admin-camp-row.is-open td { background: #F7FEE1; }
.admin-camp-detail td { background: #FFFFFF; padding: 16px 18px; white-space: normal; }
.admin-camp-detail[hidden] { display: none; }

/* Ajuda na barra lateral (21/08) — bloco discreto acima da conta do
   usuário, com o e-mail de suporte. */
.sidebar-help {
  margin: 12px 16px 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--border-soft);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-faint);
}
.sidebar-help p { margin: 0 0 6px; }
.sidebar-help a { color: var(--lime-text); font-weight: 600; text-decoration: none; }

/* ============================================================
   Pipeline de vendas (24/08) — CRM simplificado, bônus de quem já
   comprou algum pacote. Board estilo Kanban com arrastar-e-soltar
   entre os estágios do funil (ver src/leadStages.js) + modal de
   detalhe/edição do lead. Reaproveita os tokens de cor e os
   componentes genéricos (.card, .field, .btn-*) já usados no
   resto do app — só o board e o modal têm CSS próprio.
   ============================================================ */

.pipeline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.pipeline-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.pipeline-stat-label { font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.pipeline-stat-value { font-size: 21px; font-weight: 700; color: var(--purple-900); }
.pipeline-stat-value.pipeline-stat-lime { color: var(--lime-text); }

.pipeline-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }

.pipeline-board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
}
.pipeline-col {
  flex: 0 0 250px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px;
  min-height: 120px;
}
.pipeline-col.drag-over { border-color: var(--purple-500); background: var(--purple-050); }
.pipeline-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pipeline-col-head .count { font-weight: 600; color: var(--ink-faint); text-transform: none; letter-spacing: 0; }
.pipeline-col[data-stage="ganho"] .pipeline-col-head { color: var(--lime-text); }
.pipeline-col[data-stage="perdido"] .pipeline-col-head { color: var(--danger); }

.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
}
.pipeline-card:active { cursor: grabbing; }
.pipeline-card.dragging { opacity: 0.4; }
.pipeline-card .lead-nome { font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.pipeline-card .lead-empresa { font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; }
.pipeline-card .lead-valor { font-size: 13px; font-weight: 700; color: var(--purple-700); }
.pipeline-card .lead-campanha {
  display: inline-block;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--lime-text);
  background: rgba(196, 241, 53, 0.16);
  padding: 2px 7px;
  border-radius: 999px;
}
.pipeline-col-empty { font-size: 12px; color: var(--ink-faint); text-align: center; padding: 18px 6px; }

/* ---------- Modal de lead (criar/editar) ---------- */
.lead-modal { max-width: 640px; }
.lead-modal h2 { font-size: 19px; margin-bottom: 18px; }
.lead-modal .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.lead-modal .field-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

.lead-notas { border-top: 1px solid var(--border-soft); margin-top: 8px; padding-top: 16px; }
.lead-notas h3 { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 10px; }
.lead-nota-item {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--border-soft);
  margin-bottom: 6px;
}
.lead-nota-item .quando { color: var(--ink-faint); font-size: 11px; margin-top: 2px; }
.lead-notas-empty { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 10px; }
.lead-nota-add { display: flex; gap: 8px; }
.lead-nota-add input { flex: 1; }

/* ---------- Tela de bloqueio (quem ainda não comprou nenhum pacote) ---------- */
.pipeline-locked {
  text-align: center;
  padding: 70px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.pipeline-locked .lock-icon { font-size: 34px; margin-bottom: 14px; }

/* Reaproveitada no Admin — Flywheel (24/08) pra mostrar leads/conversão por
   nicho, lado a lado com o resumo de campanhas geradas — 5 colunas em vez
   das 4 do board do Pipeline. */
.pipeline-stats-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
  .pipeline-stats { grid-template-columns: repeat(2, 1fr); }
  .pipeline-stats-5 { grid-template-columns: repeat(2, 1fr); }
  .lead-modal .field-grid { grid-template-columns: 1fr; }
}
.sidebar-help a:hover { text-decoration: underline; }
