/* Shell loader — must load before app.css so "Loading CCR…" shows on first paint */
html,
body {
    margin: 0;
    min-height: 100%;
    background-color: #e8eef2;
}

#ccr-initial-loader.ccr-initial-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

#ccr-initial-loader .ccr-initial-loader-card {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 2.5rem;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

#ccr-initial-loader .ccr-initial-loader-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(4, 120, 87, 0.2);
    border-top-color: #047857;
    border-radius: 50%;
    animation: ccr-initial-loader-spin 0.85s linear infinite;
}

@keyframes ccr-initial-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

#ccr-initial-loader .ccr-initial-loader-title {
    font: 700 1.05rem/1.35 system-ui, 'Segoe UI', sans-serif;
    color: #0f172a;
    margin: 0;
}

#ccr-initial-loader .ccr-initial-loader-subtitle {
    font: 0.85rem system-ui, 'Segoe UI', sans-serif;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

#ccr-initial-loader.ccr-initial-loader-overlay--hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body[data-ccr-app-ready="true"] #ccr-initial-loader {
    display: none !important;
}

/* Dark mode overrides for shell loader */
html.dark-theme,
html.dark-theme body {
    background-color: #0b0f19;
}

html.dark-theme #ccr-initial-loader .ccr-initial-loader-card {
    background: #151e2e;
    border-color: #2d3748;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html.dark-theme #ccr-initial-loader .ccr-initial-loader-title {
    color: #f8fafc;
}

html.dark-theme #ccr-initial-loader .ccr-initial-loader-subtitle {
    color: #94a3b8;
}

html.dark-theme #ccr-initial-loader .ccr-initial-loader-spinner {
    border: 4px solid rgba(0, 168, 107, 0.2);
    border-top-color: #00a86b;
}
