/* Importamos las variables root */
@import "../../css/root_main.css";

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: var(--font-family-primary);
        background: linear-gradient(135deg, var(--background-primary), var(--background-secondary));
        color: var(--text-primary);
        min-height: 100vh;
        overflow-x: hidden;
    }


/* ================================================================================
   🏗️ ESTRUCTURA PRINCIPAL
   ================================================================================*/

.col_1_main_header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.main-column-login {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1400px;
  align-items: center;
  margin: 0 auto;
  height: 100vh;
}


.col_3_login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 97%;
}


/* ================================================================================
   📝 CONTENEDOR PRINCIPAL
   ================================================================================*/

.container_login {
  background: var(--background-secondary);
  border-radius: 25px;
  padding: 45px;
  border: 1px solid var(--border-color);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 165, 5, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  position: relative;
  width: 100%;
  max-width: 550px;
  height: var(--height-100, auto);
  animation: containerFloat 0.8s ease;
}

.container_login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 25px 25px 0 0;
}

.container_login::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(239, 165, 5, 0.05),
    transparent
  );
  transition: left 0.8s ease;
  pointer-events: none;
}

.container_login:hover::after {
  left: 100%;
}

@keyframes containerFloat {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================================================================
   🎯 TÍTULO Y BIENVENIDA
   ================================================================================*/

.form_login h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(239, 165, 5, 0.3);
  position: relative;
}

.form_login h1::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  animation: titleUnderline 2s ease-in-out infinite alternate;
}

@keyframes titleUnderline {
  0% {
    width: 100px;
    opacity: 0.7;
  }

  100% {
    width: 140px;
    opacity: 1;
    box-shadow: 0 0 15px rgba(239, 165, 5, 0.4);
  }
}

.form_login p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 1rem;
  font-weight: 500;
}

.form_login p strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* ================================================================================
   💻 CÓDIGO DE DESARROLLO
   ================================================================================*/

.dev-code-display {
  background: var(--background-info-light);
  border: 2px solid var(--color-info);
  border-radius: 12px;
  padding: 15px 20px;
  margin: 20px 0;
  text-align: center;
  font-family: "Courier New", monospace;
  font-weight: 600;
  color: var(--color-info);
  animation: devCodeBlink 2s ease-in-out infinite;
}

@keyframes devCodeBlink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.2);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
  }
}

/* ================================================================================
   ⏰ TEMPORIZADOR CRÍTICO
   ================================================================================*/

.timer-warning {
  background: var(--background-warning-light);
  border: 2px solid var(--color-warning);
  border-radius: 15px;
  padding: 18px 25px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-warning);
  position: relative;
  overflow: hidden;
  animation: timerPulse 2s ease-in-out infinite;
}

.timer-warning.timer-critical {
  background: var(--background-error-light);
  border-color: var(--color-error);
  color: var(--color-error);
  animation: timerCritical 1s ease-in-out infinite;
}

.timer-warning::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.timer-warning:hover::before {
  left: 100%;
}

@keyframes timerPulse {
  0%,
  100% {
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
  }

  50% {
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
  }
}

@keyframes timerCritical {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.6);
    transform: scale(1.02);
  }
}

.timer-warning small {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

/* ================================================================================
   📧 INFORMACIÓN DE RECOVERY
   ================================================================================*/

.recovery-info {
  background: var(--background-tertiary);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  border: 1px solid var(--border-color-light);
  position: relative;
}

.recovery-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 15px 15px 0 0;
}

.recovery-info h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recovery-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.recovery-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.recovery-info small {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  opacity: 0.8;
}

.recovery-info ul {
  margin-left: 20px;
  color: var(--text-secondary);
}

.recovery-info li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ================================================================================
   🔢 CAMPO DE CÓDIGO
   ================================================================================*/

.code-input {
  width: 100%;
  padding: 20px;
  border: 3px solid var(--border-color-input);
  border-radius: 15px;
  background: var(--background-tertiary);
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 8px;
  font-family: "Courier New", monospace;
  margin: 15px 0 25px 0;
  transition: all 0.4s ease;
  outline: none;
}

