html,
body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



body::after {
    content: "";
    background-image: repeating-radial-gradient(circle at 0 0, transparent 0, #e5e5f7 12px), repeating-linear-gradient(#dadae355, #dadae3);
    background-origin: initial;
    background-clip: initial;
    background-color: initial;
    background-color: #fafbfc;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.35;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    position: fixed;
    z-index: -2;
    margin-bottom: 0px !important;
}




.header-text {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 23px !important;
    font-weight: 500 !important;
}



.montserrat-text {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}




h1:focus {
    outline: none;
}

a,
.btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background: #5386b6 !important;
    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;
}




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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none !important;
    /* Force hide in production */
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    visibility: hidden !important;
    /* Extra layer of hiding */
    opacity: 0 !important;
    /* Extra layer of hiding */
}

#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."
}



code {
    color: #c02d76;
}

.mud-snackbar.mud-snackbar-content {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
}

/* Ensure snackbar appears above all Telerik components */
.mud-snackbar-wrapper {
    z-index: 10000 !important;
}

.mud-snackbar {
    z-index: 10000 !important;
}

.mud-dialog .mud-dialog-title {
    background-color: #f5f5f5;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 500;
}

.mud-dialog .mud-dialog-content {
    padding: 16px;
}

.mud-dialog .mud-dialog-actions {
    padding: 8px 16px;
}

.mud-input-control>.mud-input-control-input-container>.mud-input.mud-input-underline:before {
    border-bottom: none !important
}

:root {
    --mud-palette-primary: #5386b6 !important;
}

/* =============================================
   CENTRALIZED DARK MODE STYLES
   All MudBlazor dialogs, overlays, and common
   components automatically styled when
   body.dashboard-dark-mode is active.
   ============================================= */

