/* ========================================
   VIP Training - Estilos de Login Dual
   (Light Clean & Dark Premium v22.3)
   ======================================== */

/* Sobrescribe el body de global.css intencionalmente para la página de login */
body {
  padding-bottom: 0 !important;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.page-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--color-bg);
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}


/* --- FONDO OPTIMIZADO PARA MÓVIL (v28.6.0) --- */
.bg-circles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  /* Reducimos el blur a 40px: menos carga gráfica pero sigue siendo elegante */
  filter: blur(40px);
  animation: circles-smooth-drift 25s linear infinite;
  will-change: transform;
  /* Optimización para GPU */
  opacity: 0;
}

/* --- PALETA REDUCIDA (70% Naranja #f57206 / 30% Variedad) --- */

/* Círculo 1: Naranja Principal (Más pequeño para móvil) */
.circle-1 {
  width: 300px;
  height: 300px;
  top: -50px;
  background: radial-gradient(circle, rgba(245, 114, 6, 0.7) 0%, rgba(245, 114, 6, 0) 70%);
  animation-duration: 20s;
}

/* Círculo 2: Tu Azul #000118 (Con un toque de brillo para que se note) */
.circle-2 {
  width: 350px;
  height: 350px;
  bottom: 10%;
  background: radial-gradient(circle, rgba(30, 50, 180, 0.4) 0%, rgba(0, 1, 24, 0) 75%);
  animation-duration: 30s;
  animation-delay: -5s;
}

/* Círculo 3: Contraste Violeta Suave */
.circle-3 {
  width: 250px;
  height: 250px;
  top: 40%;
  background: radial-gradient(circle, rgba(163, 51, 255, 0.3) 0%, rgba(163, 51, 255, 0) 70%);
  animation-duration: 25s;
  animation-delay: -12s;
}

/* --- ANIMACIÓN FLUIDA --- */
@keyframes circles-smooth-drift {
  0% {
    transform: translate(120vw, 0);
    opacity: 0;
  }

  15% {
    opacity: 0.8;
    /* Opacidad un poco más baja para que no distraiga en móvil */
  }

  85% {
    opacity: 0.8;
  }

  100% {
    transform: translate(-120vw, 80px);
    opacity: 0;
  }
}

/* Soporte para iPad/Tablets: ajuste de rendimiento */
@media (max-width: 1024px) {
  .circle {
    filter: blur(35px);
    /* Menos desenfoque en tablets para maximizar FPS */
  }
}


#loginCard {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(10px);
}

/* --- MODO OSCURO PREMIUM --- */
[data-theme="dark"] #loginCard {
  background-color: #25262B;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  max-width: 160px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  animation: float 4s ease-in-out infinite;
  will-change: transform;
}

.logo-container h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

/* --- FORMULARIO --- */
.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
  transition: color 0.3s ease;
}

[data-theme="dark"] .form-group label {
  color: #909296;
  /* Gris tenue de la captura */
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.875rem 1.15rem;
  border-radius: 12px;
  border: 2px solid #000000;
  /* Borde negro para modo claro */
  background-color: var(--color-surface); /* v36.0.13 */
  color: #000000;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"] {
  background-color: #1A1B1E;
  border-color: #4A4D53;
  color: #FFFFFF;
  caret-color: #FFFFFF;
  /* Asegura que el cursor sea blanco */
}

/* Evitar el fondo amarillo de Chrome Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #000000;
  -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset;
  transition: background-color 5000s ease-in-out 0s;
  border: 2px solid #000000;
}

[data-theme="dark"] input:-webkit-autofill,
[data-theme="dark"] input:-webkit-autofill:hover,
[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0px 1000px #1A1B1E inset;
  border-color: #4A4D53;
}

input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(204, 75, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}


/* --- PASSWORD TOGGLE --- */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.password-toggle:hover {
  color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.icon-svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.password-wrapper input {
  padding-right: 50px !important;
}

/* --- BOTÓN PRINCIPAL --- */
.btn-main {
  width: 100%;
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  background-color: var(--color-primary);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px var(--color-primary-glow);
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--color-primary-glow);
  filter: brightness(1.1);
}

.btn-main:active {
  transform: translateY(0);
}

[data-theme="dark"] .btn-main {
  box-shadow: 0 0 25px rgba(204, 75, 0, 0.45);
  /* Orange Glow de la captura */
}

/* --- ALERTAS --- */
.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background-color: rgba(214, 57, 57, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(214, 57, 57, 0.2);
}