/* ── 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;
  }

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

.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;
}

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

.swal2-confirm,
.swal2-cancel,
.swal2-deny {
  font-size: 15px !important;
  padding: 10px 28px !important;
}

.swal2-icon {
  width: 72px !important;
  height: 72px !important;
  margin: 0 auto 16px !important;
}

/* Corrección de líneas del ícono de error (X) */
.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;
}

/* Ícono de éxito */
.swal2-icon.swal2-success .swal2-success-ring {
  width: 72px !important;
  height: 72px !important;
}

/* Ícono de warning */
.swal2-icon.swal2-warning {
  font-size: 36px !important;
}

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

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

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

/* ── 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;
}

/* ── 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: 360px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: #eef1fb57;
  display: flex;
  align-items: center;
  justify-content: center;
}

.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;
}

.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;
  padding: 0 20px;
  width: 100%;
}

.form-control:focus {
  border-color: #2b50b6;
}

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

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

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

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

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

/* Campo de contraseña con botón de mostrar/ocultar */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-control {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.toggle-password:hover {
  color: #2b50b6;
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #2b50b6;
  text-decoration: none;
  margin-top: 8px;
  margin-bottom: 6px;
}

.btn-signin {
  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;
  display: none;
  margin-top: 6px;
}

.btn-signin.show {
  display: block;
}

.btn-signin:hover {
  background-color: #123fa8;
  color: #fff;
}

.btn-signin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.signup-text {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 18px;
}

.signup-text a {
  color: #2b50b6;
  font-weight: 600;
  text-decoration: none;
}

.footer-note {
  text-align: center;
  font-size: 10px;
  color: #ccc;
  margin-top: 26px;
  letter-spacing: 0.6px;
}

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

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

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

.error-message {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 15px;
  text-align: center;
  background-color: #ffebee;
  padding: 12px;
  border-radius: 8px;
  display: none;
  border-left: 4px solid #d32f2f;
}

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