/*
 * HMSvisjon Enterprise visual theme.
 * Shared geometry lives in Site.layout.css.
 */

.portal-theme-enterprise {
    --portal-navy-950: #071b2d;
    --portal-navy-900: #0b253f;
    --portal-navy-800: #123654;
    --portal-blue-700: #075e87;
    --portal-blue-600: #087aa5;
    --portal-blue-100: #e3f1f6;
    --portal-accent: #20a4a8;
    --portal-ink: #142433;
    --portal-text: #33495c;
    --portal-muted: #627487;
    --portal-border-strong: #b8c5cf;
    --portal-border: #d5dde4;
    --portal-surface-muted: #f3f6f8;
    --portal-surface: #ffffff;
    --portal-canvas: #edf1f4;
    --portal-danger: #b42318;
    --portal-success: #24735a;
    --portal-focus: rgba(32, 164, 168, 0.28);
    --portal-shadow-header: 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(7, 27, 45, 0.16);
    --portal-shadow-float: 0 12px 32px rgba(7, 27, 45, 0.18);
    /* Semantic component colours. Customer profiles override these roles. */
    --portal-on-strong: #fff;
    --portal-logo-plate-start: #fff;
    --portal-link-hover: #034664;
    --portal-logo-plate-end: #edf3f6;
    --portal-brand-border: #b9cad4;
    --portal-logo-shadow: rgba(0, 20, 35, 0.24);
    --portal-logo-highlight: rgba(255, 255, 255, 0.95);
    --portal-header-context-border: rgba(255, 255, 255, 0.3);
    --portal-header-context-text: #dbe8ef;
    --portal-header-toggle-border: rgba(255, 255, 255, 0.38);
    --portal-header-item-text: #c8d7e1;
    --portal-header-hover-bg: rgba(255, 255, 255, 0.08);
    --portal-header-active-bg: rgba(255, 255, 255, 0.1);
    --portal-header-active-indicator: #56d2d2;
    --portal-header-separator: rgba(255, 255, 255, 0.2);
    --portal-light-header-shadow-edge: rgba(7, 27, 45, 0.08);
    --portal-light-header-shadow: rgba(7, 27, 45, 0.09);
    --portal-caption-text: #29475a;
    --portal-light-header-context-border: #c8d4dc;
    --portal-light-header-toggle-border: #aebdc7;
    --portal-light-header-item-text: #40586a;
    --portal-strong-accent-text: #103f59;
    --portal-light-header-hover-bg: #edf5f7;
    --portal-accent-text-strong: #073f5a;
    --portal-accent-soft: #e3f1f6;
    --portal-light-header-separator: #ccd7de;
    --portal-card-shadow: rgba(7, 27, 45, 0.04);
    --portal-placeholder-text: #718292;
    --portal-primary-hover: #034f72;
    --portal-primary-button-bg: var(--portal-blue-700);
    --portal-primary-button-border: var(--portal-blue-700);
    --portal-primary-button-hover-bg: var(--portal-primary-hover);
    --portal-primary-button-hover-border: var(--portal-primary-hover);
    --portal-secondary-hover-border: #8798a6;
    --portal-link-decoration: rgba(7, 94, 135, 0.42);
    --portal-link-hover-bg: rgba(227, 241, 246, 0.65);
    --portal-check-border: #8fa6b4;
    --portal-selection-bg: #d5ebef;
    --portal-form-border: #c6d4dc;
    --portal-form-shadow: rgba(7, 27, 45, 0.05);
    --portal-form-header-bg: #e7f1f4;
    --portal-form-header-border: #b7cbd5;
    --portal-secondary-action: #365c70;
    --portal-secondary-action-hover: #244b61;
    --portal-form-check-border: #9eb2be;
    --portal-component-border: #c5d2db;
    --portal-component-shadow: rgba(7, 27, 45, 0.06);
    --portal-toolbar-bg: #f7fafb;
    --portal-toolbar-border: #cbd8e0;
    --portal-grid-border: #d2dde4;
    --portal-grid-stripe-bg: #f3f8fa;
    --portal-grid-hover-bg: #e2f1f3;
    --portal-grid-header-bg: #cfe3ea;
    --portal-grid-header-border: #bfd0d9;
    --portal-grid-header-border-strong: #9db6c2;
    --portal-grid-header-link: #075a7c;
    --portal-grid-sort-text: #36657b;
    --portal-command-hover-bg: #dcecf1;
    --portal-pager-text: #27495c;
    --portal-pager-border: #c2cfd8;
    --portal-pager-hover-bg: #e6f2f5;
    --portal-pager-hover-border: #8fb2c1;
    --portal-active-shadow: rgba(7, 27, 45, 0.18);
    --portal-disabled-text: #7a8b99;
    --portal-disabled-bg: #f2f5f7;
    --portal-disabled-border: #d5dde3;
    --portal-page-size-action: #3b596a;
    --portal-toolbar-action-text: #24485c;
    --portal-toolbar-hover-bg: #e3f0f4;
    --portal-toolbar-hover-border: #b7ccd6;
    --portal-tag-border: #a9c6d2;
    --portal-command-hover-text: #033f5b;
    --portal-status-planned-text: #244f69;
    --portal-status-planned-bg: #e5f0f5;
    --portal-status-planned-border: #b8d0dc;
    --portal-status-active-text: #075b57;
    --portal-status-active-bg: #dff3ef;
    --portal-status-active-border: #a4d9cf;
    --portal-status-complete-text: #285c43;
    --portal-status-complete-bg: #e3f2e9;
    --portal-status-complete-border: #afd4bd;
    --portal-status-muted-text: #586a78;
    --portal-status-muted-bg: #eef2f4;
    --portal-status-muted-border: #ced8de;
    --portal-preview-shadow: rgba(7, 27, 45, 0.07);
    --portal-file-hover-bg: #eef6f8;
    --portal-file-hover-border: #c4d9e1;
    --portal-file-selected-border: #86aebb;
    --portal-upload-track: #e2e9ed;
    --portal-public-gradient-start: rgba(7, 27, 45, 0.98);
    --portal-public-gradient-middle: rgba(11, 37, 63, 0.94);
    --portal-public-gradient-end: rgba(7, 94, 135, 0.72);
    --portal-public-pattern: rgba(86, 210, 210, 0.12);
    --portal-public-decoration-border: rgba(86, 210, 210, 0.26);
    --portal-public-glow-inner: rgba(32, 164, 168, 0.04);
    --portal-public-glow-outer: rgba(32, 164, 168, 0.025);
    --portal-public-shadow: rgba(7, 27, 45, 0.16);
    --portal-mobile-header-border: rgba(255, 255, 255, 0.18);
    --portal-mobile-light-border: #c7d3db;
    --portal-heading-color: var(--portal-ink);
    --portal-heading-font-family: var(--bs-body-font-family);
    --bs-body-font-family: "Segoe UI Variable Text", "Segoe UI", Aptos, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--portal-ink);
    --bs-body-bg: var(--portal-canvas);
    --bs-primary: var(--portal-blue-700);
    --bs-primary-rgb: 7, 94, 135;
    color: var(--portal-text);
    background: var(--portal-canvas);
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
}

