/* Skeleton boot — style cho #initial-loader trong index.html.
   Đồng bộ giá trị với .loading-shell / .sk-process trong src/scss/loading-page.scss —
   sửa màu/spacing thì sửa cả hai nơi. Để ở file CSS thật (không inline <style>)
   vì vite-plugin-node-polyfills parse nhầm inline style thành JS gây warning. */

#initial-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    --sk-side-bg: #f0f1f4;
    --sk-side-block: #dfe2e7;
}
/* Skeleton chạy trước CSS bundle (chưa có reset border-box của Bootstrap) */
#initial-loader,
#initial-loader * {
    box-sizing: border-box;
}
#initial-loader .sk-shimmer {
    position: relative;
    overflow: hidden;
    background: #eceef1;
    border-radius: 4px;
}
#initial-loader .sk-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    animation: sk-shimmer 1.4s linear infinite;
    transform: translateX(-100%);
}
@keyframes sk-shimmer {
    to {
        transform: translateX(100%);
    }
}
#initial-loader .sk-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 16px;
}
#initial-loader .sk-brand {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 64px;
    background: var(--sk-side-bg);
    align-items: center;
    justify-content: center;
}
#initial-loader .sk-brand .sk-shimmer,
#initial-loader .sk-sidebar .sk-shimmer {
    background: var(--sk-side-block);
}
#initial-loader .sk-brand .sk-shimmer {
    width: 140px;
    height: 26px;
}
#initial-loader .sk-logo {
    width: 120px;
    height: 24px;
}
#initial-loader .sk-search,
#initial-loader .sk-chip,
#initial-loader .sk-btn,
#initial-loader .sk-hicon {
    display: none;
}
#initial-loader .sk-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: auto;
}
#initial-loader .sk-sidebar {
    position: absolute;
    top: 64px;
    bottom: 0;
    left: 0;
    width: 200px;
    background: var(--sk-side-bg);
    padding: 12px;
    display: none;
}
#initial-loader .sk-user-card {
    height: 150px;
    border-radius: 8px;
    margin-bottom: 24px;
}
#initial-loader .sk-sidebar .sk-menu-row {
    height: 16px;
    margin-bottom: 26px;
}
#initial-loader .sk-main {
    position: absolute;
    top: 64px;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Component "Đang xử lý dữ liệu" — trùng khớp LoadingShell (loading-page.scss) */
#initial-loader .sk-process {
    width: 300px;
    text-align: center;
    transform: translateY(-10%);
}
/* logo-mau.png đã crop hết padding trong suốt — spacing do CSS kiểm soát thật */
#initial-loader .sk-process img {
    width: 90%;
}
#initial-loader .sk-track {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 4px;
    border-radius: 50px;
    background: #f26522;
    margin-top: 48px;
}
#initial-loader .sk-track::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    animation: sk-shimmer 1.4s linear infinite;
    transform: translateX(-100%);
}
#initial-loader .sk-text {
    margin-top: 24px;
    color: #00467f;
    font-weight: 600;
    font-size: 14px;
    font-family: "Google Sans", Roboto, Helvetica, Arial, sans-serif;
}
@media (min-width: 992px) {
    #initial-loader .sk-brand {
        display: flex;
    }
    #initial-loader .sk-sidebar {
        display: block;
    }
    #initial-loader .sk-header {
        left: 200px;
        gap: 12px;
    }
    #initial-loader .sk-header .sk-logo {
        display: none;
    }
    #initial-loader .sk-search {
        display: block;
        width: 320px;
        max-width: 34%;
        height: 36px;
        border-radius: 6px;
    }
    #initial-loader .sk-chip {
        display: block;
        width: 140px;
        height: 32px;
        border-radius: 6px;
        margin-left: auto;
    }
    #initial-loader .sk-btn {
        display: block;
        width: 110px;
        height: 32px;
        border-radius: 6px;
    }
    #initial-loader .sk-hicon {
        display: block;
        width: 24px;
        height: 24px;
        border-radius: 50%;
    }
    #initial-loader .sk-avatar {
        margin-left: 0;
    }
    #initial-loader .sk-main {
        left: 200px;
    }
}
