/* ============================================================
   DARK MODE
   Tokens are remapped on html[data-theme="dark"].
   Load this file last so it can beat style.php / agency.php !important.
   Print stays on the light theme (rules are screen-only).
   ============================================================ */

@media screen {
	html[data-theme="dark"] {
		color-scheme: dark;
		--background-color: 32, 33, 39;
		--system-background-color: 18, 19, 23;
		--border-color: 58, 61, 70;
		--body-text-color: 226, 228, 233;
		--muted-text-color: 164, 169, 180;
		--secondary-text-color: 164, 169, 180;
		--hover-color: 44, 46, 54;
		--table-header-color: 38, 40, 48;
		--table-color-dark: 26, 27, 32;
		--table-color-light: 32, 33, 39;
		--hover-row-color: 42, 52, 68;
		--section-color: 32, 33, 39;
		--section-header-color: 38, 40, 48;
		--focus-row-color: 38, 52, 72;
		--input-background-color: 26, 27, 32;
		--input-text-color: 226, 228, 233;
		--fade-color: 0, 0, 0;
		--box-shadow: 0 .15rem 1.75rem 0 rgba(0, 0, 0, .45);
		--inset-box-shadow-light: 0 0 4px 0 rgba(0, 0, 0, .45) inset;
		--error-highlight-color: 90, 40, 40;
		--warning-highlight-color: 90, 70, 20;
		--required-highlight-color: 70, 65, 20;
	}

	html[data-theme="dark"],
	html[data-theme="dark"] body,
	html[data-theme="dark"] section,
	html[data-theme="dark"] .section,
	html[data-theme="dark"] .content,
	html[data-theme="dark"] #content,
	html[data-theme="dark"] #content.content,
	html[data-theme="dark"] .content-body,
	html[data-theme="dark"] .content > .content-body,
	html[data-theme="dark"] #mainContain,
	html[data-theme="dark"] #content.terms-gate-content,
	html[data-theme="dark"] .terms-gate-content,
	html[data-theme="dark"] .terms-gate-content #mainContain {
		background-color: rgb(var(--system-background-color)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] body {
		background: rgb(var(--system-background-color)) !important;
	}

	html[data-theme="dark"] h1,
	html[data-theme="dark"] h2,
	html[data-theme="dark"] h3,
	html[data-theme="dark"] h4,
	html[data-theme="dark"] h5,
	html[data-theme="dark"] h6,
	html[data-theme="dark"] .sidebar-text,
	html[data-theme="dark"] .sysColor,
	html[data-theme="dark"] .icon,
	html[data-theme="dark"] .logged-in-text,
	html[data-theme="dark"] .profile-username,
	html[data-theme="dark"] .dropdown-caret,
	html[data-theme="dark"] .toggle-name {
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .sidebar-text,
	html[data-theme="dark"] .sysColor,
	html[data-theme="dark"] .icon,
	html[data-theme="dark"] .profile-username,
	html[data-theme="dark"] .logged-in-text,
	html[data-theme="dark"] .vendor-menu-link,
	html[data-theme="dark"] .dropdown-caret,
	html[data-theme="dark"] .dropdown-caret:hover {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #content a:not(.btn):not(.addNewBtn):not(.btn-primary):not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):not(.help-btn):not(.submit-request-btn):not(.btn-map),
	html[data-theme="dark"] .content a:not(.btn):not(.addNewBtn):not(.btn-primary):not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):not(.help-btn):not(.submit-request-btn):not(.btn-map),
	html[data-theme="dark"] .isLink,
	html[data-theme="dark"] .profile-username a {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] #content a:not(.btn):not(.addNewBtn):not(.btn-primary):not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):not(.help-btn):not(.submit-request-btn):not(.btn-map):hover,
	html[data-theme="dark"] .content a:not(.btn):not(.addNewBtn):not(.btn-primary):not(.btn-warning):not(.btn-danger):not(.btn-success):not(.btn-info):not(.btn-secondary):not(.help-btn):not(.submit-request-btn):not(.btn-map):hover,
	html[data-theme="dark"] .isLink:hover,
	html[data-theme="dark"] .profile-username a:hover {
		color: rgb(var(--secondary-color)) !important;
	}

	/* Colored action buttons keep white labels (addNewBtn often lacks .btn) */
	html[data-theme="dark"] a.addNewBtn,
	html[data-theme="dark"] .addNewBtn,
	html[data-theme="dark"] a.btn-primary,
	html[data-theme="dark"] .btn-primary,
	html[data-theme="dark"] a.btn-warning,
	html[data-theme="dark"] .btn-warning,
	html[data-theme="dark"] a.btn-danger,
	html[data-theme="dark"] .btn-danger,
	html[data-theme="dark"] a.btn-success,
	html[data-theme="dark"] .btn-success,
	html[data-theme="dark"] a.btn-info,
	html[data-theme="dark"] .btn-info {
		color: #fff !important;
	}

	html[data-theme="dark"] a.addNewBtn:hover,
	html[data-theme="dark"] .addNewBtn:hover,
	html[data-theme="dark"] a.btn-primary:hover,
	html[data-theme="dark"] .btn-primary:hover,
	html[data-theme="dark"] a.btn-warning:hover,
	html[data-theme="dark"] .btn-warning:hover,
	html[data-theme="dark"] a.btn-danger:hover,
	html[data-theme="dark"] .btn-danger:hover,
	html[data-theme="dark"] a.btn-success:hover,
	html[data-theme="dark"] .btn-success:hover,
	html[data-theme="dark"] a.btn-info:hover,
	html[data-theme="dark"] .btn-info:hover {
		color: #fff !important;
	}

	html[data-theme="dark"] .menu-url,
	html[data-theme="dark"] .sidebar a,
	html[data-theme="dark"] .vendor-menu-link,
	html[data-theme="dark"] .vendor-menu-link[href] {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .side-left,
	html[data-theme="dark"] .pmx-menu,
	html[data-theme="dark"] .sidebar,
	html[data-theme="dark"] ul.sidebar > li > a,
	html[data-theme="dark"] .menu-url,
	html[data-theme="dark"] .menu-toolbar-container,
	html[data-theme="dark"] .vendor-side-bar {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .vendor-side-bar > li,
	html[data-theme="dark"] .vendor-side-bar .current,
	html[data-theme="dark"] .vendor-side-bar .vendor-current {
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .vendor-content {
		background: rgb(var(--system-background-color)) !important;
		background-color: rgb(var(--system-background-color)) !important;
	}

	html[data-theme="dark"] .side-left {
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.45);
	}

	html[data-theme="dark"] .side-nav-open,
	html[data-theme="dark"] .side-nav-close {
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .sidebar-child,
	html[data-theme="dark"] .sidebar-child-wrapper {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .sidebar-child a,
	html[data-theme="dark"] .sidebar-child .menu-subitem-url {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .sidebar-child a:hover,
	html[data-theme="dark"] .sidebar-child a:focus,
	html[data-theme="dark"] .sidebar-child .menu-subitem-url:hover,
	html[data-theme="dark"] .sidebar-child .menu-subitem-url:focus {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .sidebar-child a:hover .sidebar-text,
	html[data-theme="dark"] .sidebar-child a:focus .sidebar-text {
		color: rgb(var(--secondary-color)) !important;
	}

	/* Vendor flyouts have no .sidebar-child-wrapper; each <li> was a white card with its own shadow. */
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child {
		padding: 6px 0 !important;
		overflow: hidden;
		background: rgb(var(--background-color)) !important;
		border: 1px solid rgb(var(--border-color));
		border-radius: 8px;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
		min-width: 220px;
		width: max-content;
		max-width: min(92vw, 340px);
		box-sizing: border-box;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li {
		display: block;
		width: 100%;
		min-width: 0 !important;
		margin: 0;
		padding: 0;
		background: transparent !important;
		background-color: transparent !important;
		box-shadow: none !important;
		box-sizing: border-box;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a.vendor-menu-link-inner,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child:hover li a,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child:hover li a.vendor-menu-link-inner {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		box-sizing: border-box;
		margin: 0;
		padding: 9px 16px;
		text-align: left;
		border: none !important;
		border-radius: 0;
		background: transparent !important;
		background-color: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a:hover,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a:focus,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child:hover li a:hover,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a.vendor-menu-link-inner:hover,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a.vendor-menu-link-inner:focus {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border: none !important;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a .sidebar-text,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a:hover .sidebar-text,
	html[data-theme="dark"] .vendor-side-bar .vendor-sidebar-child li a:focus .sidebar-text {
		text-align: left;
		margin-top: 0 !important;
	}

	/* Top-bar flyout: keep items inside the rounded panel */
	html[data-theme="dark"] .sidebar-child-top {
		padding: 0 !important;
		background: transparent !important;
	}

	html[data-theme="dark"] .sidebar-child-top .sidebar-child-wrapper {
		background: rgb(var(--background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
		min-width: 260px;
		width: max-content;
		max-width: min(92vw, 340px);
		box-sizing: border-box;
	}

	html[data-theme="dark"] .side-left .sidebar-child .sidebar-child-wrapper {
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
		min-width: 220px;
		width: max-content;
		max-width: min(92vw, 340px);
		box-sizing: border-box;
	}

	html[data-theme="dark"] .sidebar-child-top li,
	html[data-theme="dark"] .side-left .sidebar-child li {
		display: block;
		width: 100%;
		min-width: 0 !important;
		box-sizing: border-box;
	}

	html[data-theme="dark"] .sidebar-child-top li a.menu-subitem-url,
	html[data-theme="dark"] .side-left .sidebar-child li a.menu-subitem-url {
		width: 100%;
		box-sizing: border-box;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	html[data-theme="dark"] .sidebar-child .dropdown-group-header,
	html[data-theme="dark"] .sidebar-child-top .dropdown-group-header {
		display: block;
		width: 100% !important;
		min-width: 100% !important;
		box-sizing: border-box;
		margin: 0 !important;
		padding: 8px 16px !important;
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-top: 1px solid rgb(var(--border-color)) !important;
		border-bottom: 1px solid rgb(var(--border-color)) !important;
		font-size: 10px !important;
		font-weight: 700 !important;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	html[data-theme="dark"] .sidebar-child .dropdown-group-header:first-child,
	html[data-theme="dark"] .sidebar-child-top .dropdown-group-header:first-child {
		border-top: none !important;
	}

	html[data-theme="dark"] .sidebar-child .dropdown-group-header:hover,
	html[data-theme="dark"] .sidebar-child-top .dropdown-group-header:hover {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .menu-subitem-url .admin-only-badge {
		color: rgb(230, 196, 110) !important;
		opacity: 0.95;
	}

	html[data-theme="dark"] .profile-container-top {
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] #searchCampaignID,
	html[data-theme="dark"] input.vert-input-search {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] fieldset,
	html[data-theme="dark"] .legend-container,
	html[data-theme="dark"] .fieldSetData,
	html[data-theme="dark"] .pop-bg,
	html[data-theme="dark"] .card,
	html[data-theme="dark"] .card-body,
	html[data-theme="dark"] .panel,
	html[data-theme="dark"] .panel-body,
	html[data-theme="dark"] .panel-default,
	html[data-theme="dark"] .well,
	html[data-theme="dark"] .jumbotron,
	html[data-theme="dark"] .list-group-item,
	html[data-theme="dark"] .thumbnail {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] fieldset div {
		border-bottom-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .legend,
	html[data-theme="dark"] div.legend,
	html[data-theme="dark"] .content-header,
	html[data-theme="dark"] .content > .content-header,
	html[data-theme="dark"] .content-control,
	html[data-theme="dark"] .tab,
	html[data-theme="dark"] div.tabcontent {
		background-color: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] legend {
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] label,
	html[data-theme="dark"] form label {
		color: rgb(var(--body-text-color)) !important;
		background-color: transparent !important;
	}

	html[data-theme="dark"] input[type="text"],
	html[data-theme="dark"] input[type="password"],
	html[data-theme="dark"] input[type="email"],
	html[data-theme="dark"] input[type="number"],
	html[data-theme="dark"] input[type="search"],
	html[data-theme="dark"] input[type="tel"],
	html[data-theme="dark"] input[type="url"],
	html[data-theme="dark"] input[type="date"],
	html[data-theme="dark"] input[type="datetime-local"],
	html[data-theme="dark"] input[type="time"],
	html[data-theme="dark"] textarea,
	html[data-theme="dark"] select,
	html[data-theme="dark"] select:not([multiple]),
	html[data-theme="dark"] select:not(.tinyeditor-font):not(.tinyeditor-size):not(.tinyeditor-style),
	html[data-theme="dark"] select.noSelect2,
	html[data-theme="dark"] .form-control,
	html[data-theme="dark"] .read-only-input,
	html[data-theme="dark"] .hover-modal select,
	html[data-theme="dark"] .hover-modal select:not([multiple]),
	html[data-theme="dark"] #teamForm select {
		-webkit-appearance: none !important;
		-moz-appearance: none !important;
		appearance: none !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		border-bottom: 1px solid rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] input[type="text"]:focus,
	html[data-theme="dark"] input[type="password"]:focus,
	html[data-theme="dark"] input[type="email"]:focus,
	html[data-theme="dark"] textarea:focus,
	html[data-theme="dark"] select:focus,
	html[data-theme="dark"] .form-control:focus {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	/* Autocomplete wraps keep a white plate in light mode — neutralize in dark mode */
	html[data-theme="dark"] .wrap-input,
	html[data-theme="dark"] .message-wrap-input {
		background-color: transparent !important;
		background: transparent !important;
		box-shadow: none !important;
		border: none !important;
	}

	html[data-theme="dark"] .wrap-input > input.autocomplete,
	html[data-theme="dark"] .wrap-input > input.ui-autocomplete-input,
	html[data-theme="dark"] input.autocomplete,
	html[data-theme="dark"] input.ui-autocomplete-input {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		border-radius: 5px;
		box-shadow: none !important;
	}

	html[data-theme="dark"] .wrap-input > input.autocomplete:focus,
	html[data-theme="dark"] .wrap-input > input.ui-autocomplete-input:focus,
	html[data-theme="dark"] input.autocomplete:focus,
	html[data-theme="dark"] input.ui-autocomplete-input:focus {
		background-color: rgb(var(--hover-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .label-input,
	html[data-theme="dark"] .wrap-input .label-input {
		background: transparent !important;
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .label-input img.autoCompleteFind,
	html[data-theme="dark"] .label-input img.autoCompleteLock {
		filter: invert(1) brightness(0.9);
		opacity: 0.85;
	}

	html[data-theme="dark"] input::placeholder,
	html[data-theme="dark"] textarea::placeholder {
		color: rgb(var(--muted-text-color));
		opacity: 0.85;
	}

	/* Chevron only on single-selects — multi-selects must not inherit this background. */
	html[data-theme="dark"] select:not([multiple]),
	html[data-theme="dark"] select:not([multiple]):not(.tinyeditor-font):not(.tinyeditor-size):not(.tinyeditor-style),
	html[data-theme="dark"] select.noSelect2:not([multiple]) {
		background: rgb(var(--input-background-color)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d0d4dc' d='M1.4.3L6 4.9 10.6.3 12 1.7 6 7.7 0 1.7z'/%3E%3C/svg%3E") no-repeat right 10px center / 12px !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] select[multiple],
	html[data-theme="dark"] select[size],
	html[data-theme="dark"] select[multiple]:not(.tinyeditor-font):not(.tinyeditor-size):not(.tinyeditor-style),
	html[data-theme="dark"] select.js-example-basic-multiple {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		background-image: none !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		border-top: 1px solid rgb(var(--border-color)) !important;
		border-right: 1px solid rgb(var(--border-color)) !important;
		border-bottom: 1px solid rgb(var(--border-color)) !important;
		border-left: 1px solid rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] input[type="text"]:focus,
	html[data-theme="dark"] input[type="password"]:focus,
	html[data-theme="dark"] input[type="email"]:focus,
	html[data-theme="dark"] textarea:focus,
	html[data-theme="dark"] select:focus,
	html[data-theme="dark"] select:not(.tinyeditor-font):not(.tinyeditor-size):not(.tinyeditor-style):focus,
	html[data-theme="dark"] select.noSelect2:focus,
	html[data-theme="dark"] .form-control:focus {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] input.required,
	html[data-theme="dark"] select.required,
	html[data-theme="dark"] textarea.required,
	html[data-theme="dark"] input.mx-required,
	html[data-theme="dark"] select.mx-required,
	html[data-theme="dark"] textarea.mx-required,
	html[data-theme="dark"] span.selectRequired {
		background-color: rgba(249, 170, 0, 0.16) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] table,
	html[data-theme="dark"] .table,
	html[data-theme="dark"] .datagrid,
	html[data-theme="dark"] .theme-table,
	html[data-theme="dark"] .media-grid,
	html[data-theme="dark"] #responseTable {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .theme-table {
		--bs-table-bg: transparent;
		--bs-table-accent-bg: transparent;
		--bs-table-striped-color: rgb(var(--body-text-color));
		--bs-table-striped-bg: rgba(255, 255, 255, 0.04);
		--bs-table-active-color: rgb(var(--body-text-color));
		--bs-table-hover-color: rgb(var(--body-text-color));
		--bs-table-hover-bg: rgb(var(--hover-row-color));
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .media-grid th,
	html[data-theme="dark"] .datagrid thead tr th,
	html[data-theme="dark"] .theme-table th,
	html[data-theme="dark"] table thead th,
	html[data-theme="dark"] .table thead th {
		background: rgb(var(--table-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	/* Media tab grid: body cells inherit light #cfcfcf borders from pbd.css */
	html[data-theme="dark"] .media-grid,
	html[data-theme="dark"] .media-grid table,
	html[data-theme="dark"] .media-grid th,
	html[data-theme="dark"] .media-grid td,
	html[data-theme="dark"] .media-grid tr,
	html[data-theme="dark"] .media-grid .non-media-row td,
	html[data-theme="dark"] #responseTable,
	html[data-theme="dark"] #responseTable th,
	html[data-theme="dark"] #responseTable td {
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #responseTable tr:nth-child(even) > td,
	html[data-theme="dark"] .media-grid tr:nth-child(even) > td,
	html[data-theme="dark"] .datagrid:not(.contactList) tbody tr:nth-child(even),
	html[data-theme="dark"] table.table tbody tr:nth-child(even) > td {
		background-color: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] #responseTable tr:nth-child(odd) > td,
	html[data-theme="dark"] .datagrid:not(.contactList) tbody tr:nth-child(odd),
	html[data-theme="dark"] .media-grid tr:nth-child(odd) > td,
	html[data-theme="dark"] table.table tbody tr:nth-child(odd) > td {
		background-color: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .media-grid tr:hover > td,
	html[data-theme="dark"] #responseTable tr:hover > td,
	html[data-theme="dark"] table.responseTable tbody tr:hover > td,
	html[data-theme="dark"] table.freezePains tbody tr:hover > td,
	html[data-theme="dark"] .media-grid tr:hover > td input:not(.inputError):not(.inputWarning),
	html[data-theme="dark"] .media-grid tr:hover > td textarea:not(.inputError):not(.inputWarning),
	html[data-theme="dark"] .media-grid tr:hover > td div:not(.inputError):not(.inputWarning),
	html[data-theme="dark"] #responseTable tr:hover > td input:not(.inputError):not(.inputWarning),
	html[data-theme="dark"] #responseTable tr:hover > td textarea:not(.inputError):not(.inputWarning),
	html[data-theme="dark"] #responseTable tr:hover > td div:not(.inputError):not(.inputWarning) {
		background-color: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	/* Vendor Media tab: freezePains grid IDs are #responseTable{n}, and page CSS uses
	   !important light fills (#ecf0f1 header, #fff/#fcfce6 cells, disabled spreadsheetCell). */
	html[data-theme="dark"] table.responseTable,
	html[data-theme="dark"] table.freezePains,
	html[data-theme="dark"] table[id^="responseTable"] {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.freezePains th,
	html[data-theme="dark"] table.freezePains td,
	html[data-theme="dark"] table.responseTable th,
	html[data-theme="dark"] table.responseTable td,
	html[data-theme="dark"] table[id^="responseTable"] th,
	html[data-theme="dark"] table[id^="responseTable"] td {
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] #overFlowContainer.freezeTopLeft {
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #overFlowContainer.freezeTopLeft thead th,
	html[data-theme="dark"] table.freezePains thead th,
	html[data-theme="dark"] table.responseTable thead th,
	html[data-theme="dark"] table[id^="responseTable"] thead th {
		background-color: rgb(var(--table-header-color)) !important;
		background-clip: border-box;
		color: rgb(var(--secondary-color)) !important;
		box-shadow: 0 -3px 0 0 rgb(var(--table-header-color));
	}

	html[data-theme="dark"] table.freezePains thead th .table-header-name,
	html[data-theme="dark"] table.responseTable thead th .table-header-name {
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] table.freezePains tbody td,
	html[data-theme="dark"] table.responseTable tbody td,
	html[data-theme="dark"] #overFlowContainer.freezeTopLeft tbody td,
	html[data-theme="dark"] table[id^="responseTable"] tbody td {
		background-color: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] table.freezePains tbody tr:nth-child(even) > td,
	html[data-theme="dark"] table.responseTable tbody tr:nth-child(even) > td,
	html[data-theme="dark"] table[id^="responseTable"] tbody tr:nth-child(even) > td {
		background-color: rgb(var(--table-color-light)) !important;
	}

	html[data-theme="dark"] table.freezePains tbody tr:nth-child(odd) > td,
	html[data-theme="dark"] table.responseTable tbody tr:nth-child(odd) > td,
	html[data-theme="dark"] table[id^="responseTable"] tbody tr:nth-child(odd) > td {
		background-color: rgb(var(--table-color-dark)) !important;
	}

	html[data-theme="dark"] .responseTable tr:nth-child(odd):not(.on-hold) > td.vendor-required:not(.lineSave):not(.lineFail):not(.inputError):not(.modal-empty-cell):not([disabled]),
	html[data-theme="dark"] .responseTable tr:nth-child(even):not(.on-hold) > td.vendor-required:not(.lineSave):not(.lineFail):not(.inputError):not(.modal-empty-cell):not([disabled]) {
		background-color: rgba(249, 170, 0, 0.16) !important;
	}

	html[data-theme="dark"] table.freezePains .spreadsheetCell,
	html[data-theme="dark"] table.responseTable .spreadsheetCell,
	html[data-theme="dark"] table.freezePains input.spreadsheetCell,
	html[data-theme="dark"] table.freezePains textarea.spreadsheetCell,
	html[data-theme="dark"] table.freezePains input.spreadsheetCell:disabled,
	html[data-theme="dark"] table.freezePains textarea.spreadsheetCell:disabled,
	html[data-theme="dark"] table.freezePains input.spreadsheetCell.disabled,
	html[data-theme="dark"] table.freezePains textarea.spreadsheetCell.disabled,
	html[data-theme="dark"] table.freezePains div.spreadsheetCell.disabled,
	html[data-theme="dark"] table.freezePains span.spreadsheetCell,
	html[data-theme="dark"] table.responseTable input.spreadsheetCell,
	html[data-theme="dark"] table.responseTable textarea.spreadsheetCell,
	html[data-theme="dark"] table.responseTable input.spreadsheetCell:disabled,
	html[data-theme="dark"] table.responseTable textarea.spreadsheetCell:disabled,
	html[data-theme="dark"] table.responseTable input.spreadsheetCell.disabled,
	html[data-theme="dark"] table.responseTable textarea.spreadsheetCell.disabled,
	html[data-theme="dark"] table.responseTable span.spreadsheetCell {
		background: transparent !important;
		background-color: transparent !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: transparent !important;
	}

	html[data-theme="dark"] table.freezePains input.spreadsheetCell.disabled,
	html[data-theme="dark"] table.freezePains textarea.spreadsheetCell.disabled,
	html[data-theme="dark"] table.freezePains div.spreadsheetCell.disabled,
	html[data-theme="dark"] table.responseTable input.spreadsheetCell.disabled,
	html[data-theme="dark"] table.responseTable textarea.spreadsheetCell.disabled {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] table.freezePains input.spreadsheetCell.inputError,
	html[data-theme="dark"] table.freezePains textarea.spreadsheetCell.inputError,
	html[data-theme="dark"] table.responseTable input.spreadsheetCell.inputError,
	html[data-theme="dark"] table.responseTable textarea.spreadsheetCell.inputError,
	html[data-theme="dark"] table.responseTable td.inputError {
		background-color: rgba(220, 80, 80, 0.35) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] table.freezePains td.lineSave,
	html[data-theme="dark"] table.responseTable td.lineSave,
	html[data-theme="dark"] table.freezePains input.lineSave,
	html[data-theme="dark"] table.freezePains textarea.lineSave,
	html[data-theme="dark"] table.responseTable input.lineSave,
	html[data-theme="dark"] table.responseTable textarea.lineSave {
		background-color: rgba(60, 160, 80, 0.28) !important;
	}

	html[data-theme="dark"] table.freezePains .action-btn-container.gray-bg,
	html[data-theme="dark"] table.responseTable .action-btn-container.gray-bg {
		background-color: rgb(var(--table-header-color)) !important;
	}

	html[data-theme="dark"] table.freezePains tr:nth-child(odd) > .alternating-bg,
	html[data-theme="dark"] table.responseTable tr:nth-child(odd) > .alternating-bg {
		background-color: rgba(249, 170, 0, 0.12) !important;
	}

	html[data-theme="dark"] table.freezePains tr:nth-child(even) > .alternating-bg,
	html[data-theme="dark"] table.responseTable tr:nth-child(even) > .alternating-bg {
		background-color: rgba(249, 170, 0, 0.08) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar {
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .tablinks,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.tablinks {
		background-color: transparent !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .tablinks:hover,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.tablinks:hover {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .tablinks.active,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.tablinks.active {
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .rfp-submission-detail-tab,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.rfp-submission-detail-tab {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .rfp-submission-detail-tab.active,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.rfp-submission-detail-tab.active,
	html[data-theme="dark"] #content .rfp-submission-tab-bar a.rfp-submission-detail-tab.active:hover {
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] #content .rfp-submission-tab-bar .tablinks + .tablinks,
	html[data-theme="dark"] #content .rfp-submission-main-tabs > .tablinks + .rfp-submission-submitted-cluster,
	html[data-theme="dark"] #content .rfp-submission-submitted-cluster:hover .rfp-submission-detail-tray,
	html[data-theme="dark"] #content .rfp-submission-submitted-cluster:focus-within .rfp-submission-detail-tray,
	html[data-theme="dark"] #content .rfp-submission-tab-bar.rfp-submission-tab-bar--detail-expanded .rfp-submission-detail-tray {
		border-left-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .datagrid tbody,
	html[data-theme="dark"] .datagrid th,
	html[data-theme="dark"] .datagrid td,
	html[data-theme="dark"] .datagrid tr {
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .datagrid tbody tr.datagrid-empty-row td,
	html[data-theme="dark"] .datagrid tbody tr td.datagrid-empty-message,
	html[data-theme="dark"] .summary-contact-page .activity-log-panel .datagrid tbody tr.datagrid-empty-row td {
		background: rgb(var(--table-color-light)) !important;
		background-color: rgb(var(--table-color-light)) !important;
		color: rgb(var(--muted-text-color)) !important;
		border: none !important;
		text-align: center !important;
		padding: 15px 0 !important;
		font-size: 17px;
	}

	/* Read-only WYSIWYG summary iframes (RFP Specifics, Campaign Objectives, etc.) */
	html[data-theme="dark"] .iframe-container iframe.wsywig-display-iframe,
	html[data-theme="dark"] iframe.wsywig-display-iframe {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color-scheme: dark;
		min-height: 36px;
	}

	.iframe-container iframe.wsywig-display-iframe,
	iframe.wsywig-display-iframe {
		min-height: 36px;
	}

	html[data-theme="dark"] .datagrid:not(.contactList) tbody tr:not(.table-header-row):hover,
	html[data-theme="dark"] .theme-table tbody tr:hover {
		background: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] th.admin-col {
		background: rgb(70, 58, 20) !important;
	}
	html[data-theme="dark"] tr:nth-child(odd) td.admin-col {
		background: rgb(58, 50, 22) !important;
	}
	html[data-theme="dark"] tr:nth-child(even) td.admin-col {
		background: rgb(48, 42, 20) !important;
	}

	html[data-theme="dark"] tr.deletedRow:nth-child(odd) td {
		background: rgb(72, 32, 32) !important;
	}
	html[data-theme="dark"] tr.deletedRow:nth-child(even) td {
		background: rgb(88, 36, 36) !important;
	}
	html[data-theme="dark"] tr.addedRow:nth-child(odd) td {
		background: rgb(32, 58, 36) !important;
	}
	html[data-theme="dark"] tr.addedRow:nth-child(even) td {
		background: rgb(38, 68, 42) !important;
	}

	html[data-theme="dark"] .modal-content,
	html[data-theme="dark"] .modal-body,
	html[data-theme="dark"] .modal-header,
	html[data-theme="dark"] .modal-footer,
	html[data-theme="dark"] .timeout-dialog,
	html[data-theme="dark"] .hover-modal,
	html[data-theme="dark"] .help-modal,
	html[data-theme="dark"] .notification-modal,
	html[data-theme="dark"] .parent-vendor-select-modal,
	html[data-theme="dark"] .dropdown-menu,
	html[data-theme="dark"] .popover,
	html[data-theme="dark"] .popover-title,
	html[data-theme="dark"] .popover-content,
	html[data-theme="dark"] .tooltip-inner {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .help-modal .help-heading,
	html[data-theme="dark"] .help-modal .help-heading-bar .help-heading,
	html[data-theme="dark"] .help-modal .help-subheading,
	html[data-theme="dark"] .help-modal .contact-form-title {
		color: rgb(var(--body-text-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .help-modal .help-heading-bar {
		border-bottom-color: rgb(var(--border-color));
		background: rgb(var(--section-header-color));
	}

	html[data-theme="dark"] .help-modal #tutWrapper,
	html[data-theme="dark"] .help-modal #contactSupport,
	html[data-theme="dark"] .help-modal .support-message-container,
	html[data-theme="dark"] .help-modal .support-button-container {
		background-color: rgb(var(--system-background-color)) !important;
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .help-modal .tut-message-container {
		color: rgb(var(--muted-text-color));
	}

	html[data-theme="dark"] .help-modal .tut-link,
	html[data-theme="dark"] .help-modal a.tut-link,
	html[data-theme="dark"] .help-modal a.tut-link:hover,
	html[data-theme="dark"] .help-modal #newHireLink {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] .help-modal #helpSearch {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: none !important;
	}

	html[data-theme="dark"] .help-modal .tab-links,
	html[data-theme="dark"] .help-modal .tab-links:focus {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: none !important;
	}

	html[data-theme="dark"] .help-modal .tab-links:hover {
		background: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .help-modal .tab-links.active,
	html[data-theme="dark"] .help-modal .tab-links.active:hover {
		background: rgb(34, 100, 137) !important;
		color: #fff !important;
		border-color: transparent !important;
	}

	html[data-theme="dark"] .help-modal .tut-container,
	html[data-theme="dark"] .help-modal .tut-accordion-container {
		background: rgb(var(--background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .help-modal .tut-card,
	html[data-theme="dark"] .help-modal .tut-tip-card,
	html[data-theme="dark"] .help-modal .tut-card-header,
	html[data-theme="dark"] .help-modal .card-header,
	html[data-theme="dark"] .help-modal .tut-collapse {
		background: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .help-modal .tut-card-body,
	html[data-theme="dark"] .help-modal .tut-card-body.card-body,
	html[data-theme="dark"] .help-modal .video-card-body {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .help-modal .tut-card-link,
	html[data-theme="dark"] .help-modal .tut-card-link:hover,
	html[data-theme="dark"] .help-modal .tut-title-container,
	html[data-theme="dark"] .help-modal .tut-actions,
	html[data-theme="dark"] .help-modal .last-updated,
	html[data-theme="dark"] .help-modal .small-fnt,
	html[data-theme="dark"] .help-modal .tip-item {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .help-modal .tut-card-link:hover,
	html[data-theme="dark"] .help-modal .tut-link:hover {
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .help-modal .tut-divider,
	html[data-theme="dark"] .help-modal .tip-list li {
		border-color: rgb(var(--border-color)) !important;
		border-top-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .help-modal .form-input,
	html[data-theme="dark"] .help-modal .contact-input,
	html[data-theme="dark"] .help-modal textarea.form-input {
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] .help-modal .wrapped-input,
	html[data-theme="dark"] .help-modal .message-wrap-input {
		background-color: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .dropdown-item,
	html[data-theme="dark"] .dropdown-menu a {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .dropdown-item:hover,
	html[data-theme="dark"] .dropdown-menu a:hover {
		background: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .modal-backdrop,
	html[data-theme="dark"] .fade {
		background: #000;
	}

	html[data-theme="dark"] #toasterContainer {
		background: rgb(var(--background-color));
		color: rgb(var(--body-text-color));
		border: 1px solid rgb(var(--border-color));
	}

	html[data-theme="dark"] #systemNotificationContainer {
		background-color: rgb(var(--background-color));
	}

	html[data-theme="dark"] .individualNotification {
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .loader-error-container h2 {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .btn-default,
	html[data-theme="dark"] .btn-light,
	html[data-theme="dark"] .btn-secondary:not(.btn-warning):not(.btn-danger):not(.btn-primary),
	html[data-theme="dark"] .btn-action-utility,
	html[data-theme="dark"] button.btn-action-utility,
	html[data-theme="dark"] a.btn-action-utility,
	html[data-theme="dark"] .contract-io-filter-toggle {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .btn-action-utility:hover,
	html[data-theme="dark"] .contract-io-filter-toggle:hover,
	html[data-theme="dark"] .btn-default:hover {
		background-color: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .contract-io-filter-panel {
		background: rgb(var(--background-color));
		border-color: rgb(var(--border-color));
		box-shadow: var(--box-shadow);
	}

	html[data-theme="dark"] .pager_number,
	html[data-theme="dark"] .pager_next,
	html[data-theme="dark"] .pager_prev {
		background: rgb(var(--background-color));
		border-color: rgb(var(--border-color));
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .breadcrumb,
	html[data-theme="dark"] .pagination > li > a,
	html[data-theme="dark"] .pagination > li > span,
	html[data-theme="dark"] .page-link {
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .select2-container--default .select2-selection--single,
	html[data-theme="dark"] .select2-container--default .select2-selection--multiple,
	html[data-theme="dark"] .select2-dropdown,
	html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field,
	html[data-theme="dark"] .select2-results__option,
	html[data-theme="dark"] .hover-modal .select2-container--default .select2-selection--single,
	html[data-theme="dark"] .hover-modal .select2-container--default .select2-selection--multiple {
		background-color: rgb(var(--input-background-color)) !important;
		background-image: none !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
	html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"],
	html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
		background-color: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
	html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder,
	html[data-theme="dark"] .hover-modal .select2-selection__rendered {
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
		border-color: rgb(var(--muted-text-color)) transparent transparent transparent !important;
	}

	html[data-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
		border-color: transparent transparent rgb(var(--muted-text-color)) transparent !important;
	}

	html[data-theme="dark"] .ts-wrapper .ts-control,
	html[data-theme="dark"] .ts-dropdown,
	html[data-theme="dark"] .ts-dropdown .ts-dropdown-content {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .ts-wrapper .ts-control input,
	html[data-theme="dark"] .ts-wrapper .ts-control input::placeholder {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .ts-dropdown .option,
	html[data-theme="dark"] .ts-dropdown [data-selectable].option,
	html[data-theme="dark"] .ts-dropdown .optgroup-header,
	html[data-theme="dark"] .ts-dropdown .no-results,
	html[data-theme="dark"] .ts-dropdown .create {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] .ts-dropdown .optgroup-header {
		color: rgb(var(--muted-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .ts-dropdown .active,
	html[data-theme="dark"] .ts-dropdown .option.active,
	html[data-theme="dark"] .ts-dropdown .option.selected {
		background: rgb(var(--hover-row-color)) !important;
		background-color: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .ts-dropdown [data-selectable] .highlight {
		background: rgba(157, 131, 62, 0.35) !important;
		color: inherit !important;
	}

	html[data-theme="dark"] .ts-wrapper.multi .ts-control > div,
	html[data-theme="dark"] .ts-wrapper.multi .ts-control > div.active {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .ts-wrapper.plugin-checkbox_options .option input[type="checkbox"] {
		accent-color: rgb(var(--secondary-color));
	}

	html[data-theme="dark"] .ts-wrapper .clear-button,
	html[data-theme="dark"] .ts-wrapper .clear-button:hover {
		color: rgb(var(--muted-text-color)) !important;
	}

	/* Unit Selection Automation (summaryProposal_USA) */
	html[data-theme="dark"] .selection-method-container {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .selection-method-container .btn,
	html[data-theme="dark"] .btn-group-vertical .btn {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .selection-method-container .btn.active,
	html[data-theme="dark"] .btn-group-vertical .btn.active {
		background: #3c8dbc !important;
		background-color: #3c8dbc !important;
		color: #fff !important;
		border-color: #367fa9 !important;
	}

	html[data-theme="dark"] .unit-spend-toggle {
		background: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .unit-spend-toggle-option {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .unit-spend-toggle-option span {
		color: rgb(var(--body-text-color)) !important;
		background: transparent !important;
	}

	html[data-theme="dark"] .unit-spend-toggle-option input.radio:checked + span {
		color: #fff !important;
		background: #3c8dbc !important;
	}

	html[data-theme="dark"] .drag-box {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .drag-box:hover {
		background: rgb(var(--hover-color)) !important;
		border-color: #3c8dbc !important;
	}

	html[data-theme="dark"] .drag-box h5,
	html[data-theme="dark"] .allocation-summary-text {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .allocation-summary.is-complete .allocation-summary-text {
		color: #6fcf97 !important;
	}

	html[data-theme="dark"] .allocation-summary.is-over .allocation-summary-text {
		color: #ff8a8a !important;
	}

	html[data-theme="dark"] .allocation-progress {
		background: rgb(var(--input-background-color)) !important;
	}

	html[data-theme="dark"] .drag-box .sortable li {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .drag-box .percentage-input {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .drag-box .percentage-input:disabled {
		background-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .plan-details-form {
		background: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .plan-details-row > label,
	html[data-theme="dark"] .plan-details-radio-option,
	html[data-theme="dark"] .plan-details-match-row .plan-details-match-value {
		color: rgb(var(--body-text-color)) !important;
		background: transparent !important;
	}

	html[data-theme="dark"] .plan-details-row input[type="text"],
	html[data-theme="dark"] .plan-details-row input[type="number"],
	html[data-theme="dark"] .plan-details-row textarea {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .ui-widget-content,
	html[data-theme="dark"] .ui-widget-header,
	html[data-theme="dark"] .ui-menu,
	html[data-theme="dark"] .ui-autocomplete,
	html[data-theme="dark"] .ui-datepicker,
	html[data-theme="dark"] .ui-dialog,
	html[data-theme="dark"] .ui-state-default,
	html[data-theme="dark"] .ui-widget-header .ui-state-default {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	/* Spreadsheet field picker (createSpreadsheet) — beat inline #eaeaea / #CCC */
	html[data-theme="dark"] #sortable1,
	html[data-theme="dark"] #sortable2,
	html[data-theme="dark"] #sortable3,
	html[data-theme="dark"] ul.droptrue {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #sortable1 li.ui-state-default,
	html[data-theme="dark"] #sortable2 li.ui-state-default,
	html[data-theme="dark"] #sortable3 li.ui-state-default {
		background: rgb(var(--hover-color)) !important;
		background-color: rgb(var(--hover-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #sortable1 li.ui-state-default:hover,
	html[data-theme="dark"] #sortable2 li.ui-state-default:hover,
	html[data-theme="dark"] #sortable3 li.ui-state-default:hover {
		background: rgb(var(--hover-row-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] #sortable1::-webkit-scrollbar-thumb,
	html[data-theme="dark"] #sortable2::-webkit-scrollbar-thumb {
		border-color: rgb(var(--input-background-color)) !important;
		background-color: rgba(255, 255, 255, 0.22) !important;
	}

	html[data-theme="dark"] .search-container,
	html[data-theme="dark"] .add-all-required-container {
		border-top-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .ui-state-hover,
	html[data-theme="dark"] .ui-widget-content .ui-state-hover,
	html[data-theme="dark"] .ui-state-focus {
		background: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .xdsoft_datetimepicker,
	html[data-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td,
	html[data-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar th,
	html[data-theme="dark"] .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] hr {
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] ::-webkit-scrollbar-track {
		background: rgb(var(--system-background-color));
	}

	html[data-theme="dark"] ::-webkit-scrollbar-thumb {
		background: rgb(var(--border-color));
	}

	html[data-theme="dark"] ::selection {
		background-color: rgb(var(--secondary-color));
		color: rgb(var(--background-color));
	}

	html[data-theme="dark"] .admin-only {
		color: rgb(230, 196, 110) !important;
	}

	html[data-theme="dark"] .media-grid .non-media-row td:not(.inputError),
	html[data-theme="dark"] .media-grid .non-media-row input:not(.inputError),
	html[data-theme="dark"] .media-grid .non-media-row textarea:not(.inputError),
	html[data-theme="dark"] .non-media-row {
		background: rgb(58, 54, 32) !important;
	}

	html[data-theme="dark"] .media-grid .unlockedApexRow td:not(.inputError),
	html[data-theme="dark"] .media-grid .unlockedApexRow input:not(.inputError),
	html[data-theme="dark"] .media-grid .unlockedApexRow textarea:not(.inputError),
	html[data-theme="dark"] .media-grid .unlockedApexRow {
		background: rgb(72, 48, 28) !important;
	}

	html[data-theme="dark"] .campaign-steps-wizard {
		background-color: rgb(var(--section-header-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .vendor_dashboard {
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .neutral-login-page,
	html[data-theme="dark"] .neutral-login-form-panel,
	html[data-theme="dark"] .neutral-login-card,
	html[data-theme="dark"] .account-password-page,
	html[data-theme="dark"] .account-password-card {
		background-color: rgb(var(--system-background-color));
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .neutral-login-card {
		background: rgb(var(--background-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .jqte,
	html[data-theme="dark"] .jqte_editor,
	html[data-theme="dark"] .jqte_toolbar {
		background: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .bootstrap-tagsinput {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .nav-tabs > li > a {
		background: rgb(var(--section-header-color));
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .nav-tabs > li.active > a,
	html[data-theme="dark"] .nav-tabs > li.active > a:hover,
	html[data-theme="dark"] .nav-tabs > li.active > a:focus {
		background: rgb(var(--background-color));
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .fixed-save-container,
	html[data-theme="dark"] .main-footer {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .help-btn,
	html[data-theme="dark"] .submit-request-btn,
	html[data-theme="dark"] .vendor-help-btn {
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] input[type="checkbox"],
	html[data-theme="dark"] input[type="radio"] {
		accent-color: rgb(var(--secondary-color));
	}

	html[data-theme="dark"] .pill-toggle-container > label:after {
		background: rgb(var(--background-color));
	}

	html[data-theme="dark"] code,
	html[data-theme="dark"] pre,
	html[data-theme="dark"] kbd {
		background: rgb(var(--input-background-color));
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
		background-color: rgb(var(--table-color-dark));
	}

	html[data-theme="dark"] .close,
	html[data-theme="dark"] button.close {
		color: rgb(var(--body-text-color));
		opacity: 0.8;
		text-shadow: none;
	}

	/* Top menu: full-bleed bar. Avoid 4-sided border with width:100% (clips right edge).
	   Pin left/right when sticky/fixed so the bottom edge spans the viewport. */
	html[data-theme="dark"] .pmx-menu-top,
	html[data-theme="dark"] .pmx-menu-top.pmx-menu-top-sticky {
		border: none !important;
		box-sizing: border-box !important;
		width: 100% !important;
		max-width: none !important;
		left: 0 !important;
		right: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		/* Inset line paints across the full bar even if outer border is clipped */
		box-shadow: inset 0 -1px 0 0 rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .current-top,
	html[data-theme="dark"] .current-top:first-of-type,
	html[data-theme="dark"] .profile-container-top {
		border-left: none !important;
		border-right: none !important;
	}

	/* Tenant logos are often dark-on-transparent; give them a light plate in dark mode */
	html[data-theme="dark"] .pmx-logo-container-top > a,
	html[data-theme="dark"] .pmx-logo-container > a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: auto !important;
		max-width: 100%;
		margin: 0 auto;
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 249, 252, 0.94)) !important;
		border: 1px solid rgba(255, 255, 255, 0.35);
		border-radius: 8px;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
		padding: 5px 12px;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-logo-item {
		display: flex;
		justify-content: center;
		align-items: center;
		text-align: center;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-logo-item > a.vendor-menu-link {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: auto !important;
		max-width: calc(100% - 16px);
		margin: 0 auto;
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 249, 252, 0.94)) !important;
		border: 1px solid rgba(255, 255, 255, 0.35);
		border-radius: 8px;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
		padding: 5px 12px;
	}

	html[data-theme="dark"] .vendor-side-bar .vendor-logo-item > a.vendor-menu-link:hover {
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 249, 252, 0.94)) !important;
	}

	html[data-theme="dark"] .pmx-logo-container-top,
	html[data-theme="dark"] .pmx-logo-container {
		display: flex;
		justify-content: center;
	}
	html[data-theme="dark"] .pmx-logo-container-top .brand-logo,
	html[data-theme="dark"] .pmx-logo-container .brand-logo {
		display: block;
		filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
	}

	html[data-theme="dark"] .vendor-side-bar .brand-logo {
		display: block;
		width: auto;
		max-width: 110px;
		margin: 0 auto;
		filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
	}

	html[data-theme="dark"] .pmx-logo-container-top .brand-logo {
		max-height: 44px;
	}

	/* Campaign summary tiles: light text on tinted card backgrounds */
	html[data-theme="dark"] #proposalDetails {
		background: transparent !important;
	}

	html[data-theme="dark"] .header-card .header-item-title,
	html[data-theme="dark"] .header-card .header-progress-meta,
	html[data-theme="dark"] .header-card .flight-progress-meta,
	html[data-theme="dark"] .header-card .flight-upcoming,
	html[data-theme="dark"] #proposalDetails .header-card .header-item-title,
	html[data-theme="dark"] #proposalDetails .header-card .header-progress-meta,
	html[data-theme="dark"] #proposalDetails .header-card .flight-progress-meta,
	html[data-theme="dark"] #proposalDetails .header-card .flight-upcoming {
		color: rgba(255, 255, 255, 0.85) !important;
	}

	html[data-theme="dark"] .header-card .header-item-value,
	html[data-theme="dark"] .header-card .header-item-value div,
	html[data-theme="dark"] .header-card .header-content-container,
	html[data-theme="dark"] .header-card .header-content-container a:not(.btn),
	html[data-theme="dark"] #proposalDetails .header-card .header-item-value,
	html[data-theme="dark"] #proposalDetails .header-card .header-item-value div,
	html[data-theme="dark"] #proposalDetails .header-card .header-content-container,
	html[data-theme="dark"] #proposalDetails .header-card .header-content-container a:not(.btn) {
		color: #fff !important;
	}

	html[data-theme="dark"] #proposalDetails .header-card .header-item-icon {
		color: #fff !important;
	}

	html[data-theme="dark"] .header-card .campaign-link-btn,
	html[data-theme="dark"] .header-card .campaign-link-btn i {
		color: rgba(255, 255, 255, 0.92) !important;
	}

	html[data-theme="dark"] .tile-alt-campaign .floating-card-title,
	html[data-theme="dark"] .tile-alt-client .floating-card-title,
	html[data-theme="dark"] .tile-alt-flights .floating-card-title {
		color: rgba(255, 255, 255, 0.28) !important;
	}

	html[data-theme="dark"] .brown-card {
		background: rgba(157, 131, 62, 0.62) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .teal-card {
		background: rgba(0, 176, 163, 0.55) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .pink-card {
		background: rgba(217, 61, 122, 0.55) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .tile-alt-campaign {
		background: rgba(76, 175, 80, 0.62) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .tile-alt-client {
		background: rgba(0, 188, 212, 0.58) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .tile-alt-flights {
		background: rgba(255, 193, 7, 0.58) !important;
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	html[data-theme="dark"] .header-card {
		border: 1px solid rgba(255, 255, 255, 0.18) !important;
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
	}

	/* Proposal Contacts tab — contactList tables are excluded from generic datagrid dark rules */
	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-vendor-logo-cell,
	html[data-theme="dark"] #contactsTable .proposal-contacts-vendor-logo-cell {
		/* Keep table-cell layout; flex on td breaks column fill and exposes .datagrid { background:#fff } */
		display: table-cell !important;
		text-align: center;
		vertical-align: middle;
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-vendor-logo-cell img.vendorLogoThumb,
	html[data-theme="dark"] #contactsTable .proposal-contacts-vendor-logo-cell img.vendorLogoThumb {
		display: inline-block;
		vertical-align: middle;
		margin: 0 auto;
		max-width: calc(100% - 16px);
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 249, 252, 0.94));
		border: 1px solid rgba(255, 255, 255, 0.35);
		border-radius: 6px;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
		padding: 4px 8px;
		box-sizing: border-box;
		object-fit: contain;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid {
		background: rgb(var(--background-color));
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid tbody {
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid thead tr th,
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid.proposal-contacts-subgrid-inner thead tr th {
		background: rgb(var(--table-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid thead tr th:hover {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > thead > tr:nth-child(2),
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > thead > tr:nth-child(2) > td {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.company-row:nth-child(4n+1) > td,
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.company-row:nth-child(4n+1) > td.company-contact-type,
	html[data-theme="dark"] #contactsTable > tr.company-row:nth-child(4n+1) > td {
		background-color: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.company-row:nth-child(4n+3) > td,
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.company-row:nth-child(4n+3) > td.company-contact-type,
	html[data-theme="dark"] #contactsTable > tr.company-row:nth-child(4n+3) > td {
		background-color: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.company-row:hover > td,
	html[data-theme="dark"] #contactsTable > tr.company-row:hover > td {
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid > tbody > tr.proposal-contacts-subgrid-shell > td {
		background: transparent !important;
	}

	html[data-theme="dark"] .proposal-contacts-vendor-well {
		background: rgb(var(--table-color-dark)) !important;
		outline-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] .proposal-contacts-vendor-well tbody tr.contactRow:nth-child(odd) > td {
		background-color: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-vendor-well tbody tr.contactRow:nth-child(even) > td {
		background-color: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-vendor-well tbody tr.contactRow:hover > td {
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid th.billingExempt,
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid thead th.billingExempt {
		background: rgb(150, 40, 40) !important;
		color: #fff !important;
	}

	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid td.billingExempt,
	html[data-theme="dark"] table.contactList.datagrid.proposal-contacts-grid.proposal-contacts-subgrid-inner td.billingExempt,
	html[data-theme="dark"] #contactsTable > tr.company-row:nth-child(4n+1) > td.billingExempt {
		background: rgb(108, 36, 36) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #contactsTable > tr.company-row:nth-child(4n+3) > td.billingExempt {
		background: rgb(92, 30, 30) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #contactsTable > tr.company-row:hover > td.billingExempt {
		background: rgb(128, 44, 44) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-vendor-name a.vendorHover,
	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-vendor-name a.vendorHover[style] {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-vendor-name a.vendorHover:hover {
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-company-checkall-label {
		color: rgb(var(--muted-text-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-opted-out-msg {
		color: rgb(var(--muted-text-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-status-info {
		color: rgb(var(--secondary-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-contact-detail-icon {
		color: rgb(var(--secondary-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid td.proposal-contacts-subgrid-contact-detail-cell.proposal-contacts-contact-info a {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .proposal-contacts-parent-vendor-label {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid tbody tr.rejectedTerms > td,
	html[data-theme="dark"] .proposal-contacts-grid tbody tr.rejectedTerms td b a {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid font[color="red"],
	html[data-theme="dark"] .proposal-contacts-grid font[color="red"] b {
		color: #ff8a80 !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .check-all-text {
		color: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid .grey-pill {
		background: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .proposal-contacts-grid .pill-toggle .slider-ball {
		background: rgb(var(--body-text-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid td.proposal-contacts-vendor-links-cell a.proposal-contacts-vendor-portal-icon {
		color: rgb(var(--body-text-color));
		border-color: rgb(var(--border-color));
		background: rgb(var(--hover-color));
	}

	html[data-theme="dark"] .proposal-contacts-grid td.proposal-contacts-vendor-links-cell a.proposal-contacts-vendor-portal-icon:hover {
		background: rgb(var(--section-header-color));
		border-color: rgb(var(--secondary-color));
	}

	/* CKEditor chrome (edit proposal objectives, etc.) */
	html[data-theme="dark"] span.cke_skin_kama,
	html[data-theme="dark"] .cke_skin_kama {
		border: 1px solid rgb(var(--border-color)) !important;
		background: rgb(var(--background-color)) !important;
		padding: 4px !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama *,
	html[data-theme="dark"] .cke_skin_kama a,
	html[data-theme="dark"] .cke_skin_kama a:link,
	html[data-theme="dark"] .cke_skin_kama a:visited,
	html[data-theme="dark"] .cke_skin_kama a:hover,
	html[data-theme="dark"] .cke_skin_kama a:active {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_wrapper,
	html[data-theme="dark"] .cke_skin_kama .cke_top,
	html[data-theme="dark"] .cke_skin_kama .cke_toolbox,
	html[data-theme="dark"] .cke_skin_kama .cke_toolbar {
		background: rgb(var(--section-header-color)) !important;
		background-image: none !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_wrapper {
		border: 1px solid rgb(var(--border-color)) !important;
		border-radius: 6px;
		padding: 4px !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_contents,
	html[data-theme="dark"] .cke_skin_kama .cke_contents iframe {
		border: 1px solid rgb(var(--border-color)) !important;
		background: rgb(var(--input-background-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_bottom,
	html[data-theme="dark"] .cke_skin_kama .cke_path,
	html[data-theme="dark"] .cke_skin_kama .cke_path a,
	html[data-theme="dark"] .cke_skin_kama .cke_path .cke_label {
		background: rgb(var(--section-header-color)) !important;
		background-image: none !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_toolgroup,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_label,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo a,
	html[data-theme="dark"] .cke_skin_kama .cke_button a,
	html[data-theme="dark"] .cke_skin_kama .cke_button a.cke_off,
	html[data-theme="dark"] .cke_skin_kama a.cke_off {
		background: rgb(var(--hover-color)) !important;
		background-image: none !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		opacity: 1 !important;
		filter: none !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_button a.cke_on,
	html[data-theme="dark"] .cke_skin_kama .cke_button a:hover,
	html[data-theme="dark"] .cke_skin_kama .cke_button a:focus,
	html[data-theme="dark"] .cke_skin_kama .cke_button a:active,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_off a:hover,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_off a:focus,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_off a:active,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_on a {
		background: rgb(var(--hover-row-color)) !important;
		background-image: none !important;
		border-color: rgb(var(--secondary-color)) !important;
	}

	/* Kama icons are dark sprites — invert for dark chrome */
	html[data-theme="dark"] .cke_skin_kama .cke_button .cke_icon,
	html[data-theme="dark"] .cke_skin_kama .cke_button .cke_buttonarrow,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_openbutton .cke_icon,
	html[data-theme="dark"] .cke_skin_kama .cke_menuitem .cke_icon {
		filter: invert(1) brightness(1.35) !important;
		opacity: 1 !important;
	}

	/* Keep color/remove-format glyphs readable (already tinted) */
	html[data-theme="dark"] .cke_skin_kama .cke_button_textcolor .cke_icon,
	html[data-theme="dark"] .cke_skin_kama .cke_button_bgcolor .cke_icon,
	html[data-theme="dark"] .cke_skin_kama .cke_button_removeFormat .cke_icon {
		filter: none !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_openbutton,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_text,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_off .cke_text,
	html[data-theme="dark"] .cke_skin_kama .cke_rcombo .cke_on .cke_text {
		background: rgb(var(--input-background-color)) !important;
		background-image: none !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		opacity: 1 !important;
		filter: none !important;
	}

	/* Floating Format/Size panels + menus (often outside .cke_wrapper) */
	html[data-theme="dark"] .cke_skin_kama .cke_panel,
	html[data-theme="dark"] .cke_panel,
	html[data-theme="dark"] .cke_combopanel {
		background-color: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cke_panel_frame,
	html[data-theme="dark"] body.cke_panel_frame,
	html[data-theme="dark"] html.cke_skin_kama_container,
	html[data-theme="dark"] .cke_panel_listItem a {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: transparent !important;
	}

	html[data-theme="dark"] .cke_panel_listItem a:hover,
	html[data-theme="dark"] .cke_panel_listItem a:focus,
	html[data-theme="dark"] .cke_panel_listItem a:active,
	html[data-theme="dark"] .cke_panel_listItem.cke_selected a {
		background-color: rgb(var(--hover-row-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_menuitem .cke_label,
	html[data-theme="dark"] .cke_skin_kama .cke_menuitem .cke_icon_wrapper {
		background-color: rgb(var(--hover-color)) !important;
		border-color: rgb(var(--hover-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cke_skin_kama .cke_menuitem a:hover .cke_label,
	html[data-theme="dark"] .cke_skin_kama .cke_menuitem a:focus .cke_label,
	html[data-theme="dark"] .cke_skin_kama .cke_menuitem a:active .cke_label {
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] .jqte {
		border: 1px solid rgb(var(--border-color)) !important;
		box-shadow: none !important;
	}

	/* Geopath selected demos list */
	html[data-theme="dark"] .geopathSelectList {
		background: rgb(var(--input-background-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .geopathSelectList li,
	html[data-theme="dark"] .geopathSelectList li:nth-child(odd),
	html[data-theme="dark"] .geopathSelectList li:nth-child(even) {
		background: rgb(var(--table-color-light)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .geopathSelectList li:nth-child(even) {
		background: rgb(var(--table-color-dark)) !important;
	}

	html[data-theme="dark"] .geopathSelectList li:hover {
		background: rgb(var(--hover-row-color)) !important;
	}

	/* Native multi-select lists (Markets, Format(s), Rate DB, etc.)
	   Beat style.php white 2px border + themeStyles select border-bottom accent. */
	html[data-theme="dark"] select[multiple],
	html[data-theme="dark"] select[size],
	html[data-theme="dark"] select[multiple]:not(.tinyeditor-font):not(.tinyeditor-size):not(.tinyeditor-style),
	html[data-theme="dark"] #marketAutoList,
	html[data-theme="dark"] #selectInMarket,
	html[data-theme="dark"] select.drop-down-view,
	html[data-theme="dark"] select.rate-db-select,
	html[data-theme="dark"] select.js-example-basic-multiple {
		-webkit-appearance: none !important;
		-moz-appearance: none !important;
		appearance: none !important;
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		background-image: none !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		border-top-color: rgb(var(--border-color)) !important;
		border-right-color: rgb(var(--border-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
		border-left-color: rgb(var(--border-color)) !important;
		border-top-width: 1px !important;
		border-right-width: 1px !important;
		border-bottom-width: 1px !important;
		border-left-width: 1px !important;
		border-style: solid !important;
		border-radius: 3px !important;
		outline: none !important;
		box-shadow: none !important;
		color-scheme: dark;
	}

	html[data-theme="dark"] select[multiple]:focus,
	html[data-theme="dark"] select[size]:focus,
	html[data-theme="dark"] select.rate-db-select:focus,
	html[data-theme="dark"] select.rate-db-select-active,
	html[data-theme="dark"] select.js-example-basic-multiple:focus {
		border: 1px solid rgb(var(--secondary-color)) !important;
		outline: none !important;
		box-shadow: none !important;
	}

	html[data-theme="dark"] select[multiple] option,
	html[data-theme="dark"] select[size] option,
	html[data-theme="dark"] #marketAutoList option,
	html[data-theme="dark"] #selectInMarket option,
	html[data-theme="dark"] select.rate-db-select option,
	html[data-theme="dark"] select.js-example-basic-multiple option {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] select[multiple] option:checked,
	html[data-theme="dark"] select[size] option:checked,
	html[data-theme="dark"] #marketAutoList option:checked,
	html[data-theme="dark"] #selectInMarket option:checked,
	html[data-theme="dark"] select.rate-db-select option:checked,
	html[data-theme="dark"] select.js-example-basic-multiple option:checked {
		background: linear-gradient(rgb(var(--hover-row-color)), rgb(var(--hover-row-color))) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .selectDiv-display {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] input.setMarket,
	html[data-theme="dark"] #autoMarket {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
	}

	/* jquery.multi-select plugin (used on other pages) */
	html[data-theme="dark"] .ms-container .ms-selectable,
	html[data-theme="dark"] .ms-container .ms-selection {
		background: rgb(var(--input-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .ms-container .ms-list {
		background: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: none !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .ms-container .ms-selectable li.ms-elem-selectable,
	html[data-theme="dark"] .ms-container .ms-selection li.ms-elem-selection {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .ms-container .ms-selectable li.ms-hover,
	html[data-theme="dark"] .ms-container .ms-selection li.ms-hover {
		background: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-native-multiselect {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	/* Mapping left tools panel (mapping.css loads after darkMode when embedded) */
	html[data-theme="dark"] #mapTools,
	html[data-theme="dark"] #mapToolsWrapper,
	html[data-theme="dark"] body.page-mapping-map #mapTools {
		background: rgb(var(--system-background-color)) !important;
		background-color: rgb(var(--system-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-right-color: rgb(var(--border-color)) !important;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.45) !important;
	}

	html[data-theme="dark"] #mapTools #mapTitle,
	html[data-theme="dark"] #mapTools #mapNameContainer,
	html[data-theme="dark"] #mapTools .share-map-details-label,
	html[data-theme="dark"] #mapTools .share-map-details-count-label,
	html[data-theme="dark"] #mapTools .layer-name,
	html[data-theme="dark"] #mapTools .layer-name-label,
	html[data-theme="dark"] #mapTools .setting-label,
	html[data-theme="dark"] #mapTools .setting-readonly-value,
	html[data-theme="dark"] #mapTools .which-media-label,
	html[data-theme="dark"] #mapTools .mapOptions,
	html[data-theme="dark"] #mapTools .hl,
	html[data-theme="dark"] #mapTools .layer,
	html[data-theme="dark"] #mapTools label,
	html[data-theme="dark"] #mapTools span {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #mapTools .setting-readonly-value {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] #mapTools .layer,
	html[data-theme="dark"] #mapTools .hl,
	html[data-theme="dark"] #mapTools .mapOptions,
	html[data-theme="dark"] #mapTools hr {
		border-color: rgb(var(--border-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
		border-top-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #mapTools .layer:hover,
	html[data-theme="dark"] #mapTools .hl:hover {
		background: rgb(var(--hover-color)) !important;
	}

	html[data-theme="dark"] #mapTools #mapSettings,
	html[data-theme="dark"] #mapTools #searchContainer,
	html[data-theme="dark"] #mapTools .map-settings,
	html[data-theme="dark"] #mapTools .setting,
	html[data-theme="dark"] #mapTools .filterOptions,
	html[data-theme="dark"] #mapTools #layerList,
	html[data-theme="dark"] #mapTools ul.sortable {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #mapTools input[type="text"],
	html[data-theme="dark"] #mapTools input[type="search"],
	html[data-theme="dark"] #mapTools input.map-search-input,
	html[data-theme="dark"] #mapTools select,
	html[data-theme="dark"] #mapTools textarea {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] #mapTools .tab {
		background-color: rgb(var(--section-header-color)) !important;
	}

	html[data-theme="dark"] #mapTools .activeLayer,
	html[data-theme="dark"] #mapTools .activeLayer:hover {
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] #mapSlideIn,
	html[data-theme="dark"] #slideInWrapper,
	html[data-theme="dark"] .slide-fader,
	html[data-theme="dark"] .map-pin-details,
	html[data-theme="dark"] .layer-name-container,
	html[data-theme="dark"] #addToLayerContainer {
		background: rgb(var(--background-color)) !important;
		background-color: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #mapSlideIn::-webkit-scrollbar-track,
	html[data-theme="dark"] #mapTools::-webkit-scrollbar-track {
		background: rgb(var(--section-header-color)) !important;
	}

	html[data-theme="dark"] #mapSlideIn::-webkit-scrollbar-thumb,
	html[data-theme="dark"] #mapTools::-webkit-scrollbar-thumb {
		background-color: rgba(255, 255, 255, 0.22) !important;
		border-color: rgb(var(--section-header-color)) !important;
	}

	/* Holds tab (styles load with AJAX content after darkMode.css) */
	html[data-theme="dark"] .holds-categories-container {
		background: rgb(var(--background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-category-tabs {
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn {
		background: transparent !important;
		border-right-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.is-active {
		background: #13A89E !important;
		color: #fff !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items {
		background: rgb(70, 55, 20) !important;
		color: rgb(255, 210, 120) !important;
		border-bottom-color: #f0ad4e !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items.is-active {
		background: #d98200 !important;
		color: #fff !important;
		border-bottom-color: #d98200 !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items-green {
		background: rgb(25, 55, 35) !important;
		color: rgb(140, 220, 160) !important;
		border-bottom-color: #28a745 !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items-green.is-active {
		background: #28a745 !important;
		color: #fff !important;
		border-bottom-color: #28a745 !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items-rejected {
		background: rgb(70, 30, 40) !important;
		color: rgb(255, 160, 190) !important;
		border-bottom-color: #e91e63 !important;
	}

	html[data-theme="dark"] .holds-category-tab-btn.has-items-rejected.is-active {
		background: #c2185b !important;
		color: #fff !important;
		border-bottom-color: #c2185b !important;
	}

	html[data-theme="dark"] .holds-category-panel,
	html[data-theme="dark"] .holds-category-panel .datagrid,
	html[data-theme="dark"] .holds-category-panel .datagrid th,
	html[data-theme="dark"] .holds-category-panel .datagrid td {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid thead th,
	html[data-theme="dark"] .holds-category-panel .datagrid thead th.holds-sortable-th {
		background: rgb(var(--table-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid tbody tr td {
		border-top-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid tbody tr.holds-data-row.is-odd td {
		background: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid tbody tr.holds-data-row.is-even td {
		background: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid tbody tr.holds-data-row:hover td {
		background: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-placeholder {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .holds-package-pill {
		background: rgb(20, 60, 55) !important;
		color: rgb(120, 220, 210) !important;
	}

	html[data-theme="dark"] .holds-package-details-row td {
		background: rgb(var(--background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-package-details-box.well,
	html[data-theme="dark"] .holds-package-details-box.well.well-sm {
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		box-shadow: none !important;
	}

	html[data-theme="dark"] .holds-package-details-box .holds-package-locations-grid thead th,
	html[data-theme="dark"] .holds-package-details-box .holds-package-locations-grid tbody tr td {
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .holds-package-details-box .holds-package-locations-grid tbody tr.holds-package-location-row.is-odd td {
		background: rgb(var(--table-color-dark)) !important;
	}

	html[data-theme="dark"] .holds-package-details-box .holds-package-locations-grid tbody tr.holds-package-location-row.is-even td {
		background: rgb(var(--table-color-light)) !important;
	}

	html[data-theme="dark"] .holds-category-panel .datagrid tbody tr td a:not(.btn) {
		color: rgb(var(--link-color)) !important;
	}

	/* Contracts / Insertion Orders vendor cards (AJAX styles after darkMode.css) */
	html[data-theme="dark"] .contract-io-legend,
	html[data-theme="dark"] .legend.contract-io-legend {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .contract-io-legend-title {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-io-empty-state,
	html[data-theme="dark"] .contract-io-empty-state p {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat {
		background: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-label,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-subtext,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-subtext {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-value {
		color: rgb(var(--muted-text-color)) !important;
	}

	/* Match light-mode semantic tints (open / pending / contracted / total) */
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-open.has-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-open.has-value {
		background: rgba(var(--warning-color), 0.22) !important;
		border-color: rgba(var(--warning-color), 0.65) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-open.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-open.has-value .vendor-contract-stat-label {
		color: rgb(var(--warning-color)) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-open.has-value .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-open.has-value .vendor-contract-stat-value {
		color: rgb(255, 210, 120) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-pending.has-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-pending.has-value {
		background: rgba(var(--main-button-color), 0.28) !important;
		border-color: rgba(var(--main-button-color), 0.7) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-pending.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-pending.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-pending.has-value .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-pending.has-value .vendor-contract-stat-value {
		color: rgb(140, 200, 255) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-contracted.has-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-contracted.has-value {
		background: rgba(var(--success-color), 0.22) !important;
		border-color: rgba(var(--success-color), 0.65) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-contracted.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-contracted.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-contracted.has-value .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-contracted.has-value .vendor-contract-stat-value {
		color: rgb(120, 220, 150) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-total.has-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-total.has-value {
		background: rgba(var(--secondary-color), 0.16) !important;
		border-color: rgba(var(--secondary-color), 0.55) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-total.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-total.has-value .vendor-contract-stat-label,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat-total.has-value .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat-total.has-value .vendor-contract-stat-value {
		color: rgb(var(--secondary-color)) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat.has-media-tab-mismatch,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat.has-media-tab-mismatch {
		background: rgba(var(--error-color), 0.22) !important;
		border-color: rgba(var(--error-color), 0.65) !important;
	}

	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-label,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-label,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-value,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-value,
	html[data-theme="dark"] .contract-io-header-stats .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-subtext,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-stat.has-media-tab-mismatch .vendor-contract-stat-subtext {
		color: rgb(255, 150, 150) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-card-shell {
		background: rgb(var(--background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.45) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-card-header {
		background: rgb(var(--section-header-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-summary-vendor-name {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-summary-vendor-name:hover {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details-panel {
		background: rgb(var(--background-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details thead tr th,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody tr td {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details thead tr th {
		background: rgb(var(--table-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details thead .vcd-col-amount {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details thead tr th .fa-signature {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody tr td {
		border-top-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tr.vendor-contract-batch-row:not(.vcd-row-canceled):not(.vcd-row-voided) > td {
		background: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .new-contract-row > td {
		background: rgb(50, 48, 30) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tr.vendor-contract-amount-mismatch > td {
		background-color: rgb(90, 40, 40) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tr.vcd-row-canceled > td,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tr.vcd-row-voided > td {
		background-color: rgb(var(--table-color-dark)) !important;
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .vendor-contract-amount {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .vcd-canceled-label .vendor-contract-amount,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .vcd-col-amount .vcd-canceled-label {
		color: inherit !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .vcd-canceled-badge {
		color: rgb(255, 180, 180) !important;
		background-color: rgb(90, 40, 40) !important;
		border-color: rgb(140, 60, 60) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details .vcd-cancellation-badge {
		color: rgb(255, 200, 150) !important;
		background-color: rgb(90, 55, 25) !important;
		border-color: rgb(160, 100, 40) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-cancellation-offer-meta,
	html[data-theme="dark"] .vendor-contract-workspace .vcd-campaign-mismatch-btn,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-locked-icon {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vcd-campaign-mismatch-btn:hover,
	html[data-theme="dark"] .vendor-contract-workspace .vcd-campaign-mismatch-btn:focus {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-add-menu .dropdown-menu,
	html[data-theme="dark"] body > .dropdown-menu.vendor-contract-add-dropdown-portal {
		background: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-add-menu .dropdown-menu > li > a,
	html[data-theme="dark"] body > .dropdown-menu.vendor-contract-add-dropdown-portal > li > a {
		color: rgb(var(--body-text-color)) !important;
		background: transparent !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-add-menu .dropdown-menu > li > a:hover,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-add-menu .dropdown-menu > li > a:focus,
	html[data-theme="dark"] body > .dropdown-menu.vendor-contract-add-dropdown-portal > li > a:hover,
	html[data-theme="dark"] body > .dropdown-menu.vendor-contract-add-dropdown-portal > li > a:focus {
		background: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody tr.vcd-status-open:hover > td {
		background-color: rgba(90, 70, 20, 0.55) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody tr.vcd-status-pending:hover > td {
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody tr.vendor-contract-amount-mismatch:hover > td {
		background-color: rgb(110, 45, 45) !important;
	}

	html[data-theme="dark"] .vendor-contract-workspace .approvalCell,
	html[data-theme="dark"] .vendor-contract-workspace .vcd-col-last-viewed,
	html[data-theme="dark"] .vendor-contract-workspace .vendor-contract-details tbody td {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-io-filter-option,
	html[data-theme="dark"] .contract-io-filter-options {
		color: rgb(var(--body-text-color)) !important;
	}

	/* Contract Amount / Campaign mismatch hover modals */
	html[data-theme="dark"] .hover-modal.hover-modal-amount-mismatch,
	html[data-theme="dark"] .hover-modal.hover-modal-fit {
		background: rgb(var(--background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal,
	html[data-theme="dark"] .contract-campaign-mismatch-modal {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal h3,
	html[data-theme="dark"] .contract-campaign-mismatch-modal h3 {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal .contract-amount-mismatch-intro,
	html[data-theme="dark"] .contract-amount-mismatch-modal .contract-amount-mismatch-empty,
	html[data-theme="dark"] .contract-campaign-mismatch-modal .contract-campaign-mismatch-intro,
	html[data-theme="dark"] .contract-campaign-mismatch-modal .contract-campaign-mismatch-empty {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid,
	html[data-theme="dark"] .contract-campaign-mismatch-modal table.datagrid {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid thead th,
	html[data-theme="dark"] .contract-campaign-mismatch-modal table.datagrid thead th {
		background: rgb(var(--table-header-color)) !important;
		color: rgb(var(--secondary-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid tbody td,
	html[data-theme="dark"] .contract-campaign-mismatch-modal table.datagrid tbody td {
		background: rgb(var(--table-color-light)) !important;
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid tbody tr.mismatch-row td,
	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid tbody tr.mismatch-row:hover td {
		background: rgb(90, 40, 40) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid tbody tr:hover td,
	html[data-theme="dark"] .contract-campaign-mismatch-modal table.datagrid tbody tr:hover td {
		background: rgb(var(--hover-row-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal table.datagrid tbody tr.mismatch-row:hover td {
		background: rgb(110, 45, 45) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal .contract-amount-mismatch-totals {
		border-top-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal .contract-amount-mismatch-totals th,
	html[data-theme="dark"] .contract-amount-mismatch-modal .contract-amount-mismatch-totals td {
		color: rgb(var(--body-text-color)) !important;
		background: transparent !important;
	}

	html[data-theme="dark"] .contract-amount-mismatch-modal .amount-mismatch-value {
		color: rgb(255, 150, 150) !important;
	}

	/* Production tab — admin info panel + std message fieldsets */
	html[data-theme="dark"] fieldset.fldInformation {
		background: rgb(28, 48, 52) !important;
		background-color: rgb(28, 48, 52) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] fieldset.fldInformation div.legend {
		background: rgb(0, 95, 100) !important;
		background-color: rgb(0, 95, 100) !important;
		color: #fff !important;
	}

	html[data-theme="dark"] fieldset.fldWarning {
		background: rgb(72, 58, 28) !important;
		background-color: rgb(72, 58, 28) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] fieldset.fldWarning div.legend {
		background: rgb(160, 120, 40) !important;
		background-color: rgb(160, 120, 40) !important;
		color: #fff !important;
	}

	html[data-theme="dark"] fieldset.fldError {
		background: rgb(72, 36, 36) !important;
		background-color: rgb(72, 36, 36) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] fieldset.fldError div.legend {
		background: rgb(160, 40, 40) !important;
		background-color: rgb(160, 40, 40) !important;
		color: #fff !important;
	}

	html[data-theme="dark"] fieldset.fldInformation .fieldSetData,
	html[data-theme="dark"] fieldset.fldWarning .fieldSetData,
	html[data-theme="dark"] fieldset.fldError .fieldSetData {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .printer-admin-wrapper {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .printer-admin-container {
		background: rgb(var(--input-background-color)) !important;
		background-color: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .printer-admin-container h4,
	html[data-theme="dark"] .printer-admin-container > div {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .legend.legend-flex #printerFilter,
	html[data-theme="dark"] th select#printShipMethod,
	html[data-theme="dark"] select.shipMethods {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	/* Client Dashboard tab (summaryProposal_clientDashboard) */
	html[data-theme="dark"] .cd-setting,
	html[data-theme="dark"] .cd-setting-panel {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cd-settings label.cd-setting-title,
	html[data-theme="dark"] .cd-setting-panel .cd-setting-title {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cd-setting-help {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .cd-switch-ui {
		background: rgb(70, 74, 84) !important;
	}

	html[data-theme="dark"] .cd-switch input:checked + .cd-switch-ui {
		background: #9d833e !important;
	}

	html[data-theme="dark"] .cd-switch-ui::after {
		background: #fff !important;
	}

	html[data-theme="dark"] .cd-intro-preview img {
		border-color: rgb(var(--border-color)) !important;
		background: rgb(var(--input-background-color)) !important;
	}

	html[data-theme="dark"] .cd-file-btn {
		background: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cd-file-btn:hover {
		background: rgb(var(--hover-color)) !important;
	}

	html[data-theme="dark"] .cp-template-grid {
		background: rgb(var(--input-background-color)) !important;
		border-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .cp-template-option {
		background: rgb(var(--input-background-color)) !important;
		border-bottom-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cp-template-option:hover {
		background: rgb(var(--hover-color)) !important;
	}

	html[data-theme="dark"] .cp-template-option:has(input:checked) {
		background: rgb(55, 48, 32) !important;
		box-shadow: inset 3px 0 0 #9d833e;
	}

	html[data-theme="dark"] .cp-template-option-text .cp-template-name {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .cp-template-option-text .cp-template-desc {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .sortable li {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
		border-color: rgb(var(--border-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .sortable li .tile-icon {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .sortable li .title-container,
	html[data-theme="dark"] #tilesContainer label {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .fieldSetData .btn-outline-danger:hover,
	html[data-theme="dark"] .fieldSetData .btn-outline-danger:focus,
	html[data-theme="dark"] .fieldSetData .btn-outline-danger:active {
		color: #ff8a8a !important;
		background-color: rgb(72, 36, 36) !important;
	}

	/* Notes / Documents note cards */
	html[data-theme="dark"] div.noteContainer:nth-of-type(odd) {
		background: rgb(var(--table-color-dark)) !important;
		background-color: rgb(var(--table-color-dark)) !important;
	}

	html[data-theme="dark"] div.noteContainer:nth-of-type(even) {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
	}

	html[data-theme="dark"] div.noteContainer {
		color: rgb(var(--body-text-color)) !important;
		border-color: rgb(var(--border-color));
	}

	html[data-theme="dark"] div.noteContainer:hover {
		background: rgb(var(--hover-row-color)) !important;
		background-color: rgb(var(--hover-row-color)) !important;
	}

	html[data-theme="dark"] div.noteContainer.adminOnly,
	html[data-theme="dark"] div.adminOnly {
		background: rgba(180, 150, 40, 0.28) !important;
		background-color: rgba(180, 150, 40, 0.28) !important;
	}

	html[data-theme="dark"] .noteAuthor,
	html[data-theme="dark"] .noteDate,
	html[data-theme="dark"] .note {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .noteDate {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .noteUserIcon,
	html[data-theme="dark"] .noteUserIcon i {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .cp-note-badge {
		background: rgb(var(--input-background-color)) !important;
		color: rgb(var(--body-text-color)) !important;
	}

	/* Email Summary modal (mail queue double-click) */
	html[data-theme="dark"] table.emailTable {
		background: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] table.emailTable > tr:not(:last-child) > td,
	html[data-theme="dark"] table.emailTable > tbody > tr:not(:last-child) > td {
		background: transparent !important;
		background-color: transparent !important;
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] table.emailTable .emailLabel {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] table.emailTable > tr:not(:last-child) > td a,
	html[data-theme="dark"] table.emailTable > tbody > tr:not(:last-child) > td a {
		color: rgb(var(--link-color)) !important;
	}

	html[data-theme="dark"] table.emailTable > tr:last-child > td,
	html[data-theme="dark"] table.emailTable > tbody > tr:last-child > td {
		background: transparent !important;
		background-color: transparent !important;
	}

	/* Keep rendered email HTML on a light canvas (as sent). */
	html[data-theme="dark"] .email-message-preview {
		background: #fff !important;
		color: #222;
		padding: 16px;
		border-radius: 6px;
		border: 1px solid rgb(var(--border-color));
	}

	html[data-theme="dark"] .email-message-preview table {
		background: transparent !important;
		color: inherit !important;
	}

	/* SendGrid tools (report_sendgrid) */
	html[data-theme="dark"] .sendgrid-api-panel {
		background: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		border: 1px solid rgb(var(--border-color));
	}

	html[data-theme="dark"] .sendgrid-api-title,
	html[data-theme="dark"] .sendgrid-api-subtitle {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] .sendgrid-api-lead,
	html[data-theme="dark"] .sendgrid-api-note {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] .sendgrid-api-endpoints li {
		border-bottom-color: rgb(var(--border-color)) !important;
	}

	html[data-theme="dark"] .sendgrid-api-endpoints code {
		background: rgb(var(--input-background-color)) !important;
		color: rgb(var(--link-color)) !important;
	}

	/* Top menu agency/team switcher (#systemPlantId is noSelect2) */
	html[data-theme="dark"] #systemPlantId,
	html[data-theme="dark"] .pmx-menu select#systemPlantId,
	html[data-theme="dark"] .pmx-menu-top select#systemPlantId,
	html[data-theme="dark"] .topbar select#systemPlantId,
	html[data-theme="dark"] aside.pmx-menu select.noSelect2,
	html[data-theme="dark"] .pmx-menu select.noSelect2 {
		-webkit-appearance: none !important;
		-moz-appearance: none !important;
		appearance: none !important;
		background: rgb(var(--input-background-color)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d0d4dc' d='M1.4.3L6 4.9 10.6.3 12 1.7 6 7.7 0 1.7z'/%3E%3C/svg%3E") no-repeat right 10px center / 12px !important;
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
		border-radius: 3px !important;
		outline: none !important;
		box-shadow: none !important;
		color-scheme: dark;
	}

	html[data-theme="dark"] #systemPlantId:focus,
	html[data-theme="dark"] .pmx-menu select#systemPlantId:focus,
	html[data-theme="dark"] .pmx-menu select.noSelect2:focus {
		background-color: rgb(var(--hover-color)) !important;
		border-color: rgb(var(--secondary-color)) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	html[data-theme="dark"] #systemPlantId option,
	html[data-theme="dark"] #systemPlantId optgroup,
	html[data-theme="dark"] .pmx-menu select.noSelect2 option,
	html[data-theme="dark"] .pmx-menu select.noSelect2 optgroup {
		background-color: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
	}

	/* Market County Mapping (report_marketCountyMapping) */
	html[data-theme="dark"] .info-panel,
	html[data-theme="dark"] .controls,
	html[data-theme="dark"] #hoverInfo {
		background: rgb(var(--section-header-color)) !important;
		background-color: rgb(var(--section-header-color)) !important;
		color: rgb(var(--body-text-color)) !important;
		box-shadow: var(--box-shadow) !important;
		border: 1px solid rgb(var(--border-color));
	}

	html[data-theme="dark"] .info-panel h1,
	html[data-theme="dark"] .info-panel p,
	html[data-theme="dark"] .info-panel strong,
	html[data-theme="dark"] .controls label,
	html[data-theme="dark"] .controls strong,
	html[data-theme="dark"] #assignmentCount {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #hoverInfo .county-name {
		color: rgb(var(--body-text-color)) !important;
	}

	html[data-theme="dark"] #hoverInfo .info-line {
		color: rgb(var(--muted-text-color)) !important;
	}

	html[data-theme="dark"] #marketSelect {
		background: rgb(var(--input-background-color)) !important;
		color: rgb(var(--input-text-color)) !important;
		border: 1px solid rgb(var(--border-color)) !important;
	}
}
