:root {
    --brand-primary: #6366f1;
    --brand-primary-hover: #4f46e5;
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    --text-header: #1e293b;
    --text-body: #475569;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-main);
}

h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Outfit', sans-serif;
    color: var(--text-header);
    font-weight: 600;
}

/* ===== Glass-Morphism & Premium Elements ===== */
.premium-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
}

/* ===== Form Validation ===== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10b981;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== Blazor Error Boundary ===== */
.blazor-error-boundary {
    background: #ef4444;
    padding: 1rem;
    color: white;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* ===== Sidebar & Navigation ===== */
.nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    color: #94a3b8 !important;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #f8fafc !important;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #ffffff !important;
    background-color: var(--brand-primary) !important;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* ===== Page Transitions ===== */
.page-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

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

/* ===== Reconnect UI ===== */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    padding: 0.75rem;
    text-align: center;
    color: white;
    background-color: var(--brand-primary);
    box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.1);
}
