/* --- 1. IMPORTACIÓN DE FUENTE Y VARIABLES DE TEMA --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --container-bg: rgba(255, 255, 255, 0.15); /* Cristal claro y transparente */
    --border-color: rgba(255, 255, 255, 0.3);
    --glow-shadow: 0 0 35px rgba(0, 0, 0, 0.35); /* Brillo oscuro suave para dar profundidad */
    --text-primary: #1a253c; /* Texto oscuro para máxima legibilidad */
    --text-secondary: #5a647e;
    --primary-accent: #007bff;
    --primary-hover: #0056b3;
    --background-blur: 8px;
}

/* --- 2. FONDO ORIGINAL --- */
body {
    /* Propiedades de fondo separadas para mayor claridad y control */
    background-image: url('../imagenes/Backlogin-01-01.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;

    /* Estilos de layout y fuente */
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* --- 3. CONTENEDOR DE LOGIN (CRISTAL LUMINOSO) --- */
.login-container {
    background: var(--container-bg);
    backdrop-filter: blur(var(--background-blur));
    -webkit-backdrop-filter: blur(var(--background-blur));
    border: 1px solid var(--border-color);
    box-shadow: var(--glow-shadow);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    width: 100%;
    max-width: 420px;
    color: var(--text-primary);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 4. ELEMENTOS DEL FORMULARIO CON TEXTO OSCURO --- */
h2 {
    text-align: center;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group select option {
    color: #333;
    background: #fff;
}

.input-group input:focus, 
.input-group select:focus {
    outline: none;
    border-color: var(--primary-accent);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
}

/* --- 5. OJITO DE LA CONTRASEÑA --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#togglePassword {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: var(--text-secondary);
}

/* --- 6. BOTÓN PRINCIPAL Y MENSAJE DE ERROR --- */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

.error-message {
    color: #D8000C;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    background-color: #FFD2D2;
    border: 1px solid #ffbaba;
    margin-bottom: 1.5rem;
    display: none;
}