/* --- Estilos Base y Fondo Mejorado --- */
body.login-bg {
    min-height: 100vh;
    background-color: #133c68;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDQwIDY0MCI+PHBhdGggZmlsbD0iIzE4NGI4MiIgZmlsbD1vcGFjaXR5PSIwLjEiIGQ9Ik0xMzA0IDMyMEMxMjA4IDMyMCAxMDYxLjQyIDI3NS4yMSA5NDggMjA0LjgxUzcwNC41OCA1MS4yMSA2MDggNTMuMzlDNTEyIDU2IDM5MC41OCAxNDQuMzUgMjgwIDIxMS4yMVM1MiAzMjAgMCAzMjBoMTQ0MHYzMjBIMTMwNHoiLz48cGF0aCBmaWxsPSIjZmZhOTAwIiBmaWxsLW9wYWNpdHk9IjAuMSIgZD0iTTE0NDAgMzIwYzAgMCAwIDMyMCAwIDMyMEg1MzlDNDQzIDY0MCAzMDEuNDIgNTk1LjIxIDE4OCA1MjQuODFTLTU1LjQyIDM3MS4yMSAxMiAzNzMuMzlDODggMzc2IDIwOS40MiA0NjQuMzUgMzIwIDUzMS4yMVM1NTYgNjQwIDY1MiA2NDBoNzM2Ii8+PC9zdmc+');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: blur(2px);
    z-index: 0;
}

/* --- Tarjeta de Login con efecto Glass y Animación --- */

.login-card {
    z-index: 5;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    box-shadow: 0 10px 35px rgba(17, 42, 75, 0.15), 0 2px 15px rgba(17, 42, 75, 0.1);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: card-enter 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes card-enter {
    from { opacity: 0; transform: scale(0.95) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-logo {
    width: 130px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #23283b;
    text-align: center;
    margin: 0;
}

.login-subtitle {
    font-size: 1rem;
    color: #475076;
    margin: 8px 0 28px 0;
    text-align: center;
}

.login-form {
    width: 100%;
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* --- Campos de Entrada con Iconos --- */

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #8a91b4;
    transition: color 0.2s ease-in-out;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px 14px 50px; 
    border: 2px solid #e0e5f5;
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    color: #23283b;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.login-form input::placeholder {
    color: #8a91b4;
}

.login-form input:focus {
    border-color: #ffa900;
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 169, 0, 0.2);
}

/* Efecto focus en el icono */
.input-wrapper:focus-within .input-icon {
    color: #ffa900;
}


/* --- Botón con Mejor Interactividad --- */
.login-btn {
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(90deg, #ffa900 0%, #eb8f15 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(254, 194, 107, 0.5);
    transition: all 0.2s ease-in-out;
}

.login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(254, 194, 107, 0.7);
    background: linear-gradient(90deg, #ffb836 0%, #f8a137 100%);
}


/* --- Mensaje de Error --- */
.login-error {
    color: #c72e4b;
    background: #fde8ec;
    border: 1px solid #f6cbd4;
    border-left: 5px solid #e13c5e;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    box-sizing: border-box;
}




/* --- diseño para el ícono de mostrar/ocultar contraseña --- */

.input-icon-toggle {
    position: absolute;
    right: 16px; 
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #8a91b4;
    cursor: pointer; 
    transition: color 0.2s ease-in-out;
}

.input-icon-toggle:hover {
    color: #ffa900; 
}

/* Ajuste para que el input no se sobreponga al ícono nuevo */
.login-form input[type="password"] {
    padding-right: 50px; 
}





@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsividad Refinada --- */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .login-subtitle {
        font-size: 0.95rem;
    }
}

#tsparticles {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0; 
}

.login-card {
  z-index: 5; 
}

