/* =========================================================
   SPNCE AI — Páginas de autenticación (login, registro, onboarding)
   ========================================================= */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.auth-form-panel { background: var(--bg); }

.auth-form-wrap { width: 100%; max-width: 400px; margin: 0 auto; }

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 40px;
}

.auth-form-wrap h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.auth-form-wrap .auth-sub {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.auth-form-wrap .auth-sub a { color: var(--brand-blue-600); font-weight: 600; }

.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.auth-field input, .auth-field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
}
.auth-field input:focus, .auth-field select:focus {
  outline: none;
  border-color: var(--brand-blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.auth-field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.auth-field-row a { font-size: 13.5px; font-weight: 600; color: var(--brand-blue-600); }

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-checkbox input { margin-top: 3px; }
.auth-checkbox a { color: var(--brand-blue-600); font-weight: 600; }

.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.auth-alert.is-visible { display: flex; }
.auth-alert.is-error { background: var(--color-danger-soft); color: #991b1b; }
.auth-alert.is-success { background: var(--color-success-soft); color: #065f46; }
[data-theme="dark"] .auth-alert.is-error { background: rgba(239,68,68,.15); color: #fca5a5; }
[data-theme="dark"] .auth-alert.is-success { background: rgba(16,185,129,.15); color: #6ee7b7; }
.auth-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.password-meter { display: flex; gap: 4px; margin-top: 8px; }
.password-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.password-meter i.is-active.weak { background: var(--color-danger); }
.password-meter i.is-active.medium { background: var(--color-warning); }
.password-meter i.is-active.strong { background: var(--color-success); }
.password-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Panel de marca (derecha) */
.auth-brand-panel {
  position: relative;
  background: var(--brand-gradient);
  color: #fff;
  overflow: hidden;
  align-items: flex-start;
}
.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.16), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.12), transparent 45%);
}
.auth-brand-content { position: relative; max-width: 440px; margin: auto; }
.auth-brand-content h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 20px;
}
.auth-brand-features { list-style: none; padding: 0; display: grid; gap: 16px; margin-bottom: 40px; }
.auth-brand-features li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; opacity: .95; }
.auth-brand-features li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.auth-quote {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
}
.auth-quote .who { margin-top: 12px; font-size: 12.5px; font-weight: 700; opacity: .85; }

.back-home {
  position: fixed;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 9px 14px;
  border-radius: var(--radius-full);
  z-index: 10;
}
.back-home:hover { color: var(--text-primary); }
.back-home svg { width: 15px; height: 15px; }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-panel { padding: 32px 20px; }
}

/* ---------- Onboarding ---------- */
.onboarding-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  background: var(--bg-subtle);
}
.onboarding-card {
  width: 100%;
  max-width: 560px;
  padding: 40px;
}
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
}
.step-dot {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border);
}
.step-dot.is-done, .step-dot.is-active { background: var(--brand-gradient); }
.onboarding-step { display: none; }
.onboarding-step.is-active { display: block; }
.onboarding-step h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.onboarding-step .step-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.option-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-elevated);
}
.option-card .emoji { font-size: 22px; }
.option-card.is-selected { border-color: var(--brand-blue-600); background: var(--brand-gradient-soft); }

.onboarding-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.skip-link { font-size: 13.5px; color: var(--text-muted); font-weight: 600; }