.portal-theme-enterprise a {
    color: var(--portal-blue-700);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.portal-theme-enterprise a:hover,
.portal-theme-enterprise a:focus {
    color: var(--portal-link-hover);
}

.portal-theme-enterprise :focus-visible {
    outline: 3px solid var(--portal-focus);
    outline-offset: 2px;
}

.portal-theme-enterprise h1,
.portal-theme-enterprise h2,
.portal-theme-enterprise h3,
.portal-theme-enterprise h4,
.portal-theme-enterprise h5,
.portal-theme-enterprise h6 {
    color: var(--portal-heading-color);
    font-family: var(--portal-heading-font-family);
    font-weight: 650;
    letter-spacing: -0.012em;
}

/* Dark institutional application bar */
.portal-theme-enterprise .portal-navbar {
    color: var(--portal-on-strong);
    background: var(--portal-navy-950) !important;
    border-bottom-color: var(--portal-accent);
    box-shadow: var(--portal-shadow-header);
}

.portal-theme-enterprise .portal-navbar .navbar-brand {
    color: var(--portal-on-strong) !important;
    font-weight: 500;
    text-decoration: none;
}

.portal-theme-enterprise .portal-navbar .portal-logo-surface--plate {
    background: linear-gradient(135deg, var(--portal-logo-plate-start) 0%, var(--portal-logo-plate-end) 100%);
    border-color: var(--portal-brand-border) var(--portal-brand-border) var(--portal-brand-border) var(--portal-accent);
    box-shadow: 0 3px 8px var(--portal-logo-shadow), inset 0 1px 0 var(--portal-logo-highlight);
}

.portal-theme-enterprise .portal-navbar .portal-brand-context {
    border-left-color: var(--portal-header-context-border);
    color: var(--portal-header-context-text);
}

.portal-theme-enterprise .portal-navbar .navbar-toggler {
    color: var(--portal-on-strong);
    border-color: var(--portal-header-toggle-border);
    box-shadow: none;
}

.portal-theme-enterprise .portal-navbar .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(2);
}

.portal-theme-enterprise .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a {
    color: var(--portal-header-item-text) !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 120ms ease, background-color 120ms ease;
}

.portal-theme-enterprise .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a:hover,
.portal-theme-enterprise .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a:focus {
    color: var(--portal-on-strong) !important;
    background: var(--portal-header-hover-bg);
}

.portal-theme-enterprise .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a.active {
    color: var(--portal-on-strong) !important;
    background: var(--portal-header-active-bg);
    font-weight: 650;
}

.portal-theme-enterprise .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a.active::after {
    background: var(--portal-header-active-indicator);
}

.portal-theme-enterprise .portal-navbar .extra-space-menu {
    border-left-color: var(--portal-header-separator);
}

/* Optional light Enterprise header. Geometry remains shared with the standard
   portal navbar; this modifier changes only presentation and contrast. */
