/* 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: start;
  margin: 0 auto;
}

.col_2_login {
  background: var(--background-secondary);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
}

.col_2_login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  border-radius: 20px 20px 0 0;
}

.col_3_login {
  display: flex;
  justify-content: center;
  align-items: center;
}



/* ================================================================================
   📋 INFORMACIÓN Y TÍTULOS
   ================================================================================*/

.col_2_login h1 {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--primary-color);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  justify-content: center;
}

.col_2_login h1 i {
  width: 32px;
  height: 32px;
}

.recovery-info {
  background: var(--background-tertiary);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color-light);
  position: relative;
}

.recovery-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 15px 15px 0 0;
}

.recovery-info h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.recovery-info h4 i {
  width: 20px;
  height: 20px;
}

.recovery-info ol,
.recovery-info ul {
  margin-left: 20px;
  color: var(--text-secondary);
}

.recovery-info li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.recovery-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.recovery-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 10px 0;
}

.security-note {
  background: var(--background-info-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.security-note strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.security-note strong i {
  width: 18px;
  height: 18px;
}

.security-note ul {
  margin-left: 15px;
  color: var(--text-secondary);
}

.security-note li {
  margin-bottom: 6px;
}

/* ================================================================================
   📝 FORMULARIO PRINCIPAL
   ================================================================================*/

.container_login {
  background: var(--background-secondary);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  position: relative;
  min-width: 450px;
  max-width: 500px;
  width: 100%;
  transition: all 0.3s ease;
}

.container_login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 20px 20px 0 0;
}

.container_login:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.form_login h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

.form_login h2 i {
  width: 28px;
  height: 28px;
}

/* ================================================================================
   📊 INDICADOR DE PROGRESO
   ================================================================================*/

.recovery-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.recovery-progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-color-light);
  z-index: 1;
}

.recovery-step {
  position: relative;
  z-index: 2;
  background: var(--background-secondary);
  padding: 10px 15px;
  border-radius: 25px;
  border: 2px solid var(--border-color-light);
  text-align: center;
  margin: 5px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 120px;
}

.recovery-step.active {
  border-color: var(--primary-color);
  background: var(--background-info-light);
  color: var(--primary-color);
  font-weight: 600;
  transform: scale(1.05);
}

.recovery-step.completed {
  border-color: var(--color-success);
  background: var(--background-success-light);
  color: var(--color-success);
  font-weight: 600;
}

.recovery-step.completed::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-success);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================================================================
   🎯 CAMPOS DE ENTRADA
   ================================================================================*/

.field {
  margin-bottom: 25px;
  position: relative;
}

.field.input {
  position: relative;
}

.input-icon {
  position: relative;
  display: block;
  width: 100%;
}

.input-icon input {
  width: 100%;
  padding: 15px 50px 15px 50px;
  border: 2px solid var(--border-color-input);
  border-radius: 12px;
  background: var(--background-tertiary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-icon input::placeholder {
  color: var(--text-tertiary);
}

.input-icon input:focus {
  border-color: var(--primary-color);
  background: var(--background-input-focus);
  box-shadow: 0 0 0 3px var(--primary-color-alpha-20);
  transform: translateY(-1px);
}

.input-icon i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: all 0.3s ease;
  pointer-events: none;
}

.input-icon i:first-of-type {
  left: 18px;
}

.input-icon .validation-icon {
  right: 18px;
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
}

.field.input.valid .validation-icon {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  color: var(--color-success);
}

.field.input.error .validation-icon {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  color: var(--color-error);
}

.field.input.valid input {
  border-color: var(--color-success);
  background: var(--background-valid);
}

.field.input.error input {
  border-color: var(--color-error);
  background: var(--background-invalid);
}

.field.input:focus-within i:first-of-type {
  color: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

/* Campo de palabra clave con tooltip */
.keyword-field {
  position: relative;
}

.tooltip-container {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
}

.tooltip-container i {
  cursor: help;
  transition: all 0.3s ease;
}

.tooltip-container:hover i {
  color: var(--primary-color);
}

.tooltip {
  position: absolute;
  bottom: 30px;
  right: 0;
  background: var(--background-primary);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 20px;
  border: 6px solid transparent;
  border-top-color: var(--background-primary);
}

.tooltip-container:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ================================================================================
   🔘 BOTONES
   ================================================================================*/

.btn-futuristic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  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.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--primary-color-alpha-30);
}

.btn-futuristic::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-btn-shine);
  transition: left 0.5s ease;
}

.btn-futuristic:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-color-alpha-50);
  background: var(--primary-color-hover);
}

.btn-futuristic:hover::before {
  left: 100%;
}

.btn-futuristic:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px var(--primary-color-alpha-30);
}

.btn-futuristic:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-futuristic.sending {
  background: var(--color-info);
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btn-futuristic i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-small {
  padding: 12px 20px;
  font-size: 0.9rem;
}

/* ================================================================================
   📊 ESTADO DE EMAIL
   ================================================================================*/

.email-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  text-align: center;
}

