:root {
    --primary-font-size: 12px;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
}

:root.dark {
    --bg-color: #32333d;
    --text-color: #ffffff;
}

@media (prefers-color-scheme: light) {
    .blazor-loading-div {
        background: #fff;
        height: 100vh;
    }
}

@media (prefers-color-scheme: dark) {
    .blazor-loading-div {
        background: #32333d;
        height: 100vh;
    }
}

body {
    /*noinspection CssUnresolvedCustomProperty*/
    background-color: var(--mud-palette-background);
    font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgL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41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 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: #234C7C;
    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;
    color: var(--mud-palette-text-primary);
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}


.header_text {
    font-size: 1rem !important;
    white-space: nowrap;
}

.job-tab-panel {
    max-height: 100%;
    width: 100%;
}

.mud-dialog {
    border-radius: 6px;
}

/*noinspection CssUnresolvedCustomProperty*/
.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;
}

.combo-box-container {
    max-height: 50px;
    position: relative;
}

.combo-box-popover {
    width: 100%;
    overflow-y: hidden;
}

.virtualized-list-item {
    overflow-y: auto;
}

/*Grid Defaults
*/
.mud-table {
    border-radius: 12px;
}

.mud-data-grid {
    border-radius: 12px;
}

/*noinspection CssUnresolvedCustomProperty*/
.mud-button {
    font-size: var(--primary-font-size) !important;
}

.mud-toolbar .mud-button-label {
    font-size: 14px !important;
}

/*noinspection CssUnresolvedCustomProperty*/
.grid-button {
    /*noinspection CssUnresolvedCustomProperty*/
    color: var(--mud-palette-text-primary) !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    text-align: left !important;
    font-size: var(--primary-font-size) !important;
}

/*noinspection CssUnresolvedCustomProperty*/
.mud-table-cell .mud-button-label {
    font-size: var(--primary-font-size) !important;
    padding: 2px;
}

.grid-button .mud-button-label {
    text-align: left !important;
    justify-content: start !important;
    align-items: center !important;
    font-weight: normal !important;
}

.center-col-content {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
}

.mud-table-row {
    font-size: var(--primary-font-size) !important;
}

.mud-table-cell {
    font-size: var(--primary-font-size) !important;
    text-align: left;
}

.mud-table-head th {
    white-space: nowrap !important;
    text-align: left;
}

.grid-search-box {
    height: 100%;
    border-radius: 5px !important;
}

.grid-text {
    font-size: var(--primary-font-size) !important;
}

.col-no-wrap {
    overflow-x: hidden;
    white-space: nowrap;
}

.st-col-xxs {
    width: 25px !important;
}

.st-col-xxs.mud-table-cell {
    width: 25px !important;
}

.st-col-xs {
    width: 50px !important;
}

.st-col-xs.mud-table-cell {
    width: 50px !important;
}

.st-col-sm {
    width: 120px !important;
}

.st-col-sm.mud-table-cell {
    width: 120px !important;
}

.st-col {
    width: 150px !important;
}

.st-col.mud-table-cell {
    width: 150px !important;
}

.st-col-lg {
    width: 200px !important;
}

.st-col-lg.mud-table-cell {
    width: 200px !important;
}

.st-col-xl {
    width: 300px !important;
}

.st-col-xl.mud-table-cell {
    width: 300px !important;
}


.st-tab-header {
    padding: 5px;
}

.st-tab-panel {
    font-size: .78rem !important;
    min-height: 25px !important;
    padding: 4px !important;
}

.st-card-sm {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
}

.st-card-sm p {
    padding-top: 5px;
    font-size: .78rem !important;
    line-height: 1.4;
    font-weight: 450;
}

.st-card-md {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
}


.st-row-sm {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
}


.job-tab-grid {
    height: 65vh;
    overflow-y: auto;
    width: 100%;
}


.st-dropdown-popover {
    overflow-y: hidden !important;
    max-height: 100% !important;
}

.grid-checkbox {
    margin-left: auto;
    margin-right: auto;
    height: 18px;
    width: 18px;
}

/*noinspection CssUnresolvedCustomProperty*/
.st-outlined {
    border: 1px solid var(--mud-palette-lines-default);
}

.st-rounded {
    border-radius: 12px;
}

/*noinspection CssUnresolvedCustomProperty*/
.dash-card {
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    min-height: 5vh;
    border: 1px solid var(--mud-palette-lines-default);
}

.dash-table {
    width: 100%;
}

.dash-chart {
    width: 100%;
    height: 35vh;
}

.dialog-resource-list {
    min-height: 50vh;
    width: 100%;
}

.documentation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.documentation-popup {
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.documentation-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* AG Grid Quick Filter Styling */
.example-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #F5F5F5;
    border-radius: 4px;
}

.example-header span {
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
}

