/* ========================================================================== */
/* Estilos Generales y Variables */
/* ========================================================================== */
:root {
  /* Paleta principal */
  --bg-0: #0c0f12;
  --bg-1: #11151a;
  --bg-2: #171c22;
  --txt: #eef1f6;
  --txt-dim: #aab7c7;

  /* Acentos aurora (metal + hielo + cobre) */
  --aurora-1: #F5F6F7;
  --aurora-2: #8a7dff;
  --aurora-3: #c78b54;
  --aurora-4: #7ae3c3;
  --focus: rgba(92, 194, 255, 0.28);

  /* Glass + sombras */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --radius: 22px;
  --shadow-a: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-b: 0 6px 18px rgba(0, 0, 0, 0.25);

  /* Botón (ACTUALIZADO) */
  --btn-grad-1: #E36464; /* Color de fondo del botón */
  --btn-grad-2: #E88383; /* Color un poco más claro para el efecto hover */
  --btn-glow: 0 12px 30px rgba(227, 100, 100, 0.25); /* Sombra para el glow */

  /* Input */
  --inp-bg: rgba(255, 255, 255, 0.05);
  --inp-bd: rgba(255, 255, 255, 0.16);
  --inp-bd-focus: rgba(92, 194, 255, 0.55);
}

/* Base del cuerpo y fondo animado */
html,
body {
  height: 100%;
}
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--txt);
  background: radial-gradient(1000px 700px at 15% 10%, #10151b 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 85%, #0f141a 0%, transparent 60%),
    linear-gradient(120deg, var(--bg-0), var(--bg-1), var(--bg-2));
  background-size: 180% 180%;
  animation: bg-pan 16s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
  position: relative;
}

/* Animación de fondo */
@keyframes bg-pan {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Contenedor principal del formulario */
.form-container {
  width: min(440px, 92vw);
  position: relative;
  z-index: 1;
}

/* Cajas de login y recuperación */
.login-box,
.forgot-password-box {
  padding: 26px 22px 24px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-strong);
  box-shadow: var(--shadow-a);
  overflow: hidden;
  position: relative;
}

/* Halo y borde degradado animado */
.login-box::before, .forgot-password-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 2px);
  padding: 1px;
  background: conic-gradient(
    from 120deg,
    color-mix(in oklab, var(--aurora-1) 70%, #fff 0%) 0deg,
    color-mix(in oklab, var(--aurora-2) 75%, #fff 0%) 90deg,
    color-mix(in oklab, var(--aurora-3) 80%, #fff 0%) 180deg,
    color-mix(in oklab, var(--aurora-4) 70%, #fff 0%) 270deg,
    var(--aurora-1) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-rotate 14s linear infinite;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}
@keyframes ring-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Reflejo superior sutil */
.login-box::after, .forgot-password-box::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(100% 40% at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.6;
  z-index: 0;
}

/* Clase para ocultar los formularios */
.hidden {
  display: none;
}

/* Estilos para el Logo y Títulos */
.logo-login {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.logo-login img {
  max-height: 86px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
}

.login-box h5,
.forgot-password-box h5 {
  text-align: center;
  margin: 10px 0 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--txt);
}

.login-form p,
.forgot-password-form p {
  margin-bottom: 1.5rem;
  color: var(--txt-dim);
}

/* ========================================================================== */
/* Estilos para los Campos de Entrada y sus Iconos */
/* ========================================================================== */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group i:first-child {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-dim);
  z-index: 2;
}

.input-group input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 1px solid var(--inp-bd);
  border-radius: 14px;
  font-size: 1rem;
  background: var(--inp-bg);
  color: var(--txt);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 0 0 rgba(0, 0, 0, 0);
  z-index: 1;
}

.input-group input::placeholder {
  color: #96a6b9;
}

.input-group input:focus {
  outline: none;
  border-color: var(--inp-bd-focus);
  box-shadow: 0 0 0 0.25rem var(--focus), 0 6px 16px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
  color: var(--txt);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--txt-dim);
  transition: color 0.2s ease;
  z-index: 2;
}
.toggle-password:hover {
  color: var(--txt);
}

/* ========================================================================== */
/* Estilos para los Botones y Enlaces */
/* ========================================================================== */
.login-form button,
.forgot-password-form button {
  width: 100%;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, var(--btn-grad-1), var(--btn-grad-2));
  border: 0;
  color: #08131b;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: var(--btn-glow), inset 0 2px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.08s ease, filter 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-form button::after,
.forgot-password-form button::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 35%, transparent 70%);
  transform: translateX(-120%);
  filter: blur(8px);
  transition: transform 0.8s ease;
}

.login-form button:hover,
.forgot-password-form button:hover {
  filter: brightness(1.06);
  /* Sombra del botón ajustada al nuevo color */
  box-shadow: 0 14px 28px rgba(227, 100, 100, 0.3);
}

.login-form button:hover::after,
.forgot-password-form button:hover::after {
  transform: translateX(120%);
}

.login-form button:active,
.forgot-password-form button:active {
  transform: translateY(1px);
}

.login-form button i,
.forgot-password-form button i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Estilo para los enlaces de "olvidaste contraseña" y "volver al login" */
.forgot-password,
.back-to-login {
  color: color-mix(in oklab, var(--aurora-1) 75%, #fff 0%);
  text-decoration: none;
  transition: opacity 0.2s ease, text-shadow 0.2s ease;
  text-shadow: 0 0 0 rgba(92, 194, 255, 0);
  display: block;
}

.forgot-password {
  text-align: right;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.back-to-login {
  text-align: center;
  margin-top: 1.5rem;
}

.forgot-password:hover,
.back-to-login:hover {
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(92, 194, 255, 0.35);
}

/* Estilo para el enlace de Verificador de precio */
.price-checker-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: color-mix(in oklab, var(--aurora-1) 75%, #fff 0%);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, text-shadow 0.2s ease;
  text-shadow: 0 0 0 rgba(92, 194, 255, 0);
}

.price-checker-link:hover {
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(92, 194, 255, 0.35);
}

/* Diseño Responsivo para Móviles y Tablets */
@media (max-width: 576px) {
  .login-box,
  .forgot-password-box {
    width: 90%;
    box-sizing: border-box;
    padding: 2rem 1.5rem;
  }
  .logo-login img {
    max-width: 250px;
  }
}

/* Accesibilidad: reduce animación si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .login-form button::after,
  .forgot-password-form button::after {
    display: none;
  }
}