html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Ensure MudBlazor layout and main content container scroll properly */
.mud-layout {
    min-height: 100vh !important;
    overflow: visible !important;
}

.mud-main-content {
    min-height: calc(100vh - 64px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Visible Custom Scrollbars */
::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
}

::-webkit-scrollbar-thumb {
    background: #888888 !important;
    border-radius: 6px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555 !important;
}

/* Ensure MudChart SVG overflow and X-axis month labels render visibly */
.mud-chart {
    overflow: visible !important;
    padding-bottom: 0px !important;
}

.mud-chart svg {
    overflow: visible !important;
    height: 100% !important;
}

/* X-Axis and Y-Axis Tick Labels ONLY */
g.mud-charts-xaxis text,
g.mud-charts-yaxis text,
text.mud-charts-xaxis-text,
text.mud-charts-yaxis-text,
.mud-charts-xaxis text,
.mud-charts-yaxis text {
    fill: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* MudChart Legend Text */
.mud-chart-legend text,
.mud-chart-legend-item text {
    fill: #334155 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* Chart Tooltips & Point Hover Labels (Sleek Dark Card with High-Contrast White Text) */
.mud-chart-tooltip,
g.mud-chart-tooltip,
.mud-chart-line-tooltip,
.mud-chart-donut-tooltip,
g.mud-chart-donut-tooltip {
    pointer-events: none !important;
}

.mud-chart-tooltip rect,
g.mud-chart-tooltip rect,
g.mud-chart-donut-tooltip rect,
.mud-chart-donut-tooltip rect {
    fill: #0f172a !important;
    rx: 6px !important;
    ry: 6px !important;
    stroke: #334155 !important;
    stroke-width: 1px !important;
}

.mud-chart-tooltip text,
g.mud-chart-tooltip text,
.mud-chart-line-tooltip text,
text.mud-chart-line-tooltip,
.mud-chart svg text.mud-chart-tooltip,
text.mud-chart-hover,
.mud-chart-donut-tooltip text,
g.mud-chart-donut-tooltip text {
    fill: #ffffff !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

/* Donut & Pie Chart Labels and Legend Text (Dark Slate for Contrast) */
.mud-chart-donut text,
.mud-chart-pie text,
g.mud-chart-donut text,
g.mud-chart-pie text {
    fill: #334155 !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
}



a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAy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5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* GitHub Style Daily Heatmap Chart (Adapts to Light & Night/Dark Mode) */
.github-heatmap-container {
    width: 100%;
    overflow-x: auto;
    background-color: transparent !important;
    border-radius: 8px;
    padding: 10px 14px;
    box-sizing: border-box;
}

.github-heatmap-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: transparent !important;
    min-width: 720px;
}

.github-heatmap-months {
    display: flex;
    align-items: center;
    gap: 8px;
}

.github-heatmap-y-spacer {
    width: 28px;
    flex-shrink: 0;
}

.github-heatmap-months-grid {
    display: grid;
    gap: 3px;
    align-items: center;
}

.github-month-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary, #57606a);
    line-height: 1;
    white-space: nowrap;
}

.github-heatmap-body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.github-heatmap-days-axis {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    gap: 3px;
    width: 28px;
    flex-shrink: 0;
    text-align: right;
}

.github-day-label {
    font-size: 10px;
    color: var(--mud-palette-text-secondary, #57606a);
    font-weight: 500;
    line-height: 13px;
}

.github-heatmap-grid {
    display: grid;
    grid-auto-flow: column;
    gap: 3px;
}

.github-day-square {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    outline: 1px solid var(--mud-palette-lines-default, rgba(27, 31, 36, 0.06));
    transition: transform 0.15s ease, outline-color 0.15s ease;
    cursor: pointer;
}

.github-day-square:hover {
    transform: scale(1.3);
    z-index: 10;
    outline: 1px solid var(--mud-palette-text-primary, #1b1f24);
}

/* Green (Emerald) Theme Levels - Light Mode */
.gh-lvl-0 { background-color: var(--mud-palette-lines-inputs, #ebedf0); }
.gh-emerald-1 { background-color: #9be9a8; }
.gh-emerald-2 { background-color: #40c463; }
.gh-emerald-3 { background-color: #30a14e; }
.gh-emerald-4 { background-color: #216e39; }

/* Blue Theme Levels - Light Mode */
.gh-blue-1 { background-color: #bae6fd; }
.gh-blue-2 { background-color: #38bdf8; }
.gh-blue-3 { background-color: #0284c7; }
.gh-blue-4 { background-color: #0369a1; }

.github-heatmap-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--mud-palette-lines-default, #f0f0f0);
}

.github-footer-info {
    font-size: 11px;
    color: var(--mud-palette-text-secondary, #57606a);
}

.github-legend-text {
    font-size: 11px;
    color: var(--mud-palette-text-secondary, #57606a);
}

/* Night / Dark Mode Overrides */
.mud-theme-dark .gh-lvl-0,
[data-theme="dark"] .gh-lvl-0,
body.dark .gh-lvl-0,
.mud-dark-mode .gh-lvl-0 {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Emerald Dark Mode Palette */
.mud-theme-dark .gh-emerald-1, [data-theme="dark"] .gh-emerald-1, .mud-dark-mode .gh-emerald-1 { background-color: #0e4429 !important; }
.mud-theme-dark .gh-emerald-2, [data-theme="dark"] .gh-emerald-2, .mud-dark-mode .gh-emerald-2 { background-color: #006d32 !important; }
.mud-theme-dark .gh-emerald-3, [data-theme="dark"] .gh-emerald-3, .mud-dark-mode .gh-emerald-3 { background-color: #26a641 !important; }
.mud-theme-dark .gh-emerald-4, [data-theme="dark"] .gh-emerald-4, .mud-dark-mode .gh-emerald-4 { background-color: #39d353 !important; }

/* Blue Dark Mode Palette */
.mud-theme-dark .gh-blue-1, [data-theme="dark"] .gh-blue-1, .mud-dark-mode .gh-blue-1 { background-color: #0c4a6e !important; }
.mud-theme-dark .gh-blue-2, [data-theme="dark"] .gh-blue-2, .mud-dark-mode .gh-blue-2 { background-color: #0284c7 !important; }
.mud-theme-dark .gh-blue-3, [data-theme="dark"] .gh-blue-3, .mud-dark-mode .gh-blue-3 { background-color: #38bdf8 !important; }
.mud-theme-dark .gh-blue-4, [data-theme="dark"] .gh-blue-4, .mud-dark-mode .gh-blue-4 { background-color: #7dd3fc !important; }

/* Universal Crisp MudChart & X-Axis Styling */
.mud-chart {
    overflow: visible !important;
}

.mud-chart svg {
    overflow: visible !important;
}

/* X-Axis Labels: Always visible, bold, slate color */
g.mud-charts-xaxis text,
.mud-charts-xaxis text,
g.mud-charts-xaxis text tspan {
    font-size: 11px !important;
    font-weight: 600 !important;
    fill: #475569 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Y-Axis Labels */
g.mud-charts-yaxis text,
.mud-charts-yaxis text {
    font-size: 10px !important;
    font-weight: 500 !important;
    fill: #64748b !important;
    opacity: 1 !important;
}

/* Rounded top corners on bar chart bars */
rect.mud-chart-bar {
    rx: 4px;
    ry: 4px;
    transition: all 0.2s ease;
}

g.mud-chart-bar path:hover,
g.mud-charts-bar path:hover {
    filter: brightness(1.15);
    cursor: pointer;
}

/* Custom Advanced Donut Chart Styles */
.custom-donut-container {
    width: 100%;
    padding: 8px 0;
}

.custom-donut-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    width: 100%;
}

.custom-donut-chart-box {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.custom-donut-svg {
    width: 100%;
    height: 100%;
}

.donut-segment {
    transition: stroke-width 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.donut-segment:hover {
    stroke-width: 20px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.custom-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.custom-donut-total {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.custom-donut-label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 2px;
}

.custom-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.donut-legend-name {
    font-weight: 600;
    color: #334155;
    flex: 1;
}

.donut-legend-val {
    font-weight: 700;
    color: #0f172a;
}

.donut-legend-val small {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}