.example-header input {
    flex: 1;
    max-width: 300px;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.example-header input:focus {
    border-color: #234C7C;
}

.example-header input::placeholder {
    color: rgba(0, 0, 0, 0.38);
}

.export-button {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    background-color: #234C7C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.export-button:hover {
    background-color: #1a3a5e;
}

.export-button:active {
    background-color: #152f4d;
}

/* Dark mode styling for search box */
.dark .example-header {
    background-color: #2d2d2d;
}

.dark .example-header span {
    color: rgba(255, 255, 255, 0.87);
}

.dark .example-header input {
    background-color: #1e1e1e;
    border-color: #424242;
    color: rgba(255, 255, 255, 0.87);
}

.dark .example-header input:focus {
    border-color: #234C7C;
}

.dark .example-header input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.dark .export-button {
    background-color: #234C7C;
    color: white;
}

.dark .export-button:hover {
    background-color: #2d5a92;
}

.dark .export-button:active {
    background-color: #1a3a5e;
}

/* MudBlazor Dark Mode Overrides */
.mud-theme-dark .mud-table-cell,
.mud-theme-dark .mud-table-row,
.mud-theme-dark .mud-typography,
.mud-theme-dark .mud-input,
.mud-theme-dark .mud-input-slot,
.mud-theme-dark .mud-select-input,
.mud-theme-dark .mud-chip-text,
.mud-theme-dark .mud-button-label,
.mud-theme-dark .mud-tab-label,
.mud-theme-dark .mud-nav-link,
.mud-theme-dark .mud-text {
    color: rgba(255, 255, 255, 0.87) !important;
    font-weight: 450 !important;
}

.mud-theme-dark .mud-table-head .mud-table-cell {
    color: rgba(255, 255, 255, 0.87) !important;
    font-weight: 600 !important;
}

.mud-theme-dark .mud-typography-secondary,
.mud-theme-dark .mud-input-helper-text,
.mud-theme-dark .mud-table-toolbar .mud-typography {
    color: rgba(255, 255, 255, 0.60) !important;
}

.mud-theme-dark .mud-disabled,
.mud-theme-dark .mud-typography-disabled {
    color: rgba(255, 255, 255, 0.38) !important;
}

/* ===================================
   GRID CONSISTENCY OVERRIDES
   Making MudBlazor tables match React TanStack tables
   =================================== */

/* Dark Theme Table Styling - Matching React exactly */
.mud-theme-dark .mud-table-container {
    background-color: var(--mud-palette-surface) !important;
    border-radius: 12px !important;
}

.mud-theme-dark .mud-table {
    background-color: var(--mud-palette-surface) !important;
}

/* Table Head - Slightly darker than body */
.mud-theme-dark .mud-table-head {
    background-color: var(--mud-palette-background) !important;
}

.mud-theme-dark .mud-table-head .mud-table-cell {
    background-color: var(--mud-palette-background) !important;
    color: rgba(255, 255, 255, 0.87) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
    height: auto !important;
}

/* Table Body Rows */
.mud-theme-dark .mud-table-body .mud-table-row {
    background-color: var(--mud-palette-surface) !important;
    transition: background-color 0.2s ease !important;
    height: auto !important;
}

.mud-theme-dark .mud-table-body .mud-table-row:hover {
    background-color: var(--mud-palette-action-hover) !important;
}

/* Table Cells */
.mud-theme-dark .mud-table-body .mud-table-cell {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.87) !important;
    font-size: 12px !important;
    padding: 8px 16px !important;
    border-bottom: 1px solid var(--mud-palette-divider-light) !important;
    height: auto !important;
    min-height: 40px !important;
}

/* Remove last row border */
.mud-theme-dark .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none !important;
}

/* Toolbar styling */
.mud-theme-dark .mud-table-toolbar {
    background-color: var(--mud-palette-background) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
    padding: 8px 12px !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Pagination styling */
.mud-theme-dark .mud-table-pagination {
    background-color: var(--mud-palette-background) !important;
    border-top: 1px solid var(--mud-palette-divider) !important;
    color: rgba(255, 255, 255, 0.87) !important;
    padding: 8px 12px !important;
    border-radius: 0 0 12px 12px !important;
}

.mud-theme-dark .mud-table-pagination .mud-table-pagination-caption,
.mud-theme-dark .mud-table-pagination .mud-typography {
    color: rgba(255, 255, 255, 0.87) !important;
    font-size: 12px !important;
}

.mud-theme-dark .mud-table-pagination .mud-icon-button {
    color: rgba(255, 255, 255, 0.87) !important;
}

.mud-theme-dark .mud-table-pagination .mud-icon-button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.mud-theme-dark .mud-table-pagination .mud-icon-button:disabled {
    color: rgba(255, 255, 255, 0.38) !important;
}

/* Button styling in tables */
.mud-theme-dark .mud-table .mud-button {
    font-size: 12px !important;
    padding: 6px 12px !important;
}

.mud-theme-dark .mud-table .mud-button-filled {
    background-color: #4da6ff !important;
    color: #ffffff !important;
}

.mud-theme-dark .mud-table .mud-button-filled:hover {
    background-color: #3d96ef !important;
}

/* Checkbox styling */
.mud-theme-dark .mud-table .mud-checkbox {
    color: rgba(255, 255, 255, 0.87) !important;
}

.mud-theme-dark .mud-table .mud-checkbox-checked {
    color: #4da6ff !important;
}

/* Light theme overrides */
.mud-theme-light .mud-table-container {
    background-color: #ffffff !important;
}

.mud-theme-light .mud-table {
    background-color: #ffffff !important;
}

.mud-theme-light .mud-table-head {
    background-color: #f5f5f5 !important;
}

.mud-theme-light .mud-table-head .mud-table-cell {
    background-color: #f5f5f5 !important;
    color: rgba(0, 0, 0, 0.87) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 10px 16px !important;
    height: auto !important;
}

.mud-theme-light .mud-table-body .mud-table-row {
    background-color: #ffffff !important;
    height: auto !important;
}

.mud-theme-light .mud-table-body .mud-table-row:hover {
    background-color: #f5f5f5 !important;
}

.mud-theme-light .mud-table-body .mud-table-cell {
    color: rgba(0, 0, 0, 0.87) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 8px 16px !important;
    height: auto !important;
    min-height: 40px !important;
}

.mud-theme-light .mud-table-toolbar {
    background-color: #f5f5f5 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.mud-theme-light .mud-table-pagination {
    background-color: #f5f5f5 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: rgba(0, 0, 0, 0.87) !important;
}