/* =====================================================
   Cadastro de Clientes — Layout Split-Screen 2 Colunas
   Lado Esquerdo: Visual Hero | Lado Direito: Formulário
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1d4ed8;
  --blue-hover: #2563eb;
  --blue-d: #1e3a8a;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --amber-d: #d97706;
  --green: #10b981;
  --green-d: #059669;
  --dark: #090e1a;
  --dark-surface: #0d1a3a;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --light: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #2563eb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #f0fdf4;
  --radius: 12px;
  --radius-lg: 18px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1e293b;
}

/* ── Layout Split-Screen ── */
.page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ── LADO ESQUERDO — Visual Hero ── */
.side-left {
  background: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.32) 0%, transparent 50%),
    linear-gradient(150deg, #090e1a 0%, #0d1a3a 50%, #1e293b 100%);
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sl-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.sl-logo-img {
  max-height: 52px;
  width: auto;
  align-self: flex-start;
  display: block;
  margin-bottom: 18px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.sl-body { position: relative; z-index: 2; }

.sl-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 18px;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.sl-title {
  font-family: 'Sora', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.sl-title span {
  background: linear-gradient(90deg, #38bdf8 0%, #60a5fa 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sl-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 34px;
  max-width: 500px;
}

.sl-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 34px;
}
.sl-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 18px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.sl-step:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.08);
}
.sl-step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}
.sl-step-tx strong {
  display: block;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.sl-step-tx span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.sl-reward {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sl-rew-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease;
}
.sl-rew-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(6, 182, 212, 0.3);
}
.sl-rew-card i {
  font-size: 1.4rem;
  color: #38bdf8;
  margin-bottom: 8px;
  display: block;
}
.sl-rew-card strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.sl-rew-card span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
}