.email-status.show {
  opacity: 1;
  transform: translateY(0);
}

.email-status.valid {
  background: var(--background-success-light);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.email-status.invalid {
  background: var(--background-error-light);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.email-status i {
  width: 16px;
  height: 16px;
}

/* ================================================================================
   🔗 ENLACES Y AYUDA
   ================================================================================*/

.help-section {
  background: var(--background-tertiary);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
  border: 1px solid var(--border-color-light);
}

.help-section h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.help-section h4 i {
  width: 20px;
  height: 20px;
}

.help-section p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.help-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.help-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--background-link);
  border: 1px solid var(--border-color-link);
  border-radius: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.help-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-link-shine);
  transition: left 0.4s ease;
}

.help-link:hover {
  background: var(--background-link-hover);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239, 165, 5, 0.2);
}

.help-link:hover::before {
  left: 100%;
}

.help-link i {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.link {
  text-align: center;
  margin: 25px 0;
}

.link p {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--background-link);
  border: 1px solid transparent;
}

.link-icon:hover {
  color: var(--primary-color-hover);
  background: var(--background-link-hover);
  border-color: var(--border-color-link);
  transform: translateY(-1px);
}

.link-icon i {
  width: 16px;
  height: 16px;
}

/* ================================================================================
   🍞 SISTEMA DE TOAST MESSAGES
   ================================================================================*/

.toast {
  position: fixed;
  top: 30px;
  right: 30px;
  background: var(--background-secondary);
  color: var(--text-primary);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  max-width: 400px;
  min-width: 300px;
  z-index: 9999;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success::before {
  background: var(--color-success);
}

.toast.error::before,
.toast.danger::before {
  background: var(--color-error);
}

.toast.warning::before {
  background: var(--color-warning);
}

.toast.info::before {
  background: var(--color-info);
}

.toast:hover {
  transform: translateX(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* ================================================================================
   🎭 MODAL DE CONSEJOS DE EMAIL
   ================================================================================*/

#emailTipsModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#emailTipsModal > div {
  background: var(--background-secondary);
  border-radius: 20px;
  padding: 40px;
  max-width: 550px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#emailTipsModal > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 20px 20px 0 0;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
  }
}

#emailTipsModal h3 {
  color: var(--primary-color);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
}

#emailTipsModal h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  margin: 20px 0 10px 0;
  font-size: 1.1rem;
}

#emailTipsModal ul {
  margin: 10px 0;
  padding-left: 25px;
  color: var(--text-secondary);
}

#emailTipsModal li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ================================================================================
   🎨 ANIMACIONES Y EFECTOS
   ================================================================================*/

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--primary-color-alpha-30);
  }

  50% {
    box-shadow: 0 0 20px var(--primary-color-alpha-50);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================================================
   📱 RESPONSIVE DESIGN
   ================================================================================*/

@media (max-width: 1200px) {
  .main-column-login {
    grid-template-columns: 1fr 2.5fr;
    gap: 30px;
  }

  .col_4_login {
    display: none;
  }
}

@media (max-width: 900px) {
  .main-column-login {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .col_2_login {
    order: 2;
    padding: 30px 25px;
  }

  .col_3_login {
    order: 1;
  }

  .container_login {
    min-width: auto;
    max-width: 100%;
    padding: 30px 25px;
  }

  .recovery-progress {
    flex-direction: column;
    gap: 10px;
  }

  .recovery-step {
    min-width: auto;
    padding: 12px 16px;
  }

  .help-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .col_1_main_header {
    padding: 15px;
  }

  .col_2_login,
  .container_login {
    padding: 25px 20px;
  }

  .col_2_login h1 {
    font-size: 1.8rem;
  }

  .form_login h2 {
    font-size: 1.5rem;
  }

  .recovery-info,
  .help-section {
    padding: 20px;
  }

  .input-icon input {
    padding: 12px 45px 12px 45px;
    font-size: 0.95rem;
  }

  .btn-futuristic {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  .toast {
    right: 15px;
    left: 15px;
    min-width: auto;
    max-width: none;
  }

  #emailTipsModal > div {
    padding: 30px 25px;
  }
}

@media (max-width: 400px) {
  .col_2_login,
  .container_login {
    padding: 20px 15px;
  }

  .recovery-info,
  .help-section {
    padding: 15px;
  }

  .col_2_login h1 {
    font-size: 1.6rem;
    gap: 10px;
  }

  .form_login h2 {
    font-size: 1.3rem;
    gap: 10px;
  }

  .input-icon input {
    padding: 12px 40px 12px 40px;
  }
}

/* ================================================================================
   🖨️ PRINT STYLES
   ================================================================================*/

@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .col_2_login,
  .container_login {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: white !important;
  }

  .btn-futuristic,
  .help-links,
  .toast {
    display: none !important;
  }
}