.code-input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.code-input:focus {
  border-color: var(--primary-color);
  background: var(--background-input-focus);
  box-shadow: 0 0 0 4px var(--primary-color-alpha-20),
    0 10px 30px rgba(239, 165, 5, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.code-input:valid {
  border-color: var(--color-success);
  background: var(--background-valid);
  animation: codeValid 0.5s ease;
}

@keyframes codeValid {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ================================================================================
   🔒 CAMPOS DE CONTRASEÑA INDIVIDUALES
   ================================================================================*/

label {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin: 20px 0 15px 0;
  font-size: 1.05rem;
}

.password-fields {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.password-char {
  width: 55px;
  height: 55px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  border: 3px solid var(--border-color-input);
  border-radius: 12px;
  background: var(--background-tertiary);
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-family: "Courier New", monospace;
}

.password-char:focus {
  border-color: var(--primary-color);
  background: var(--background-input-focus);
  box-shadow: 0 0 0 3px var(--primary-color-alpha-20),
    0 8px 20px rgba(239, 165, 5, 0.2);
  transform: translateY(-2px) scale(1.1);
}

.password-char.valid {
  border-color: var(--color-success);
  background: var(--background-valid);
  animation: charValid 0.3s ease;
}

.password-char.invalid {
  border-color: var(--color-error);
  background: var(--background-invalid);
  animation: charShake 0.4s ease;
}

@keyframes charValid {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

@keyframes charShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* ================================================================================
   🔘 BOTONES ESPECIALIZADOS
   ================================================================================*/

.btn-futuristic.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 25px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: var(--background-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--primary-color-alpha-30);
  margin: 8px 5px;
  min-width: 140px;
}

.btn-futuristic::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-btn-shine);
  transition: left 0.5s ease;
  z-index: 1;
}

.btn-futuristic::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: 2;
}

.btn-futuristic:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px var(--primary-color-alpha-50);
  background: var(--primary-color-hover);
}

.btn-futuristic:hover::before {
  left: 100%;
}

.btn-futuristic:hover::after {
  width: 200%;
  height: 200%;
}

.btn-futuristic:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 15px var(--primary-color-alpha-30);
}

/* Botón específico para mostrar/ocultar */
#togglePassword {
  background: var(--background-tertiary);
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#togglePassword:hover {
  background: var(--background-btn-hover);
  border-color: var(--primary-color);
  color: var(--primary-color-hover);
  box-shadow: 0 8px 25px rgba(239, 165, 5, 0.2);
}

/* Botón de generar contraseña */
#generate-password {
  background: linear-gradient(135deg, var(--color-info), #1976d2);
  color: white;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

#generate-password:hover {
  background: linear-gradient(135deg, #1976d2, var(--color-info));
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

/* Botón de envío especial */
button[type="submit"].btn-futuristic {
  width: 100%;
  background: var(--gradient-success) !important;
  color: white !important;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3) !important;
  margin: 25px 0;
  padding: 18px 30px;
  font-size: 1.1rem;
  font-weight: 700;
}

button[type="submit"].btn-futuristic:hover {
  background: linear-gradient(135deg, #20c997, #28a745) !important;
  box-shadow: 0 15px 40px rgba(40, 167, 69, 0.5) !important;
}

/* Contenido de botones */
.btn-futuristic * {
  position: relative;
  z-index: 3;
}

/* ================================================================================
   📋 LISTA DE REQUISITOS
   ================================================================================*/

.container_li {
  background: var(--background-tertiary);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
  border: 1px solid var(--border-color-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}

.container_li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 15px 15px 0 0;
}

.li_exclusive {
  list-style: none;
  padding: 8px 0 8px 30px;
  margin: 12px 0;
  position: relative;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.li_exclusive::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--primary-color);
  font-weight: 900;
  font-size: 1.2rem;
  animation: bulletPulse 2s ease-in-out infinite;
}

.li_exclusive:hover {
  color: var(--text-primary);
  border-left-color: var(--primary-color);
  transform: translateX(5px);
}

.li_exclusive.fulfilled {
  color: var(--color-success);
  border-left-color: var(--color-success);
}

.li_exclusive.fulfilled::before {
  content: "✓";
  color: var(--color-success);
}

@keyframes bulletPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* ================================================================================
   🔗 ENLACES FINALES
   ================================================================================*/

.link {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.link:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--border-color-light);
  opacity: 0.5;
}

