/* =====================================================
   VARIABLES DE COLOR
===================================================== */
:root {
    --azul-principal: #0d3b66;
    --azul-oscuro: #092a4a;
    --azul-claro: #e0ecff;
}

/* =====================================================
   BASE
===================================================== */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
}

#bodyLogin {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   ANIMACIÓN
===================================================== */
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   CONTENEDOR LOGIN
===================================================== */
#divLogin {
    background: #fff;
    padding: 10px 15px;
    border-radius: 14px;
    width: 100%;
    max-width: 720px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    animation: loginFadeIn 0.35s ease-out;
    box-sizing: border-box;
}

/* Título */
#divLogin h1 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--azul-principal);
}

/* =====================================================
   CONTENIDO
===================================================== */
#divContentPane {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#divLeftPane, #divRightPane {
    flex: 1;
}

#divRightPane {
    display: flex;
    justify-content: center;
}

/* =====================================================
   FORMULARIO
===================================================== */
.form-group {
    margin-bottom: 15px !important;
}

label {
    font-size: 12px;
    color: #333;
    margin-bottom: .25rem !important;
    padding-left: .75rem;
}

.form-control {
    height: 38px !important;
    border-radius: 6px !important;
    padding: .375rem .5rem !important;
}

#imgLogin {
    max-width: 180px;
    width: 100%;
    height: auto;
}

/* =====================================================
   BOTÓN UNIFICADO
===================================================== */
.button.primarybtn {
    padding: 6px 12px !important;
    background-color: var(--azul-principal);
    border: 1px solid var(--azul-principal);
    color: #fff;
    font-weight: 500;
    text-decoration: none !important;
    text-align: center;
    border-radius: 4px !important;
    font-size: 12px !important;
    min-width: 80px;
    cursor: pointer !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

    .button.primarybtn:hover {
        background-color: var(--azul-claro);
        border-color: var(--azul-oscuro);
        color: var(--azul-oscuro);
    }

/* =====================================================
   MENSAJES
===================================================== */
#divMensaje {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #666;
}

.errorText {
    display: block;
    margin-top: 10px;
    color: #d9534f;
    font-size: 12px;
    text-align: center;
}

/* =====================================================
   BOTÓN LOADING
===================================================== */
.button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.button.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   RESPONSIVE (MÓVIL / TABLET)
===================================================== */
@media (max-width: 768px) {

    #divLogin {
        padding: 15px 10px;
        min-width: 380px;
    }

        #divLogin h1 {
            font-size: 18px;
        }

    #divContentPane {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    #divRightPane {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #imgLogin {
        max-width: 140px;
    }

    #divLeftPane {
        width: 100%;
    }

    label {
        font-size: 13px;
    }

    .form-control {
        width: 100% !important;
        height: 38px !important;
        font-size: 14px;
    }

    .button.primarybtn {
        width: 100%;
        height: 38px;
        font-size: 14px !important;
    }

    .form-group {
        margin-bottom: 15px !important;
    }
}