/* ==================== RESET & BASE ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: linear-gradient(to bottom, #2a826d, #0C5C4C);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.login-layout {
  width: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contenedor blanco estilo “tarjeta” */
.login-container {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  width: 100%;
  max-width: 24rem; /* 384px */
  text-align: center;
}

/* Logo dentro de la tarjeta */
.login-container img {
  display: block;
  margin: 2rem auto 0;
  padding-bottom: 2rem; /* ← espaciado inferior */
  width: 6rem;
  max-width: 100%;
  height: auto;
  transform: scale(1.5); /* Agranda visualmente la imagen */
}

/* Texto introductorio */
.login-container p {
  color: #333333;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

/* Campos del formulario */
.field {
  margin-bottom: 1rem;
  text-align: left;
}
.field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #333333;
}
.field input {
  width: 100%;
  padding: 0.65rem;
  border: 0.0625rem solid #cccccc;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

/* Botón de ingreso */
.btn-login {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #0C5C4C;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn-login:hover {
  background-color: #2a826d;
}

/* Texto de registro */
.register-text {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #333333;
}
.register-text a {
  color: #0C5C4C;
  text-decoration: none;
}
.register-text a:hover {
  text-decoration: underline;
}

/* Logo de pie de página */
.footer-logo {
  margin-top: 2rem;
  text-align: center;
  width: 100%;
}
.footer-logo img {
  display: block;
  margin: 0 auto;
  width: 20rem;   /* 320px */
  max-width: 100%;
  height: auto;
}

/* ==================== MODAL DE ALERTA ==================== */
#alertModal {
  display: none;                /* Solo oculto por defecto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
#alertModal .modal-content {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 20rem; /* 320px */
  text-align: center;
}
#alertModal .modal-content p {
  font-size: 1rem;
  color: #333333;
  margin-bottom: 1.5rem;
}
#alertBtn {
  padding: 0.75rem 1.5rem;
  background-color: #0C5C4C;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}
#alertBtn:hover {
  background-color: #2a826d;
}

/* ==================== BREAKPOINTS ==================== */
/* Pequeño: ≥36rem (576px) */
@media (min-width: 36rem) {
  .login-container {
    max-width: 22.5rem;
    padding: 2rem;
  }
  .login-container img {
    width: 7rem;
    margin-bottom: 1.25rem;
  }
  .field input {
    padding: 0.75rem;
  }
  .btn-login {
    font-size: 1.05rem;
  }
  .footer-logo img {
    width: 22rem;
  }
  #alertModal .modal-content {
    max-width: 22rem;
  }
}
/* Mediano: ≥48rem (768px) */
@media (min-width: 48rem) {
  .login-container {
    max-width: 26.25rem;
  }
  .login-container p {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }
  .field label {
    font-size: 0.9rem;
  }
  .field input {
    font-size: 1rem;
  }
  .btn-login {
    padding: 0.85rem;
  }
  .footer-logo img {
    width: 24rem;
  }
  #alertModal .modal-content {
    max-width: 24rem;
  }
}
/* Grande: ≥62rem (992px) */
@media (min-width: 62rem) {
  .login-container {
    max-width: 30rem;
  }
  .login-container img {
    width: 8rem;
  }
  .register-text {
    font-size: 0.9rem;
  }
  .footer-logo img {
    width: 26rem;
  }
  #alertModal .modal-content {
    max-width: 26rem;
  }
}
/* Extra grande: ≥75rem (1200px) */
@media (min-width: 75rem) {
  .login-container {
    max-width: 32.5rem;
  }
  .login-container p {
    font-size: 1.05rem;
    line-height: 1.5;
  }
  .footer-logo img {
    width: 28rem;
  }
  #alertModal .modal-content {
    max-width: 28rem;
  }
}
