/* FUENTE LIMPIA */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap");

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

/* CONTENEDOR DEL LOGIN */
.login-container {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.login-box {
  background: #ffffff20;
  backdrop-filter: blur(10px);
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadeIn 0.6s ease-in-out;
}

h2 {
  color: white;
  margin-bottom: 5px;
}

.subtitle {
  color: #dcdcdc;
  margin-bottom: 25px;
}

/* INPUTS ESTILO MODERNO */
.input-group {
  position: relative;
  margin-bottom: 28px;
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: none;
  border-bottom: 2px solid #ffffff70;
  outline: none;
  background: transparent;
  color: white;
  font-size: 16px;
  transition: 0.3s;
}

.input-group input:focus {
  border-bottom-color: #00e5ff;
}

.input-group label {
  position: absolute;
  left: 0;
  top: 12px;
  color: #ffffff80;
  pointer-events: none;
  transition: 0.3s;
}

/* LABEL FLOATING NORMAL */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -10px;
  font-size: 14px;
  color: #00e5ff;
}

/* FIX PARA AUTOCOMPLETE CHROME Y EDGE */
.input-group input:-webkit-autofill {
  box-shadow: 0 0 0 30px transparent inset !important;
  -webkit-text-fill-color: white !important;
}

/* HACER QUE EL LABEL SUBA TAMBIÉN CON AUTOFILL */
.input-group input:-webkit-autofill + label {
  top: -10px;
  font-size: 14px;
  color: #00e5ff;
}

/* También soportar autofill vía JS */
.input-group input.filled + label {
  top: -10px;
  font-size: 14px;
  color: #00e5ff;
}

/* ICONO VER CONTRASEÑA */
.toggle-password {
  position: absolute;
  right: 5px;
  top: 12px;
  cursor: pointer;
  color: white;
  font-size: 18px;
}

/* BOTÓN */
.btn-login {
  width: 100%;
  padding: 12px;
  background: #00bcd4;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-login:hover {
  background: #0097a7;
}

/* MENSAJE ERROR */
.error-message {
  color: #ff6b6b;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  height: 18px; /* reserva el espacio aunque no haya error */
  animation: fadeIn 0.4s ease;
  text-align: center;
}


/* ANIMACIÓN ENTRADA */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* R*
/* ELIMINAR FONDO AMARILLO DE AUTOCOMPLETE DEFINITIVAMENTE */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  background: transparent !important;
  -webkit-text-fill-color: white !important;
  transition: background-color 9999s ease-in-out 0s !important;
}