.portal-theme-enterprise.portal-header-light .portal-navbar {
    color: var(--portal-ink);
    background: var(--portal-surface) !important;
    border-bottom-color: var(--portal-accent);
    box-shadow: 0 1px 0 var(--portal-light-header-shadow-edge), 0 3px 10px var(--portal-light-header-shadow);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .navbar-brand {
    color: var(--portal-ink) !important;
}

.portal-theme-enterprise.portal-header-light .portal-navbar .portal-brand-context {
    color: var(--portal-caption-text);
    border-left-color: var(--portal-light-header-context-border);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .navbar-toggler {
    color: var(--portal-ink);
    border-color: var(--portal-light-header-toggle-border);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .navbar-toggler-icon {
    filter: none;
}

.portal-theme-enterprise.portal-header-light .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a {
    color: var(--portal-light-header-item-text) !important;
}

.portal-theme-enterprise.portal-header-light .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a:hover,
.portal-theme-enterprise.portal-header-light .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a:focus {
    color: var(--portal-strong-accent-text) !important;
    background: var(--portal-light-header-hover-bg);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a.active {
    color: var(--portal-accent-text-strong) !important;
    background: var(--portal-accent-soft);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .top-menu > .navbar-nav > .navbarMenuItem > a.active::after {
    background: var(--portal-blue-700);
}

.portal-theme-enterprise.portal-header-light .portal-navbar .extra-space-menu {
    border-left-color: var(--portal-light-header-separator);
}

/* Work surfaces: crisp hierarchy, minimal decoration */
.portal-theme-enterprise .card {
    background: var(--portal-surface);
    border-color: var(--portal-border);
    box-shadow: 0 1px 2px var(--portal-card-shadow);
}

.portal-theme-enterprise .card-header {
    color: var(--portal-ink);
    background: var(--portal-surface-muted);
    border-bottom-color: var(--portal-border-strong);
    font-weight: 650;
}

.portal-theme-enterprise hr {
    border-color: var(--portal-border);
    opacity: 1;
}

.portal-theme-enterprise footer {
    color: var(--portal-muted);
}

.portal-theme-enterprise .badge {
    font-weight: 650;
    letter-spacing: 0.015em;
}

/* Organization tree */
.portal-theme-enterprise .treeviewNode,
.portal-theme-enterprise .dxbs-tree {
    color: var(--portal-text);
}

.portal-theme-enterprise .dxbs-tree .nav-link {
    color: var(--portal-text);
    border-left-color: transparent;
}

.portal-theme-enterprise .dxbs-tree .nav-link:hover,
.portal-theme-enterprise .dxbs-tree .nav-link:focus {
    color: var(--portal-ink);
    background: var(--portal-surface-muted);
}

.portal-theme-enterprise .dxbs-tree .nav-link.active,
.portal-theme-enterprise .treeviewNode > a.active {
    color: var(--portal-blue-700) !important;
    background: var(--portal-blue-100) !important;
    border-left-color: var(--portal-blue-700);
    font-weight: 650;
}

/* Controls and actions */
.portal-theme-enterprise .form-label,
.portal-theme-enterprise .dxbs-fl-cpt {
    color: var(--portal-text);
    font-weight: 600;
}

.portal-theme-enterprise .form-control,
.portal-theme-enterprise .form-select,
.portal-theme-enterprise .dxbs-edit,
.portal-theme-enterprise select {
    color: var(--portal-ink);
    background-color: var(--portal-surface);
    border-color: var(--portal-border-strong);
}

.portal-theme-enterprise .form-control:focus,
.portal-theme-enterprise .form-select:focus,
.portal-theme-enterprise .dxbs-edit:focus-within,
.portal-theme-enterprise select:focus {
    border-color: var(--portal-blue-600);
    box-shadow: 0 0 0 0.2rem var(--portal-focus);
}

.portal-theme-enterprise .form-control::placeholder {
    color: var(--portal-placeholder-text);
}

.portal-theme-enterprise .btn {
    font-weight: 600;
}

.portal-theme-enterprise .btn-primary {
    color: var(--portal-on-strong);
    background: var(--portal-primary-button-bg);
    border-color: var(--portal-primary-button-border);
}

.portal-theme-enterprise .btn-primary:hover,
.portal-theme-enterprise .btn-primary:focus {
    color: var(--portal-on-strong);
    background: var(--portal-primary-button-hover-bg);
    border-color: var(--portal-primary-button-hover-border);
}

.portal-theme-enterprise .btn-light,
.portal-theme-enterprise .btn-outline-secondary {
    color: var(--portal-ink);
    background: var(--portal-surface);
    border-color: var(--portal-border-strong);
}

.portal-theme-enterprise .btn-light:hover,
.portal-theme-enterprise .btn-outline-secondary:hover {
    color: var(--portal-ink);
    background: var(--portal-surface-muted);
    border-color: var(--portal-secondary-hover-border);
}

/* DevExpress renders link-style buttons for customer links, tree actions and
   compact grid commands. Keep them in the Enterprise palette instead of the
   brighter Bootstrap default blue. */
.portal-theme-enterprise .btn-link {
    color: var(--portal-blue-700);
    text-decoration-color: var(--portal-link-decoration);
}

.portal-theme-enterprise .btn-link:hover,
.portal-theme-enterprise .btn-link:focus {
    color: var(--portal-link-hover);
    background-color: var(--portal-link-hover-bg);
}

.portal-theme-enterprise .form-check-input {
    border-color: var(--portal-check-border);
}

.portal-theme-enterprise .form-check-input:checked {
    background-color: var(--portal-blue-700);
    border-color: var(--portal-blue-700);
}

.portal-theme-enterprise .dropdown-menu {
    border-color: var(--portal-border);
    box-shadow: var(--portal-shadow-float);
}

.portal-theme-enterprise .dropdown-item {
    color: var(--portal-text);
}

.portal-theme-enterprise .dropdown-item:hover,
.portal-theme-enterprise .dropdown-item:focus {
    color: var(--portal-ink);
    background: var(--portal-blue-100);
}

.portal-theme-enterprise .dropdown-item.active,
.portal-theme-enterprise .dropdown-item:active {
    color: var(--portal-ink) !important;
    background: var(--portal-selection-bg) !important;
}

.portal-theme-enterprise .portal-text-size-option.portal-text-size-option--selected:is(a),
.portal-theme-enterprise .portal-text-size-option:is(a).active,
.portal-theme-enterprise .portal-text-size-option.portal-text-size-option--selected > a,
.portal-theme-enterprise .portal-text-size-option > a.active {
    color: var(--portal-ink) !important;
    background: var(--portal-selection-bg) !important;
    font-weight: 650;
}

/* DevExpress form layouts: generous enough for data entry, but with a clearer
   section hierarchy than the default grey-on-grey cards. */
.portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card {
    background: var(--portal-surface);
    border-color: var(--portal-form-border);
    box-shadow: 0 1px 3px var(--portal-form-shadow);
}

.portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card > .card-header {
    color: var(--portal-strong-accent-text);
    background: var(--portal-form-header-bg);
    border-bottom-color: var(--portal-form-header-border);
    box-shadow: inset 3px 0 0 var(--portal-accent);
    font-weight: 700;
}

.portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card > .row {
    background: var(--portal-surface);
}

.portal-theme-enterprise .dxbs-fl .dxbs-fl-cpt {
    color: var(--portal-caption-text);
    font-weight: 650;
}

.portal-theme-enterprise .dxbs-fl .dxbs-edit-btn.btn-secondary {
    background: var(--portal-secondary-action);
    border-color: var(--portal-secondary-action);
}

.portal-theme-enterprise .dxbs-fl .dxbs-edit-btn.btn-secondary:hover,
.portal-theme-enterprise .dxbs-fl .dxbs-edit-btn.btn-secondary:focus {
    background: var(--portal-secondary-action-hover);
    border-color: var(--portal-secondary-action-hover);
}

.portal-theme-enterprise .dxbs-fl .form-text {
    color: var(--portal-muted) !important;
}

.portal-theme-enterprise .dxbs-fl .form-check-input {
    border-color: var(--portal-form-check-border);
}

.portal-theme-enterprise .dxbs-fl .form-check-input:checked {
    background-color: var(--portal-blue-700);
    border-color: var(--portal-blue-700);
}

.portal-theme-enterprise .dxbs-fl .form-check-label {
    color: var(--portal-ink);
}

.portal-theme-enterprise .enterprise-form-section-help {
    color: var(--portal-muted);
}

.portal-theme-enterprise .enterprise-preview-intro {
    color: var(--portal-text);
}

.portal-theme-enterprise .enterprise-form-actions {
    border-top-color: var(--portal-border);
}

/* Data grids are the primary enterprise work surface. DevExpress 26 uses
   .dxbs-gridview; .dxbs-grid is retained for compatibility with older output. */
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) {
    color: var(--portal-ink);
    background: var(--portal-surface);
    border-color: var(--portal-component-border) !important;
    box-shadow: 0 2px 8px var(--portal-component-shadow);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) > .card {
    box-shadow: none;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) > .card > .card-body:first-child {
    background: var(--portal-toolbar-bg);
    border-bottom-color: var(--portal-toolbar-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-search-panel .form-control {
    background-color: var(--portal-on-strong);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table {
    --bs-table-color: var(--portal-ink);
    --bs-table-bg: var(--portal-surface);
    --bs-table-border-color: var(--portal-grid-border);
    --bs-table-striped-bg: var(--portal-grid-stripe-bg);
    --bs-table-striped-color: var(--portal-ink);
    --bs-table-hover-bg: var(--portal-grid-hover-bg);
    --bs-table-hover-color: var(--portal-ink);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table > :not(caption) > * > * {
    border-color: var(--portal-grid-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead th,
.portal-theme-enterprise .dxbs-table > thead > tr:not(.dxbs-filter-row) > th {
    color: var(--portal-strong-accent-text) !important;
    background-color: var(--portal-grid-header-bg) !important;
    background-image: none !important;
    border-color: var(--portal-grid-header-border);
    border-bottom-color: var(--portal-grid-header-border-strong);
    font-weight: 700;
    letter-spacing: 0.012em;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead th a,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .HeaderCellClass,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .HeaderCellClass * {
    color: var(--portal-grid-header-link) !important;
    font-weight: 700;
    text-decoration: none;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead .btn-link {
    color: var(--portal-grid-sort-text);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr {
    transition: background-color 100ms ease, box-shadow 100ms ease;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr:hover > * {
    background-color: var(--portal-grid-hover-bg);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.table-active > *,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.dxgvSelectedRow > *,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.active > *,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.table-primary > * {
    background-color: var(--portal-selection-bg);
    border-left-color: var(--portal-grid-border) !important;
    box-shadow: none !important;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-cmd-cell .btn-link,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) button[data-toggle*="detail"].btn-link {
    color: var(--portal-blue-700);
    font-weight: 750;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-cmd-cell .btn-link:hover,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-cmd-cell .btn-link:focus,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) button[data-toggle*="detail"].btn-link:hover,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) button[data-toggle*="detail"].btn-link:focus {
    color: var(--portal-link-hover);
    background: var(--portal-command-hover-bg);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .card-header,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-toolbar {
    background: var(--portal-toolbar-bg);
}

/* Compact, calm pager with a clear current page. */
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) > .card > .card-body:last-child {
    background: var(--portal-surface);
    border-top-color: var(--portal-toolbar-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-pager .form-control-plaintext {
    color: var(--portal-muted);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link {
    color: var(--portal-pager-text);
    background: var(--portal-surface);
    border-color: var(--portal-pager-border);
    font-weight: 600;
    text-decoration: none;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link:hover,
.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link:focus {
    color: var(--portal-accent-text-strong);
    background: var(--portal-pager-hover-bg);
    border-color: var(--portal-pager-hover-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-item.active .page-link {
    color: var(--portal-on-strong);
    background: var(--portal-blue-700);
    border-color: var(--portal-blue-700);
    box-shadow: 0 1px 2px var(--portal-active-shadow);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-item.disabled .page-link {
    color: var(--portal-disabled-text);
    background: var(--portal-disabled-bg);
    border-color: var(--portal-disabled-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-size .col-form-label {
    color: var(--portal-muted);
    font-weight: 500;
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-size .form-control {
    border-color: var(--portal-pager-border);
}

.portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-size .btn {
    background: var(--portal-page-size-action);
    border-color: var(--portal-page-size-action);
}

/* Grid toolbars and row actions */
.portal-theme-enterprise .enterprise-grid-toolbar,
.portal-theme-enterprise .card-header:has(.dxbs-toolbar-adaptive) {
    background: var(--portal-toolbar-bg);
    border-bottom-color: var(--portal-component-border);
}

.portal-theme-enterprise .dxbs-toolbar-adaptive .btn {
    color: var(--portal-toolbar-action-text);
    background: transparent;
    border-color: transparent;
}

.portal-theme-enterprise .dxbs-toolbar-adaptive .btn:hover,
.portal-theme-enterprise .dxbs-toolbar-adaptive .btn:focus {
    color: var(--portal-accent-text-strong);
    background: var(--portal-toolbar-hover-bg);
    border-color: var(--portal-toolbar-hover-border);
}

.portal-theme-enterprise .dxbs-toolbar-adaptive.dxbs-ta-nib > .btn-toolbar .btn.active,
.portal-theme-enterprise .dxbs-toolbar-adaptive .btn[aria-pressed="true"] {
    color: var(--portal-on-strong) !important;
    background: var(--portal-secondary-action) !important;
    border-color: var(--portal-secondary-action) !important;
    box-shadow: inset 0 -2px 0 var(--portal-accent) !important;
}

.portal-theme-enterprise .dxbs-toolbar-adaptive.dxbs-ta-nib > .btn-toolbar .btn.active:hover,
.portal-theme-enterprise .dxbs-toolbar-adaptive.dxbs-ta-nib > .btn-toolbar .btn.active:focus,
.portal-theme-enterprise .dxbs-toolbar-adaptive .btn[aria-pressed="true"]:hover,
.portal-theme-enterprise .dxbs-toolbar-adaptive .btn[aria-pressed="true"]:focus {
    color: var(--portal-on-strong) !important;
    background: var(--portal-secondary-action-hover) !important;
    border-color: var(--portal-secondary-action-hover) !important;
}

/* TagBox selections use the same calm accent treatment as other inputs. */
.portal-theme-enterprise .dxbs-tagbox .dxbs-tag {
    color: var(--portal-strong-accent-text) !important;
    background: var(--portal-accent-soft) !important;
    border-color: var(--portal-tag-border) !important;
}

.portal-theme-enterprise .dxbs-tagbox .dxbs-tag-remove-btn {
    color: var(--portal-secondary-action) !important;
}

.portal-theme-enterprise .dxbs-tagbox .dxbs-tag a,
.portal-theme-enterprise .dxbs-tagbox .dxbs-tag button,
.portal-theme-enterprise .dxbs-tagbox .dxbs-tag span {
    color: inherit !important;
}

.portal-theme-enterprise .enterprise-grid-action {
    color: var(--portal-blue-700);
    font-weight: 650;
    text-decoration: none;
}

.portal-theme-enterprise .enterprise-grid-action:hover,
.portal-theme-enterprise .enterprise-grid-action:focus {
    color: var(--portal-command-hover-text);
    background: var(--portal-command-hover-bg);
}

/* Semantic statuses: color supports scanning, text carries the meaning. */
.portal-theme-enterprise .portal-status {
    border-color: transparent;
    font-weight: 700;
}

.portal-theme-enterprise .portal-status-planned {
    color: var(--portal-status-planned-text);
    background: var(--portal-status-planned-bg);
    border-color: var(--portal-status-planned-border);
}

.portal-theme-enterprise .portal-status-active {
    color: var(--portal-status-active-text);
    background: var(--portal-status-active-bg);
    border-color: var(--portal-status-active-border);
}

.portal-theme-enterprise .portal-status-complete {
    color: var(--portal-status-complete-text);
    background: var(--portal-status-complete-bg);
    border-color: var(--portal-status-complete-border);
}

.portal-theme-enterprise .portal-status-muted {
    color: var(--portal-status-muted-text);
    background: var(--portal-status-muted-bg);
    border-color: var(--portal-status-muted-border);
}

/* Isolated preview page used to verify real DevExpress rendering. */
.portal-theme-enterprise .enterprise-preview-kicker {
    color: var(--portal-blue-700);
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-theme-enterprise .enterprise-grid-shell {
    background: var(--portal-surface);
    border-color: var(--portal-brand-border);
    border-top-color: var(--portal-accent);
    box-shadow: 0 4px 14px var(--portal-preview-shadow);
}

.portal-theme-enterprise .enterprise-grid-titlebar {
    background: var(--portal-surface);
    border-bottom-color: var(--portal-component-border);
}

.portal-theme-enterprise .enterprise-grid-meta {
    color: var(--portal-muted);
}

.portal-theme-enterprise .enterprise-grid-shell > :is(.dxbs-grid, .dxbs-gridview) {
    box-shadow: none;
}

/* File archive: separate navigation, path and document list clearly while
   preserving the same compact grid language used elsewhere in the portal. */
.portal-theme-enterprise .dxbs-file-manager {
    color: var(--portal-ink);
    background: var(--portal-surface);
    border-color: var(--portal-component-border);
    box-shadow: 0 2px 8px var(--portal-component-shadow);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar {
    background: var(--portal-toolbar-bg);
    border-bottom-color: var(--portal-component-border);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn {
    color: var(--portal-toolbar-action-text);
    background: transparent;
    border-color: transparent;
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn:hover,
.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn:focus,
.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn.active {
    color: var(--portal-accent-text-strong);
    background: var(--portal-toolbar-hover-bg);
    border-color: var(--portal-toolbar-hover-border);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-breadcrumb {
    color: var(--portal-muted);
    background: var(--portal-surface);
    border-bottom-color: var(--portal-border);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-folder-container {
    background: var(--portal-toolbar-bg);
    border-right-color: var(--portal-border);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-file-container:not(.dxbs-details-container) {
    background: var(--portal-surface);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item {
    color: var(--portal-text);
    border-color: transparent;
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-hover,
.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item:hover {
    color: var(--portal-ink);
    background: var(--portal-file-hover-bg);
    border-color: var(--portal-file-hover-border) !important;
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-focus,
.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-select-active {
    color: var(--portal-accent-text-strong);
    background: var(--portal-selection-bg);
    border-color: var(--portal-file-selected-border) !important;
    box-shadow: none;
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-upload-panel,
.portal-theme-enterprise .dxbs-uc {
    color: var(--portal-text);
}

.portal-theme-enterprise .dxbs-file-manager .dxbs-fm-upload-panel {
    background: var(--portal-toolbar-bg);
    border-top-color: var(--portal-border);
}

.portal-theme-enterprise .dxbs-uc .progress {
    background: var(--portal-upload-track);
}

.portal-theme-enterprise .dxbs-uc .progress-bar {
    background: var(--portal-accent);
}

/* Dialogs */
.portal-theme-enterprise .popover,
.portal-theme-enterprise .modal-content,
.portal-theme-enterprise .dxbs-popup {
    color: var(--portal-ink);
    border-color: var(--portal-border-strong);
    box-shadow: var(--portal-shadow-float);
}

.portal-theme-enterprise .popover-header,
.portal-theme-enterprise .modal-header,
.portal-theme-enterprise .dxbs-popup .modal-header {
    color: var(--portal-ink);
    background: var(--portal-surface-muted);
    border-bottom-color: var(--portal-border-strong);
    font-weight: 650;
}

/* Public front page: a graphic, ownable surface without stock-image dependency */
.portal-theme-enterprise .jumbotron {
    color: var(--portal-on-strong);
    background-color: var(--portal-navy-900);
    background-image: linear-gradient(115deg, var(--portal-public-gradient-start) 0%, var(--portal-public-gradient-middle) 53%, var(--portal-public-gradient-end) 100%),
        linear-gradient(30deg, transparent 49.5%, var(--portal-public-pattern) 50%, transparent 50.5%);
    background-size: auto, 54px 54px;
    border-color: var(--portal-header-hover-bg);
    box-shadow: 0 10px 28px var(--portal-public-shadow);
}

.portal-theme-enterprise .jumbotron::before {
    border-color: var(--portal-public-decoration-border);
    box-shadow: 0 0 0 90px var(--portal-public-glow-inner), 0 0 0 180px var(--portal-public-glow-outer);
}

.portal-theme-enterprise .jumbotron::after {
    background: var(--portal-accent);
}

.portal-theme-enterprise .jumbotron h1,
.portal-theme-enterprise .jumbotron h2,
.portal-theme-enterprise .jumbotron h3 {
    color: var(--portal-on-strong);
}

.portal-theme-enterprise .jumbotron h1 {
    font-weight: 650;
    letter-spacing: -0.035em;
}

.portal-theme-enterprise .jumbotron p {
    color: var(--portal-header-context-text);
}

@media (max-width: 991.98px) {
    .portal-theme-enterprise .portal-navbar .navbar-collapse {
        background: var(--portal-navy-900);
        border-color: var(--portal-mobile-header-border);
        box-shadow: var(--portal-shadow-float);
    }

    .portal-theme-enterprise .portal-navbar .extra-space-menu {
        border-top-color: var(--portal-mobile-header-border);
    }

    .portal-theme-enterprise.portal-header-light .portal-navbar .navbar-collapse {
        background: var(--portal-surface);
        border-color: var(--portal-mobile-light-border);
        box-shadow: var(--portal-shadow-float);
    }

    .portal-theme-enterprise.portal-header-light .portal-navbar .extra-space-menu {
        border-top-color: var(--portal-light-header-separator);
    }

}

/* User-selectable dark mode. The customer header choice remains independent:
   TopMenuStyle 0 keeps the institutional dark header, while TopMenuStyle 1
   deliberately retains the light header against the dark work surface. */
html[data-portal-color-mode="dark"] .portal-theme-enterprise {
    --portal-blue-700: #67c8df;
    --portal-blue-600: #44b3cf;
    --portal-blue-100: #203b46;
    --portal-accent: #45c3c5;
    --portal-ink: #eef5f8;
    --portal-text: #cfdae1;
    --portal-muted: #9eb0bc;
    --portal-border-strong: #49616f;
    --portal-border: #304550;
    --portal-surface-muted: #1d2c35;
    --portal-surface: #16232c;
    --portal-canvas: #0f181e;
    --portal-danger: #ff8b83;
    --portal-success: #68c9a5;
    --portal-focus: rgba(69, 195, 197, 0.35);
    --portal-shadow-header: 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 14px rgba(0, 0, 0, 0.36);
    --portal-shadow-float: 0 14px 36px rgba(0, 0, 0, 0.42);
    --portal-heading-color: var(--portal-ink);
    --bs-body-color: var(--portal-ink);
    --bs-body-bg: var(--portal-canvas);
    color-scheme: dark;
    color: var(--portal-text);
    background: var(--portal-canvas);
    /* Dark-mode semantic component colours. */
    --portal-dark-link: #72cfe3;
    --portal-dark-link-hover: #a8e5f1;
    --portal-dark-dropdown-bg: #18262f;
    --portal-dark-dropdown-hover-bg: #243d48;
    --portal-dark-selection-bg: #294956;
    --portal-dark-control-bg: #111d24;
    --portal-dark-placeholder: #8da0ad;
    --portal-dark-check-border: #6f8795;
    --portal-dark-primary: #0a7198;
    --portal-dark-primary-border: #36aeca;
    --portal-dark-primary-border-strong: #1684ac;
    --portal-dark-primary-hover: #086184;
    --portal-dark-primary-hover-border: #2998bb;
    --portal-primary-button-bg: var(--portal-dark-primary);
    --portal-primary-button-border: var(--portal-dark-primary-border-strong);
    --portal-primary-button-hover-bg: var(--portal-dark-primary-hover);
    --portal-primary-button-hover-border: var(--portal-dark-primary-hover-border);
    --portal-dark-secondary-bg: #1c2b34;
    --portal-dark-secondary-hover-bg: #29404b;
    --portal-dark-secondary-hover-border: #66808e;
    --portal-dark-link-decoration: rgba(114, 207, 227, 0.46);
    --portal-dark-interactive-hover-bg: #203944;
    --portal-light-header-dark-mode-text: #142433;
    --portal-dark-form-header-text: #d9edf2;
    --portal-dark-form-header-bg: #203640;
    --portal-dark-editor-action: #31586b;
    --portal-dark-editor-action-border: #466d7e;
    --portal-dark-component-shadow: rgba(0, 0, 0, 0.28);
    --portal-dark-toolbar-bg: #1b2b34;
    --portal-dark-grid-border: #344954;
    --portal-dark-grid-header-bg: #27434f;
    --portal-dark-grid-header-text: #dceef3;
    --portal-dark-grid-header-border: #3c5865;
    --portal-dark-grid-header-border-strong: #5f7b88;
    --portal-dark-grid-header-link: #91dceb;
    --portal-dark-grid-sort-text: #a3d9e5;
    --portal-dark-pager-border: #405764;
    --portal-dark-pager-hover-border: #6b8996;
    --portal-dark-disabled-text: #758994;
    --portal-dark-disabled-bg: #18242c;
    --portal-dark-disabled-border: #30434e;
    --portal-dark-toolbar-active-border: #4a6875;
    --portal-dark-tag-border: #4d7484;
    --portal-dark-tag-remove: #b8dce5;
    --portal-dark-status-planned-text: #bcdceb;
    --portal-dark-status-planned-bg: #263d4a;
    --portal-dark-status-planned-border: #496878;
    --portal-dark-status-active-text: #a8e6dc;
    --portal-dark-status-active-bg: #193d3a;
    --portal-dark-status-active-border: #3e716a;
    --portal-dark-status-complete-text: #b5e1c4;
    --portal-dark-status-complete-bg: #223d2e;
    --portal-dark-status-complete-border: #52755e;
    --portal-dark-status-muted-text: #bdc9d0;
    --portal-dark-status-muted-bg: #28343b;
    --portal-dark-status-muted-border: #4d5e68;
    --portal-dark-file-tree-bg: #1a2932;
    --portal-dark-file-hover-border: #486775;
    --portal-dark-file-selected-border: #68a0b2;
    --portal-dark-upload-track: #263740;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise a {
    color: var(--portal-dark-link);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise a:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise a:focus {
    color: var(--portal-dark-link-hover);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.bg-white, .bg-light) {
    background-color: var(--portal-surface) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .text-muted {
    color: var(--portal-muted) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .card,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .modal-content,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .popover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-popup {
    color: var(--portal-text);
    background: var(--portal-surface);
    border-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .card-header,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .modal-header,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .popover-header,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-popup .modal-header {
    color: var(--portal-ink);
    background: var(--portal-surface-muted);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-menu {
    color: var(--portal-text);
    background: var(--portal-dark-dropdown-bg);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-item {
    color: var(--portal-text);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-item:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-item:focus {
    color: var(--portal-ink);
    background: var(--portal-dark-dropdown-hover-bg);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-item.active,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dropdown-item:active,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-text-size-option.portal-text-size-option--selected > a,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-text-size-option > a.active,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-color-mode-option.portal-color-mode-option--selected > a,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-color-mode-option > a.active {
    color: var(--portal-ink) !important;
    background: var(--portal-dark-selection-bg) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .form-control,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .form-select,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-edit,
html[data-portal-color-mode="dark"] .portal-theme-enterprise select {
    color: var(--portal-ink);
    background-color: var(--portal-dark-control-bg);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .form-control::placeholder {
    color: var(--portal-dark-placeholder);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .form-check-input {
    background-color: var(--portal-dark-control-bg);
    border-color: var(--portal-dark-check-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .form-check-input:checked {
    background-color: var(--portal-dark-primary);
    border-color: var(--portal-dark-primary-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-primary {
    color: var(--portal-on-strong);
    background: var(--portal-primary-button-bg);
    border-color: var(--portal-primary-button-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-primary:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-primary:focus {
    color: var(--portal-on-strong);
    background: var(--portal-primary-button-hover-bg);
    border-color: var(--portal-primary-button-hover-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.btn-light, .btn-outline-secondary) {
    color: var(--portal-ink);
    background: var(--portal-dark-secondary-bg);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.btn-light, .btn-outline-secondary):hover {
    color: var(--portal-on-strong);
    background: var(--portal-dark-secondary-hover-bg);
    border-color: var(--portal-dark-secondary-hover-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-link {
    color: var(--portal-dark-link);
    text-decoration-color: var(--portal-dark-link-decoration);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-link:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .btn-link:focus {
    color: var(--portal-dark-link-hover);
    background: var(--portal-dark-interactive-hover-bg);
}

/* A customer-selected light top menu remains genuinely light in dark mode. */
html[data-portal-color-mode="dark"] .portal-theme-enterprise.portal-header-light .portal-navbar,
html[data-portal-color-mode="dark"] .portal-theme-enterprise.portal-header-light .portal-navbar .navbar-brand,
html[data-portal-color-mode="dark"] .portal-theme-enterprise.portal-header-light .portal-navbar .navbar-toggler {
    color: var(--portal-light-header-dark-mode-text) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise.portal-header-light .portal-navbar .portal-brand-context {
    color: var(--portal-caption-text);
}

/* DevExpress forms */
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card > .row {
    color: var(--portal-text);
    background: var(--portal-surface);
    border-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .dxbs-fl-gd > .card > .card-header {
    color: var(--portal-dark-form-header-text);
    background: var(--portal-dark-form-header-bg);
    border-bottom-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .dxbs-fl-cpt,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .form-check-label {
    color: var(--portal-ink);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-fl .dxbs-edit-btn.btn-secondary {
    color: var(--portal-on-strong);
    background: var(--portal-dark-editor-action);
    border-color: var(--portal-dark-editor-action-border);
}

/* DevExpress grids and compact pager */
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) {
    color: var(--portal-text);
    background: var(--portal-surface);
    border-color: var(--portal-border-strong) !important;
    box-shadow: 0 2px 10px var(--portal-dark-component-shadow);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .enterprise-grid-shell,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .enterprise-grid-titlebar {
    color: var(--portal-text);
    background: var(--portal-surface);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) > .card > .card-body:first-child,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .card-header,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-toolbar,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .enterprise-grid-toolbar,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .card-header:has(.dxbs-toolbar-adaptive) {
    background: var(--portal-dark-toolbar-bg);
    border-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-search-panel .form-control {
    color: var(--portal-ink);
    background-color: var(--portal-dark-control-bg);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table {
    --bs-table-color: var(--portal-ink);
    --bs-table-bg: #16232c;
    --bs-table-border-color: var(--portal-dark-grid-border);
    --bs-table-striped-bg: var(--portal-dark-toolbar-bg);
    --bs-table-striped-color: var(--portal-ink);
    --bs-table-hover-bg: var(--portal-dark-interactive-hover-bg);
    --bs-table-hover-color: var(--portal-on-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table > :not(caption) > * > * {
    border-color: var(--portal-dark-grid-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead th,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-table > thead > tr:not(.dxbs-filter-row) > th {
    color: var(--portal-dark-grid-header-text) !important;
    background-color: var(--portal-dark-grid-header-bg) !important;
    border-color: var(--portal-dark-grid-header-border);
    border-bottom-color: var(--portal-dark-grid-header-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead th a,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .HeaderCellClass,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .HeaderCellClass * {
    color: var(--portal-dark-grid-header-link) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table thead .btn-link {
    color: var(--portal-dark-grid-sort-text);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr:hover > * {
    background-color: var(--portal-dark-interactive-hover-bg);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.table-active > *,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.dxgvSelectedRow > *,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.active > *,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .table tbody tr.table-primary > * {
    color: var(--portal-on-strong);
    background-color: var(--portal-dark-selection-bg);
    border-left-color: var(--portal-dark-grid-border) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .dxbs-cmd-cell .btn-link,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) button[data-toggle*="detail"].btn-link {
    color: var(--portal-dark-link);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) > .card > .card-body:last-child {
    background: var(--portal-surface);
    border-top-color: var(--portal-dark-grid-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link {
    color: var(--portal-text);
    background: var(--portal-dark-toolbar-bg);
    border-color: var(--portal-dark-pager-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-link:focus {
    color: var(--portal-on-strong);
    background: var(--portal-dark-selection-bg);
    border-color: var(--portal-dark-pager-hover-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-item.active .page-link {
    color: var(--portal-on-strong);
    background: var(--portal-dark-primary);
    border-color: var(--portal-dark-primary-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise :is(.dxbs-grid, .dxbs-gridview) .page-item.disabled .page-link {
    color: var(--portal-dark-disabled-text);
    background: var(--portal-dark-disabled-bg);
    border-color: var(--portal-dark-disabled-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-toolbar-adaptive .btn,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn {
    color: var(--portal-text);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-toolbar-adaptive .btn:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-toolbar-adaptive .btn:focus,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn:hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn:focus,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar .btn.active {
    color: var(--portal-on-strong);
    background: var(--portal-dark-selection-bg);
    border-color: var(--portal-dark-toolbar-active-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-tagbox .dxbs-tag {
    color: var(--portal-dark-grid-header-text) !important;
    background: var(--portal-dark-selection-bg) !important;
    border-color: var(--portal-dark-tag-border) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-tagbox .dxbs-tag-remove-btn {
    color: var(--portal-dark-tag-remove) !important;
}

/* Semantic status colors remain distinguishable without becoming luminous. */
html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-status-planned {
    color: var(--portal-dark-status-planned-text);
    background: var(--portal-dark-status-planned-bg);
    border-color: var(--portal-dark-status-planned-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-status-active {
    color: var(--portal-dark-status-active-text);
    background: var(--portal-dark-status-active-bg);
    border-color: var(--portal-dark-status-active-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-status-complete {
    color: var(--portal-dark-status-complete-text);
    background: var(--portal-dark-status-complete-bg);
    border-color: var(--portal-dark-status-complete-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .portal-status-muted {
    color: var(--portal-dark-status-muted-text);
    background: var(--portal-dark-status-muted-bg);
    border-color: var(--portal-dark-status-muted-border);
}

/* File archive */
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager {
    color: var(--portal-ink);
    background: var(--portal-surface);
    border-color: var(--portal-border-strong);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-toolbar,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-upload-panel {
    background: var(--portal-dark-toolbar-bg);
    border-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-breadcrumb,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-file-container:not(.dxbs-details-container) {
    color: var(--portal-text);
    background: var(--portal-surface);
    border-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-breadcrumb :is(.breadcrumb-item, a, span) {
    color: var(--portal-text) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-breadcrumb .breadcrumb-item.active {
    color: var(--portal-ink) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-folder-container {
    background: var(--portal-dark-file-tree-bg);
    border-right-color: var(--portal-border);
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-hover,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item:hover {
    color: var(--portal-on-strong);
    background: var(--portal-dark-interactive-hover-bg);
    border-color: var(--portal-dark-file-hover-border) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-focus,
html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-file-manager .dxbs-fm-item.dxbs-fm-select-active {
    color: var(--portal-on-strong);
    background: var(--portal-dark-selection-bg);
    border-color: var(--portal-dark-file-selected-border) !important;
}

html[data-portal-color-mode="dark"] .portal-theme-enterprise .dxbs-uc .progress {
    background: var(--portal-dark-upload-track);
}
