:root {
  --primary: #1f6feb;
  --primary-dark: #14509c;
  --primary-light: #eef4ff;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f3f6fc;
  --card: #ffffff;
  --border: #e6ebf3;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(20, 80, 156, 0.08);
  --shadow-lg: 0 20px 60px rgba(20, 80, 156, 0.14);
  --error-bg: #fdecec;
  --error-text: #a3222d;
  --warning-bg: #fff6e0;
  --warning-text: #8a5a00;
  --success-bg: #e9f9ef;
  --success-text: #17703a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Topbar                                                                  */
/* ---------------------------------------------------------------------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: #0f172a;
  color: #fff;
}

.topbar-left { display: flex; align-items: center; gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover .brand-name { text-decoration: underline; }
.brand-mark {
  font-weight: 800;
  font-size: 13px;
  background: var(--primary);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-tag { color: #94a3b8; font-size: 13px; margin-left: 8px; padding-left: 10px; border-left: 1px solid #334155; }

.session-info { display: flex; gap: 14px; align-items: center; font-size: 13.5px; }
.status-pill {
  display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1); padding: 7px 14px; border-radius: 999px;
  font-size: 13px; color: #e2e8f0;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: 0 0 auto; }
.status-dot.warn { background: #f59e0b; }

/* Pill-botao do "Teste gratis" na topbar, para visitantes que ainda nao
   se cadastraram (ver base.html) - vira um convite clicavel em vez de so
   texto informativo, levando direto para /teste-gratis. */
.trial-cta-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2f7dfb, #14509c);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 13px;
  padding: 7px 16px 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 20px rgba(31,111,235,0.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.trial-cta-pill:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(31,111,235,0.48); filter: brightness(1.06); }
.trial-cta-pill:active { transform: translateY(0); }
.trial-cta-pill .pulse-ring {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; position: relative; flex: 0 0 auto;
}
.trial-cta-pill .pulse-ring::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.65); animation: ssv-pulse-ring 1.8s ease-out infinite;
}
.trial-cta-pill .arrow { font-size: 13px; opacity: .85; transition: transform .15s ease; }
.trial-cta-pill:hover .arrow { transform: translateX(3px); }
@keyframes ssv-pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .trial-cta-pill .pulse-ring::after { animation: none; }
}

/* Botao "Voltar ao Início" (ou similar, ex: "Painel da Revenda") - mesmo
   estilo em pilula com gradiente do trial-cta-pill acima, usado em toda
   parte onde antes era so um link de texto sublinhado (topbar escura E
   dentro dos cards claros de login/cadastro tipo split-wrap). */
.btn-home-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #2f7dfb, #14509c);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 12.5px;
  padding: 7px 15px 7px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 16px rgba(31,111,235,0.3); white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-home-pill:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(31,111,235,0.42); filter: brightness(1.06); }
.btn-home-pill:active { transform: translateY(0); }
.btn-home-pill .arrow { transition: transform .15s ease; }
.btn-home-pill:hover .arrow { transform: translateX(-3px); }
/* Dentro dos cards claros (split-wrap/form-side), afasta um pouco do
   titulo abaixo - nos lugares escuros (topbar) essa margem nao atrapalha. */
.form-side .btn-home-pill, .card-narrow > .btn-home-pill { margin-bottom: 18px; }

