/* =========================================================
   PÁGINA DE LOGIN
   ========================================================= */

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

body.auth-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: radial-gradient(
    circle at center,
    #07182c 0%,
    #020813 55%,
    #00040a 100%
  );
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

/* La imagen original tiene aproximadamente una relación 291 / 583. */
.login-screen {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;

  background-image: url("../../img/bg-img/image1.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;

  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(0, 89, 255, 0.08);
}

/* =========================================================
   POSICIÓN DEL FORMULARIO
   ========================================================= */

.login-form-container {
  position: absolute;

  /*
   * Posicionamiento proporcional respecto a la imagen.
   * En la referencia, el formulario comienza aproximadamente
   * al 45% de la altura total.
   */
  top: 45%;
  left: 4.2%;
  right: 4.2%;

  z-index: 2;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.7vh, 12px);
}

/* =========================================================
   MENSAJE DE ERROR
   ========================================================= */

.login-alert {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 92, 92, 0.5);
  border-radius: 7px;

  color: #ffd6d6;
  background: rgba(125, 15, 25, 0.86);

  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.35;
  text-align: center;

  backdrop-filter: blur(6px);
}

/* =========================================================
   CAMPOS
   ========================================================= */

.login-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-input {
  width: 100%;
  height: clamp(42px, 7vh, 52px);

  padding: 0 46px 0 43px;

  border: 1px solid rgba(126, 157, 194, 0.48);
  border-radius: 7px;
  outline: none;

  color: #f4f8ff;
  background: rgba(2, 14, 29, 0.76);

  font-size: clamp(13px, 3.7vw, 16px);
  font-weight: 400;

  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.35),
    0 0 0 rgba(0, 112, 255, 0);

  backdrop-filter: blur(4px);

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.login-input::placeholder {
  color: rgba(219, 229, 244, 0.72);
  opacity: 1;
}

.login-input:hover {
  border-color: rgba(111, 169, 231, 0.72);
}

.login-input:focus {
  border-color: #178aff;
  background: rgba(2, 17, 36, 0.92);

  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(0, 119, 255, 0.14),
    0 0 14px rgba(0, 116, 255, 0.2);
}

.login-field-icon {
  position: absolute;
  left: 13px;
  z-index: 2;

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

  color: rgba(242, 247, 255, 0.9);
  font-size: clamp(19px, 5vw, 22px);

  pointer-events: none;
}

/* =========================================================
   MOSTRAR / OCULTAR CONTRASEÑA
   ========================================================= */

.password-visibility-button {
  position: absolute;
  right: 10px;
  z-index: 3;

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

  width: 36px;
  height: 36px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  outline: none;

  color: rgba(234, 242, 255, 0.86);
  background: transparent;

  font-size: clamp(18px, 5vw, 21px);
  cursor: pointer;

  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.password-visibility-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.password-visibility-button:focus-visible {
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(25, 139, 255, 0.55);
}

.password-icon-hide {
  display: none;
}

/* Estas clases se pueden activar desde JavaScript. */
.password-visibility-button.is-visible .password-icon-show {
  display: none;
}

.password-visibility-button.is-visible .password-icon-hide {
  display: inline-block;
}

/* =========================================================
   BOTÓN INGRESAR
   ========================================================= */

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: 100%;
  height: clamp(44px, 7.2vh, 54px);
  margin-top: 1px;

  border: 1px solid rgba(72, 167, 255, 0.9);
  border-radius: 6px;
  outline: none;

  color: #ffffff;
  background: linear-gradient(100deg, #064fb7 0%, #0069df 48%, #087bed 100%);

  font-size: clamp(14px, 4vw, 17px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 5px 16px rgba(0, 79, 189, 0.32);

  cursor: pointer;

  transition:
    transform 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

.login-submit i {
  font-size: 21px;
}

.login-submit:hover {
  filter: brightness(1.1);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 7px 20px rgba(0, 104, 226, 0.42);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:focus-visible {
  box-shadow:
    0 0 0 3px rgba(38, 149, 255, 0.3),
    0 7px 20px rgba(0, 104, 226, 0.42);
}

/* =========================================================
   RECUPERACIÓN DE CREDENCIALES
   ========================================================= */

.login-recovery {
  margin-top: clamp(10px, 2vh, 16px);
  text-align: center;
}

.login-recovery a {
  color: rgba(237, 243, 252, 0.9);
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;

  transition: color 150ms ease;
}

.login-recovery a:hover {
  color: #44a7ff;
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

.visually-hidden {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;

  border: 0 !important;
}

/* =========================================================
   ESCRITORIO
   ========================================================= */

@media (min-width: 431px) {
  .login-page {
    padding: 24px;
  }

  .login-screen {
    min-height: min(860px, calc(100dvh - 48px));
    aspect-ratio: 291 / 583;
    border-radius: 0 0 24px 24px;
  }
}

/* Pantallas particularmente bajas */
@media (max-height: 620px) {
  .login-form-container {
    top: 43%;
  }

  .login-form {
    gap: 7px;
  }

  .login-recovery {
    margin-top: 8px;
  }
}

/* =========================================================
   BENEFICIOS INFERIORES
   ========================================================= */

.login-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  width: 100%;
  margin-top: clamp(26px, 4.5vh, 42px);
}

.login-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 5px;
  text-align: center;
}

/* Separadores verticales tenues */
.login-feature:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  width: 1px;
  height: 38px;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(47, 132, 216, 0.2),
    transparent
  );
}

.login-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(31px, 9vw, 39px);
  height: clamp(31px, 9vw, 39px);
  margin-bottom: 7px;

  color: #078cff;
  font-size: clamp(27px, 8vw, 34px);
  line-height: 1;

  filter: drop-shadow(0 0 3px rgba(0, 132, 255, 0.45))
    drop-shadow(0 0 8px rgba(0, 90, 210, 0.18));
}

.login-feature-icon i {
  display: block;
  line-height: 1;
}

.login-feature-text {
  display: block;
  color: rgba(241, 246, 255, 0.92);
  font-size: clamp(10px, 2.9vw, 12px);
  font-weight: 400;
  line-height: 1.38;
  white-space: nowrap;

  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
