/* =========================================================
   LUX DEI — LOGIN PRINCIPAL
   Diseño: carrusel izquierdo + fondo institucional borroso
   + panel de acceso profesional a la derecha.
========================================================= */

/* =========================================================
   BLOQUE 0: CONFIGURACIÓN GENERAL
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: #f4f7fb;
}

/* =========================================================
   BLOQUE 1: VARIABLES — MODO CLARO
========================================================= */
:root {
  /* Base de la pantalla */
  --left-strip-bg: #f4f7fb;
  --page-overlay: rgba(8, 20, 42, 0.18);

  /* Card */
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-border: rgba(20, 37, 67, 0.10);

  /* Textos */
  --text-main: #0f1d35;
  --text-title: #101d35;
  --text-soft: #718096;
  --text-label: #24324a;

  /* Inputs */
  --input-bg: #ffffff;
  --input-border: #d7e0eb;
  --input-border-focus: #1764ff;
  --input-icon: #70809a;

  /* Marca y botones */
  --primary: #1764ff;
  --primary-hover: #0f4ed4;
  --primary-light: rgba(23, 100, 255, 0.12);
  --gold: #d9a319;

  /* Topbar */
  --top-action-bg: rgba(255, 255, 255, 0.90);
  --top-action-border: rgba(20, 37, 67, 0.10);

  /* Sombras */
  --card-shadow:
    0 26px 58px rgba(15, 30, 56, 0.18),
    0 8px 20px rgba(15, 30, 56, 0.07);

  --soft-shadow:
    0 10px 24px rgba(15, 30, 56, 0.12);

  --carousel-shadow:
    0 28px 58px rgba(8, 20, 42, 0.24),
    0 8px 22px rgba(8, 20, 42, 0.10);
}

/* =========================================================
   BLOQUE 2: VARIABLES — MODO OSCURO
========================================================= */
body.theme-dark {
  --left-strip-bg: #070d18;
  --page-overlay: rgba(2, 7, 18, 0.53);

  --card-bg: rgba(13, 24, 43, 0.97);
  --card-border: rgba(255, 255, 255, 0.10);

  --text-main: #f4f7fb;
  --text-title: #ffffff;
  --text-soft: #aab6c9;
  --text-label: #edf3fb;

  --input-bg: #101d31;
  --input-border: #30415e;
  --input-border-focus: #4f82ff;
  --input-icon: #aebbd0;

  --primary: #2e70ff;
  --primary-hover: #5a8dff;
  --primary-light: rgba(46, 112, 255, 0.16);
  --gold: #e7b63f;

  --top-action-bg: rgba(11, 21, 38, 0.88);
  --top-action-border: rgba(255, 255, 255, 0.12);

  --card-shadow:
    0 28px 64px rgba(0, 0, 0, 0.48),
    0 8px 20px rgba(0, 0, 0, 0.24);

  --soft-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28);

  --carousel-shadow:
    0 28px 58px rgba(0, 0, 0, 0.42),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

/* =========================================================
   BLOQUE 3: BASE DEL BODY
========================================================= */
body {
  overflow: hidden;

  color: var(--text-main);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--left-strip-bg);

  transition:
    background 0.25s ease,
    color 0.25s ease;
}

/* =========================================================
   BLOQUE 4: LIENZO PRINCIPAL
========================================================= */
.login-layout {
  position: relative;
  isolation: isolate;

  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  overflow: hidden;

  background: var(--left-strip-bg);

  transition: background 0.25s ease;
}

