/* ============================================================
   Splash Screen — شركة نفط الوسط
   ============================================================ */

.app-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ecfeff;
    font-family: 'Cairo', sans-serif;
    overflow: hidden;
    background: #041f1e;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.app-splash.is-hiding {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 55% at 50% 20%, rgba(45, 212, 191, 0.28), transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(194, 65, 12, 0.18), transparent 50%),
        linear-gradient(145deg, #041f1e 0%, #0b3d3a 45%, #0f766e 100%);
}

.splash-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.splash-orb-a {
    width: 280px;
    height: 280px;
    top: -70px;
    right: -50px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.45), transparent 70%);
    animation: splashFloatA 8s ease-in-out infinite;
}

.splash-orb-b {
    width: 220px;
    height: 220px;
    bottom: -40px;
    left: -40px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.35), transparent 70%);
    animation: splashFloatB 10s ease-in-out infinite;
}

@keyframes splashFloatA {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 18px); }
}

@keyframes splashFloatB {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(18px, -16px); }
}

.splash-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    max-width: 520px;
    animation: splashRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes splashRise {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo {
    width: 78px;
    height: 78px;
    margin: 0 auto 22px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 34px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.35);
    animation: splashPulse 2.8s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.35); }
    50% { box-shadow: 0 0 0 16px rgba(45, 212, 191, 0); }
}

.splash-content h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.splash-dept {
    margin: 0 0 14px;
    color: #99f6e4;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
}

.splash-msg {
    margin: 0 0 26px;
    color: rgba(236, 254, 255, 0.75);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.7;
}

.splash-loader {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.splash-loader span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5eead4;
    animation: splashDot 1.1s ease-in-out infinite;
}

.splash-loader span:nth-child(2) { animation-delay: 0.15s; }
.splash-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes splashDot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.45; }
    40% { transform: scale(1.15); opacity: 1; }
}

.splash-progress {
    width: min(240px, 70vw);
    height: 4px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.splash-progress i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #5eead4, #fbbf24);
    animation: splashBar 5s linear forwards;
}

@keyframes splashBar {
    from { width: 0%; }
    to { width: 100%; }
}

body.splash-lock {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .splash-logo,
    .splash-orb,
    .splash-loader span,
    .splash-content {
        animation: none !important;
    }
}
