/* Brand tokens — MUST stay in sync with Models/AdminColors.cs, which is the
   single source of truth. Blazor cannot emit a static .css file from C#
   constants, so this is a deliberate, documented mirror: change
   AdminColors.cs first, then update these values to match. */
:root {
    --brand:               #7C3AED;
    --brand-hover:         #6D28D9;
    --accent:              #F59E0B;
    --primary-bg:          #FFFFFF;
    --secondary-bg:        #F8F7FF;
    --text-primary:        #1A1033;
    --text-secondary:      #4B4668;
    --text-muted:          #9992B3;
    --border:              #E8E4F3;
    --scroll-thumb-hover:  #C4B8E8;
    --error-soft-bg:       #FEE2E2;
    --error-soft-fg:       #991B1B;
}

html, body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* ── Override MudBlazor dark-surface fallbacks ─────────────────────── */
.mud-drawer {
    background-color: var(--primary-bg) !important;
}

.mud-nav-link:hover,
.mud-nav-link.active {
    background-color: var(--secondary-bg) !important;
    color: var(--brand) !important;
}

.mud-nav-link.active .mud-nav-link-icon {
    color: var(--brand) !important;
}

/* ── Utility ─────────────────────────────────────────────────────────── */
.fw-bold { font-weight: 700; }

.rounded-lg { border-radius: 12px !important; }

code {
    background: var(--secondary-bg);
    color: var(--brand);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ── Stat card surface ────────────────────────────────────────────────── */
.mud-paper[style*="background:#F8F7FF"] {
    border: 1px solid var(--border);
}

/* ── Card polish — soft lift on hover for a less flat, more premium feel ── */
.rounded-lg.mud-paper {
    transition: box-shadow 0.2s ease;
}
.rounded-lg.mud-paper:hover {
    box-shadow: 0 4px 16px rgba(26, 16, 51, 0.08);
}

/* ── Dashboard "Needs Attention" rows ────────────────────────────────── */
.needs-attention-row {
    transition: background-color 0.15s;
}
.needs-attention-row:hover {
    background-color: var(--secondary-bg);
}

/* ── MudTable header ─────────────────────────────────────────────────── */
.mud-table-head .mud-table-cell {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--secondary-bg); }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* ── SSR Login form ─────────────────────────────────────────────────── */
.login-field { margin-bottom: 1.25rem; }
.login-field label {
    display: block; margin-bottom: 0.35rem;
    font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
}
.login-input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 1rem; color: var(--text-primary);
    background: var(--primary-bg); outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.login-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.login-btn {
    width: 100%; padding: 0.85rem;
    background: var(--brand); color: #fff; border: none;
    border-radius: 8px; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.login-btn:hover { background: var(--brand-hover); }
.login-error {
    background: var(--error-soft-bg); color: var(--error-soft-fg);
    padding: 0.75rem 1rem; border-radius: 8px;
    margin-bottom: 1rem; font-size: 0.875rem;
}
