/* ===== لودینگ یکپارچه سایت و پنل مدیریت ===== */
#site-start-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#site-start-loader.site-loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.site-loader-logo {
    position: relative;
    width: min(500px, 82vw);
    height: 245px;
}

.site-loader-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-loader-logo-base {
    opacity: 0.35;
    filter: grayscale(0.25);
}

.site-loader-logo-fill {
    clip-path: inset(100% 0 0 0);
    opacity: 1;
    animation: siteLogoFill 0.6s ease-out forwards;
}

.site-loader-text {
    color: #202733;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.8;
    text-align: center;
}

.site-loader-percent {
    min-width: 100px;
    color: #111;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    direction: ltr;
    letter-spacing: 0;
    text-align: center;
}

@media (max-width: 576px) {
    .site-loader-logo {
        width: min(380px, 88vw);
        height: 190px;
    }

    .site-loader-text {
        font-size: 20px;
    }

    .site-loader-percent {
        font-size: 34px;
    }
}

@keyframes siteLogoFill {
    from {
        clip-path: inset(100% 0 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

/* ===== همان لودینگ، بدون هیچ تفاوتی، در overlay پنل مدیریت =====
   فقط پس‌زمینه و چیدمان overlay هم‌سطح #site-start-loader می‌شود؛
   اندازه لوگو، متن و درصد عیناً از قواعد بالا می‌آید. */
#overlay {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html[data-admin-theme="dark"] #overlay {
    background: rgba(255, 255, 255, 0.96);
}

#overlay .cv-spinner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
