body {
  margin: 0;
  min-height: 100vh; /* Permite que el fondo crezca si el contenido es largo */
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
 background: linear-gradient(140deg, #d9ffdd 0%, #887A03 40%, #E5FDFC 100%);
  /* PERMITIR SCROLL EN MÓVIL */
  overflow-y: auto; 
  padding: 20px 0; /* Espacio de seguridad arriba y abajo */
  color: #1D1F21;
}

@keyframes ios-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 15px; /* Margen lateral en pantallas pequeñas */
  box-sizing: border-box;
}

.glass-box {
  width: 100%; /* Ocupa el ancho disponible */
  max-width: 380px; /* Pero no más de esto en PC */
  padding: 30px 20px;
  border-radius: 12px;
 background: rgba(215, 250, 233, 0.25); /* Rojo translúcido */
  border: 1px solid rgba(215, 250, 233, 0.5); /* Borde rojo brillante */
  box-shadow: 0 8px 32px rgba(199, 253, 243, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
  box-sizing: border-box; /* Crucial para que el padding no ensanche la caja */
}

/* Ajuste del Logo para que no se corte nunca */
.avatar-container {
  width: 100%;
  max-width: 200px; /* Un poco más pequeño para móviles */
  height: auto;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.avatar-container img {
  max-width: 100%;
  height: auto;
  object-fit: contain; /* Muestra el logo COMPLETO */
}
/* --- INPUTS CONSOLIDADOS (ELIMINA DOBLE BORDE) --- */
.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
  background: rgba(255, 247, 247, 0.25); /* Fondo oscuro para contraste */
  border-radius: 8px;
  border: 1px solid rgba(131, 241, 246, 0.2);
  transition: all 0.3s ease;
}

/* Estilo para cuando el usuario hace clic en el campo */
.input-group-custom:focus-within {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
  border-radius: 10px !important;
}

.input-group-custom input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 14px 15px;
  color: #1D1F21 !important;
  font-size: 15px;
  margin: 0 !important;
}

/* Esto elimina el cuadro oscuro que se ve alrededor del ojo en tu imagen */
.password-container {
    display: flex !important;
    align-items: center;
    background: rgba(0, 0, 0, 0.25) !important; /* Fondo uniforme para todo el campo */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    overflow: hidden;
    margin-bottom: 5px;
    height: 50px; /* Altura fija para que coincidan */
}

.password-container input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 15px !important;
    height: 100%;
    color: white !important;
}

#togglePassword {
    background: transparent !important; /* CLAVE: Quita el fondo azul oscuro */
    border: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important; /* Separador sutil */
    color: rgba(255, 255, 255, 0.8) !important;
    width: 60px;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#togglePassword:hover {
    color: #007bff !important; /* Azul Activo */
    background: rgba(255, 255, 255, 0.05) !important;
}


/* --- LIMPIEZA DE AUTOCOMPLETADO --- */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px rgba(216, 237, 253, 0.8) inset !important;
  -webkit-text-fill-color: #0C1F36 !important;
}

/* --- FOOTER --- */
.login-footer {
  text-align: center;
  font-size: 0.85rem;
}

.login-footer a {
  color: #0C1F36;
  text-decoration: none;
  font-weight: 600;
}


/* Selector ultra-específico para forzar el estilo Crystal Azure */
.btn-login {
   width: 100% !important;
    height: 50px !important;
    border-radius: 10px !important;
    border: none !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: white !important;
    cursor: pointer !important;
    /* Gradiente Azure Vibrante */
    background: linear-gradient(180deg, #0095ff 0%, #007bff 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

/* Efecto al pasar el mouse */
.btn-login:hover {
   filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(0, 149, 255, 0.6) !important;
    transform: translateY(-1px);
}

/* Efecto al hacer clic */
.btn-login:active {
    transform: translateY(0) !important;
    filter: brightness(0.9) !important;
}



/* Contenedor base de la alerta (Ajustado para Crystal Azure) */
.alert {
  position: fixed;
  top: 0px;               /* Separado del borde superior */
  left: 50%;
  transform: translateX(-50%); /* Centrado horizontal */
  width: 90%;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 12px;
  z-index: 9999;           /* Siempre al frente */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #1D1F21 !important;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: slideDown 0.5s ease forwards, shake 0.4s ease-in-out 0.5s;
}

/* Variación DANGER (Rojo Crystal) */
.alert.danger {
  background: rgba(220, 53, 69, 0.25); /* Rojo translúcido */
  border: 1px solid rgba(255, 71, 87, 0.5); /* Borde rojo brillante */
  box-shadow: 0 8px 32px rgba(220, 53, 69, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Icono dentro de la alerta (Opcional si usas FontAwesome) */
.alert.danger.success::before {
  content: '\f071'; /* Icono de advertencia de FontAwesome */
  font-family: 'FontAwesome';
  font-weight: 900;
  font-size: 1.1rem;
}

.alert.success {
  background: rgba(215, 250, 233, 0.25); /* Rojo translúcido */
  border: 1px solid rgba(215, 250, 233, 0.5); /* Borde rojo brillante */
  box-shadow: 0 8px 32px rgba(220, 53, 69, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
}



/* --- ANIMACIONES --- */
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  25% { transform: translateX(-52%); }
  75% { transform: translateX(-48%); }
}

