/* ── ARCHIVO UNIFICADO: cambio_contrasena.css ── */
/* Basado en login.css, adaptado para la vista de cambio de contraseña */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* ── HEADER BANNER ── */
.header-banner {
  width: 100%;
  overflow: hidden;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-img {
  width: 100%;
  height: auto;
  max-width: 1500px;
  object-fit: contain;
  display: block;
}

/* ── RESPONSIVE BANNER ── */
@media (max-width: 768px) {
  .banner-img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
  }
}

@media (max-width: 576px) {
  .banner-img {
    max-height: 150px;
    object-fit: contain;
  }
}

/* ── PÁGINA: imagen de fondo + tarjeta centrada ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--header-h, 0px));
  min-height: 0;
  overflow-y: auto;
  padding: 30px 20px;
  position: relative;
  background: url('../assets/img/fondo_nuevo.jpg') center center / cover no-repeat;
}

.seccion-principal {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--header-h, 0px));
  min-height: 0;
  overflow-y: auto;
  padding: 30px 20px;
  position: relative;
  background: url('../assets/img/fondo_nuevo.jpg') center center / cover no-repeat;
}

/* ── TARJETA DE LOGIN ── */
.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(10, 26, 58, 0.25);
  padding: 44px 48px 36px;
  text-align: center;
}

.login-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: #eef1fb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-icon i {
  font-size: 28px;
  color: #1a56db;
}

.login-card h2 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.login-card .subtitle {
  font-size: 14px;
  color: #999;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* ── CAMPOS DE FORMULARIO ── */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 7px;
}

.form-control {
  border: 1px solid #e0e0e0;
  border-radius: 999px !important;
  height: 46px;
  font-size: 13px;
  color: #555;
  box-shadow: none !important;
  transition: border-color 0.2s, background-color 0.2s;
  padding: 0 20px;
  width: 100%;
}

.form-control:focus {
  border-color: #2b50b6;
  outline: 2px solid rgba(43, 80, 182, 0.15);
  outline-offset: 0px;
}

.form-control.error-input {
  border-color: #d32f2f;
  background-color: #ffebee;
}

.form-control.error-input:focus {
  border-color: #d32f2f;
  outline: 2px solid rgba(211, 47, 47, 0.15);
}

.form-control.valid-input {
  border-color: #4caf50;
}

/* ── SELECT (nacionalidad) ── */
select.form-control {
  appearance: auto;
  padding: 0 16px;
  background-color: #fff;
  cursor: pointer;
}

select.form-control:hover {
  border-color: #2b50b6;
  background-color: #f8f9ff;
}

select.form-control:focus {
  border-color: #2b50b6;
  outline: 2px solid rgba(43, 80, 182, 0.2);
  outline-offset: 0px;
  background-color: #fff;
}

select.form-control:not([value=""]) {
  color: #1a1a2e;
}

select.form-control option {
  padding: 8px 12px;
  font-size: 13px;
  color: #555;
  background-color: #fff;
}

select.form-control option:hover {
  background-color: #eef1fb;
}

select.form-control option:checked {
  background-color: #1a56db;
  color: #fff;
}

select.form-control::-webkit-select {
  background-color: #fff;
}

select.form-control:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 #555;
}

select.form-control:focus:-moz-focusring {
  color: #555;
  text-shadow: none;
}

select.form-control.error-input {
  border-color: #d32f2f;
  background-color: #ffebee;
}

select.form-control.error-input:hover {
  border-color: #d32f2f;
  background-color: #ffebee;
}

select.form-control.error-input:focus {
  border-color: #d32f2f;
  outline: 2px solid rgba(211, 47, 47, 0.2);
}

select.form-control.valid-input {
  border-color: #1a56db;
}

select.form-control.valid-input:hover {
  border-color: #1a56db;
  background-color: #f0faf0;
}

.field-error,
.error-message {
  color: #d32f2f;
  font-size: 11px;
  margin-top: 5px;
  display: none;
}

.field-error.show,
.error-message.show {
  display: block;
}

/* ── BOTÓN secundario ── */
.boton-regresar {
  background-color: #213368;
  color: #fff;
  border: none;
  border-radius: 999px !important;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  letter-spacing: 0.3px;
  transition: background 0.2s;
  margin-top: 6px;
  cursor: pointer;
  display: block;
}

.boton-regresar:hover {
  background-color: #123fa8;
  color: #fff;
}

.boton-regresar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── BOTÓN PRINCIPAL ── */
.btn-signin,
.boton-consultar,
.boton-enviar {
  background-color: #1a56db;
  color: #fff;
  border: none;
  border-radius: 999px !important;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  letter-spacing: 0.3px;
  transition: background 0.2s;
  margin-top: 6px;
  cursor: pointer;
  display: block;
}

.btn-signin:hover,
.boton-consultar:hover,
.boton-enviar:hover {
  background-color: #123fa8;
  color: #fff;
}

