.app-startup-loading {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #18304f;
    background: rgba(238, 244, 252, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 180ms ease;
}

.app-startup-loading[hidden] { display: none !important; }
.app-startup-loading.is-leaving { opacity: 0; pointer-events: none; }

.app-startup-loading__content {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: min(300px, calc(100vw - 48px));
    padding: 14px 18px;
    border: 1px solid rgba(117, 148, 190, 0.26);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 44px rgba(27, 54, 90, 0.12);
}

.app-startup-loading__content > span:last-child { display: grid; gap: 3px; }
.app-startup-loading__content strong { color: inherit; font-size: 0.88rem; line-height: 1.2; }
.app-startup-loading__content small { color: #62738b; font-size: 0.72rem; }

.app-startup-loading__spinner {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    border: 3px solid rgba(37, 99, 235, 0.16);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: app-startup-spin 0.78s linear infinite;
}

body.dark-mode .app-startup-loading { color: #eef5ff; background: rgba(8, 20, 37, 0.72); }
body.dark-mode .app-startup-loading__content {
    border-color: rgba(123, 162, 216, 0.22);
    background: rgba(17, 38, 65, 0.86);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}
body.dark-mode .app-startup-loading__content small { color: #b7c7dc; }

@keyframes app-startup-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .app-startup-loading { transition: none; }
    .app-startup-loading__spinner { animation-duration: 1.5s; }
}