.link p {
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.link a:hover {
  color: var(--primary-color-hover);
  background: var(--background-link-hover);
  transform: translateY(-1px);
}

/* ================================================================================
   🎨 ANIMACIONES DE ENTRADA
   ================================================================================*/

.form_login > * {
  animation: elementFadeIn 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.form_login h1 {
  animation-delay: 0.1s;
}

.form_login p:first-of-type {
  animation-delay: 0.2s;
}

.dev-code-display {
  animation-delay: 0.3s;
}

.timer-warning {
  animation-delay: 0.4s;
}

.recovery-info:nth-of-type(1) {
  animation-delay: 0.5s;
}

form {
  animation-delay: 0.6s;
}

.recovery-info:nth-of-type(2) {
  animation-delay: 0.7s;
}

.link:nth-of-type(1) {
  animation-delay: 0.8s;
}

.link:nth-of-type(2) {
  animation-delay: 0.9s;
}

@keyframes elementFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================================================
   📱 RESPONSIVE DESIGN
   ================================================================================*/

@media (max-width: 1200px) {
  .main-column-login {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .col_2_login,
  .col_4_login {
    display: none;
  }

  .col_3_login {
    height: auto;
    min-height: 100vh;
    padding: 20px 0;
  }
}

@media (max-width: 768px) {
  .col_1_main_header {
    padding: 15px;
  }

  .container_login {
    padding: 35px 25px;
    max-width: 100%;
    height: auto;
    min-height: auto;
  }

  .form_login h1 {
    font-size: 1.9rem;
  }

  .code-input {
    font-size: 1.6rem;
    letter-spacing: 6px;
    padding: 18px;
  }

  .password-fields {
    gap: 8px;
  }

  .password-char {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .btn-futuristic.btn-small {
    padding: 14px 20px;
    font-size: 0.9rem;
    min-width: 120px;
    margin: 6px 3px;
  }

  button[type="submit"].btn-futuristic {
    padding: 16px 25px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container_login {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .form_login h1 {
    font-size: 1.7rem;
  }

  .code-input {
    font-size: 1.4rem;
    letter-spacing: 4px;
    padding: 16px;
  }

  .password-fields {
    gap: 6px;
    justify-content: space-between;
  }

  .password-char {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .btn-futuristic.btn-small {
    padding: 12px 16px;
    font-size: 0.85rem;
    min-width: 110px;
    margin: 5px 2px;
  }

  .recovery-info,
  .container_li,
  .timer-warning {
    padding: 20px 18px;
  }

  .li_exclusive {
    padding: 6px 0 6px 25px;
    font-size: 0.9rem;
  }

  .dev-code-display {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .container_login {
    padding: 25px 15px;
  }

  .form_login h1 {
    font-size: 1.5rem;
  }

  .code-input {
    font-size: 1.2rem;
    letter-spacing: 3px;
    padding: 14px;
  }

  .password-char {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .btn-futuristic.btn-small {
    padding: 11px 14px;
    font-size: 0.8rem;
    min-width: 100px;
  }

  .recovery-info,
  .container_li,
  .timer-warning {
    padding: 18px 15px;
  }
}

/* ================================================================================
   🌙 MODO OSCURO MEJORADO
   ================================================================================*/

@media (prefers-color-scheme: dark) {
  body {
    --background-primary: #0a0a0a;
    --background-secondary: #111111;
    --background-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-tertiary: rgba(255, 255, 255, 0.6);
  }

  .container_login {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(239, 165, 5, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .container_login:hover {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(239, 165, 5, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

/* ================================================================================
   🖨️ PRINT STYLES
   ================================================================================*/

@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .container_login {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: white !important;
  }

  .btn-futuristic,
  .dev-code-display {
    display: none !important;
  }

  .form_login h1 {
    color: #333 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
  }

  .recovery-info,
  .container_li,
  .timer-warning {
    border: 1px solid #ddd !important;
    background: #f9f9f9 !important;
  }
}

/* ================================================================================
   ⚡ EFECTOS ESPECIALES
   ================================================================================*/

.container_login:hover {
  animation: securityGlow 2s ease-in-out infinite alternate;
}

@keyframes securityGlow {
  0% {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 165, 5, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  100% {
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(239, 165, 5, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 40px rgba(239, 165, 5, 0.1);
  }
}

/* Efecto de escaneo de seguridad */
.form_login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-scanner);
  transition: left 3s ease;
  opacity: 0.6;
}

.container_login:hover .form_login::before {
  left: 100%;
}

/* Animación específica para campos de contraseña */
.password-char:nth-child(1) {
  animation-delay: 0.1s;
}

.password-char:nth-child(2) {
  animation-delay: 0.15s;
}

.password-char:nth-child(3) {
  animation-delay: 0.2s;
}

.password-char:nth-child(4) {
  animation-delay: 0.25s;
}

.password-char:nth-child(5) {
  animation-delay: 0.3s;
}

.password-char:nth-child(6) {
  animation-delay: 0.35s;
}

.password-char:nth-child(7) {
  animation-delay: 0.4s;
}

.password-char {
  animation: charAppear 0.5s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes charAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
