/* =============================================
   Wizard de Auto-Cadastro AgFlex
   Palette idêntica ao PDV v2
   ============================================= */

:root {
  --cd-azul-marinho:   #142544;
  --cd-azul-primario:  #2563EB;
  --cd-azul-claro:     #EFF6FF;
  --cd-roxo:           #7C3AED;
  --cd-roxo-claro:     #F5F3FF;
  --cd-verde:          #16A34A;
  --cd-verde-claro:    #F0FDF4;
  --cd-laranja-logo:   #F39200;
  --cd-cinza-claro:    #F3F4F6;
  --cd-cinza-borda:    #E5E7EB;
  --cd-texto:          #111827;
  --cd-texto-sec:      #6B7280;
  --cd-branco:         #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cd-cinza-claro);
  color: var(--cd-texto);
  min-height: 100vh;
}

/* === HEADER === */
.cd-header {
  background: var(--cd-azul-marinho);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.cd-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--cd-branco);
  text-decoration: none;
  flex-shrink: 0;
}
.cd-logo .letra-f { color: var(--cd-laranja-logo); }

.cd-header-title {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
}

.cd-header-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
}

.cd-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all .2s;
}
.cd-step-pill.ativo {
  background: rgba(255,255,255,.12);
  color: var(--cd-branco);
}
.cd-step-pill.concluido {
  color: rgba(255,255,255,.6);
}
.cd-step-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cd-step-pill.ativo .cd-step-circle {
  background: var(--cd-azul-primario);
  color: white;
}
.cd-step-pill.concluido .cd-step-circle {
  background: var(--cd-verde);
  color: white;
}
.cd-step-sep {
  width: 28px; height: 2px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}

.cd-header-link {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  text-decoration: none;
  flex-shrink: 0;
  margin-left: auto;
}
.cd-header-link:hover { color: white; }

/* === CONTEÚDO === */
.cd-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* === STEPS (animação) === */
.cd-step { display: none; }
.cd-step.ativo { display: block; }

/* === SEÇÃO TÍTULO === */
.cd-section-title {
  text-align: center;
  margin-bottom: 28px;
}
.cd-section-title h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--cd-texto);
  margin-bottom: 6px;
}
.cd-section-title p {
  font-size: 14px;
  color: var(--cd-texto-sec);
}

/* === TOGGLE PERÍODO === */
.cd-toggle-periodo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.cd-toggle-btn-group {
  display: inline-flex;
  background: var(--cd-branco);
  border: 1px solid var(--cd-cinza-borda);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.cd-toggle-btn {
  padding: 7px 20px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--cd-texto-sec);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.cd-toggle-btn.ativo {
  background: var(--cd-azul-marinho);
  color: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.cd-badge-economia {
  display: inline-block;
  background: #D1FAE5;
  color: #065F46;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: 5px;
}

/* === GRADE DE PLANOS === */
.cd-planos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .cd-planos-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

/* === CARD DE PLANO === */
.cd-plano-card {
  background: var(--cd-branco);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  border: 2px solid transparent;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .2s, border-color .2s;
  cursor: default;
}
.cd-plano-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.12);
}
.cd-plano-card.destaque {
  border-color: var(--cd-azul-primario);
}
.cd-plano-card.selecionado {
  border-color: var(--cd-verde);
  box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}

.cd-badge-mais-vendido {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cd-azul-primario);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 3px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.cd-plano-icone {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}

.cd-plano-nome {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.cd-plano-desc {
  text-align: center;
  font-size: 12px;
  color: var(--cd-texto-sec);
  margin-bottom: 12px;
  min-height: 32px;
}

.cd-plano-divider {
  height: 1px;
  background: var(--cd-cinza-borda);
  margin: 12px 0;
}

/* Preço */
.cd-plano-preco {
  text-align: center;
  margin-bottom: 4px;
}
.cd-plano-preco-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  line-height: 1;
}
.cd-preco-moeda  { font-size: 13px; font-weight: 700; color: var(--cd-texto); margin-top: 10px; }
.cd-preco-inteiro { font-size: 52px; font-weight: 900; color: var(--cd-texto); line-height: 1; }
.cd-preco-cent   { font-size: 18px; font-weight: 700; color: var(--cd-texto); margin-top: 10px; }
.cd-preco-label  { font-size: 11px; color: var(--cd-texto-sec); margin-top: 4px; }

