/* Site-wide top loading bar — injected into every HTML page by
   dashboard.middleware.LoaderBarMiddleware (see that file for why).
   Visual language matches the accent/secondary gradient already used for
   progress bars elsewhere in the app (see style.css's .progression-fill /
   schedule.html's .nav-loading-bar). */

#rcmLoaderBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, var(--secondary, #3182ce), var(--accent, #4fd1c5), var(--secondary, #3182ce));
    background-size: 200% 100%;
    box-shadow: 0 0 10px var(--accent-glow, rgba(79, 209, 197, 0.5)), 0 0 4px var(--secondary-glow, rgba(49, 130, 206, 0.6));
    transition: width 0.3s ease-out, opacity 0.35s ease;
}

#rcmLoaderBar.active {
    opacity: 1;
    animation: rcmLoaderShimmer 1.1s linear infinite;
}

#rcmLoaderBar.error {
    background: #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.6);
    animation: none;
}

@keyframes rcmLoaderShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