.link-muted { color: #cfd6e0; text-decoration: underline; }
.inline-form { display: inline; margin: 0; }
.link-button {
  background: none; border: none; padding: 0; margin: 0;
  color: #cfd6e0; text-decoration: underline; font-size: inherit;
  font-family: inherit; cursor: pointer;
}

/* ---------------------------------------------------------------------- */
/* Layout / cards                                                          */
/* ---------------------------------------------------------------------- */
.container { max-width: 960px; margin: 0 auto; padding: 40px 24px 64px 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}
.card-narrow { max-width: 460px; margin: 48px auto; text-align: left; }

h1 { margin-top: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; margin: 0 0 4px 0; font-weight: 800; }
.card .desc { color: var(--muted); font-size: 13.5px; margin: 0 0 20px 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.step { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.step:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.hidden { display: none; }

/* ---------------------------------------------------------------------- */
/* Stepper (topo da tela do conversor)                                     */
/* ---------------------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.stepper .step-item { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.stepper .step-item.active { color: var(--primary); }
.stepper .step-item .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex: 0 0 auto;
}
.stepper .step-item.active .num { background: var(--primary); color: #fff; }
.stepper .step-item.done .num { background: #16a34a; color: #fff; }
.stepper .step-line { flex: 1; height: 2px; background: var(--border); margin: 0 14px; }

/* ---------------------------------------------------------------------- */
/* Mode switch (Individual / Em lote)                                      */
/* ---------------------------------------------------------------------- */
.mode-switch { display: flex; gap: 6px; background: #e9eef8; border-radius: 12px; padding: 5px; margin-bottom: 24px; width: fit-content; }
.mode-btn {
  padding: 9px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; border: none; background: transparent; font-family: inherit;
}
.mode-btn.active { background: #fff; color: var(--primary); box-shadow: 0 4px 12px rgba(20,80,156,0.12); }

/* ---------------------------------------------------------------------- */
/* Dropzone / upload                                                       */
/* ---------------------------------------------------------------------- */
.dropzone {
  border: 2px dashed #c7d3e6;
  border-radius: 16px;
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  background: #fafcff;
  transition: all .15s ease;
}
.dropzone.dragover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.dropzone .dz-icon {
  width: 48px; height: 48px; margin: 0 auto 12px auto; border-radius: 12px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.dropzone strong { color: var(--ink); }
.dropzone .hint { font-size: 12.5px; margin-top: 6px; }

.file-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fbfcfe; }
.file-row.error { border-color: #f4b8b8; background: #fff6f6; }
.file-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.file-row.error .file-icon { background: #fde3e3; color: #c0392b; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.file-row.error .file-meta { color: #c0392b; }
.file-remove { width: 26px; height: 26px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; flex: 0 0 auto; }
.file-remove:hover { background: #eef1f6; }

.summary-strip { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 16px 18px; background: var(--primary-light); border-radius: 12px; flex-wrap: wrap; gap: 12px; }
.summary-strip .txt { font-size: 13.5px; color: var(--primary-dark); font-weight: 700; }
.summary-strip .sub { font-size: 12px; color: #3f68a8; font-weight: 500; margin-top: 2px; }

/* ---------------------------------------------------------------------- */
/* Rotation grid                                                           */
/* ---------------------------------------------------------------------- */
.rotation-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.rotation-option { border: 2px solid var(--border); border-radius: 12px; padding: 8px; cursor: pointer; width: 160px; text-align: center; }
.rotation-option img { width: 100%; height: 110px; object-fit: contain; background: #fafbfc; }
.rotation-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 2px rgba(31,111,235,0.2); }
.rotation-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */
.options-form, form { display: flex; flex-direction: column; gap: 16px; }
.card form.options-form, .card-narrow form { max-width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
label { font-size: 0.85rem; font-weight: 700; color: #33404f; }
label .req { color: var(--primary); font-weight: 400; }
label .opt { color: var(--muted); font-weight: 400; font-size: 12px; }
input, select {
  padding: 12px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); background: #fff; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-block;
  border: none;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, #1f6feb, #14509c); color: #fff; box-shadow: 0 10px 24px rgba(31,111,235,0.28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.btn-small { padding: 6px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------------- */
/* Flash messages                                                          */
/* ---------------------------------------------------------------------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.flash-error { background: var(--error-bg); color: var(--error-text); }
.flash-warning { background: var(--warning-bg); color: var(--warning-text); }
.flash-success { background: var(--success-bg); color: var(--success-text); }

/* ---------------------------------------------------------------------- */
/* Resultado da conversao                                                   */
/* ---------------------------------------------------------------------- */
.result-grid { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.final-preview { max-width: 320px; max-height: 480px; border: 1px solid var(--border); background: #fafbfc; border-radius: 10px; }

.result-card-flex { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.result-icon { width: 52px; height: 52px; border-radius: 14px; background: #e9f9ef; color: #16a34a; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; }
.result-info { flex: 1; min-width: 200px; }
.result-info h4 { margin: 0 0 6px 0; font-size: 15px; }
.result-info .dims { color: var(--muted); font-size: 13.5px; }
.result-item-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.result-item-list .ok { color: #16a34a; }
.result-item-list .bad { color: #c0392b; }

/* ---------------------------------------------------------------------- */
/* Tela de cadastro inicial (split-hero)                                   */
/* ---------------------------------------------------------------------- */
.split-wrap { display: grid; grid-template-columns: 1fr 1.15fr; min-height: calc(100vh - 0px); }
@media (max-width: 860px) { .split-wrap { grid-template-columns: 1fr; } .split-panel { display: none; } }

.split-panel {
  background: linear-gradient(160deg, #14509c 0%, #1f6feb 55%, #3f8cff 100%);
  color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.split-panel::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.14), transparent 60%);
  right: -160px; bottom: -160px;
  /* Decoracao pura (bolha de luz de fundo) - SEM isto, por ser absolutamente
     posicionada sem z-index, ela pinta por cima de irmaos nao-posicionados
     (mesmo estando "atras" visualmente por causa da transparencia) e rouba
     cliques de qualquer link/botao que caia embaixo dela. Ver o mesmo bug,
     ja CONFIRMADO ao vivo, em .hero-site::after logo abaixo. */
  pointer-events: none;
}
.split-panel .panel-hero { position: relative; z-index: 1; }
.split-panel .panel-hero h1 { font-size: 30px; line-height: 1.25; margin: 0 0 16px 0; font-weight: 800; color: #fff; }
.split-panel .panel-hero p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.85); max-width: 420px; margin: 0; }
.split-panel .benefits { list-style: none; margin: 32px 0 0 0; padding: 0; display: flex; flex-direction: column; gap: 15px; position: relative; z-index: 1; }
.split-panel .benefits li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.92); }
.split-panel .check { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.split-panel .panel-footer { font-size: 12px; color: rgba(255,255,255,0.6); position: relative; z-index: 1; }

.form-side { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.form-side .card-narrow { margin: 0; }

/* ---------------------------------------------------------------------- */
/* Tela "Ativar" (minimalista)                                             */
/* ---------------------------------------------------------------------- */
.center-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px 60px 24px; }
.ativar-card { max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); border-radius: 22px; }
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 18px auto;
}
.ativar-card input#license_key { text-align: center; font-family: 'Courier New', monospace; letter-spacing: .02em; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------------- */
/* Tela "Comprar" (planos)                                                 */
/* ---------------------------------------------------------------------- */
.plans-hero { text-align: center; padding: 8px 12px 20px 12px; }
.plans-hero .eyebrow { color: var(--primary); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.plans-hero h1 { font-size: 30px; margin: 0 0 12px 0; }
.plans-hero p { color: var(--muted); font-size: 15px; max-width: 480px; margin: 0 auto; line-height: 1.6; }

.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
@media (max-width: 780px) { .plans-grid { grid-template-columns: 1fr 1fr; } }

.plan-card {
  background: var(--card); border: 2px solid var(--border); border-radius: 16px; padding: 22px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s, transform .15s; position: relative;
}
.plan-card:hover { transform: translateY(-2px); }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 12px 28px rgba(31,111,235,0.16); }
.plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg,#1f6feb,#14509c);
  color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan-duration { font-size: 13.5px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.plan-price { font-size: 24px; font-weight: 800; margin: 8px 0 2px 0; letter-spacing: -0.02em; }
.plan-permonth { font-size: 12px; color: var(--muted); }
.plan-quota {
  font-size: 11.5px; font-weight: 700; color: var(--primary); background: rgba(31,111,235,0.08);
  border-radius: 999px; padding: 4px 10px; margin-top: 10px; display: inline-block;
}

.qty-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 20px 24px; margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.qty-label { font-size: 14.5px; font-weight: 700; }
.qty-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.qty-control { display: flex; align-items: center; gap: 14px; }
.qty-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--primary); font-family: inherit; }
.qty-value { font-size: 18px; font-weight: 800; min-width: 24px; text-align: center; }

.summary-card {
  background: linear-gradient(160deg,#ffffff,#f8fbff); border: 1.5px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 30px; margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.summary-left .row { display: flex; justify-content: space-between; gap: 40px; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.summary-left .row strong { color: var(--ink); }
.summary-total { font-size: 13px; color: var(--muted); text-align: right; }
.summary-total .value { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }

.footer-note { text-align: center; padding: 20px 24px 8px 24px; color: var(--muted); font-size: 13.5px; }
.footer-note a { color: var(--primary); text-decoration: none; font-weight: 600; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 30px 0;
}
.footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------- */
/* Site (pagina inicial / marketing) - so aparece na versao Web           */
/* ---------------------------------------------------------------------- */
.site-nav {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 40px;
}
.site-nav .nav-links { display: flex; align-items: center; gap: 28px; }
.site-nav .nav-links a.nav-link { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.site-nav .nav-links a.nav-link:hover { color: #fff; }
.site-nav .btn { padding: 10px 18px; font-size: 13.5px; }

.hero-site {
  background: linear-gradient(160deg, #0f172a 0%, #14509c 60%, #1f6feb 130%);
  color: #fff; padding-bottom: 70px; position: relative; overflow: hidden;
}
.hero-site::after {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.10), transparent 60%);
  right: -180px; top: -220px;
  /* CAUSA REAL do "os links do menu nao funcionam": esta bolha decorativa
     e absolutamente posicionada sem z-index, entao o navegador pinta ela
     POR CIMA do .site-nav (que nao e posicionado) na ordem de empilhamento
     - mesmo sendo semi-transparente e parecendo estar "atras" dos links
     visualmente. Resultado: o clique era capturado por esta bolha (que nao
     faz nada) em vez de chegar no <a> do menu, bem na regiao onde ficam
     "Planos"/"Ja tenho uma chave"/"Testar gratis" (o botao "Como funciona",
     mais a esquerda, ficava fora do raio da bolha - por isso so ele
     parecia funcionar). pointer-events:none faz cliques atravessarem esta
     decoracao direto para o que estiver embaixo, sem mudar nada visualmente. */
  pointer-events: none;
}
.hero-site-inner { max-width: 780px; margin: 0 auto; text-align: center; padding: 56px 24px 0 24px; position: relative; z-index: 1; }
.hero-site .eyebrow { color: #bcd4ff; font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.hero-site h1 { font-size: 44px; line-height: 1.18; font-weight: 800; margin: 0 0 18px 0; letter-spacing: -0.02em; color: #fff; }
.hero-site p { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 32px auto; }
.hero-site .hero-ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-site .hero-ctas .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 14px 34px rgba(0,0,0,0.22); }
.hero-site .hero-ctas .btn-primary:hover { filter: none; background: #f3f6fc; }
.hero-site .hero-ctas .btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.hero-site .hero-note { font-size: 12.5px; color: rgba(255,255,255,0.6); }

.hero-preview {
  max-width: 900px; margin: 44px auto 0 auto; padding: 0 24px; position: relative; z-index: 1;
}
.hero-preview-card {
  background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  padding: 22px 26px; text-align: left; color: var(--ink);
}
.hero-preview-card .hp-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.hero-preview-card .hp-dot { width: 9px; height: 9px; border-radius: 50%; background: #e2554a; }
.hero-preview-card .hp-dot:nth-child(2) { background: #eab308; }
.hero-preview-card .hp-dot:nth-child(3) { background: #22c55e; }
.hero-preview-card .hp-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.hero-preview-card .hp-step { background: var(--bg); border-radius: 12px; padding: 16px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.hero-preview-card .hp-step .hp-icon { font-size: 20px; margin-bottom: 8px; }

.site-section { max-width: 1040px; margin: 0 auto; padding: 80px 24px; }
.site-section.tight { padding-top: 50px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px auto; }
.section-head .eyebrow { color: var(--primary); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: 30px; font-weight: 800; margin: 0 0 12px 0; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 780px) { .how-steps { grid-template-columns: 1fr; } }
.how-step { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 26px 22px; text-align: left; box-shadow: var(--shadow); }
.how-step .how-num {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,#1f6feb,#14509c); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; margin-bottom: 14px;
}
.how-step h3 { font-size: 15.5px; margin: 0 0 6px 0; }
.how-step p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 780px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.feature-card .f-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.feature-card h3 { font-size: 14.5px; margin: 0 0 6px 0; }
.feature-card p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

.site-plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 780px) { .site-plans-grid { grid-template-columns: 1fr 1fr; } }
.site-plans-grid .plan-card { cursor: default; }
.site-plans-grid .plan-card:hover { transform: none; }
.site-plans-grid .plan-card a.btn { display: block; margin-top: 16px; }

.cta-banner {
  background: linear-gradient(135deg,#1f6feb,#14509c); border-radius: var(--radius); color: #fff;
  text-align: center; padding: 52px 32px; max-width: 1040px; margin: 0 auto 80px auto;
}
.cta-banner h2 { font-size: 26px; margin: 0 0 12px 0; color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 14.5px; margin: 0 0 26px 0; }
.cta-banner .btn-primary { background: #fff; color: var(--primary-dark); }

.site-footer {
  background: #0f172a; color: rgba(255,255,255,0.6); text-align: center; padding: 30px 24px; font-size: 12.5px;
}

/* ---------------------------------------------------------------------- */
/* Painel do cliente (conta com e-mail + senha)                            */
/* ---------------------------------------------------------------------- */
.painel-topbar {
  background: linear-gradient(135deg, #0f172a 0%, #14509c 60%, #1f6feb 130%);
  padding: 18px 40px; display: flex; justify-content: space-between; align-items: center; color: #fff;
}
.painel-topbar .brand { color: #fff; }
.painel-topbar .brand-mark { background: #fff; color: var(--primary-dark); }
.painel-topbar .brand-name { color: #fff; }
.painel-user { display: flex; align-items: center; gap: 16px; font-size: 13.5px; color: rgba(255,255,255,0.9); }
.painel-user .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.painel-user a.link-muted { color: rgba(255,255,255,0.75); }
.painel-shell { max-width: 900px; margin: 0 auto; padding: 40px 24px 64px 24px; }
.painel-section-title {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 40px 0 14px 0;
}
.painel-section-title:first-child { margin-top: 0; }
.license-card { margin-bottom: 18px; }
.license-card-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.license-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.license-badge.warn { background: var(--warning-bg); color: var(--warning-text); }
.license-badge.ok { background: var(--success-bg); color: var(--success-text); }
.license-badge.danger { background: var(--error-bg); color: var(--error-text); }
.license-stats { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 20px; }
.license-stats .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #98a2b3; margin: 0 0 4px 0; }
.license-stats .stat-value { font-size: 15px; font-weight: 700; margin: 0; }
.license-key-tag {
  font-family: 'Courier New', monospace; font-size: 12px; color: var(--muted); background: #f5f7fb;
  border-radius: 8px; padding: 4px 10px; word-break: break-all;
}
.device-row {
  background: #f5f7fb; border: 1px solid #e2e6ee; border-radius: 12px; padding: 12px 16px;
  margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state-cta { text-align: center; padding: 44px 32px; box-shadow: var(--shadow-lg); border-radius: 22px; }
.empty-state-cta .icon-circle { width: 64px; height: 64px; font-size: 28px; }
.empty-state-cta .divider { max-width: 420px; margin-left: auto; margin-right: auto; }
.empty-state-tip { text-align: left; max-width: 480px; margin: 0 auto 22px auto; }

/* ---------------------------------------------------------------------- */
/* Pop-up "teste grátis acabou" (individual + em lote) - no site (navegador
   cheio) fica mais decorado; dentro do programa Desktop (janela pequena,
   sensação de app nativo) fica mais discreto - ver body.is-desktop abaixo. */
/* ---------------------------------------------------------------------- */
.limit-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.limit-modal-overlay.open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.limit-modal {
  background: #fff; border-radius: 24px; max-width: 440px; width: 100%; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35); transform: translateY(16px) scale(.96); opacity: 0;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
}
.limit-modal-overlay.open .limit-modal { transform: translateY(0) scale(1); opacity: 1; }

.limit-modal-head {
  position: relative; padding: 36px 28px 24px 28px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #1f6feb, #14509c); overflow: hidden;
}
.limit-modal-head::before, .limit-modal-head::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.12);
}
.limit-modal-head::before { width: 190px; height: 190px; top: -100px; right: -60px; }
.limit-modal-head::after { width: 130px; height: 130px; bottom: -75px; left: -45px; }
.limit-modal-icon {
  width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 16px auto;
  position: relative; z-index: 1; box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.limit-modal-head h2 { margin: 0 0 6px 0; font-size: 21px; position: relative; z-index: 1; }
.limit-modal-head .limit-modal-sub { margin: 0; font-size: 13px; color: rgba(255,255,255,0.85); position: relative; z-index: 1; }
.limit-modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff; border: none; font-size: 17px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s; z-index: 1;
}
.limit-modal-close:hover { background: rgba(255,255,255,0.32); }

.limit-modal-body { padding: 26px 28px 28px 28px; text-align: center; }
.limit-modal-body p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0 0 22px 0; }
.limit-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.limit-modal-actions .btn { width: 100%; }
.limit-modal-note { margin-top: 16px !important; font-size: 12.5px !important; color: #98a2b3 !important; }

/* Modo Desktop: pop-up mais discreto/"nativo de programa" - sem gradiente
   decorado nem bolhas, cabeçalho mais curto e sóbrio. */
body.is-desktop .limit-modal-head { background: var(--primary-dark); padding: 26px 24px 18px 24px; }
body.is-desktop .limit-modal-head::before, body.is-desktop .limit-modal-head::after { display: none; }
body.is-desktop .limit-modal-icon { width: 50px; height: 50px; font-size: 22px; margin-bottom: 12px; background: rgba(255,255,255,0.14); }
body.is-desktop .limit-modal-head h2 { font-size: 17px; }
body.is-desktop .limit-modal { border-radius: 14px; max-width: 380px; }
body.is-desktop .limit-modal-body { padding: 20px 22px 22px 22px; }
body.is-desktop .limit-modal-body p { font-size: 13.5px; }

/* ---------------------------------------------------------------------- */
/* Painel Admin (uso interno da SSV Sistemas)                             */
/* ---------------------------------------------------------------------- */
.admin-body { background: #f4f6fb; }

.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }

.admin-sidebar {
  width: 250px; flex: 0 0 250px; background: linear-gradient(180deg, #0f172a 0%, #14509c 140%);
  color: #fff; display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 6px 8px 22px 8px; }
.admin-brand-name { display: block; font-weight: 700; font-size: 14.5px; }
.admin-brand-sub { display: block; font-size: 11.5px; color: rgba(255,255,255,0.6); }

.admin-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.78); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.admin-nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-link.active { background: rgba(255,255,255,0.16); color: #fff; }
.admin-nav-ico { width: 18px; text-align: center; font-size: 13px; opacity: .85; }

.admin-sidebar-footer { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); }
.admin-sidebar-link { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 12.5px; padding: 6px 12px; }
.admin-sidebar-link:hover { color: #fff; }

.admin-main { flex: 1; padding: 32px 40px 60px 40px; max-width: 1180px; }
.admin-flashes { margin-bottom: 20px; }

.admin-header { margin-bottom: 24px; }
.admin-header h1 { margin: 0 0 4px 0; font-size: 24px; }
.admin-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .admin-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.admin-stat-card {
  background: #fff; border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.admin-stat-card.admin-stat-warn { border-color: #f3c98b; background: #fffaf0; }
.admin-stat-value { font-size: 28px; font-weight: 800; color: var(--ink); }
.admin-stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .admin-grid-2 { grid-template-columns: 1fr; } }

.admin-card {
  background: #fff; border-radius: 18px; padding: 24px 26px; box-shadow: var(--shadow);
  border: 1px solid var(--border); margin-bottom: 20px;
}
.admin-card h2 { margin: 0 0 12px 0; font-size: 16.5px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-card-head h2 { margin: 0; }
.admin-card-highlight { border: 1.5px solid var(--primary); background: linear-gradient(180deg, #f5f9ff 0%, #fff 40%); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .03em; padding: 8px 10px; border-bottom: 1.5px solid var(--border);
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafbfe; }

.admin-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
}
.admin-badge-ok { background: var(--success-bg); color: var(--success-text); }
.admin-badge-warn { background: var(--warning-bg); color: var(--warning-text); }
.admin-badge-error { background: var(--error-bg); color: var(--error-text); }

.admin-mono { font-family: "SF Mono", Consolas, monospace; font-size: 12.5px; word-break: break-all; }

.admin-link { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 13px; }
.admin-link:hover { text-decoration: underline; }
.admin-link-button {
  background: none; border: none; color: var(--primary); font-weight: 600; font-size: 12.5px;
  cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline;
}
.admin-link-button:hover { color: var(--primary-dark); }

/* flex-direction precisa ser explicito aqui - a regra generica "form {
   flex-direction: column }" (ver acima, usada pelos formularios normais
   do site) tem menos especificidade que .admin-search-form no "display",
   mas nenhuma das duas regras brigam por "flex-direction" especificamente
   - sem declarar de novo aqui, o valor column da regra generica "vence"
   por ser a unica que declara essa propriedade, e a busca (input + botao)
   empilha em vez de ficar lado a lado. */
.admin-search-form { display: flex; flex-direction: row; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.admin-search-form input[type="text"], .admin-search-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--border); font-size: 14px;
}

.admin-form .field { margin-bottom: 16px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 18px 0; }
.admin-checkbox input { margin-top: 3px; }

.admin-mini-license { padding: 14px 0; border-bottom: 1px solid var(--border); }
.admin-mini-license:last-child { border-bottom: none; }

.btn-danger { background: #dc2626; color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; }

.chave-box {
  background: #f5f7fb; border: 1px solid #e2e6ee; border-radius: 10px; padding: 14px 16px;
  word-break: break-all; font-family: "SF Mono", Consolas, monospace; font-size: 0.95em;
}

.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #0f172a 0%, #14509c 100%); padding: 20px; }
.admin-login-card { background: #fff; border-radius: 20px; padding: 40px 36px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.admin-login-icon { font-size: 34px; margin-bottom: 10px; }
.admin-login-card h1 { margin: 0 0 4px 0; font-size: 22px; }
.admin-login-card form { margin-top: 20px; text-align: left; }
.admin-login-hint { margin-top: 18px; }
.admin-login-hint code { background: #f1f4fa; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
