/**
 * CRM Amlak OE — صفحه پیش‌بارگذاری PWA / TWA
 */
.pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030712;
    color: #f1f5f9;
    font-family: 'IranSans', Tahoma, Arial, sans-serif;
    direction: rtl;
    overflow: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

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

.pwa-splash__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pwa-splash__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 15%, transparent 75%);
    animation: pwa-grid-drift 18s linear infinite;
}

.pwa-splash__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: pwa-orb-float 14s ease-in-out infinite;
}

.pwa-splash__orb--1 {
    width: 260px;
    height: 260px;
    top: -10%;
    right: -8%;
    background: rgba(99, 102, 241, 0.28);
}

.pwa-splash__orb--2 {
    width: 220px;
    height: 220px;
    bottom: -5%;
    left: -10%;
    background: rgba(34, 211, 238, 0.2);
    animation-delay: -5s;
}

.pwa-splash__scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(34, 211, 238, 0.02) 2px,
        rgba(34, 211, 238, 0.02) 4px
    );
}

.pwa-splash__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 92vw;
}

.pwa-splash__logo-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-splash__logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.15), inset 0 0 24px rgba(129, 140, 248, 0.08);
    animation: pwa-ring-pulse 2.4s ease-in-out infinite;
}

.pwa-splash__logo-ring::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(129, 140, 248, 0.2);
    animation: pwa-ring-spin 8s linear infinite;
}

.pwa-splash__logo {
    width: 88px;
    height: auto;
    max-height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.25));
    animation: pwa-logo-float 3s ease-in-out infinite;
}

.pwa-splash__title {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #22d3ee 55%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pwa-splash__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.pwa-splash__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 10px #22d3ee;
    animation: pwa-dot-blink 1.8s ease-in-out infinite;
}

.pwa-splash__loader {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwa-splash__loader span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #818cf8);
    animation: pwa-loader-bounce 1.2s ease-in-out infinite;
}

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

@keyframes pwa-grid-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(40px); }
}

@keyframes pwa-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 10px) scale(1.06); }
}

@keyframes pwa-ring-pulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

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

@keyframes pwa-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pwa-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes pwa-loader-bounce {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
    40% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-splash *,
    .pwa-splash *::before {
        animation: none !important;
    }
}
