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

:root {
  --navy:      #0D1C30;
  --navy-mid:  #152540;
  --navy-lite: #1C3050;
  --accent:    #ff4000;
  --accent-bg: rgba(255,64,0,.10);
  --white:     #FFFFFF;
  --bg:        #F4F6FA;
  --border:    #E5E7EB;
  --tx1:       #111827;
  --tx2:       #4B5563;
  --tx3:       #9CA3AF;
  --green:     #2EA44F;
  --r:         12px;
  --r-sm:      8px;
  --focus-ring: 0 0 0 3px rgba(255,64,0,.20);
}

html, body { height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--tx1);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════
   LAYOUT SPLIT
═══════════════════════════════ */
.layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: 100vh;
}

/* ═══════════════════════════════
   PAINEL ESQUERDO
═══════════════════════════════ */
.panel-left {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--navy);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pl-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pl-bg svg { width: 100%; height: 100%; position: absolute; inset: 0; }

.pl-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 36px 36px;
}

.pl-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  margin-bottom: 36px;
  transition: color .15s;
  align-self: flex-start;
}
.pl-back svg { width: 15px; height: 15px; }
.pl-back:hover { color: rgba(255,255,255,.85); }

.pl-logo-wrap { margin-bottom: 28px; }
.pl-logo {
  width: 160px;
  filter: brightness(0) invert(1);
  opacity: .90;
  display: block;
}

.pl-copy { margin-bottom: 30px; }
.pl-title {
  font-family: 'Poppins', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.pl-title em {
  font-style: italic;
  color: var(--accent);
}
.pl-desc {
  font-size: 14px;
  color: rgba(255,255,255,.58);
  line-height: 1.70;
}

.pl-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: auto;
  padding-bottom: 28px;
}
.pl-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,.70);
}
.perk-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(46,164,79,.20);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.perk-icon svg { width: 12px; height: 12px; color: #4ade80; }

.pl-initiative {
  font-size: 11.5px;
  color: rgba(255,255,255,.28);
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.pl-initiative strong { color: rgba(255,255,255,.50); font-weight: 600; }

/* ═══════════════════════════════
   PAINEL DIREITO
═══════════════════════════════ */
.panel-right {
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 64px;
}

.form-wrap {
  width: 100%;
  max-width: 560px;
  animation: fadeUp .45s ease both;
}

.form-header {
  margin-bottom: 28px;
}
.form-title {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--tx1);
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.form-sub {
  font-size: 14px;
  color: var(--tx3);
}
.form-sub a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.form-sub a:hover { text-decoration: underline; }

/* ═══════════════════════════════
   FORM STRUCTURE
═══════════════════════════════ */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label, legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx1);
  line-height: 1.4;
}
fieldset { border: none; padding: 0; }
legend { margin-bottom: 2px; }

.req { color: var(--accent); font-size: 13px; }

/* Field validation errors */
.field-msg {
  font-size: 12.5px;
  color: #dc2626;
  line-height: 1.4;
}
.field--error input,
.field--error .select-wrap select {
  border-color: #dc2626;
}
.field--error legend { color: #dc2626; }

.form-error-banner {
  background: rgba(220,38,38,.08);
  border: 1.5px solid rgba(220,38,38,.30);
  color: #b91c1c;
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.form-error-banner a { color: inherit; text-decoration: underline; }
.form-error-banner strong { display: block; margin-bottom: 6px; }
.form-error-banner ul { margin: 0; padding-left: 18px; }
.form-error-banner li { margin-bottom: 2px; }

/* Text inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"] {
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--tx1);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="tel"]::placeholder { color: var(--tx3); }
input:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* Password wrap */
.input-password-wrap {
  position: relative;
}
.input-password-wrap input { padding-right: 44px; }
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--tx3);
  transition: color .15s;
  display: flex;
  align-items: center;
}
.toggle-pw svg { width: 16px; height: 16px; }
.toggle-pw:hover { color: var(--tx1); }

/* Password strength */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  margin-top: 2px;
}
.str-bars { display: flex; gap: 4px; }
.str-bar {
  width: 26px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  transition: background .25s ease;
}
.str-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx3);
  transition: color .25s ease;
}
.pw-strength.str-1 .str-bar.filled { background: #ef4444; }
.pw-strength.str-2 .str-bar.filled { background: #f97316; }
.pw-strength.str-3 .str-bar.filled { background: #eab308; }
.pw-strength.str-4 .str-bar.filled { background: #84cc16; }
.pw-strength.str-5 .str-bar.filled { background: var(--green); }
.pw-strength.str-1 .str-label { color: #ef4444; }
.pw-strength.str-2 .str-label { color: #f97316; }
.pw-strength.str-3 .str-label { color: #eab308; }
.pw-strength.str-4 .str-label { color: #84cc16; }
.pw-strength.str-5 .str-label { color: var(--green); }

/* Selects */
.select-wrap {
  position: relative;
}
.select-wrap select {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--tx1);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.select-wrap select:disabled {
  cursor: not-allowed;
  background: var(--bg2, #f5f5f5);
  color: var(--tx3);
}
.select-wrap > svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--tx3);
  pointer-events: none;
}

/* Divider */
.form-divider {
  position: relative;
  text-align: center;
  margin: 2px 0;
}
.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.form-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--tx3);
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.radio-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--tx2);
  font-weight: 400;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  transition: border-color .15s, background .15s;
  user-select: none;
}
/* Input nativo escondido visualmente, mas continua focável via teclado
   (display:none removeria do tab order inteiramente). */
.radio-opt input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.radio-opt input:focus-visible ~ .radio-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.radio-box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color .15s;
  position: relative;
}
.radio-box::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .15s;
}
.radio-opt input:checked ~ .radio-box { border-color: var(--accent); }
.radio-opt input:checked ~ .radio-box::after { opacity: 1; }
.radio-opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--tx1);
  font-weight: 500;
}

