/* ==========================================================================
   GTOS ENTERPRISE PRELOADER - PORT OF MY THUY (MTIP)
   ========================================================================== */

.preloader-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: rgba(248, 250, 252, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
}

.preloader-backdrop.loaded,
.preloader-backdrop.fade-out {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Ẩn thẻ page-preloader cũ */
.preloader-backdrop .page-preloader {
    display: none !important;
}

/* Thẻ Card Trung Tâm (Elevated Frosted Glass Card) */
.gtos-preloader-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    padding: 32px 42px 28px 42px;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.9);
    min-width: 300px;
    max-width: 90vw;
    text-align: center;
    overflow: hidden;
    animation: gtosCardPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gtosCardPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Vòng xoay đa tầng (Dual-Ring Maritime Orb) */
.gtos-loader-orb {
    position: relative;
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Vòng ngoài (Đỏ thương hiệu MTIP) */
.gtos-loader-orb .ring-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #e11d48;
    border-right-color: #e11d48;
    animation: gtosSpinClockwise 1.1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

/* Vòng trong (Xanh biển sâu & Cyan) */
.gtos-loader-orb .ring-inner {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-bottom-color: #dc2626;
    border-left-color: #f87171;
    animation: gtosSpinCounterClockwise 0.85s linear infinite;
}

@keyframes gtosSpinClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gtosSpinCounterClockwise {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* Logo MTIP ở tâm vòng quay */
.gtos-loader-orb .orb-logo {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
    animation: gtosLogoPulse 2s ease-in-out infinite;
}

.gtos-loader-orb .orb-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

@keyframes gtosLogoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Typography Tiêu đề thương hiệu */
.gtos-loader-brand {
    font-family: 'Times New Roman', Times, Georgia, serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.gtos-loader-brand .brand-gtos {
    color: #dc2626;
}

.gtos-loader-brand .brand-divider {
    color: #dc2626;
}

.gtos-loader-brand .brand-port {
    color: #dc2626;
}

/* Dòng trạng thái tác nghiệp */
.gtos-loader-status {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

/* Thanh tiến trình đáy Card (Linear Progress Shimmer) */
.gtos-loader-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: #f1f5f9;
    overflow: hidden;
}

.gtos-loader-progress .progress-bar-shimmer {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #e11d48, #38bdf8, #1e40af);
    border-radius: 4px;
    animation: gtosProgressGlide 1.4s ease-in-out infinite;
}

@keyframes gtosProgressGlide {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(300%);
    }
}
