/* ================================
   FONDO GENERAL + ANIMACIÓN
   ================================ */

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;

    background-image: url('../img/fondo_login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0;
    transition: opacity .8s ease;
    overflow: hidden;
}

body.bg-loaded {
    opacity: 1;
}

/* Animación suave */
.overlay-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;

    background: radial-gradient(circle at 30% 30%, rgba(0, 90, 150, 0.18), transparent),
                radial-gradient(circle at 70% 70%, rgba(0, 50, 120, 0.18), transparent);
    animation: mover 10s ease-in-out infinite alternate;
}

@keyframes mover {
    0% { transform: translateX(-15px) translateY(-10px); }
    100% { transform: translateX(15px) translateY(10px); }
}

/* ================================
   TARJETA
   ================================ */

.login-card {
    position: absolute;
    top: 50%;
    right: 7%;
    transform: translateY(-50%);

    width: 330px;
    padding: 35px 40px;

    background: rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 25px rgba(0,0,0,.25);

    color: white;
    opacity: 0;
    transition: opacity .7s ease, transform .7s ease;
}

body.bg-loaded .login-card {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ================================
   TEXTOS Y FORMULARIO
   ================================ */

h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;

    border: none;
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.78);
    font-size: 15px;
}

button {
    width: 100%;
    margin-top: 25px;
    padding: 12px;

    background: linear-gradient(45deg, #004a85, #007bff);
    color: white;
    border: none;
    border-radius: 12px;

    font-size: 16px;
    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    transition: transform .2s ease;
}

button:hover {
    transform: scale(1.04);
}