/* Plan selector */
.plano-group { width: 100%; }
.plano-opt {
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
}
.plano-opt-info { display: flex; flex-direction: column; gap: 2px; }
.plano-opt-info strong { font-size: 15px; color: var(--tx1); }
.plano-opt-preco { font-size: 13px; color: var(--tx3); }

/* Checkbox group */
.check-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.check-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
  color: var(--tx2);
  font-weight: 400;
  user-select: none;
}
/* Input nativo escondido visualmente, mas continua focável via teclado
   (display:none removeria do tab order inteiramente). */
.check-opt input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.check-opt input:focus-visible ~ .check-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
  background: var(--white);
}
.check-box svg { width: 11px; height: 11px; color: white; opacity: 0; transition: opacity .15s; }
.check-opt input:checked ~ .check-box {
  border-color: var(--accent);
  background: var(--accent);
}
.check-opt input:checked ~ .check-box svg { opacity: 1; }

/* Comunicações checkbox — full width */
.check-opt--comm {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.check-opt--comm:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* Submit button */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255,64,0,.38);
  transition: background .2s, box-shadow .2s, transform .15s;
  margin-top: 4px;
  text-decoration: none;
}
.btn-submit svg { width: 18px; height: 18px; }
.btn-submit:hover {
  background: #e63900;
  box-shadow: 0 6px 26px rgba(255,64,0,.52);
  transform: translateY(-1px);
}
.btn-submit:active { transform: translateY(0); }

.btn-submit--secondary {
  background: transparent;
  color: var(--tx2);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-submit--secondary:hover {
  background: var(--bg2, #F9FAFB);
  box-shadow: none;
  color: var(--tx1);
}

.form-terms {
  font-size: 12px;
  color: var(--tx3);
  text-align: center;
  line-height: 1.6;
}
.form-terms a { color: var(--tx2); text-decoration: underline; }
.form-terms a:hover { color: var(--tx1); }

.boleto-box {
  background: var(--accent-bg);
  border: 1.5px solid rgba(255,64,0,.20);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.boleto-box-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.boleto-box-codigo {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.boleto-box-codigo code {
  flex: 1;
  font-family: 'DM Sans', monospace;
  font-size: 13px;
  color: var(--tx1);
  word-break: break-all;
  line-height: 1.5;
}
.boleto-copiar {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.boleto-copiar:hover { background: #e63900; }
.boleto-copiar.copiado { background: var(--green); }
.boleto-box-hint {
  font-size: 13px;
  color: var(--tx2);
  margin-top: 8px;
}

.pix-box { text-align: center; }
.pix-box .boleto-box-label { text-align: center; }
.pix-qrcode {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pix-box .boleto-box-hint { text-align: center; }

/* Página de pagamento pendente: os textos aqui carregam instrução
   importante (não são legenda secundária como em /assine/), então
   precisam de mais contraste do que --tx3 oferece. */
.page-pendente .form-sub {
  color: var(--tx2);
  font-size: 15px;
  line-height: 1.6;
}
.page-pendente .form-terms {
  color: var(--tx2);
  font-size: 13px;
  margin-top: 20px;
}

#campos-cartao,
#boleto-info,
#pix-info {
  display: none;
}
#campos-cartao {
  flex-direction: column;
  gap: 18px;
}
#boleto-info,
#pix-info {
  background: var(--accent-bg);
  border: 1.5px solid rgba(255,64,0,.20);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
  color: var(--tx2);
}

/* Success icon (página de bem-vindo pós-pagamento) */
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(46,164,79,.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg { width: 30px; height: 30px; color: var(--green); }

/* ═══════════════════════════════
   ANIMATIONS
═══════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .panel-left {
    position: relative;
    height: auto;
    min-height: unset;
  }
  .pl-inner { padding: 28px 24px 32px; }
  .pl-title { font-size: 30px; }
  .pl-perks { display: none; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .check-group { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .panel-right { padding: 32px 16px 48px; }
}

/* ── Minha conta ─────────────────────────────────────────────── */
.input-action-wrap { position: relative; }
.input-action-wrap input { padding-right: 120px; }
.input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.input-action:hover { text-decoration: underline; }

.form-success-banner {
  background: rgba(46,164,79,.08);
  border: 1.5px solid rgba(46,164,79,.30);
  color: #1a7f37;
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.field-hint {
  font-size: 12px;
  color: var(--tx3);
  line-height: 1.5;
}
.field-hint a { color: var(--tx2); text-decoration: underline; }

input:disabled {
  background: var(--bg2, #F9FAFB);
  color: var(--tx3);
  cursor: not-allowed;
}

.form-terms--left { text-align: left; margin-top: -6px; }
