:root {
    --system-loading-backdrop: rgba(15, 23, 42, .38);
    --system-loading-surface: #ffffff;
    --system-loading-text: #1f2937;
    --system-loading-muted: #64748b;
    --system-loading-accent: #0d6efd;
}

.system-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--system-loading-backdrop);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
}

.system-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.system-loading-panel {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    width: min(26rem, 100%);
    padding: 1rem 1.1rem;
    color: var(--system-loading-text);
    background: var(--system-loading-surface);
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: .5rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .25);
}

.system-loading-spinner {
    width: 2.25rem;
    height: 2.25rem;
    border: .22rem solid #dbeafe;
    border-top-color: var(--system-loading-accent);
    border-radius: 50%;
    animation: system-loading-spin .75s linear infinite;
}

.system-loading-title,
.system-loading-detail {
    display: block;
    overflow-wrap: anywhere;
}

.system-loading-title {
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.3;
}

.system-loading-detail {
    margin-top: .2rem;
    color: var(--system-loading-muted);
    font-size: .8rem;
    line-height: 1.35;
}

[aria-busy="true"].system-loading-trigger {
    cursor: wait !important;
}

@keyframes system-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .system-loading-overlay {
        transition: none;
    }

    .system-loading-spinner {
        animation-duration: 1.5s;
    }
}

