/* ===== Global Font Size ===== */
html, body {
    font-size: 12px !important;
}

/* ===== Validation ===== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}
.invalid {
    outline: 1px solid #e50000;
}
.validation-message {
    color: #e50000;
}

/* ===== Error Boundaries ===== */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}
.animate-fade-in {
    animation: fadeIn 0.6s ease-out both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ===== Hero Section ===== */
.hero-section {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d47a1 0%, #1565C0 30%, #1e88e5 60%, #7C4DFF 100%);
    margin: -16px;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(124,77,255,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 20%, rgba(255,111,0,0.1) 0%, transparent 50%);
    animation: fadeIn 2s ease-out;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}
.hero-title {
    font-size: 3.2rem !important;
    font-weight: 800 !important;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.15 !important;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.3rem !important;
    color: rgba(255,255,255,0.85);
    font-weight: 400 !important;
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.6 !important;
}

/* ===== Feature Cards ===== */
.feature-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: #fff;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.18);
}
.feature-card .mud-icon-root {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* ===== Stat Cards (Dashboard) ===== */
.stat-card {
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.stat-card-blue    { background: linear-gradient(135deg, #1565C0, #1e88e5); }
.stat-card-cyan    { background: linear-gradient(135deg, #0277BD, #039be5); }
.stat-card-green   { background: linear-gradient(135deg, #2E7D32, #43a047); }
.stat-card-orange  { background: linear-gradient(135deg, #E65100, #F57F17); }

/* ===== Page Headers ===== */
.page-header {
    margin-bottom: 24px;
}
.page-header-title {
    font-weight: 700 !important;
    font-size: 1.6rem !important;
}
.page-header-desc {
    color: var(--mud-palette-text-secondary);
    margin-top: 4px;
}

/* ===== Nav Drawer Brand ===== */
.nav-brand {
    padding: 12px 14px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1565C0, #7C4DFF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.nav-brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
}
.nav-brand-sub {
    font-size: 0.65rem;
    color: var(--mud-palette-text-secondary);
    margin-top: -2px;
}

/* ===== Compact Nav Links ===== */
.mud-navmenu .mud-nav-link {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    min-height: 34px !important;
    font-size: 13px !important;
}

/* ===== Drawer Scrollbar ===== */
.mud-drawer-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
.mud-drawer-content::-webkit-scrollbar {
    width: 4px;
}
.mud-drawer-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.mud-navmenu {
    overflow: visible !important;
}
.mud-nav-link {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ===== User Menu Alignment ===== */
.mud-popover-open .mud-list-item-icon,
.mud-menu .mud-list-item-icon,
.mud-list .mud-list-item-icon {
    min-width: 28px !important;
    margin-right: 0 !important;
}
.mud-popover-open .mud-list-item-gutters,
.mud-menu .mud-list-item-gutters {
    padding-left: 12px !important;
    padding-right: 16px !important;
}

/* ===== Card Hover ===== */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1) !important;
}

/* ===== AppBar Gradient ===== */
.appbar-gradient .mud-appbar {
    background: linear-gradient(90deg, #0d47a1, #1565C0, #1a237e) !important;
}