/* =========================================================
   BLOQUE 5: FONDO INSTITUCIONAL
   La imagen empieza después del área blanca izquierda.
   El blur se aplica directamente aquí.
========================================================= */
.login-layout::before {
  content: "";

  position: absolute;
  z-index: 0;

  top: -14px;
  right: -14px;
  bottom: -14px;
  left: 22%;

  background-image: url("../img/login/fondo-login.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  filter: blur(4px) saturate(0.92) brightness(0.88);
  transform: scale(1.035);

  pointer-events: none;
}

/* Capa de contraste sobre el fondo */
.login-layout::after {
  content: "";

  position: absolute;
  z-index: 1;

  top: 0;
  right: 0;
  bottom: 0;
  left: 22%;

  background:
    linear-gradient(
      90deg,
      rgba(244, 247, 251, 0.12) 0%,
      var(--page-overlay) 55%,
      rgba(5, 17, 38, 0.23) 100%
    );

  pointer-events: none;
}

body.theme-dark .login-layout::before {
  filter: blur(4px) saturate(0.82) brightness(0.56);
}

/* =========================================================
   BLOQUE 6: CARRUSEL IZQUIERDO
   Ocupa casi toda la altura disponible y deja aire uniforme
   arriba y abajo.
========================================================= */
.login-visual {
  position: absolute;
  z-index: 3;

  /*
    Espacio aproximado de 1 cm arriba y abajo.
    Se adapta si la altura de la ventana disminuye.
  */
  top: clamp(28px, 4vh, 38px);
  bottom: clamp(28px, 4vh, 38px);

  left: clamp(24px, 2.8vw, 48px);

  /*
    Ancho similar a la card de formulario.
    En tu pantalla de 1366px será aproximadamente 430px–440px.
  */
  width: clamp(360px, 32vw, 440px);

  /*
    Importante:
    eliminamos height y transform para que el alto se calcule
    automáticamente entre top y bottom.
  */
  height: auto;
  transform: none;
}

/* Card exterior del carrusel */
.login-visual .carousel {
  width: 100%;
  height: 100%;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;

  background: #0e1d34;

  box-shadow: var(--carousel-shadow);
}

/* Bootstrap Carousel ocupa toda la altura disponible */
.login-visual .carousel-inner,
.login-visual .carousel-item {
  width: 100%;
  height: 100%;
}

/* Imagen de cada slide */
.login-slide-img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* Degradado muy discreto para los indicadores inferiores */
.login-visual .carousel-item::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(4, 14, 31, 0.01) 55%,
      rgba(4, 14, 31, 0.18) 100%
    );

  pointer-events: none;
}
/* =========================================================
   BLOQUE 7: FLECHAS DEL CARRUSEL
========================================================= */
.login-visual .carousel-control-prev,
.login-visual .carousel-control-next {
  display: none !important;
}
/* =========================================================
   BLOQUE 8: INDICADORES DEL CARRUSEL
========================================================= */
.login-visual .carousel-indicators {
  bottom: 18px;

  margin: 0;
}

.login-visual .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;

  margin-right: 5px;
  margin-left: 5px;

  border: 1.5px solid #ffffff;
  border-radius: 50%;

  background-color: transparent;

  opacity: 1;

  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.login-visual .carousel-indicators .active {
  width: 24px;

  border-radius: 999px;

  background-color: #ffffff;
}

/* =========================================================
   BLOQUE 9: PANEL DERECHO
   El panel tiene altura real para que la card pueda crecer.
========================================================= */
.login-panel {
  position: relative;
  z-index: 4;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  width: 52%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;

  margin-left: 48%;

  /*
    Espacio superior para los botones de tema e idioma.
    Espacio inferior para que la card no toque el borde.
  */
  padding:
    clamp(14px, 2vh, 22px)
    clamp(34px, 4.5vw, 72px)
    clamp(24px, 3vh, 32px)
    clamp(30px, 4vw, 64px);

  overflow: hidden;
}
/* =========================================================
   BLOQUE 10: ACCIONES SUPERIORES
========================================================= */
.panel-topbar {
  display: flex;
  justify-content: flex-end;

  flex: 0 0 auto;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Toggle claro / oscuro */
.theme-toggle-btn {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  width: 116px;
  height: 44px;

  padding: 4px;

  border: 1px solid var(--top-action-border);
  border-radius: 999px;

  background: var(--top-action-bg);

  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);

  cursor: pointer;
}

