/* =====================================
   PÁGINA DE INICIO DE SESIÓN
===================================== */

.login-body {
  min-height: 100vh;
  background: #f3f8f6;
}


/* =====================================
   ENCABEZADO
===================================== */

.header-login-active {
  position: relative;
  color: #083d39;
  font-weight: 800;
  box-shadow: inset 0 -3px #efb526;
}

.mobile-account-link {
  display: none !important;
}


/* =====================================
   FONDO GENERAL
===================================== */

.login-page {
  min-height: calc(100vh - 82px);
  padding: 48px 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(20, 104, 92, 0.09),
      transparent 28%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(239, 181, 38, 0.10),
      transparent 24%
    ),
    #f3f8f6;
}


/* =====================================
   TARJETA PRINCIPAL
===================================== */

.login-layout {
  width: min(1180px, 100%);
  min-height: 610px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  overflow: hidden;

  background: #ffffff;
  border: 1px solid #dce5e2;
  border-radius: 22px;

  box-shadow:
    0 25px 70px rgba(8, 61, 57, 0.14);
}


/* =====================================
   PANEL DE LA FOTOGRAFÍA
===================================== */

.login-visual {
  position: relative;
  min-height: 610px;
  padding: 65px;

  display: flex;
  align-items: center;

  color: #ffffff;

  background:
    linear-gradient(
      90deg,
      rgba(3, 45, 42, 0.94),
      rgba(5, 68, 61, 0.72)
    ),
    url("../../images/parque-municipal.jpeg")
    center / cover no-repeat;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;

  opacity: 0.20;

  background-image:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.45) 0 1px,
      transparent 1.5px
    );

  background-size: 25px 25px;

  -webkit-mask-image:
    linear-gradient(
      90deg,
      transparent,
      black
    );

  mask-image:
    linear-gradient(
      90deg,
      transparent,
      black
    );
}

.login-visual-content {
  position: relative;
  z-index: 1;
  max-width: 430px;
}

.login-kicker {
  margin: 0 0 22px;

  display: flex;
  align-items: center;
  gap: 11px;

  color: #f4c650;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-kicker span {
  width: 30px;
  height: 2px;

  display: block;

  background: #efb526;
}

