/* ========================================
   MODAL OLVIDAR CONTRASEÑA - ESTILO LOGIN
   Colores y diseño consistente con login
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== WRAPPER PRINCIPAL ===== */
.forgot-password-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 500px;
  gap: 0;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
}

/* ===== SECCIÓN FORMULARIO (IZQUIERDA) ===== */
.forgot-form-section {
  flex: 1;
  padding: 50px 45px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  border-radius: 0;
}

.forgot-form-content {
  width: 100%;
  max-width: 100%;
}

/* ===== SECCIÓN IMAGEN (DERECHA) ===== */
.forgot-image-section {
  flex: 0 0 55%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  border-left: 1px solid #e5e7eb;
}

.forgot-image {
  max-width: 280px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  aspect-ratio: 1;
}

/* ===== TÍTULOS Y TEXTOS ===== */
.forgot-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.forgot-description {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 28px 0;
  line-height: 1.5;
}

/* ===== FORMULARIO ===== */
.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.forgot-form-step {
  border: none;
  padding: 0;
  margin: 0;
}

/* ===== GRUPOS DE INPUT ===== */
.forgot-input-group {
  position: relative;
  width: 100%;
  margin-bottom: 4px;
}

.forgot-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: #f0f4f8;
  font-size: 15px;
  color: #1a1a1a;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.forgot-input:focus {
  background: #e8eef7;
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.1);
  border: 1px solid #0069ff;
}

.forgot-input::placeholder {
  color: #9ca3af;
}

/* ===== LABELS ===== */
.forgot-label {
  position: static;
  display: block;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  margin-bottom: 6px;
  padding: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

/* ===== SECCIÓN OTP ===== */
.forgot-otp-section {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.forgot-otp-section .forgot-label {
  position: static;
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 500;
}

.forgot-otp-hint {
  font-size: 12px;
  color: #4b5563;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.forgot-otp-section .forgot-input {
  margin-top: 0;
  background: #f0f4f8;
}

/* ===== SECCIÓN CONTRASEÑA ===== */
.forgot-password-section {
  margin: 0;
}

.forgot-password-section .forgot-label {
  position: static;
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 500;
}

.forgot-password-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 14px;
}

.forgot-password-input .forgot-input {
  padding-right: 36px;
  width: 100%;
  background: #f0f4f8;
}

.forgot-password-input i {
  position: absolute;
  right: 12px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.3s ease;
  user-select: none;
}

.forgot-password-input i:hover {
  color: #0069ff;
}

.forgot-password-input i:focus-visible {
  outline: 2px solid #0069ff;
  outline-offset: 2px;
  border-radius: 4px;
}

.forgot-password-hint {
  font-size: 12px;
  color: #4b5563;
  margin: 0 0 0 0;
  line-height: 1.4;
}

/* ===== LOADING ===== */
#LoadingRecuperarContrasena {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  margin: 0;
}

#LoadingRecuperarContrasena .spinner-border {
  color: #0069ff;
  width: 36px;
  height: 36px;
}

/* ===== BOTONES ===== */
.forgot-btn {
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

/* Botón primario */
.forgot-btn-primary {
  background: #0069ff;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 105, 255, 0.2);
  margin-bottom: 10px;
}

.forgot-btn-primary:hover {
  background: #0055cc;
  box-shadow: 0 4px 12px rgba(0, 105, 255, 0.3);
  transform: translateY(-1px);
}

.forgot-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 105, 255, 0.15);
}

.forgot-btn-primary:focus-visible {
  outline: 3px solid #0069ff;
  outline-offset: 2px;
}

.forgot-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Botón secundario */
.forgot-btn-secondary {
  background-color: #6b7280;
  color: white;
  box-shadow: 0 1px 3px rgba(107, 114, 128, 0.1);
  margin-bottom: 0;
}

.forgot-btn-secondary:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(75, 85, 99, 0.2);
}

.forgot-btn-secondary:focus-visible {
  outline: 3px solid #6b7280;
  outline-offset: 2px;
}

.forgot-btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== FOOTER ===== */
.forgot-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.forgot-footer-text {
  font-size: 13px;
  color: #4b5563;
  margin: 0 0 12px 0;
  padding: 0;
}

.forgot-btn-tertiary {
  background: transparent;
  color: #0069ff;
  border: 2px solid #0069ff;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: none;
  margin: 0;
}

.forgot-btn-tertiary:hover {
  background: #f0f4f8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 105, 255, 0.15);
}

.forgot-btn-tertiary:focus-visible {
  outline: 3px solid #0069ff;
  outline-offset: 2px;
}