.theme-option {
  display: grid;
  place-items: center;

  border-radius: 999px;

  color: var(--text-soft);

  font-size: 1rem;

  transition:
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

/* Sol activo por defecto */
body:not(.theme-dark) .theme-option--light,
body.theme-light .theme-option--light {
  color: #18253b;

  background: #ffffff;

  box-shadow: 0 3px 8px rgba(15, 30, 56, 0.13);
}

/* Luna activa en modo oscuro */
body.theme-dark .theme-option--dark {
  color: #ffffff;

  background: #1a335b;

  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

/* Botón idioma */
.language-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  height: 44px;
  padding: 0 16px;

  border: 1px solid var(--top-action-border);
  border-radius: 999px;

  color: var(--text-main);
  background: var(--top-action-bg);

  font-size: 0.90rem;
  font-weight: 650;

  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.language-btn:hover {
  transform: translateY(-1px);
}

.language-arrow {
  margin-left: 2px;
  font-size: 0.72rem;
}

/* =========================================================
   BLOQUE 11: ÁREA CENTRAL DEL FORMULARIO
   Ocupa toda la altura restante del panel.
========================================================= */
.login-card-wrapper {
  display: flex;
  align-items: stretch;
  justify-content: center;

  width: 100%;
  height: 100%;
  min-height: 0;

  padding: 0;
}
/* =========================================================
   BLOQUE 12: CARD DEL FORMULARIO
   Crece hasta ocupar prácticamente la misma altura
   visual que el carrusel.
========================================================= */
.login-card {
  display: flex;
  flex-direction: column;

  width: min(100%, 440px);
  height: 100%;
  min-height: 0;
  max-height: none;

  /*
    El contenido tendrá aire, pero la card crecerá
    hasta la parte inferior del panel.
  */
  padding:
    clamp(22px, 3vh, 34px)
    clamp(24px, 3vw, 36px)
    clamp(18px, 2.2vh, 26px);

  overflow: hidden;

  border: 1px solid var(--card-border);
  border-radius: 24px;

  color: var(--text-main);
  background: var(--card-bg);

  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
/* =========================================================
   BLOQUE 13: MARCA LUX DEI
========================================================= */
.brand-box {
  margin-bottom: clamp(15px, 2vh, 22px);
  text-align: center;
}

/* Isotipo dorado */
.brand-symbol {
  display: block;

  width: clamp(94px, 11vh, 125px);
  height: clamp(94px, 11vh, 125px);

  margin: 0 auto clamp(4px, 0.7vh, 8px);

  object-fit: contain;
}

/* LUX DEI */
.brand-name {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(6px, 0.7vw, 10px);

  margin-bottom: 6px;

  font-size: clamp(1.55rem, 2.65vh, 2rem);
  font-weight: 760;
  letter-spacing: clamp(0.17rem, 0.5vw, 0.29rem);
  line-height: 1;
}

.brand-lux {
  color: var(--text-main);
}

.brand-dei {
  color: var(--gold);
}

.brand-subtitle {
  margin: 0;

  color: var(--text-soft);

  font-size: clamp(0.70rem, 1.32vh, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* =========================================================
   BLOQUE 14: ENCABEZADO DEL FORMULARIO
========================================================= */
.login-heading {
  margin-bottom: clamp(17px, 2.5vh, 25px);
  text-align: center;
}

.login-heading h1 {
  margin: 0 0 6px;

  color: var(--text-title);

  font-size: clamp(1.62rem, 2.8vh, 2.08rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.login-heading p {
  margin: 0;

  color: var(--text-soft);

  font-size: clamp(0.82rem, 1.5vh, 0.95rem);
}

/* =========================================================
   BLOQUE 15: ALERTA DE ERROR
========================================================= */
.login-alert {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 16px;
  padding: 12px 14px;

  border: 1px solid rgba(220, 38, 38, 0.24);
  border-radius: 12px;

  color: #c92d3b;
  background: rgba(220, 38, 38, 0.09);

  font-size: 0.88rem;
}

body.theme-dark .login-alert {
  color: #ff9ca6;
  background: rgba(220, 38, 38, 0.14);
}

/* =========================================================
   BLOQUE 16: CAMPOS DEL FORMULARIO
========================================================= */
.form-block {
  margin-bottom: clamp(12px, 1.8vh, 17px);
}

.form-label-custom {
  display: block;

  margin-bottom: 7px;

  color: var(--text-label);

  font-size: 0.86rem;
  font-weight: 720;
}

/* Caja de input */
.input-box {
  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 54px;
  padding: 0 15px;

  border: 1px solid var(--input-border);
  border-radius: 13px;

  background: var(--input-bg);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.25s ease;
}

.input-box:focus-within {
  border-color: var(--input-border-focus);

  box-shadow: 0 0 0 4px var(--primary-light);
}

.input-icon {
  flex: 0 0 auto;

  color: var(--input-icon);

  font-size: 1.03rem;
}

.input-box input {
  flex: 1;
  min-width: 0;
  min-height: 52px;

  border: none;
  outline: none;

  color: var(--text-main);
  background: transparent;

  font-size: 0.91rem;
}

.input-box input::placeholder {
  color: var(--text-soft);
  opacity: 0.90;
}

/* Botón para mostrar contraseña */
.toggle-password-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;

  color: var(--input-icon);
  background: transparent;

  font-size: 1.05rem;

  cursor: pointer;

  transition: color 0.2s ease;
}

.toggle-password-btn:hover {
  color: var(--primary);
}

/* =========================================================
   BLOQUE 17: RECORDARME Y RECUPERAR CONTRASEÑA
========================================================= */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: 2px;
  margin-bottom: clamp(16px, 2.1vh, 20px);
}

.remember-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--text-soft);

  font-size: 0.86rem;

  cursor: pointer;
}

.remember-box input {
  width: 16px;
  height: 16px;

  margin: 0;

  accent-color: var(--primary);

  cursor: pointer;
}

.forgot-link {
  color: var(--primary);

  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;

  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* =========================================================
   BLOQUE 18: BOTÓN INGRESAR
========================================================= */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  min-height: 54px;

  border: none;
  border-radius: 13px;

  color: #ffffff;
  background: linear-gradient(135deg, #2d75ff 0%, #1158f6 100%);

  font-size: 0.95rem;
  font-weight: 760;

  cursor: pointer;

  box-shadow: 0 12px 22px rgba(17, 88, 246, 0.24);

  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.submit-btn:hover {
  filter: brightness(1.04);

  box-shadow: 0 15px 26px rgba(17, 88, 246, 0.31);

  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

/* =========================================================
   BLOQUE 19: PIE DE SEGURIDAD DE LA CARD
========================================================= */
.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(15px, 1.8vw, 23px);

  /*
    Empuja el footer hacia la parte inferior de la card.
  */
  margin-top: auto;
  padding-top: clamp(14px, 1.9vh, 18px);

  border-top: 1px solid var(--card-border);
}

.security-item {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--text-soft);
}

.security-icon {
  flex: 0 0 auto;

  color: var(--gold);

  font-size: 1.18rem;
}

.security-item div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.security-item strong {
  color: var(--text-main);

  font-size: 0.72rem;
  font-weight: 720;
}

.security-item span {
  color: var(--text-soft);

  font-size: 0.64rem;
}

.security-divider {
  width: 1px;
  height: 34px;

  background: var(--card-border);
}

/* =========================================================
   BLOQUE 20: PIE GENERAL
========================================================= */
.site-footer {
  position: absolute;
  z-index: 5;

  right: 20px;
  bottom: 15px;
  left: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 10px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 0.73rem;

  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.site-footer a {
  color: inherit;
  text-decoration: none;

  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.54);
}

body.theme-light .site-footer,
body:not(.theme-dark) .site-footer {
  color: #66758d;

  text-shadow: none;
}

body.theme-light .site-footer a:hover,
body:not(.theme-dark) .site-footer a:hover {
  color: var(--primary);
}

body.theme-light .footer-separator,
body:not(.theme-dark) .footer-separator {
  color: #a3afbf;
}

/* =========================================================
   BLOQUE 21: LAPTOPS CON POCA ALTURA
   Mantiene ambas cards grandes y equilibradas.
========================================================= */
@media (max-height: 820px) and (min-width: 1101px) {
  .login-panel {
    padding-top: 12px;
    padding-bottom: 22px;
  }

  .theme-toggle-btn,
  .language-btn {
    height: 38px;
  }

  .login-card-wrapper {
    height: 100%;
    padding: 0;
  }

  .login-card {
    width: min(100%, 430px);
    height: 100%;
    padding: 16px 24px 14px;
  }

  .brand-box {
    margin-bottom: 8px;
  }

  .brand-symbol {
    width: 64px;
    height: 64px;

    margin-bottom: 3px;
  }

  .brand-name {
    margin-bottom: 3px;

    font-size: 1.30rem;
    letter-spacing: 0.17rem;
  }

  .brand-subtitle {
    font-size: 0.63rem;
  }

  .login-heading {
    margin-bottom: 11px;
  }

  .login-heading h1 {
    margin-bottom: 3px;

    font-size: 1.40rem;
  }

  .login-heading p {
    font-size: 0.77rem;
  }

  .form-block {
    margin-bottom: 9px;
  }

  .form-label-custom {
    margin-bottom: 4px;

    font-size: 0.78rem;
  }

  .input-box,
  .input-box input {
    min-height: 44px;
  }

  .input-box {
    padding-right: 12px;
    padding-left: 12px;

    border-radius: 11px;
  }

  .input-box input {
    font-size: 0.81rem;
  }

  .form-options {
    margin-bottom: 10px;
  }

  .remember-box,
  .forgot-link {
    font-size: 0.76rem;
  }

  .submit-btn {
    min-height: 45px;

    border-radius: 11px;

    font-size: 0.85rem;
  }

  /*
    Se mantiene al pie de la card, aprovechando
    la altura extra que ahora tendrá el formulario.
  */
  .login-card-footer {
    margin-top: auto;
    padding-top: 10px;
  }

  .security-icon {
    font-size: 0.95rem;
  }

  .security-item strong {
    font-size: 0.64rem;
  }

  .security-item span {
    display: none;
  }

  .security-divider {
    height: 24px;
  }
}
/* =========================================================
   BLOQUE 21.1: ESCRITORIO ANGOSTO
   El carrusel se oculta únicamente cuando no hay suficiente
   ancho horizontal para mostrar ambas columnas correctamente.
========================================================= */
@media (max-width: 1100px) {
  .login-layout::before {
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;

    filter: blur(5px) brightness(0.72);
    transform: scale(1.04);
  }

  .login-layout::after {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    background: rgba(7, 18, 38, 0.34);
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    margin-left: 0;

    padding:
      18px
      clamp(22px, 7vw, 64px)
      62px;
  }

  .login-card-wrapper {
    padding-top: 8px;
  }

  .login-card {
    width: min(100%, 470px);
  }
}
/* =========================================================
   BLOQUE 21.2: ESCRITORIO CON POCA ALTURA
   Mantiene carrusel y formulario visibles y grandes.
========================================================= */
@media (max-height: 690px) and (min-width: 1101px) {
  .login-panel {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .theme-toggle-btn,
  .language-btn {
    height: 36px;
  }

  .login-card-wrapper {
    height: 100%;
    padding: 0;
  }

  .login-card {
    width: min(100%, 430px);
    height: 100%;

    padding: 13px 22px 12px;
  }

  .brand-box {
    margin-bottom: 6px;
  }

  .brand-symbol {
    width: 54px;
    height: 54px;

    margin-bottom: 2px;
  }

  .brand-name {
    margin-bottom: 2px;

    font-size: 1.18rem;
    letter-spacing: 0.15rem;
  }

  .brand-subtitle {
    font-size: 0.58rem;
  }

  .login-heading {
    margin-bottom: 8px;
  }

  .login-heading h1 {
    margin-bottom: 2px;

    font-size: 1.28rem;
  }

  .login-heading p {
    font-size: 0.72rem;
  }

  .form-block {
    margin-bottom: 7px;
  }

  .form-label-custom {
    margin-bottom: 3px;

    font-size: 0.73rem;
  }

  .input-box,
  .input-box input {
    min-height: 40px;
  }

  .input-box {
    gap: 8px;
    padding-right: 11px;
    padding-left: 11px;

    border-radius: 10px;
  }

  .input-box input {
    font-size: 0.77rem;
  }

  .input-icon,
  .toggle-password-btn {
    font-size: 0.88rem;
  }

  .form-options {
    margin-top: 0;
    margin-bottom: 8px;
  }

  .remember-box,
  .forgot-link {
    font-size: 0.71rem;
  }

  .remember-box input {
    width: 13px;
    height: 13px;
  }

  .submit-btn {
    min-height: 41px;

    border-radius: 10px;

    font-size: 0.80rem;
  }

  .login-card-footer {
    gap: 11px;

    margin-top: auto;
    padding-top: 8px;
  }

  .security-icon {
    font-size: 0.86rem;
  }

  .security-item strong {
    font-size: 0.59rem;
  }

  .security-item span {
    display: none;
  }

  .security-divider {
    height: 20px;
  }
}
/* =========================================================
   BLOQUE 22: TABLETS
========================================================= */
@media (max-width: 991.98px) {
  body {
    overflow: auto;
  }

  .login-layout {
    min-height: 100vh;
    min-height: 100dvh;

    background: #eef2f7;
  }

  body.theme-dark .login-layout {
    background: #070d18;
  }

  .login-layout::before {
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;

    filter: blur(5px) brightness(0.72);

    opacity: 0.24;
  }

  body.theme-dark .login-layout::before {
    opacity: 0.34;
  }

  .login-layout::after {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    background: rgba(244, 247, 251, 0.76);
  }

  body.theme-dark .login-layout::after {
    background: rgba(4, 11, 24, 0.70);
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    margin-left: 0;

    padding:
      clamp(16px, 3vw, 28px)
      clamp(18px, 5vw, 36px)
      clamp(42px, 6vh, 60px);
  }

  .login-card-wrapper {
    padding: 26px 0;
  }

  .login-card {
    width: min(100%, 500px);
  }

  .site-footer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;

    padding: 0 18px 22px;
  }
}

/* =========================================================
   BLOQUE 23: CELULARES
========================================================= */
@media (max-width: 575.98px) {
  .panel-actions {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .theme-toggle-btn {
    width: 106px;
    height: 40px;
  }

  .language-btn {
    height: 40px;
    padding: 0 13px;

    font-size: 0.84rem;
  }

  .login-panel {
    padding: 14px;
  }

  .login-card-wrapper {
    padding: 18px 0;
  }

  .login-card {
    padding: 24px 18px 20px;

    border-radius: 20px;
  }

  .brand-symbol {
    width: 90px;
    height: 90px;
  }

  .brand-name {
    gap: 6px;

    font-size: 1.42rem;
    letter-spacing: 0.18rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
  }

  .login-heading h1 {
    font-size: 1.58rem;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .login-card-footer {
    align-items: flex-start;
    gap: 14px;
  }

  .security-divider {
    display: none;
  }

  .security-item strong {
    font-size: 0.66rem;
  }

  .security-item span {
    display: none;
  }

  .site-footer {
    gap: 7px;

    font-size: 0.67rem;
  }
}

/* =========================================================
   BLOQUE 24: ACCESIBILIDAD
========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* =========================================================
   AJUSTE FINAL — ESCRITORIO
   Carrusel y formulario con misma altura, mismo ancho
   y márgenes exteriores simétricos.
========================================================= */
@media (min-width: 1101px) {
  .login-layout {
    /* Ambos bloques empiezan y terminan a la misma altura */
    --surface-top: clamp(34px, 4vh, 44px);
    --surface-bottom: clamp(30px, 4vh, 40px);

    /* Mismo ancho para carrusel y card de formulario */
    --surface-width: clamp(360px, 32vw, 440px);

    /*
      Margen exterior simétrico.
      Aumentado para que el carrusel no quede pegado
      al borde izquierdo y el formulario tampoco al derecho.
    */
    --surface-side: clamp(142px, 8vw, 162px);
  }

  /* =======================================================
     CARRUSEL IZQUIERDO
  ======================================================= */
  .login-visual {
    top: var(--surface-top);
    bottom: var(--surface-bottom);
    left: var(--surface-side);

    width: var(--surface-width);
    height: auto;

    transform: none;
  }

  /* =======================================================
     PANEL DERECHO
  ======================================================= */
  .login-panel {
    position: relative;

    display: block;

    width: 52%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;

    margin-left: 48%;
    padding: 0;

    overflow: hidden;
  }

  /* Botones superiores */
  /* Botones de idioma y modo: independientes de las cards */
.panel-topbar {
  position: absolute;
  z-index: 8;

  top: clamp(14px, 2vh, 20px);
  right: clamp(16px, 1.8vw, 30px);

  display: flex;
  justify-content: flex-end;
}

  /* =======================================================
     CONTENEDOR DEL FORMULARIO
     Anclado al lado derecho, no centrado.
  ======================================================= */
  .login-card-wrapper {
    position: absolute;

    top: var(--surface-top);
    right: var(--surface-side);
    bottom: var(--surface-bottom);
    left: auto;

    display: block;

    width: var(--surface-width);
    height: auto;
    min-height: 0;

    padding: 0;
  }

  /* =======================================================
     CARD DEL FORMULARIO
  ======================================================= */
  .login-card {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;

    padding:
      clamp(22px, 3vh, 32px)
      clamp(24px, 3vw, 36px)
      clamp(18px, 2.2vh, 26px);

    overflow: hidden;

    border-radius: 24px;
  }

  /* Distribuye mejor el contenido interno */
  .login-card form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;

    min-height: 0;
  }

  /* Más aire visual */
  .brand-box {
    margin-bottom: clamp(16px, 2.6vh, 24px);
  }

  .login-heading {
    margin-bottom: clamp(18px, 2.8vh, 26px);
  }

  .form-block {
    margin-bottom: clamp(12px, 2vh, 17px);
  }

  .form-options {
    margin-top: 2px;
    margin-bottom: clamp(16px, 2.4vh, 21px);
  }

  /* Pie interno de seguridad */
  .login-card-footer {
    flex: 0 0 auto;

    margin-top: 0;
    padding-top: clamp(14px, 2vh, 18px);
  }

/* =======================================================
   FOOTER GENERAL
   Texto simple debajo de las cards.
======================================================= */
.site-footer {
  position: absolute;
  z-index: 9;

  right: 0;
 bottom: clamp(6px, 1vh, 10px);
  left: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 8px;

  padding: 0 16px;

  color: rgba(255, 255, 255, 0.82);

  font-size: 0.72rem;
  line-height: 1.4;

  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;

  transform: none;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.50);
}

/* Texto legible cuando esté en modo claro */
body.theme-light .site-footer,
body:not(.theme-dark) .site-footer {
  color: #64748b;
  text-shadow: none;
}

body.theme-light .site-footer a:hover,
body:not(.theme-dark) .site-footer a:hover {
  color: var(--primary);
}

body.theme-light .footer-separator,
body:not(.theme-dark) .footer-separator {
  color: #94a3b8;
}
}