/* ─── Preloader · dimmed backdrop + animated brand mark ───
   #preloader sits fixed over the whole viewport while a page (or its
   first data fetch) is loading. Instead of a spinner/skeleton, it dims
   the page behind a blurred glass overlay and animates the Mahe logo
   in the center — pulsing scale + a soft rotating halo + expanding
   ripple rings, so it reads as "brand is working", not a generic loader. */

#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 13, 26, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1055;
    opacity: 1;
    transition: opacity 0.35s ease;
}

#preloader.preloader-hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-mark {
    position: relative;
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Two staggered ripple rings expanding outward from behind the logo */
.preloader-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(76, 191, 122, 0.45);
    animation: preloader-ripple 2.1s cubic-bezier(.3, .6, .4, 1) infinite;
}
.preloader-ripple.preloader-ripple-delay {
    animation-delay: 0.7s;
}

/* Slow rotating halo ring that frames the logo */
.preloader-halo {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-right-color: rgba(255, 255, 255, 0.35);
    animation: preloader-spin 1.1s linear infinite;
}

.preloader-logo-wrap {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: preloader-pulse 1.5s ease-in-out infinite;
}

.preloader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

.preloader-caption {
    position: absolute;
    top: calc(50% + 78px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.1); opacity: 0.88; }
}

@keyframes preloader-ripple {
    0%   { transform: scale(0.55); opacity: 0.55; }
    100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .preloader-ripple,
    .preloader-halo,
    .preloader-logo-wrap {
        animation: none;
    }
}

/* Hide the DataTables built-in "processing" loader (three animated teal
   dots shown in the middle of a table during ajax loads). The brand logo
   preloader already covers loading, so this second indicator is redundant
   and was showing up as a stray "three dots" loader on list pages. */
div.dataTables_wrapper div.dataTables_processing,
div.dataTables_processing {
    display: none !important;
}
