/* ══════════════════════════════════════════════════════════════════════
   auth-scene.css — Escena minimalista con grid animado para login/registro.
   Réplica de site/login-miplanes.html, extendida con estados de error,
   selects y botón de mostrar/ocultar contraseña que el diseño original
   no necesitaba. Usada por login.php y registro.php.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --auth-bg: #fb682a;
  --auth-dot-idle: #ffa578;
  --auth-dot-hot: #c2410c;
  --auth-ink: #18181b;
  --auth-ink-soft: #52525b;
  --auth-line: #e4e4e7;
  --auth-focus: #18181b;
  --auth-danger: #dc2626;
  --auth-danger-bg: #fef2f2;
  --auth-danger-line: #fecaca;
  --auth-success: #15803d;
  --auth-success-bg: #f0fdf4;
  --auth-success-line: #bbf7d0;
}

.auth-page * { box-sizing: border-box; }

.auth-page {
  margin: 0; padding: 0;
  min-height: 100%;
  background: var(--auth-bg);
  font-family: 'Poppins', sans-serif;
  color: var(--auth-ink);
}

#auth-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}

/* El header ya no es este .auth-header a medida — desde la migración a
   header.php (var $mp_header_white) el espacio para el header lo reserva
   automáticamente el propio header.php vía su JS de siempre
   (document.body.style.paddingTop = header.offsetHeight), igual que en
   cualquier otra página del sitio. .auth-scene ya no necesita un
   padding-top fijo para compensarlo. */
.auth-scene {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 40px;
}

/* Login (formulario más corto que registro): 90vh en vez de 100vh. */
.auth-scene-80 { min-height: 90vh; }

.auth-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(251,104,42,0) 0%, rgba(251,104,42,0) 45%, rgba(251,104,42,0.92) 100%);
}

.auth-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(228,228,231,0.9);
  border-radius: 18px;
  padding: 40px 36px 32px;
  box-shadow:
    0 1px 2px rgba(24,24,27,0.04),
    0 20px 50px -20px rgba(24,24,27,0.18);
  animation: auth-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-card.auth-card-wide { max-width: 460px; }

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.auth-card p.auth-sub {
  margin: 0 0 24px;
  font-size: 13.5px;
  color: var(--auth-ink-soft);
  line-height: 1.5;
}

.auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.auth-field label .opt {
  font-weight: 400;
  color: #a1a1aa;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.auth-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2352525b' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 30px;
}

.auth-field input::placeholder { color: #a1a1aa; }

.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 3px rgba(24,24,27,0.08);
}

.auth-field.has-error input,
.auth-field.has-error select {
  border-color: var(--auth-danger);
}

.auth-field.has-error input:focus,
.auth-field.has-error select:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.auth-field-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--auth-danger);
  line-height: 1.4;
}

.auth-field-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--auth-ink-soft);
  line-height: 1.4;
}

.auth-field-row { display: flex; gap: 10px; }
.auth-field-row .auth-field { flex: 1; margin-bottom: 0; }

.auth-input-wrap { position: relative; }

.auth-toggle-pwd {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 15px;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-toggle-pwd:hover { color: var(--auth-ink-soft); background: rgba(24,24,27,0.05); }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--auth-ink-soft);
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox input {
  width: 15px; height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--auth-ink);
}

.auth-checkbox a { color: var(--auth-ink-soft); text-decoration: underline; }
.auth-checkbox a:hover { color: var(--auth-ink); }

.auth-link {
  font-size: 12.5px;
  color: var(--auth-ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.auth-link:hover { color: var(--auth-ink); border-color: var(--auth-ink-soft); }

.auth-submit {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--auth-ink);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover { background: #27272a; }
.auth-submit:active { transform: scale(0.98); }
.auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24,24,27,0.25);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: #a1a1aa;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

.auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--auth-ink-soft);
  margin: 0;
}

.auth-footer-text a {
  color: var(--auth-ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--auth-ink);
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid;
}

.auth-alert i { flex-shrink: 0; margin-top: 1px; font-size: 15px; }

.auth-alert-error {
  background: var(--auth-danger-bg);
  border-color: var(--auth-danger-line);
  color: var(--auth-danger);
}

.auth-alert-error a { color: var(--auth-danger); text-decoration: underline; }

.auth-alert-success {
  background: var(--auth-success-bg);
  border-color: var(--auth-success-line);
  color: var(--auth-success);
}

.auth-footer {
  position: relative;
  z-index: 3;
  background: var(--auth-ink);
  padding: 36px 24px 26px;
}

.auth-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.auth-footer-logo svg { height: 22px; width: auto; display: block; }

.auth-footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.auth-footer-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-footer-nav a:hover { color: #fff; }

.auth-footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* 575px: mismo breakpoint que usa el resto del sitio (ver header.php). El
   header ahora es una barra de altura fija (68px) igual en cualquier
   dispositivo, así que a diferencia del diseño anterior (logo flotante)
   no depende de a qué lado del corte caiga cada celular — solo se ajusta
   el padding del card para pantallas angostas. */
@media (max-width: 575px) {
  .auth-scene { padding: 24px 16px 32px; }
  .auth-card { padding: 32px 22px 26px; border-radius: 14px; }
  .auth-field-row { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
}
