/* ===== Reset básico ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #ffffff;
  background-image: url('car_headlights_background.png'); /* mantém seu back original */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}
/* overlay cobrindo 100% SEM FALHAS */
body::before {
  content: "";
  position: fixed; /* fixo cobre toda a página mesmo com scroll */
  inset: 0;
  background: linear-gradient(135deg, rgba(15,15,15,.7) 0%, rgba(26,26,26,.75) 50%, rgba(45,45,45,.8) 100%);
  z-index: 0;
}

/* ===== Layout ===== */
.container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; z-index: 1;
}
.form-container {
  width: 100%; max-width: 500px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  animation: slideInLeft .6s ease-out;
}
@keyframes slideInLeft {
  from { opacity:0; transform: translateX(-32px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ===== Header ===== */
.header { text-align: center; margin-bottom: 22px; }
.logo { width: 220px; height: auto; margin-bottom: 8px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
/* Título da página de cadastro — BRANCO puro, sem neon */
.title-plain {
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.header p { color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.5; }

/* ===== Form ===== */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.form-group-small { max-width: 120px; }

label { font-size: 14px; font-weight: 600; color: #d8d8d8; }
input, select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: .2s ease;
}
input::placeholder { color: rgba(255,255,255,.5); }
select { cursor: pointer; }
select option { background: #1a1a1a; color: #fff; }

input:focus, select:focus {
  border-color: #7c3aed;
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(124,58,237,.25);
}

/* readonly */
input[readonly], select[readonly] { opacity: .75; cursor: not-allowed; background: rgba(255,255,255,.05); }
input[readonly]:focus, select[readonly]:focus { box-shadow: none; border-color: rgba(255,255,255,.18); }

/* Campos de endereço: colapsados até preencher CEP */
.hidden-address-fields { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .2s ease; }
.hidden-address-fields:not(.hidden-address-fields) {}
/* O JS remove apenas a classe "hidden-address-fields" quando deve aparecer */

/* Senhas lado a lado em telas largas */
.form-group-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== Termos / LGPD – checkbox ALINHADA NA MESMA LINHA ===== */
.terms-lgpd { margin-top: 4px; font-size: 13px; color: #eaeaea; line-height: 1.45; }
.terms-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}
.terms-line input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #7c3aed; /* cor do check */
}
.terms-lgpd a { color: #b892ff; text-decoration: underline; }

/* ===== Botão ===== */
.submit-btn {
  background: linear-gradient(135deg, #7c3aed, #9d55ff, #6d28d9);
  border: none; border-radius: 12px; padding: 14px 28px;
  color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .6px;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 26px rgba(124,58,237,.35), 0 6px 16px rgba(34,211,238,.20);
}
.submit-btn:hover { transform: translateY(-2px); }
.submit-btn:active { transform: translateY(0); }

.login-link { text-align: center; color: rgba(255,255,255,.78); font-size: 14px; margin-top: 12px; }
.login-link a { color: #b892ff; text-decoration: none; font-weight: 600; }
.login-link a:hover { color: #fff; }

.page-footer { margin-top: 12px; text-align: center; font-size: 12px; color: #ddd; opacity: .9; }

/* ===== Alertas ===== */
.alert {
  position: fixed; top: 20px; right: 20px;
  background: rgba(255,255,255,.96); color: #333;
  border-left: 4px solid #7c3aed;
  border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 10px; min-width: 280px;
  z-index: 1000; animation: slideIn .25s ease-out;
}
@keyframes slideIn { from{opacity:0; transform: translateX(24px);} to{opacity:1; transform: none;} }
.alert-success { border-left-color: #22c55e; }
.alert-error { border-left-color: #ef4444; }
.alert button {
  background: none; border: none; color: #666; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; width: 22px; height: 22px;
}

/* ===== Responsivo ===== */
@media (max-width: 768px) {
  .form-container { padding: 22px; }
  .logo { width: 180px; }
  .title-plain { font-size: 24px; }
  .form-row { flex-direction: column; gap: 18px; }
  .form-group-small { max-width: 100%; }
  .form-group-inline { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .form-container { padding: 20px; }
  .logo { width: 150px; }
  input, select { padding: 13px; }
  .submit-btn { width: 100%; }
  .alert { right: 10px; left: 10px; min-width: auto; }
}


/* Checkbox e links dos Termos */
.terms-lgpd{ margin-top: 10px; font-size: 13px; color:#eaeaea; }
.terms-line{ display:inline-flex; align-items:flex-start; gap:8px; line-height:1.45; }
.terms-line input[type="checkbox"]{ width:16px; height:16px; margin-top:2px; accent-color:#7c3aed; }
.terms-lgpd a{ color:#b892ff; text-decoration:underline; }

/* Aviso padrão (cadastro/roleta) */
.promo-disclaimer{ color:#d9d9e3; font-size:12.5px; opacity:.9; }

/* Estilo de erro instantâneo no CPF */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.25) !important;
}


/* === Password show/hide === */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { flex: 1; padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; font-size: 16px;
}
