/* ========================================================================
   BOSSS Design System — Elevation & Spacing Tokens
   ========================================================================
   Elevation="0"  — Nested/inset panels (sub-sections within cards, reminder items)
   Elevation="1"  — Metric/summary stat cards, secondary panels, chart containers
   Elevation="2"  — Primary content panels (tables, forms, main sections), interactive cards
   Elevation="4"  — Auth pages only (hero treatment, border-radius: 12px, pa-8)

   Padding:
     pa-3  — Compact metric cards, nested items within panels
     pa-4  — Standard content panels, stat cards, form containers
     pa-8  — Auth hero panels only

   Status tint classes: bg-error-light, bg-warning-light, bg-success-light, bg-info-light
   ======================================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

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

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg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
        content: "An error has occurred."
    }

/* App bar search — pill shape with focus expansion */
.appbar-search {
    transition: max-width 0.2s ease;
    max-width: 280px;
}

.appbar-search:focus-within {
    max-width: 360px;
}

.appbar-search .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255,255,255,0.15) !important;
}

.appbar-search .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255,255,255,0.3) !important;
}

/* Sidebar identity area — subtle primary tint to separate from nav links */
.sidebar-identity {
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
}

/* Theme-aware tinted backgrounds for status indicators */
.bg-error-light { background: color-mix(in srgb, var(--mud-palette-error) 10%, var(--mud-palette-surface)); }
.bg-warning-light { background: color-mix(in srgb, var(--mud-palette-warning) 10%, var(--mud-palette-surface)); }
.bg-success-light { background: color-mix(in srgb, var(--mud-palette-success) 10%, var(--mud-palette-surface)); }
.bg-info-light { background: color-mix(in srgb, var(--mud-palette-info) 10%, var(--mud-palette-surface)); }

/* Stat card number — large, light-weight for visual dominance */
.stat-number {
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--mud-palette-text-primary);
}

/* Stat card hover effect — subtle lift on interactive metric cards */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Urgent stat card — overdue reminders with count > 0 */
.stat-card-urgent {
    background: color-mix(in srgb, var(--mud-palette-error) 8%, var(--mud-palette-surface));
    border-left: 4px solid var(--mud-palette-error);
}

/* Process completion celebration animation */
.completion-check-animation {
    animation: completionPop 0.5s ease-out;
}

@keyframes completionPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Profile detail hero — subtle gradient behind header */
.profile-hero {
    background: linear-gradient(135deg, color-mix(in srgb, var(--mud-palette-primary) 6%, transparent), transparent);
    border-radius: 12px;
    padding: 24px;
}

/* Task Board: stack kanban columns vertically on mobile */
@media (max-width: 640px) {
    .kanban-container {
        flex-direction: column !important;
    }
    .kanban-container > .mud-paper {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* Login hero backdrop */
.login-hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('/images/login-backdrop.svg');
    background-size: cover;
    background-position: center;
    background-color: #1E3A5F;
}

/* Ctrl+K command palette overlay */
.command-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.command-palette-card {
    width: min(640px, 92vw);
    background: var(--mud-palette-surface);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    outline: none;
}

.command-palette-result {
    padding: 8px 12px;
    cursor: pointer;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.command-palette-result.selected {
    background: var(--mud-palette-action-default-hover);
}

.command-palette-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Dashboard fade-up entrance — stagger via inline animation-delay per region */
@keyframes dashboardFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-region {
    animation: dashboardFadeUp 0.35s ease-out both;
}

/* Dashboard KPI / clickable card hover lift */
.dashboard-kpi {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