.cd-preco-periodo { display: block; }
.cd-preco-periodo.oculto { display: none; }

.cd-badge-trial {
  background: var(--cd-azul-claro);
  color: var(--cd-azul-primario);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin: 10px 0 0;
}

/* Recursos */
.cd-plano-recursos {
  list-style: none;
  margin: 14px 0 20px;
  padding: 0;
  flex: 1;
}
.cd-plano-recursos li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--cd-texto);
  padding: 4px 0;
}
.cd-plano-recursos li i { margin-top: 2px; flex-shrink: 0; }

/* Botão escolher plano */
.cd-btn-escolher {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  margin-top: auto;
}
.cd-btn-escolher.outline {
  border-color: var(--cd-azul-primario);
  color: var(--cd-azul-primario);
  background: white;
}
.cd-btn-escolher.outline:hover { background: var(--cd-azul-claro); }
.cd-btn-escolher.filled-blue {
  background: var(--cd-azul-primario);
  color: white;
}
.cd-btn-escolher.filled-blue:hover { background: #1D4ED8; }
.cd-btn-escolher.filled-purple {
  background: var(--cd-roxo);
  color: white;
}
.cd-btn-escolher.filled-purple:hover { background: #6D28D9; }
.cd-btn-escolher.selecionado-btn {
  background: var(--cd-verde);
  color: white;
  border-color: var(--cd-verde);
}

/* === BARRA "TODOS OS PLANOS INCLUEM" === */
.cd-todos-incluem {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--cd-cinza-borda);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
}
.cd-todos-incluem-titulo {
  font-weight: 700;
  color: var(--cd-texto);
  white-space: nowrap;
}
.cd-todos-incluem span {
  color: var(--cd-texto-sec);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cd-todos-incluem span i { color: var(--cd-azul-primario); }

/* === STEP 2: FORMULÁRIO === */
.cd-form-container {
  max-width: 560px;
  margin: 0 auto;
}

.cd-plano-resumo {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cd-azul-claro);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.cd-plano-resumo-icone {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cd-azul-primario);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cd-plano-resumo-info { flex: 1; min-width: 0; }
.cd-plano-resumo-label { font-size: 11px; color: var(--cd-texto-sec); }
.cd-plano-resumo-nome  { font-size: 15px; font-weight: 700; color: var(--cd-texto); }
.cd-plano-resumo-trocar {
  font-size: 12px;
  font-weight: 600;
  color: var(--cd-azul-primario);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
}
.cd-plano-resumo-trocar:hover { text-decoration: underline; }

.cd-form-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  padding: 28px;
}
.cd-form-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--cd-texto);
  margin-bottom: 20px;
}

.cd-form-group { margin-bottom: 16px; }
.cd-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cd-texto);
  margin-bottom: 5px;
}
.cd-form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--cd-cinza-borda);
  border-radius: 8px;
  font-size: 14px;
  color: var(--cd-texto);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.cd-form-input:focus {
  border-color: var(--cd-azul-primario);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.cd-form-input::placeholder { color: #9CA3AF; }
.cd-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .cd-form-row { grid-template-columns: 1fr; } }

.cd-form-error { font-size: 12px; color: #DC2626; margin-top: 4px; }

.cd-form-terms {
  font-size: 12px;
  color: var(--cd-texto-sec);
  margin: 12px 0 18px;
  line-height: 1.5;
}
.cd-form-terms a { color: var(--cd-azul-primario); }

.cd-form-consent {
  margin: 12px 0 18px;
  line-height: 1.5;
}
.cd-form-consent input[type="checkbox"]:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.cd-btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--cd-azul-marinho);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.cd-btn-submit:hover { background: #1D3461; }

/* Voltar link */
.cd-voltar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cd-texto-sec);
  text-decoration: none;
  margin-bottom: 20px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.cd-voltar-link:hover { color: var(--cd-texto); }

/* Yii error overrides dentro do wizard */
.cd-form-card .help-block { font-size: 12px; color: #DC2626; margin-top: 3px; }
.cd-form-card .has-error .cd-form-input { border-color: #DC2626; }
.cd-form-card .form-group { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════
   NOVA LANDING PAGE
════════════════════════════════════════════════════════════ */

/* === HERO === */
.cd-hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1e2d5e 100%);
  padding: 80px 24px 90px;
  overflow: hidden;
  text-align: center;
}
.cd-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(99,102,241,.25) 0%, transparent 65%),
              radial-gradient(ellipse at 20% 70%, rgba(37,99,235,.2) 0%, transparent 50%);
  pointer-events: none;
}
.cd-hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.cd-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.4);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: .3px;
}
.cd-hero-badge i { color: #fbbf24; }
.cd-hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.5px;
}
.cd-hero-hl {
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cd-hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: 32px;
}
.cd-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.cd-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
}
.cd-hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,.5); }
.cd-hero-btn-sec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: .2s;
}
.cd-hero-btn-sec:hover { background: rgba(255,255,255,.15); color: white; }
.cd-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cd-hero-stat { font-size: 13px; color: rgba(255,255,255,.6); }
.cd-hero-stat span { font-weight: 800; color: rgba(255,255,255,.9); margin-right: 3px; }
.cd-hero-stat-sep { color: rgba(255,255,255,.25); }