.sl-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sl-avatars { display: flex; }
.sl-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #090e1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  margin-left: -8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.sl-av:first-child { margin-left: 0; }
.sl-av:nth-child(1) { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
.sl-av:nth-child(2) { background: linear-gradient(135deg, #059669, #047857); }
.sl-av:nth-child(3) { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.sl-av:nth-child(4) { background: linear-gradient(135deg, var(--amber), var(--amber-d)); }
.sl-footer-tx {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}
.sl-footer-tx strong { color: #ffffff; }

/* ── LADO DIREITO — Formulário ── */
.side-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  background: #ffffff;
  position: relative;
  overflow-y: auto;
}

/* Mobile: formulário primeiro, cards depois */
@media (max-width: 960px) {
  .page {
    grid-template-columns: 1fr;
  }

  .side-right {
    order: 1;
    padding: 28px 20px 40px;
    min-height: auto;
  }

  .side-left {
    order: 2;
    padding: 36px 20px 40px;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sl-title {
    font-size: 1.55rem;
  }

  .sl-sub {
    font-size: 0.9rem;
  }

  .sl-logo-img {
    max-height: 40px;
    margin-bottom: 10px;
  }

  .sl-footer {
    margin-top: 28px;
  }
}

.form-header { margin-bottom: 24px; }
.form-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 20px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 9999px;
  transition: all 0.2s ease;
}
.form-header .back-link:hover {
  color: var(--blue);
  background: #e2e8f0;
  transform: translateX(-2px);
}

.form-header h1 {
  font-family: 'Sora', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}
.form-header p {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ── ALERTA (erro cadastro) ── */
.alert-cadastro-erro {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-cadastro-erro i {
  font-size: 1.1rem;
  color: #dc2626;
  flex-shrink: 0;
}

/* ── TOGGLE PF/PJ (Segmented Control) ── */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 1.5rem;
  gap: 6px;
}

.type-btn {
  border: none;
  background: transparent;
  color: var(--gray);
  font-family: "Sora", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.2px;
}
.type-btn i { font-size: 0.9rem; }
.type-btn.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.32);
}
.type-btn:not(.active):hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

/* ── BANNER DO PLANO ESCOLHIDO ── */
.plano-escolhido-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}
.plano-escolhido-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.plano-escolhido-info { flex: 1; min-width: 0; }
.plano-escolhido-info strong { display: block; font-size: 0.92rem; color: #0f172a; font-weight: 700; }
.plano-escolhido-info span { font-size: 0.78rem; color: var(--gray); }
.plano-escolhido-trocar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--gray);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.plano-escolhido-trocar:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* ── SISTEMA DE COLUNAS ── */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.col-6 { flex: 0 0 calc(50% - 7px); min-width: 0; }
.col-12 { flex: 0 0 100%; min-width: 0; }

@media (max-width: 600px) {
  .col-6, .col-12 { flex: 0 0 100%; }
}

/* ── FIELDS & INPUT WRAPPERS ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.field > label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
}
.field > label span {
  color: var(--danger);
  margin-left: 3px;
  font-weight: 700;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.field-wrap .field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.2s ease;
}
.field-wrap:focus-within .field-icon { color: var(--blue); }

input, select, textarea {
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.74rem 1rem 0.74rem 2.65rem;
  color: #0f172a;
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}

input::placeholder, textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hidden-section { display: none; }

/* ── STATUS LIVE (Validação AJAX) ── */
.status-live {
  font-size: 0.78rem;
  margin-top: 4px;
  font-weight: 600;
  display: none;
}
.status-live.error { display: block; color: var(--danger); }
.status-live.success { display: block; color: var(--green); }

.field.erro input {
  border-color: var(--danger) !important;
  background-color: var(--danger-light) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.field.sucesso input {
  border-color: var(--success) !important;
  background-color: var(--success-light) !important;
}

/* ── SENHA & OLHO ── */
.input-eye input { padding-right: 2.85rem; }
.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.eye-btn:hover {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

/* ── SENHA — BARRA DE FORÇA & REQUISITOS ── */
.strength-bar {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.strength-bar span {
  flex: 1;
  height: 4px;
  border-radius: 9999px;
  background: var(--border);
  transition: background 0.3s ease;
}
.strength-text {
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--gray);
}
.senha-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.req-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.2s ease;
}
.req-item i { font-size: 0.76rem; }
.req-item.ok { color: #059669; font-weight: 600; }

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

/* ── TERMOS ── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0 10px 0;
  transition: border-color 0.2s, background 0.2s;
}
.check-row:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--blue);
  margin-top: 2px;
  padding: 0;
}
.check-label {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
  display: block;
  flex: 1;
  min-width: 0;
  white-space: normal;
  font-weight: 400;
}
.check-label a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  display: inline;
}
.check-label a:hover {
  text-decoration: underline;
  color: var(--blue-d);
}

/* ── BTN SUBMIT ── */
.btn-submit {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #1e40af 100%);
  border: none;
  border-radius: var(--radius);
  color: #ffffff;
  font-family: "Sora", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -4px rgba(29, 78, 216, 0.45);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -4px rgba(29, 78, 216, 0.55);
  filter: brightness(1.04);
}
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.75; cursor: not-allowed; transform: none; }

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ── LOGIN BOX / FOOTER ── */
.login-box {
  text-align: center;
  font-size: 0.86rem;
  color: var(--gray);
  margin-bottom: 16px;
}
.btn-login-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.btn-login-link:hover { text-decoration: underline; color: var(--blue-d); }

/* ── TRUST BADGES ── */
.trust-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray);
  background: #f8fafc;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.trust-badge i { color: var(--green); font-size: 0.75rem; }

/* ── MODAL TERMOS / POLÍTICA ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 26, 0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.ativo { display: flex; animation: modalFadeIn 0.25s ease-out; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-doc {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-doc-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--light);
}
.modal-doc-header h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.modal-doc-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--gray);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
}
.modal-doc-close:hover {
  color: var(--blue);
  background: rgba(29, 78, 216, 0.08);
}
.modal-doc-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #334155;
}
.modal-doc-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--blue-d);
}
.modal-doc-body h4:first-child { margin-top: 0; }
.modal-doc-body p { margin: 0.5rem 0; }
.modal-doc-body ul { margin: 0.5rem 0; padding-left: 1.25rem; }

/* Entrada suave */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.side-right { animation: fadeUp .5s ease-out; }
