html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

#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;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20px auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1a237e;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ===== Global Transitions ===== */
.mud-button-root,
.mud-card,
.mud-nav-link {
    transition: all 0.2s ease;
}

/* ===== Product Cards ===== */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border-color: #0097a7;
}

/* ===== Hero Section ===== */
.hero-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.hero-cta .mud-button-filled {
    padding: 10px 28px;
    font-weight: 600;
}

/* ===== Login Card ===== */
.login-card {
    border: 1px solid #e0e0e0;
    border-radius: 16px !important;
    max-width: 520px;
    margin: 0 auto;
}

/* ===== Table Headers ===== */
.mud-table-head .mud-table-cell {
    text-transform: uppercase;
    font-weight: 600;
    color: #5f6368;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* ===== Nav Drawer ===== */
.mud-drawer {
    border-right: 1px solid #e0e0e0 !important;
}

.mud-nav-link.active {
    background-color: rgba(13, 33, 55, 0.08) !important;
}

.nav-header {
    padding: 16px 16px 8px 16px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

/* ===== Global Card Radius ===== */
.mud-card {
    border-radius: 12px !important;
}

/* ===== PDF Export Loading Overlay =====
   Backdrop blurs the dashboard while the server-side PDF is generating.
   Applied to MudOverlay via Class="pdf-export-overlay" in Dashboard.razor. */
.pdf-export-overlay {
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    background-color: rgba(255, 255, 255, 0.35) !important;
}
.pdf-export-overlay .mud-overlay-scrim {
    background-color: transparent !important;
}