/* === SEÇÕES GENÉRICAS === */
.cd-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.cd-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.cd-section-title {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.2;
}
.cd-section-sub {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 40px;
}

/* === RECURSOS === */
.cd-recursos-section {
  background: #fff;
  padding: 72px 0 64px;
  text-align: center;
}
.cd-recursos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: left;
}
@media (max-width: 1024px) { .cd-recursos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .cd-recursos-grid { grid-template-columns: 1fr; } }

.cd-rec-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 18px;
  transition: .2s;
}
.cd-rec-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 16px rgba(99,102,241,.1); transform: translateY(-2px); }
.cd-rec-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.cd-rec-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.cd-rec-card p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}
.cd-rec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cd-rec-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #374151;
  padding: 3px 0;
}
.cd-rec-list li i { color: #10b981; font-size: 10px; flex-shrink: 0; }

/* === DIFERENCIAIS === */
.cd-diff-section {
  background: #f1f5f9;
  padding: 48px 0;
}
.cd-diff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 768px) { .cd-diff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cd-diff-grid { grid-template-columns: 1fr; } }

.cd-diff-item i {
  font-size: 28px;
  color: #6366f1;
  margin-bottom: 12px;
  display: block;
}
.cd-diff-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.cd-diff-item p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

/* === PLANOS SECTION === */
.cd-planos-section {
  background: #f8fafc;
  padding: 72px 0 56px;
  text-align: center;
}

/* === FORM SECTION === */
.cd-form-section {
  background: #f8fafc;
  padding: 48px 20px 64px;
}

/* === FOOTER === */
.cd-footer {
  background: #0f172a;
  padding: 24px;
}
.cd-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cd-footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.cd-footer-links a { color: rgba(255,255,255,.5); font-size: 13px; text-decoration: none; }
.cd-footer-links a:hover { color: rgba(255,255,255,.8); }

@media (max-width: 600px) {
  .cd-hero { padding: 60px 16px 70px; }
  .cd-hero-desc br { display: none; }
  .cd-recursos-section, .cd-planos-section { padding: 48px 0 40px; }
  .cd-form-section { padding: 32px 16px 48px; }
  .cd-footer-inner { justify-content: center; text-align: center; }
  .cd-footer-links { margin-left: 0; }
}

/* === BOTÃO VER TODAS AS FUNÇÕES === */
.cd-ver-funcoes {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: 1.5px dashed currentColor;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin: 10px 0 4px;
  opacity: .75;
  transition: opacity .15s, background .15s;
  justify-content: center;
}
.cd-ver-funcoes:hover { opacity: 1; background: rgba(0,0,0,.03); }
.cd-ver-funcoes .fa-chevron-down { margin-left: auto; transition: transform .25s; }
.cd-ver-funcoes.aberto .fa-chevron-down { transform: rotate(180deg); }

/* === LISTA EXPANDIDA === */
.cd-todos-recursos {
  margin: 4px 0 6px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.cd-rec-grupo { margin-bottom: 10px; }
.cd-rec-grupo:last-child { margin-bottom: 0; }
.cd-rec-grupo-titulo {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.cd-plano-recursos--full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.cd-plano-recursos--full li { font-size: 11.5px; }
@media (max-width: 400px) {
  .cd-plano-recursos--full { grid-template-columns: 1fr; }
}
