/* COLORES INSTITUCIONALES */
:root {
    --rojo-institucional: #7B1E2B;
    --azul-fuerte: #0A2A66;
    --blanco: #FFFFFF;
    --negro-suave: #1A1A1A;
    --gris-claro: #F4F4F4;
    --gris-medio: #C4C4C4;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

html, body {
    height: 100%;
}

/* ===== FONDO OPTIMIZADO ===== */
body {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
        url('ilb.png') center/cover no-repeat;

    /* ❌ Eliminamos background-attachment: fixed */

    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== HEADER ===== */
h1 {
    background-color: var(--rojo-institucional);
    color: var(--blanco);
    text-align: center;
    padding: 18px;
    font-size: 22px;
    letter-spacing: 1px;

    position: sticky;
    top: 0;
}

/* ===== TARJETA LOGIN ===== */
form {
    margin: auto;
    width: 380px;
    padding: 40px;

    /* Fondo sólido ligero en lugar de blur */
    background: rgba(255, 255, 255, 0.95);

    border-radius: 15px;
    border: 1px solid var(--gris-medio);

    /* Sombra optimizada */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);

    /* Animación ligera */
    animation: fadeIn 0.4s ease-in-out;
}

/* Animación moderna pero ligera */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LABELS ===== */
label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: var(--negro-suave);
}

/* ===== INPUTS ===== */
input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 8px;
    border: 1px solid var(--gris-medio);
    font-size: 14px;

    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--rojo-institucional);
    box-shadow: 0 0 4px rgba(123,30,43,0.25);
}

/* ===== BOTÓN ===== */
input[type="submit"] {
    width: 100%;
    padding: 13px;
    background-color: var(--rojo-institucional);
    color: var(--blanco);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="submit"]:hover {
    background-color: #651722;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* ===== LINKS ===== */
p {
    text-align: center;
    margin-top: 18px;
}

a {
    color: var(--azul-fuerte);
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    form {
        width: 90%;
        padding: 25px;
    }
}