/* Pre-mount paint shown before the React bundle parses + AppRouter's
   profile-loading icon mounts. Lives in public/ (not src/) so Vite doesn't
   try to bundle/inline it — we want it loadable from the very first byte
   the browser receives. */

html,
body {
    margin: 0;
    background: #f7f8fa;
}

/* Pre-mount loading overlay. Sits OUTSIDE #root so React doesn't unmount
   it on first render — main.tsx removes the element explicitly once
   AppRouter has resolved profile loading. Highest z-index so it covers
   any half-mounted AppShell layout underneath. */
.aquila-boot {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #f7f8fa;
    transition: opacity 150ms ease;
}

.aquila-boot.aquila-boot-fade {
    opacity: 0;
    pointer-events: none;
}

.aquila-boot::after {
    content: "";
    width: 32px;
    height: 32px;
    border: 3px solid rgba(31, 52, 89, 0.15);
    border-top-color: #1f3459;
    border-radius: 50%;
    animation: aquila-boot-spin 800ms linear infinite;
}

@keyframes aquila-boot-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-color-scheme: dark) {
    html,
    body {
        background: #14161b;
    }
    .aquila-boot {
        background: #14161b;
    }
    .aquila-boot::after {
        border-color: rgba(255, 255, 255, 0.18);
        border-top-color: #f7f8fa;
    }
}