/* --- Dialog Surface --- */
body.dashboard-dark-mode .mud-dialog-container .mud-dialog,
body.dashboard-dark-mode .mud-dialog {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-dialog-title,
body.dashboard-dark-mode .mud-dialog-title {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-dialog-content,
body.dashboard-dark-mode .mud-dialog-content {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-dialog .mud-dialog-actions,
body.dashboard-dark-mode .mud-dialog-actions {
    background-color: #252525 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* --- Dialog Typography --- */
body.dashboard-dark-mode .mud-dialog .mud-typography,
body.dashboard-dark-mode .mud-dialog-content .mud-typography {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-dialog .mud-dark-text,
body.dashboard-dark-mode .mud-dialog-content .mud-dark-text {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* --- Dialog close button --- */
body.dashboard-dark-mode .mud-dialog-title .mud-button-close {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dashboard-dark-mode .mud-dialog-title .mud-button-close:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

/* --- Dialog Overlay / Backdrop --- */
body.dashboard-dark-mode .mud-overlay {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* --- MudBlazor Message Box --- */
body.dashboard-dark-mode .mud-message-box {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

/* --- MudAlert inside dialogs and globally --- */
body.dashboard-dark-mode .mud-alert-outlined-warning {
    border-color: rgba(255, 152, 0, 0.4) !important;
    color: #ffb74d !important;
}

body.dashboard-dark-mode .mud-alert-outlined-info {
    border-color: rgba(33, 150, 243, 0.4) !important;
    color: #90caf9 !important;
}

body.dashboard-dark-mode .mud-alert-outlined-error {
    border-color: rgba(244, 67, 54, 0.4) !important;
    color: #ef9a9a !important;
}

body.dashboard-dark-mode .mud-alert-outlined-success {
    border-color: rgba(76, 175, 80, 0.4) !important;
    color: #81c784 !important;
}

body.dashboard-dark-mode .mud-alert .mud-alert-message {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-alert .mud-alert-message strong {
    color: #fff !important;
}

body.dashboard-dark-mode .mud-alert-filled-info {
    background-color: rgba(33, 150, 243, 0.15) !important;
    color: #90caf9 !important;
}

body.dashboard-dark-mode .mud-alert-filled-warning {
    background-color: rgba(255, 152, 0, 0.15) !important;
    color: #ffb74d !important;
}

/* --- MudTextField / MudSelect / MudInput inside dialogs --- */
body.dashboard-dark-mode .mud-dialog .mud-input-label {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-input {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-dialog .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-input-adornment {
    color: rgba(255, 255, 255, 0.4) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-select .mud-input-slot {
    color: #e0e0e0 !important;
}

/* --- MudTable inside dialogs --- */
body.dashboard-dark-mode .mud-dialog .mud-table {
    background-color: #1e1e1e !important;
}

body.dashboard-dark-mode .mud-dialog .mud-table .mud-table-head .mud-table-cell {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-table .mud-table-body .mud-table-cell {
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-table .mud-table-body .mud-table-row:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* --- MudChip --- */
body.dashboard-dark-mode .mud-dialog .mud-chip {
    color: #e0e0e0;
}

/* --- MudSwitch labels --- */
body.dashboard-dark-mode .mud-dialog .mud-switch .mud-switch-label {
    color: #e0e0e0 !important;
}

/* --- MudList / Popover / Menu (for MudSelect dropdowns rendered as portals) --- */
body.dashboard-dark-mode .mud-popover-open {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dashboard-dark-mode .mud-list {
    background-color: #2a2a2a !important;
}

body.dashboard-dark-mode .mud-list-item {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-list-item:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

body.dashboard-dark-mode .mud-list-item.mud-selected-item {
    background-color: rgba(83, 134, 182, 0.2) !important;
    color: #90caf9 !important;
}

/* --- MudMenu --- */
body.dashboard-dark-mode .mud-menu .mud-list {
    background-color: #2a2a2a !important;
}

/* --- Close / icon buttons in dialog headers --- */
body.dashboard-dark-mode .mud-dialog .mud-dialog-title .mud-icon-button {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dashboard-dark-mode .mud-dialog .mud-dialog-title .mud-icon-button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

/* --- MudExpansionPanel inside dialogs --- */
body.dashboard-dark-mode .mud-dialog .mud-expand-panel {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .mud-dialog .mud-expand-panel-header {
    color: #e0e0e0 !important;
}

/* --- MudDivider --- */
body.dashboard-dark-mode .mud-dialog .mud-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Code blocks --- */
body.dashboard-dark-mode .mud-dialog code {
    background-color: #333 !important;
    color: #e0e0e0 !important;
}

/* --- MudProgressLinear / MudProgressCircular --- */
body.dashboard-dark-mode .mud-dialog .mud-progress-linear {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Custom dialog list items (priority, status, etc.) --- */
body.dashboard-dark-mode .priority-item,
body.dashboard-dark-mode .status-item {
    background-color: #2a2a2a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .priority-item:hover,
body.dashboard-dark-mode .status-item:hover {
    background-color: #333 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

body.dashboard-dark-mode .priority-item.inactive,
body.dashboard-dark-mode .status-item.inactive {
    background-color: #222 !important;
    opacity: 0.6;
}

body.dashboard-dark-mode .priority-item .mud-typography,
body.dashboard-dark-mode .status-item .mud-typography {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .priority-color-box,
body.dashboard-dark-mode .status-color-box {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Scrollbar for dark lists */
body.dashboard-dark-mode .priority-list,
body.dashboard-dark-mode .status-list {
    scrollbar-color: #555 #1e1e1e;
}

body.dashboard-dark-mode .priority-list::-webkit-scrollbar-track,
body.dashboard-dark-mode .status-list::-webkit-scrollbar-track {
    background: #1e1e1e;
}

body.dashboard-dark-mode .priority-list::-webkit-scrollbar-thumb,
body.dashboard-dark-mode .status-list::-webkit-scrollbar-thumb {
    background: #555;
}

/* MudChip default variant in dark mode */
body.dashboard-dark-mode .mud-chip-text.mud-chip-color-default {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dashboard-dark-mode .mud-chip-outlined.mud-chip-color-default {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* MudDivider globally in dark mode */
body.dashboard-dark-mode .mud-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Preview boxes (Add/Edit Status & Priority dialogs) --- */
body.dashboard-dark-mode .status-preview,
body.dashboard-dark-mode .priority-preview {
    background-color: #2a2a2a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

/* Color picker swatches */
body.dashboard-dark-mode .color-option.selected {
    border-color: #fff !important;
}

/* MudTextField helper text & character counter */
body.dashboard-dark-mode .mud-input-helper-text {
    color: rgba(255, 255, 255, 0.4) !important;
}

body.dashboard-dark-mode .mud-input-counter {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* --- Telerik Popups, Menus & SplitButton Dropdowns & DropDownLists --- */
body.dashboard-dark-mode .k-popup,
body.dashboard-dark-mode .k-animation-container .k-popup,
body.dashboard-dark-mode .k-list-container,
body.dashboard-dark-mode .k-list,
body.dashboard-dark-mode .k-list-content {
    background-color: #2a2a2a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .k-menu-popup,
body.dashboard-dark-mode .k-menu-group {
    background-color: #2a2a2a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dashboard-dark-mode .k-menu-item,
body.dashboard-dark-mode .k-item,
body.dashboard-dark-mode .k-list-item,
body.dashboard-dark-mode .k-menu-popup .k-item,
body.dashboard-dark-mode .k-list-scroller .k-list-item {
    color: #e0e0e0 !important;
    background-color: #2a2a2a !important;
}

body.dashboard-dark-mode .k-menu-item:hover,
body.dashboard-dark-mode .k-menu-item.k-hover,
body.dashboard-dark-mode .k-menu-item.k-state-hover,
body.dashboard-dark-mode .k-menu-item:focus,
body.dashboard-dark-mode .k-menu-item.k-state-focused,
body.dashboard-dark-mode .k-item:hover,
body.dashboard-dark-mode .k-item.k-hover,
body.dashboard-dark-mode .k-item.k-state-hover,
body.dashboard-dark-mode .k-item:focus,
body.dashboard-dark-mode .k-item.k-state-focused,
body.dashboard-dark-mode .k-list-item:hover,
body.dashboard-dark-mode .k-list-item.k-hover,
body.dashboard-dark-mode .k-list-item.k-state-hover,
body.dashboard-dark-mode .k-list-item:focus,
body.dashboard-dark-mode .k-list-item.k-state-focused,
body.dashboard-dark-mode .k-popup .k-item:hover,
body.dashboard-dark-mode .k-popup .k-item.k-hover {
    background-color: #3a3a3a !important;
}

/* Force dark text on hover */
body.dashboard-dark-mode .k-menu-item:hover,
body.dashboard-dark-mode .k-item:hover,
body.dashboard-dark-mode .k-list-item:hover,
body.dashboard-dark-mode .k-menu-item.k-state-hover,
body.dashboard-dark-mode .k-item.k-state-hover,
body.dashboard-dark-mode .k-list-item.k-state-hover,
body.dashboard-dark-mode .k-menu-item:hover .k-item-text,
body.dashboard-dark-mode .k-item:hover .k-item-text,
body.dashboard-dark-mode .k-list-item:hover .k-list-item-text,
body.dashboard-dark-mode .k-menu-item:hover .k-link,
body.dashboard-dark-mode .k-item:hover .k-link {
    color: #111 !important;
}

body.dashboard-dark-mode .k-menu-item.k-selected,
body.dashboard-dark-mode .k-item.k-selected,
body.dashboard-dark-mode .k-item.k-state-selected,
body.dashboard-dark-mode .k-list-item.k-selected,
body.dashboard-dark-mode .k-list-item.k-state-selected {
    background-color: rgba(83, 134, 182, 0.2) !important;
    color: #90caf9 !important;
}

body.dashboard-dark-mode .k-menu-link,
body.dashboard-dark-mode .k-link {
    color: #e0e0e0 !important;
}

body.dashboard-dark-mode .k-menu-link:hover,
body.dashboard-dark-mode .k-link:hover {
    color: #fff !important;
}

/* Telerik SplitButton dropdown arrow */
body.dashboard-dark-mode .k-split-button .k-button {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dashboard-dark-mode .k-split-button .k-button:hover {
    background-color: #3a3a3a !important;
    color: #fff !important;
}

/* Shared Dashboard Metrics & Charts Styles */
.metric-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.metric-icon .mud-icon {
    font-size: 2.2rem !important;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.metric-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.total-clashes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.resolved-clashes {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: #fff;
}

.active-clashes {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.resolution-rate {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.action-required {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #fff;
}

.ai-impact-metric {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #fff;
}

.chart-container {
    border-radius: 12px;
    /*min-height: 520px;*/
    /*display: flex;*/
    align-items: center;
    justify-content: center;
}

.charts-gallery-section {
    background-color: white;
    padding: 50px 0;
    min-height: 600px !important;
}

.chart-explainer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(83, 134, 182, 0.08);
    border: 1px solid rgba(83, 134, 182, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
}