/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1b2430;
  background-color: #ffffff;
}

/* Fondo general con patrón */
.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("img/background.png");
  background-repeat: repeat;
  background-size: auto;
  padding: 24px;
}

/* Tarjeta principal */
.login-card {
  position: relative;
  width: 735px;
  max-width: 100%;
  /* height: 495px; */
  background-color: #ffffff;
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border: 2px solid #153b8b;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Fondo superior con el título integrado (stpypagos.png) */
.login-card__header {
  height: 140px;
  background-image: url("img/stpypagos.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

/* Barra azul con formulario */
.login-card__bar {
  background-color: #123a7e;
  padding: 12px 24px;
}

.login-form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr auto;
  align-items: center;
  gap: 12px 18px;
}

.login-form__field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  white-space: nowrap;
}

.login-form__field label {
  font-weight: 600;
}

.login-form__field input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 2px;
  border: none;
  font-size: 0.9rem;
  outline: none;
}

.login-form__field input:focus {
  box-shadow: 0 0 0 2px #7fb1ff;
}

.login-form__submit {
  padding: 5px 26px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background-color: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: none;
}

.login-form__submit:hover {
  background-color: transparent;
  color: #ffffff;
  box-shadow: none;
}

.login-form__submit:active {
  transform: none;
}

.login-form__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.login-indicator {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  margin-left: -5px;
}

/* Zona inferior con logo y fondo de líneas (fondo_stp_lineas.png) */
.login-card__logo-wrapper {
  position: relative;
  padding: 60px 24px 56px;
  display: flex;
  justify-content: center;
  z-index: 1;
  background-image: url("img/fondo_stp_lineas.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}

.login-errors {
  position: absolute;
  top: 10px;
  right: 32px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #8b0000;
  text-align: right;
}

.logo-image {
  width: 170px;
  height: 170px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Insignia de seguridad esquina inferior izquierda */
.security-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.security-badge__icon {
  min-width: 72px;
  min-height: 72px;
  padding: 8px 10px 10px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.security-badge__icon img {
  max-width: 85%;
  max-height: 70%;
}

.security-badge__code {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1b5fd9;
}

/* Responsivo */
@media (max-width: 720px) {
  .login-card__header {
    padding-inline: 16px;
  }

  .login-card__header h1 {
    font-size: 1.1rem;
    letter-spacing: 0.12em;
  }

  .login-card__bar {
    padding-inline: 16px;
  }

  .login-form {
    grid-template-columns: 1fr;
  }

  .login-form__field {
    width: 100%;
  }

  .login-form__submit {
    justify-self: start;
  }

  .login-card__logo-wrapper {
    padding-top: 28px;
  }

  .logo-circle {
    width: 140px;
    height: 140px;
  }

  .logo-circle__text {
    font-size: 2.6rem;
  }
}

