/* =================================================================== */
/*      PAUPAY INSTITUTIONAL PRE-LOADER - FASE 20_01                 */
/* =================================================================== */

.dashboard-preloader, #loader {
    position: fixed;
    inset: 0;
    background: #0f172a; /* Altanoche Profundo */
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.8s;
    opacity: 1;
    visibility: visible;
}

.preloader-hidden, .loader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.loader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    animation: pulseLogoPaupay 2s infinite ease-in-out;
    object-fit: contain;
}

@keyframes pulseLogoPaupay {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 20px rgba(31, 95, 168, 0.4)); }
}

.loader-bar {
    width: 220px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.loader-progress {
    position: absolute;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1f5fa8, #8fb4de);
    box-shadow: 0 0 15px rgba(31, 95, 168, 0.6);
    animation: progressFillPaupay 1.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes progressFillPaupay {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loader-text {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: blinkTextPaupay 1.5s infinite;
}

@keyframes blinkTextPaupay {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Soporte para modo claro si fuera necesario (aunque el preloader suele ser oscuro para impacto) */
.light-loader {
    background: #f1f5f9;
}
.light-loader .loader-text {
    color: #475569;
}