.btn-signin:disabled,
.boton-consultar:disabled,
.boton-enviar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── ENLACES ── */
.forgot-link,
.btn-regresar {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #2b50b6;
  text-decoration: none;
  margin-top: 8px;
  margin-bottom: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-regresar {
  text-align: center;
  margin-top: 18px;
  font-weight: 600;
}

.btn-regresar:hover {
  text-decoration: underline;
}

/* ── PIE DE PÁGINA ── */
.footer-note {
  text-align: center;
  font-size: 10px;
  color: #ccc;
  margin-top: 26px;
  letter-spacing: 0.6px;
}

/* ── RESPONSIVE ── */
@media (max-width: 576px) {
  .login-card {
    padding: 34px 26px 28px;
    border-radius: 16px;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .login-page {
    padding: 15px 10px;
  }
}

/* ── CAPTCHA ── */
.captcha-container {
  margin: 18px 0;
  display: flex;
  justify-content: center;
}

#turnstile-loading {
  font-size: 13px;
  color: #888;
}

/* ── CONTENEDOR PARA DOCUMENTO + DÍGITO ── */
.documento-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.documento-container .form-group {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}

.documento-container .digito-input {
  flex: 0 0 90px;
}

.documento-container .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 7px;
  display: block;
}

.documento-container .form-control {
  height: 46px;
}

/* ── OCULTAR CAMPOS ── */
.hidden-field {
  display: none !important;
}

/* ── AJUSTES PARA INPUT TYPE DATE ── */
input[type="date"].form-control {
  padding: 0 16px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
}

input[type="date"].form-control:hover {
  border-color: #2b50b6;
  background-color: #f8f9ff;
}

input[type="date"].form-control::-webkit-inner-spin-button,
input[type="date"].form-control::-webkit-calendar-picker-indicator {
  opacity: 0.6;
  padding: 4px;
  cursor: pointer;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ── SWEETALERT CORREGIDO ── */
.swal2-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 99999 !important;
  zoom: reset !important;
  transform: none !important;
  transform-origin: unset !important;
}

.swal2-popup {
  font-size: 16px !important;
  width: 500px !important;
  max-width: 90vw !important;
  padding: 24px !important;
}

.swal2-title {
  font-size: 24px !important;
  color: #1a1a2e !important;
}

.swal2-html-container {
  font-size: 16px !important;
  color: #555 !important;
}

/* ── BOTONES DE SWEETALERT ── */
.swal2-confirm,
.swal2-cancel,
.swal2-deny {
  font-size: 15px !important;
  padding: 10px 28px !important;
  border-radius: 999px !important;
  min-width: 100px !important;
  font-weight: 600 !important;
}

.swal2-confirm {
  background-color: #1a56db !important;
}

.swal2-confirm:hover {
  background-color: #123fa8 !important;
}

.swal2-cancel {
  background-color: #f44336 !important;
}

.swal2-cancel:hover {
  background-color: #d32f2f !important;
}

/* ── ICONOS DE SWEETALERT ── */
.swal2-icon {
  width: 72px !important;
  height: 72px !important;
  margin: 0 auto 16px !important;
}

.swal2-icon.swal2-warning {
  border-color: #f39c12 !important;
  color: #f39c12 !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
  font-size: 48px !important;
  line-height: 72px !important;
}

.swal2-icon.swal2-error {
  border-color: #f44336 !important;
}

.swal2-icon.swal2-error .swal2-x-mark {
  font-size: 72px !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  width: 40px !important;
  height: 5px !important;
  top: 33px !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {
  left: 14px !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {
  right: 14px !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  width: 72px !important;
  height: 72px !important;
}

.swal2-icon.swal2-success .swal2-success-fix {
  width: 8px !important;
  height: 90px !important;
  left: 28px !important;
  top: 8px !important;
}

.swal2-icon.swal2-question {
  border-color: #1a56db !important;
  color: #1a56db !important;
}

.swal2-icon.swal2-question .swal2-icon-content {
  font-size: 48px !important;
  line-height: 72px !important;
}

.swal2-icon.swal2-info {
  border-color: #17a2b8 !important;
  color: #17a2b8 !important;
}

.swal2-icon.swal2-info .swal2-icon-content {
  font-size: 48px !important;
  line-height: 72px !important;
}

.swal2-image {
  width: 80px !important;
  height: 80px !important;
}

/* ── LOADING DE SWEETALERT ── */
.swal2-popup .swal2-loader {
  border-color: #1a56db transparent #1a56db transparent !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 16px !important;
  display: block !important;
  border-width: 4px !important;
}

.swal2-popup.swal2-loading .swal2-loader {
  display: block !important;
  animation: swal2-rotate-loading 1.5s linear infinite !important;
}

.swal2-popup.swal2-loading .swal2-actions {
  display: none !important;
}

.swal2-popup .swal2-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 20px !important;
}

/* ── CAPTCHA WRAPPER ── */
.captcha-wrapper {
  margin: 20px 0 12px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.captcha-wrapper #turnstileCf {
  margin: 6px 0;
}

/* ── CORRECCIÓN PARA EL TEXTO DEL CAPTCHA EXPIRADO ── */
.swal2-popup .swal2-html-container p {
  margin: 0;
  line-height: 1.6;
}