html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* ---------- Invictor Shared Dark UI ---------- */
.inv-page {
    padding: 16px;
}

.inv-shell {
    background: linear-gradient(165deg, rgba(12, 18, 34, 0.94) 0%, rgba(20, 29, 48, 0.9) 100%) !important;
    border: 1px solid rgba(71, 85, 105, 0.45);
    border-radius: 14px;
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.34);
}

.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.inv-header .mud-typography-h4,
.inv-header .mud-typography-h5,
.inv-header .mud-typography-h6 {
    color: #f8fafc;
    letter-spacing: 0.01em;
}

.inv-shell .mud-typography-h6,
.inv-shell .mud-typography-subtitle1 {
    color: #e2e8f0 !important;
}

.inv-subtitle {
    color: #cbd5e1;
}

.inv-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.inv-stat-card {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(100, 116, 139, 0.45);
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 84px;
}

.inv-stat-label {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}

.inv-stat-value {
    color: #e2e8f0;
    margin-top: 6px;
    font-size: 1.5rem;
}

.inv-table-shell {
    background: rgba(8, 15, 30, 0.72) !important;
    border: 1px solid rgba(71, 85, 105, 0.35);
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}

.inv-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 10px;
    background: rgba(8, 13, 25, 0.94);
}

.inv-table-wrap .mud-table-container {
    overflow-x: auto;
}

.inv-dark-table,
.inv-dark-table .mud-table-root,
.inv-dark-table table {
    background: rgba(8, 13, 25, 0.94) !important;
    color: #e2e8f0 !important;
}

.inv-dark-table {
    min-width: 980px;
}

.inv-dark-table .mud-table-toolbar {
    background: rgba(15, 23, 42, 0.94) !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(71, 85, 105, 0.42);
}

.inv-dark-table .mud-table-head th {
    background: rgba(15, 23, 42, 0.96) !important;
    color: #dbeafe !important;
    border-color: rgba(71, 85, 105, 0.45) !important;
}

.inv-dark-table .mud-table-head .mud-table-sort-label {
    color: #dbeafe !important;
}

.inv-dark-table .mud-table-body td {
    background: rgba(12, 18, 34, 0.92) !important;
    color: #e2e8f0 !important;
    border-color: rgba(71, 85, 105, 0.32) !important;
}

.inv-dark-table .mud-input > input,
.inv-dark-table .mud-input-slot,
.inv-dark-table .mud-input-slot input {
    color: #e2e8f0 !important;
}

.inv-dark-table .mud-input > input::placeholder,
.inv-dark-table .mud-input-slot input::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.inv-dark-table .mud-input-adornment .mud-icon-root {
    color: #94a3b8 !important;
}

.inv-dark-table .mud-input-outlined-border {
    border-color: rgba(100, 116, 139, 0.6) !important;
}

.inv-table-compact .mud-table-head th {
    font-size: 0.78rem;
    padding: 7px 8px !important;
}

.inv-table-compact .mud-table-body td {
    font-size: 0.77rem;
    line-height: 1.22;
    padding: 6px 8px !important;
}

.inv-actions-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.inv-actions-cell .mud-button-root {
    min-width: 74px;
    height: 24px;
    padding: 0 8px;
    font-size: 0.67rem;
    line-height: 1;
}

.inv-dark-table .mud-button-outlined-primary,
.rda-dark-table .mud-button-outlined-primary {
    border-color: var(--mud-palette-primary) !important;
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text, #fff) !important;
    box-shadow: 0 6px 14px rgba(84, 105, 212, 0.24);
}

.inv-dark-table .mud-button-outlined-primary:hover,
.inv-dark-table .mud-button-outlined-primary:focus-visible,
.rda-dark-table .mud-button-outlined-primary:hover,
.rda-dark-table .mud-button-outlined-primary:focus-visible {
    border-color: var(--mud-palette-primary-darken, var(--mud-palette-primary)) !important;
    background-color: var(--mud-palette-primary-darken, var(--mud-palette-primary)) !important;
    color: var(--mud-palette-primary-text, #fff) !important;
}

.inv-dark-table .mud-button-outlined-primary .mud-icon-root,
.rda-dark-table .mud-button-outlined-primary .mud-icon-root {
    color: inherit !important;
}

.inv-dark-table .mud-chip {
    height: 24px;
    font-size: 0.72rem;
    line-height: 1;
}

.inv-row-pending > td {
    background: rgba(68, 45, 14, 0.9) !important;
    color: #f8fafc !important;
}

.inv-row-warning > td {
    background: rgba(83, 28, 28, 0.88) !important;
}

.inv-chip-success {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.inv-chip-warning {
    background-color: rgba(245, 158, 11, 0.2) !important;
}

.inv-chip-danger {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.inv-form-shell {
    background: rgba(8, 15, 30, 0.72) !important;
    border: 1px solid rgba(71, 85, 105, 0.35);
    border-radius: 12px;
}

.inv-form-shell .mud-typography-h6,
.inv-form-shell .mud-typography-subtitle1 {
    color: #e2e8f0 !important;
}

.inv-form-shell .mud-input > input.mud-input-root,
.inv-form-shell .mud-input > textarea.mud-input-root,
.inv-form-shell .mud-input-slot,
.inv-form-shell .mud-input-slot input,
.inv-form-shell .mud-input-slot textarea {
    color: #e2e8f0 !important;
}

.inv-form-shell .mud-input > input::placeholder,
.inv-form-shell .mud-input > textarea::placeholder,
.inv-form-shell .mud-input-slot input::placeholder,
.inv-form-shell .mud-input-slot textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.inv-form-shell .mud-input-label {
    color: #cbd5e1 !important;
}

.inv-form-shell .mud-input-label-inputcontrol {
    background-color: rgba(8, 15, 30, 0.9) !important;
    padding: 0 4px !important;
    border-radius: 4px;
}

.inv-form-shell .mud-input-adornment .mud-icon-root {
    color: #94a3b8 !important;
}

.inv-form-shell .mud-input-outlined-border {
    border-color: rgba(100, 116, 139, 0.6) !important;
}

.inv-form-shell .mud-input-root-outlined,
.inv-form-shell .mud-input-slot {
    background: rgba(12, 18, 34, 0.62) !important;
}

.inv-form-section {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(100, 116, 139, 0.38);
    border-radius: 10px;
    padding: 14px;
}

.inv-form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inv-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.inv-kv-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.inv-kv-label {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}

.inv-kv-value {
    color: #e2e8f0;
    word-break: break-word;
}

.inv-detail-card {
    background: rgba(8, 15, 30, 0.72) !important;
    border: 1px solid rgba(71, 85, 105, 0.35);
    border-radius: 12px;
    color: #e2e8f0 !important;
}

.inv-detail-card .mud-typography-h6,
.inv-detail-card .mud-typography-subtitle1,
.inv-detail-card .mud-typography-body1,
.inv-detail-card .mud-typography-body2 {
    color: #e2e8f0 !important;
}

.inv-center {
    text-align: center;
}

@media (max-width: 960px) {
    .inv-page {
        padding: 10px;
    }

    .inv-dark-table {
        min-width: 900px;
    }
}

@media (max-width: 600px) {
    .inv-page {
        padding: 8px;
    }

    /* In small-device mode MudTable stacks label/value: keep row width within viewport. */
    .inv-dark-table {
        min-width: 100% !important;
    }

    .inv-table-wrap,
    .inv-table-wrap .mud-table-container {
        overflow-x: hidden;
    }
}
