h1:focus {
    outline: none;
}

#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;
    }

.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."
    }


/* Charts Overview - horizontal distribution bars */
.amp-hbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

.amp-hbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amp-hbar-label {
    flex: 0 0 100px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amp-hbar-track {
    flex: 1 1 auto;
    height: 16px;
    border-radius: 4px;
    background: var(--mud-palette-action-disabled-background);
    overflow: hidden;
}

.amp-hbar-fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--mud-palette-primary);
    transition: width 300ms ease;
}

.amp-hbar-value {
    flex: 0 0 32px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* MudBlazor charts keep a fixed viewBox and letterbox themselves inside a wider
   card. Filling the width and taking the natural aspect height removes the
   dead space without distorting the text (preserveAspectRatio="none" would). */
.amp-chart svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Month labels sit diagonally so they never crowd each other. */
.amp-chart .mud-charts-xaxis text {
    text-anchor: end;
    transform: rotate(-45deg);
    transform-box: fill-box;
    transform-origin: 100% 50%;
}

.amp-chart {
    padding-bottom: 20px;
}

/* MudBlazor's generic tooltip (button/icon hints) - default 12px reads
   small once it's carrying more than a couple of words. */
.mud-tooltip {
    font-size: 14px;
    padding: 6px 10px;
}

/* Chart hover tooltips are a different thing entirely - not .mud-tooltip,
   but a <text font-size="12px"> drawn directly inside the chart's own SVG
   (<g class="svg-tooltip">). A plain CSS rule beats that font-size
   attribute in the cascade, so no !important needed. */
.svg-tooltip text {
    font-size: 15px;
}

/* Pies otherwise stretch to fill a wide card via .amp-chart svg's height:auto;
   cap and centre them so 3-4 per row stay a sensible, comparable size. */
.amp-pie-wrap {
    max-width: 160px;
    margin: 0 auto;
}

.amp-pie-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
}

.amp-pie-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
}

.amp-pie-legend-swatch {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.amp-pie-legend-label {
    flex: 1 1 auto;
    color: var(--mud-palette-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amp-pie-legend-value {
    flex: 0 0 auto;
    font-weight: 500;
}

/* Dashboard section labels (Needs Attention / At a Glance / Quick Actions) -
   given real weight and a rule so they read as section breaks, not captions. */
.amp-section-header {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    border-bottom: 2px solid var(--mud-palette-divider);
    padding-bottom: 8px;
}

.amp-empty-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
    opacity: 0.6;
}

/* Reports dashboard tiles */
.amp-report-card .mud-paper {
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.amp-report-card:hover .mud-paper {
    box-shadow: var(--mud-elevation-6);
    transform: translateY(-2px);
}

/* AccountView.razor - Members/Entitlements tables get a proper header
   treatment instead of blending into the body rows. */
.amp-detail-table th {
    background: var(--mud-palette-background-gray);
    font-weight: 600;
    padding: 8px;
}

.amp-detail-table td {
    padding: 8px;
}