.login-visual h1 {
  margin: 0;

  font-size: clamp(48px, 5vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.login-welcome-text {
  max-width: 360px;
  margin: 24px 0 30px;

  color: rgba(255, 255, 255, 0.88);

  font-size: 19px;
  line-height: 1.6;
}

.login-welcome-text::after {
  content: "";

  width: 58px;
  height: 2px;
  margin-top: 22px;

  display: block;

  background: #efb526;
}


/* =====================================
   BENEFICIOS DEL PANEL
===================================== */

.login-benefits {
  margin: 0;
  padding: 0;

  display: grid;
  gap: 15px;

  list-style: none;
}

.login-benefits li {
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-benefits li > span {
  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  display: grid;
  place-items: center;

  color: #ffffff;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #efb526;
  border-radius: 10px;
}

.login-benefits i {
  font-size: 19px;
}

.login-benefits strong {
  color: #ffffff;
  font-size: 15px;
}


/* =====================================
   CONTENEDOR DEL FORMULARIO
===================================== */

.login-form-panel {
  padding: 62px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-card {
  width: min(100%, 500px);
}


/* Título */

.login-section-label {
  margin: 0 0 8px;

  color: #d99a08;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-heading h2 {
  margin: 0 0 10px;

  color: #102b2a;

  font-size: clamp(38px, 4vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.login-heading > p:last-child {
  margin: 0 0 34px;

  color: #60706f;

  font-size: 15px;
  line-height: 1.6;
}


/* =====================================
   FORMULARIO
===================================== */

.login-form {
  display: grid;
  gap: 22px;
}

.login-field label {
  display: block;
  margin-bottom: 8px;

  color: #173331;

  font-size: 14px;
  font-weight: 800;
}

.login-input {
  min-height: 54px;

  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;

  overflow: hidden;

  background: #ffffff;
  border: 1px solid #cbd8d5;
  border-radius: 10px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.login-input:focus-within {
  border-color: #14685c;

  box-shadow:
    0 0 0 4px rgba(20, 104, 92, 0.12);
}


/* Iconos de los campos */

.input-icon {
  height: 100%;

  display: grid;
  place-items: center;

  color: #0c514a;

  background: #edf5f2;
  border-right: 1px solid #dce5e2;
}

.input-icon i {
  font-size: 17px;
}


/* Inputs */

.login-input input {
  width: 100%;
  height: 52px;
  min-width: 0;
  padding: 0 15px;

  color: #102b2a;
  background: transparent;

  border: 0;
  outline: 0;

  font-size: 15px;
}

.login-input input::placeholder {
  color: #899794;
}


/* =====================================
   MOSTRAR CONTRASEÑA
===================================== */

.password-visibility {
  width: 50px;
  height: 52px;

  display: grid;
  place-items: center;

  color: #0c514a;
  background: transparent;

  border: 0;

  font-size: 17px;
}

.password-visibility:hover {
  background: #f1f7f5;
}

/* Oculta el ojo automático de Microsoft Edge */

#password::-ms-reveal,
#password::-ms-clear {
  display: none;
}


/* =====================================
   AYUDA Y VALIDACIÓN DEL CUI
===================================== */

/* Texto que siempre permanece visible */

.field-help {
  display: block;
  margin-top: 7px;

  color: #71817f !important;

  font-size: 11px !important;
  font-weight: 500;
  line-height: 1.4;
}

/* Mensaje que solamente aparece al intentar ingresar */

.field-error {
  display: none !important;
  margin-top: 7px;

  color: #d92d20 !important;

  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.field-error.is-visible {
  display: block !important;
}

/* Campo con error */

.login-input.has-error {
  border-color: #d92d20 !important;

  box-shadow:
    0 0 0 4px rgba(217, 45, 32, 0.10) !important;
}

.login-input.has-error .input-icon {
  color: #d92d20;
  background: #fff1f0;
}


/* =====================================
   RECORDAR Y RECUPERAR CONTRASEÑA
===================================== */

.login-options {
  margin-top: -3px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  font-size: 13px;
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #425956;

  cursor: pointer;
}

.remember-option input {
  width: 17px;
  height: 17px;

  accent-color: #0c514a;
}

.login-options a {
  color: #0c514a;
  font-weight: 800;
}

.login-options a:hover {
  text-decoration: underline;
}


/* =====================================
   BOTÓN DE INICIAR SESIÓN
===================================== */

.login-submit {
  width: 100%;
  margin-top: 2px;
}


/* =====================================
   CREAR CUENTA
===================================== */

.register-message {
  margin: 24px 0;

  color: #60706f;

  text-align: center;
  font-size: 14px;
}

.register-message a {
  color: #0c514a;
  font-weight: 800;
}

.register-message a:hover {
  text-decoration: underline;
}


/* =====================================
   MENSAJE DE SEGURIDAD
===================================== */

.login-security {
  padding: 15px 17px;

  display: flex;
  align-items: center;
  gap: 12px;

  color: #27524d;
  background: #eaf5f1;

  border: 1px solid #d8ebe4;
  border-radius: 11px;
}

.login-security > span {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: grid;
  place-items: center;

  color: #14685c;
  background: #ffffff;

  border-radius: 50%;
}

.login-security strong,
.login-security small {
  display: block;
}

.login-security strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.login-security small {
  color: #607875;

  font-size: 10px;
  line-height: 1.4;
}


/* =====================================
   PIE DE PÁGINA
===================================== */

.login-footer {
  margin-top: 0;
}


/* =====================================
   TABLETAS
===================================== */

@media (max-width: 860px) {

  .mobile-account-link {
    display: flex !important;
  }

  .login-page {
    min-height: auto;
    padding: 28px 16px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .login-visual {
    min-height: 310px;
    padding: 45px;
  }

  .login-visual h1 {
    font-size: 48px;
  }

  .login-welcome-text {
    margin-bottom: 22px;
  }

  .login-benefits {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .login-benefits li {
    gap: 8px;
  }

  .login-benefits li > span {
    width: 40px;
    height: 40px;

    flex-basis: 40px;
  }

  .login-benefits strong {
    font-size: 11px;
  }

  .login-form-panel {
    padding: 48px 42px;
  }

}


/* =====================================
   TELÉFONOS
===================================== */

@media (max-width: 560px) {

  .login-page {
    padding: 16px;
  }

  .login-layout {
    border-radius: 16px;
  }

  .login-visual {
    min-height: 235px;
    padding: 30px 25px;

    background-position: center;
  }

  .login-kicker {
    margin-bottom: 13px;
    font-size: 10px;
  }

  .login-visual h1 {
    font-size: 38px;
  }

  .login-welcome-text {
    max-width: 280px;
    margin: 14px 0 0;

    font-size: 14px;
  }

  .login-welcome-text::after {
    margin-top: 15px;
  }

  .login-benefits {
    display: none;
  }

  .login-form-panel {
    padding: 34px 20px;
  }

  .login-heading h2 {
    font-size: 34px;
  }

  .login-heading > p:last-child {
    margin-bottom: 26px;
    font-size: 13px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .login-options a {
    align-self: flex-end;
  }

  .login-security {
    align-items: flex-start;
  }

  .field-error {
    text-align: left;
  }

}

.login-server-error {
  margin: 0;
  padding: 12px 15px;

  color: #b42318;
  background: #fff1f0;

  border: 1px solid #f5c2c0;
  border-radius: 9px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.login-server-error[hidden] {
  display: none;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.75;
}