/* ===== RESPONSIVE TABLET (768px) ===== */
@media (max-width: 768px) {
  .forgot-password-wrapper {
    flex-direction: column;
    min-height: auto;
    gap: 0;
  }

  .forgot-form-section {
    flex: 1;
    padding: 35px 25px;
    border-radius: 0;
    order: 2;
  }

  .forgot-image-section {
    flex: 0 0 auto;
    width: 100%;
    padding: 30px 20px;
    border-radius: 0;
    min-height: 180px;
    order: 1;
  }

  .forgot-image {
    max-width: 140px;
    width: 100%;
  }

  .forgot-title {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .forgot-description {
    font-size: 13px;
    margin-bottom: 24px;
    color: #4b5563;
  }

  .forgot-form {
    gap: 18px;
  }

  .forgot-label {
    font-size: 12px;
    color: #374151;
  }

  .forgot-input {
    font-size: 14px;
    padding: 11px 12px;
  }

  .forgot-otp-section {
    padding: 0;
  }

  .forgot-otp-section .forgot-label {
    font-size: 12px;
    color: #374151;
  }

  .forgot-otp-hint {
    font-size: 11px;
    color: #4b5563;
  }

  .forgot-password-section .forgot-label {
    font-size: 12px;
    color: #374151;
  }

  .forgot-password-hint {
    font-size: 11px;
    color: #4b5563;
  }

  .forgot-btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .forgot-btn-primary {
    margin-bottom: 10px;
  }

  .forgot-footer {
    margin-top: 18px;
    padding-top: 18px;
  }

  .forgot-footer-text {
    font-size: 12px;
    margin-bottom: 10px;
    color: #4b5563;
  }
}

/* ===== RESPONSIVE MOBILE (480px) ===== */
@media (max-width: 480px) {
  .forgot-password-wrapper {
    flex-direction: column;
    min-height: auto;
    border-radius: 12px;
  }

  .forgot-form-section {
    padding: 25px 15px;
    order: 2;
  }

  .forgot-image-section {
    padding: 20px 15px;
    min-height: 120px;
    order: 1;
  }

  .forgot-image {
    max-width: 90px;
    width: 100%;
  }

  .forgot-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .forgot-description {
    font-size: 12px;
    margin-bottom: 18px;
    color: #4b5563;
  }

  .forgot-form {
    gap: 14px;
  }

  .forgot-input-group {
    margin-bottom: 2px;
  }

  .forgot-label {
    font-size: 12px;
    margin-bottom: 5px;
    color: #374151;
  }

  .forgot-input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .forgot-otp-section {
    padding: 0;
    margin-bottom: 0;
  }

  .forgot-otp-section .forgot-label {
    font-size: 12px;
    color: #374151;
  }

  .forgot-otp-hint {
    font-size: 11px;
    margin-bottom: 8px;
    color: #4b5563;
  }

  .forgot-password-section {
    margin: 0;
  }

  .forgot-password-section .forgot-label {
    font-size: 12px;
    margin-bottom: 5px;
    color: #374151;
  }

  .forgot-password-input {
    margin-bottom: 10px;
  }

  .forgot-password-input i {
    font-size: 14px;
    right: 10px;
  }

  .forgot-password-hint {
    font-size: 10px;
    margin-top: 4px;
    color: #4b5563;
  }

  .forgot-btn {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 6px;
  }

  .forgot-btn-primary {
    margin-bottom: 8px;
  }

  .forgot-btn-tertiary {
    padding: 9px 16px;
    font-size: 12px;
  }

  #LoadingRecuperarContrasena {
    padding: 15px;
  }

  #LoadingRecuperarContrasena .spinner-border {
    width: 30px;
    height: 30px;
  }

  .forgot-footer {
    margin-top: 16px;
    padding-top: 16px;
  }

  .forgot-footer-text {
    font-size: 11px;
    margin-bottom: 10px;
    color: #4b5563;
  }
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  .forgot-password-wrapper {
    background: #1f2937;
  }

  .forgot-logo-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }

  .forgot-form-section {
    background: #1f2937;
  }

  .forgot-title {
    color: #f3f4f6;
  }

  .forgot-description {
    color: #d1d5db;
  }

  .forgot-input {
    color: #f3f4f6;
    background: #374151;
    border-color: transparent;
  }

  .forgot-input:focus {
    background: #4b5563;
    border-color: #0069ff;
    box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.15);
  }

  .forgot-label {
    color: #d1d5db;
  }

  .forgot-otp-section {
    background: transparent;
    border: none;
  }

  .forgot-otp-section .forgot-label {
    color: #d1d5db;
  }

  .forgot-otp-hint {
    color: #9ca3af;
  }

  .forgot-password-section .forgot-label {
    color: #d1d5db;
  }

  .forgot-password-hint {
    color: #9ca3af;
  }

  .forgot-password-input i {
    color: #9ca3af;
  }

  .forgot-password-input i:hover {
    color: #60a5fa;
  }

  .forgot-footer {
    border-top-color: #4b5563;
  }

  .forgot-footer-text {
    color: #d1d5db;
  }
}

/* ===== PRINT ===== */
@media print {
  .forgot-password-wrapper {
    display: none;
  }
}

/* ===== PRINT ===== */
@media print {
  .forgot-password-wrapper {
    display: none;
  }
}
