/* ==========================================================================
   FLOWDESK ENTERPRISE GLOBAL STYLES (v4.0)
   ========================================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #F8FAFC; /* Seamless transition to the MudBlazor theme */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   THE BOOT SEQUENCE
   ========================================================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0F172A; /* Slate Navy */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    padding: 0 24px;
    box-sizing: border-box;
}

.splash-logo {
    width: 56px;
    height: 56px;
    color: #FFFFFF;
    margin-bottom: 24px;
    animation: pulse-glow 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.98); }
}

.splash-title {
    color: #FFFFFF;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
}

.splash-subtitle {
    color: #64748B; /* Muted Slate */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 48px;
}

/* ==========================================================================
   NATIVE BLAZOR HARDWARE PROGRESS BAR
   ========================================================================== */
.loading-progress {
    width: 100%;
    height: 3px;
    background-color: #1E293B; /* Darker Slate Track */
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.loading-progress-bar {
    height: 100%;
    background-color: #38BDF8; /* Sky Blue Accent */
    border-radius: 4px;
    
    /* 🟢 Hooks directly into Blazor WebAssembly's native memory download tracker */
    width: var(--blazor-load-percentage, 0%); 
    transition: width 0.15s ease-out;
}

.loading-progress-text {
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   PREMIUM CUSTOM SCROLLBARS
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ==========================================================================
   BLAZOR FATAL ERROR UI
   ========================================================================== */
#blazor-error-ui {
    background: #FEF2F2;
    border-top: 4px solid #EF4444;
    color: #991B1B;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    color: #EF4444;
}