/* ═══════════════════════════════════════════════════════
   Layout de Auth — Login y Registro (glassmorphism)
═══════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
}

/* Fondo animado con orbes */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: var(--color-primario);
  top: -150px; left: -150px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: var(--color-secundario);
  bottom: -100px; right: -100px;
  animation-delay: 3s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: var(--color-acento);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
}

@keyframes orbFloat {
  0%, 100% { transform: scale(1) translate(0, 0); }
  33%       { transform: scale(1.1) translate(20px, -20px); }
  66%       { transform: scale(0.9) translate(-20px, 20px); }
}

/* Contenedor central de auth */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

/* Card de auth con glassmorphism */
.auth-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: cardEntrada 0.5s ease both;
}

@keyframes cardEntrada {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo-icon {
  width: 48px; height: 48px;
  background: var(--grad-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Título y subtítulo */
.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  text-align: center;
  color: var(--texto-3);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

/* Divisor */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--texto-3);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--borde);
}

/* Input con ícono */
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .form-control {
  padding-left: 42px;
}
.input-icon-wrap .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texto-3);
  font-size: 0.9rem;
  pointer-events: none;
}

/* Toggle password */
.input-pass-wrap { position: relative; }
.input-pass-wrap .form-control { padding-right: 44px; }
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--texto-3);
  cursor: pointer;
  padding: 4px;
  transition: color var(--trans-fast);
}
.toggle-pass:hover { color: var(--texto-1); }

/* Link de abajo */
.auth-footer-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--texto-3);
  margin-top: 20px;
}
.auth-footer-link a {
  color: var(--color-primario);
  font-weight: 600;
}
.auth-footer-link a:hover { text-decoration: underline; }

/* Fuerza de contraseña */
.password-strength {
  height: 4px;
  background: var(--bg-elevado);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.password-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* Reglas de contraseña */
.password-rules { margin-top: 8px; }
.password-rule {
  font-size: 0.75rem;
  color: var(--texto-3);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--trans-fast);
}
.password-rule.ok { color: var(--color-exito); }
.password-rule.ok::before { content: '✓'; }
.password-rule:not(.ok)::before { content: '○'; }
