* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Fondo del login: usar la imagen principal del proyecto */
  background-image: url('../img/fondo-gestmat.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

.container-login {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.style-form-login {
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease;
}

.style-form-login:hover {
  transform: translateY(-5px);
}

.style-form-login h2 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 35px;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 1px;
  position: relative;
}

.style-form-login h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(45deg, #fe938c, #ead2ac);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.form-control.input-med {
  width: 100%;
  padding: 15px 20px;
  border: none;
  /* Quitamos bordes */
  border-radius: 12px;
  font-size: 16px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  color: #2c3e50;
}

.form-control.input-med:focus {
  outline: none;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(254, 147, 140, 0.1);
  transform: translateY(-1px);
}

.form-control.input-med::placeholder {
  color: #adb5bd;
  font-size: 14px;
}

.btn {
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(45deg, #fe938c, #e8b4cb);
  color: white;
  box-shadow: 0 8px 20px rgba(254, 147, 140, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(45deg, #fd7a6e, #e6a1c1);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(254, 147, 140, 0.4);
  color: white;
}

.btn-outline {
  background: transparent;
  color: #fe938c;
  border: 2px solid #fe938c;
}

.btn-outline:hover {
  background: #fe938c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 147, 140, 0.3);
}

.btn-link {
  background: none;
  color: #6c757d;
  text-decoration: none;
  font-size: 14px;
  padding: 10px 0;
  border: none;
  transition: all 0.3s ease;
}

.btn-link:hover {
  color: #fe938c;
  text-decoration: underline;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.button-group .btn {
  flex: 1;
}

.forgot-password {
  text-align: center;
  margin-top: 20px;
}

.form-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 147, 140, 0.1), transparent);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.style-form-login {
  animation: fadeInUp 0.6s ease-out;
}

/* Tablet */
@media (max-width: 768px) {
  .container-login {
    max-width: 90%;
  }

  .style-form-login {
    padding: 35px 30px;
  }

  .style-form-login h2 {
    font-size: 26px;
    margin-bottom: 30px;
  }

  .form-control.input-med {
    padding: 13px 18px;
    font-size: 15px;
  }

  .btn {
    padding: 11px 25px;
    font-size: 14px;
  }

  .button-group {
    gap: 12px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body.login {
    padding: 15px;
  }

  .container-login {
    max-width: 100%;
  }

  .style-form-login {
    padding: 25px 20px;
    margin: 0;
    border-radius: 16px;
  }

  .style-form-login h2 {
    font-size: 22px;
    margin-bottom: 25px;
  }

  .style-form-login h2::after {
    width: 50px;
    bottom: -8px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .form-control.input-med {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .button-group .btn {
    width: 100%;
  }

  .btn-link {
    font-size: 13px;
  }

  .forgot-password {
    margin-top: 15px;
  }

  .paswor-style button {
    right: 12px;
    width: 35px;
  }

  .paswor-style input.form-control {
    padding-right: 45px !important;
  }
}

.form-control.input-med:valid {
  border: none;
  /* Sin bordes incluso al validar */
}

.form-control.input-med:invalid:not(:placeholder-shown) {
  border: none;
  /* Sin bordes en inválidos */
}


.paswor-style {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: block;
  /* Asegurar comportamiento bloque */
}

/* Usamos selector más específico para ganar a input-med */
.paswor-style input.form-control {
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 40px !important;
  /* Espacio para el ojo */
  box-sizing: border-box !important;
  /* Forzar modelo de caja */
}

.paswor-style button {
  position: absolute;
  right: 15px;
  /* Un poco más de margen del borde */
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 40px;
  /* Zona de clic consistente */
  z-index: 5;
}