/**
 * Dash Horizon — complete dark surface system
 * Loaded LAST (after theme, components, forms, checkout).
 * Scoped to body.dh-theme / #order-standard_cart only.
 * No blanket * { background } rules.
 */

/* ================================================================== */
/* Utility remaps (Bootstrap helpers that force white/light)          */
/* Exclude allowlisted / intentional light surfaces                   */
/* ================================================================== */
body.dh-theme .bg-white:not(.landing-page):not(.dh-allow-light):not(.dhx-cta):not(.gateway-logo):not(img),
body.dh-theme #order-standard_cart .bg-white,
#order-standard_cart .bg-white {
  background-color: var(--dh-bg-surface-1) !important;
  background-image: none !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .bg-light:not(.landing-page):not(.dh-allow-light):not(nav.navbar-light),
body.dh-theme #order-standard_cart .bg-light,
#order-standard_cart .bg-light,
body.dh-theme .sidebar .bg-light,
body.dh-theme .card.bg-light {
  background-color: var(--dh-bg-surface-2) !important;
  background-image: none !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .table-light,
body.dh-theme .table-light > th,
body.dh-theme .table-light > td,
body.dh-theme .thead-light th,
body.dh-theme .thead-light td {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .text-dark:not(.dh-allow-light *) {
  color: var(--dh-text-primary) !important;
}

body.dh-theme .text-muted {
  color: var(--dh-text-muted) !important;
}

body.dh-theme a:not(.btn):not(.badge):not(.nav-link):not(.dropdown-item):not(.dhx-nav a):not(.dhds-footer a) {
  color: var(--dh-link);
}
body.dh-theme a:not(.btn):not(.badge):not(.nav-link):not(.dropdown-item):not(.dhx-nav a):not(.dhds-footer a):hover {
  color: var(--dh-link-hover);
}

/* primary-bg-color utility is #f1f1f1 in theme.css — remap non-body uses */
body.dh-theme .primary-bg-color:not(body):not(.dh-allow-light) {
  background-color: var(--dh-bg-surface-2) !important;
  color: var(--dh-text-primary) !important;
}
body.dh-theme span.primary-bg-color,
body.dh-theme .sub-heading span.primary-bg-color,
#order-standard_cart span.primary-bg-color {
  background: linear-gradient(135deg, #10233a, #1A3F6B) !important;
  background-color: #1A3F6B !important;
  color: #ffffff !important;
}

/* ================================================================== */
/* Cards / panels / wells / jumbotron                                 */
/* ================================================================== */
body.dh-theme .card,
body.dh-theme .panel,
body.dh-theme .well,
body.dh-theme .jumbotron,
body.dh-theme .mc-promo-manage,
body.dh-theme .mc-promo-login,
#order-standard_cart .card,
#order-standard_cart .panel,
#order-standard_cart .well {
  background: var(--dh-bg-surface-1) !important;
  background-color: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .card-header,
body.dh-theme .card-footer,
body.dh-theme .panel-heading,
body.dh-theme .panel-footer,
body.dh-theme .panel-default > .panel-heading,
#order-standard_cart .card-header,
#order-standard_cart .card-footer,
#order-standard_cart .panel-heading,
#order-standard_cart .panel-footer {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .card-body,
body.dh-theme .panel-body,
body.dh-theme .well,
#order-standard_cart .card-body,
#order-standard_cart .panel-body {
  background: transparent !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .card-title,
body.dh-theme .panel-title,
#order-standard_cart .card-title,
#order-standard_cart .panel-title {
  color: var(--dh-text-primary) !important;
}

/* ================================================================== */
/* List groups                                                        */
/* ================================================================== */
body.dh-theme .list-group,
#order-standard_cart .list-group {
  background: transparent !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .list-group-item,
#order-standard_cart .list-group-item {
  background-color: var(--dh-bg-surface-2) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .list-group-item:hover,
body.dh-theme .list-group-item:focus,
body.dh-theme a.list-group-item:hover,
body.dh-theme button.list-group-item:hover,
#order-standard_cart .list-group-item:hover {
  background-color: var(--dh-bg-hover) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .list-group-item.active,
body.dh-theme .list-group-item.active:hover,
#order-standard_cart .list-group-item.active {
  background-color: var(--dh-bg-selected) !important;
  border-color: var(--dh-border-strong) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .list-group-item-action:focus-visible {
  outline: none;
  box-shadow: var(--dh-focus-ring);
}

/* ================================================================== */
/* Modals                                                             */
/* ================================================================== */
body.dh-theme .modal-content,
#order-standard_cart .modal-content {
  background-color: var(--dh-bg-surface-2) !important;
  border: 1px solid var(--dh-border-strong) !important;
  color: var(--dh-text-secondary) !important;
  box-shadow: var(--dh-shadow);
}

body.dh-theme .modal-header,
body.dh-theme .modal-footer,
#order-standard_cart .modal-header,
#order-standard_cart .modal-footer {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .modal-body,
#order-standard_cart .modal-body {
  background: transparent !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .modal-title,
#order-standard_cart .modal-title {
  color: var(--dh-text-primary) !important;
}

body.dh-theme .modal-header .close,
body.dh-theme .modal-header .btn-close {
  color: var(--dh-text-primary);
  text-shadow: none;
  opacity: 0.85;
}

/* ================================================================== */
/* Dropdowns                                                          */
/* ================================================================== */
body.dh-theme .dropdown-menu,
#order-standard_cart .dropdown-menu {
  background-color: var(--dh-bg-surface-2) !important;
  border: 1px solid var(--dh-border-strong) !important;
  color: var(--dh-text-secondary) !important;
  box-shadow: var(--dh-shadow-soft);
  z-index: var(--z-dropdown);
}

body.dh-theme .dropdown-item,
#order-standard_cart .dropdown-item {
  color: var(--dh-text-secondary) !important;
  background-color: transparent !important;
}

body.dh-theme .dropdown-item:hover,
body.dh-theme .dropdown-item:focus,
body.dh-theme .dropdown-item:active,
#order-standard_cart .dropdown-item:hover,
#order-standard_cart .dropdown-item:focus {
  background-color: var(--dh-bg-hover) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .dropdown-item.active,
#order-standard_cart .dropdown-item.active {
  background-color: var(--dh-bg-selected) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .dropdown-divider,
#order-standard_cart .dropdown-divider {
  border-top-color: var(--dh-border) !important;
}

body.dh-theme .dropdown-header,
#order-standard_cart .dropdown-header {
  color: var(--dh-text-muted) !important;
}

/* Multiselect / bootstrap-select menus used on domain search */
body.dh-theme .multiselect-container,
body.dh-theme .bootstrap-select .dropdown-menu,
#order-standard_cart .multiselect-container,
#order-standard_cart .bootstrap-select .dropdown-menu {
  background-color: var(--dh-bg-surface-2) !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .multiselect-container > li > a,
body.dh-theme .multiselect-container .multiselect-item,
#order-standard_cart .multiselect-container > li > a {
  color: var(--dh-text-secondary) !important;
  background: transparent !important;
}

body.dh-theme .multiselect-container > li.active > a,
body.dh-theme .multiselect-container > li > a:hover,
#order-standard_cart .multiselect-container > li.active > a,
#order-standard_cart .multiselect-container > li > a:hover {
  background-color: var(--dh-bg-hover) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .multiselect-container .input-group .form-control,
#order-standard_cart .multiselect-container .input-group .form-control {
  background: var(--dh-bg-input) !important;
  color: var(--dh-text-primary) !important;
  border-color: var(--dh-border) !important;
}

/* ================================================================== */
/* Popovers + Notifications dropdown                                  */
/* ================================================================== */
body.dh-theme .popover,
body.dh-theme .popover-user-notifications {
  background-color: var(--dh-bg-surface-2) !important;
  border: 1px solid var(--dh-border-strong) !important;
  color: var(--dh-text-secondary) !important;
  box-shadow: var(--dh-shadow);
  z-index: var(--z-dropdown);
  max-width: min(360px, calc(100vw - 24px));
  overflow: visible;
}

body.dh-theme .popover-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-bottom-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .popover-body,
body.dh-theme .popover-user-notifications .popover-body {
  background: transparent !important;
  color: var(--dh-text-secondary) !important;
}

/* Arrow matches dark panel (all placements) */
body.dh-theme .popover .arrow::after,
body.dh-theme .bs-popover-top > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="top"] > .arrow::after,
body.dh-theme .bs-popover-bottom > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="bottom"] > .arrow::after,
body.dh-theme .bs-popover-left > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="left"] > .arrow::after,
body.dh-theme .bs-popover-right > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="right"] > .arrow::after {
  border-top-color: var(--dh-bg-surface-2);
  border-bottom-color: var(--dh-bg-surface-2);
  border-left-color: var(--dh-bg-surface-2);
  border-right-color: var(--dh-bg-surface-2);
}

body.dh-theme .bs-popover-top > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="top"] > .arrow::after {
  border-top-color: var(--dh-bg-surface-2) !important;
  border-bottom-color: transparent !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
}
body.dh-theme .bs-popover-bottom > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="bottom"] > .arrow::after {
  border-bottom-color: var(--dh-bg-surface-2) !important;
  border-top-color: transparent !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
}
body.dh-theme .bs-popover-left > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="left"] > .arrow::after {
  border-left-color: var(--dh-bg-surface-2) !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  border-right-color: transparent !important;
}
body.dh-theme .bs-popover-right > .arrow::after,
body.dh-theme .bs-popover-auto[x-placement^="right"] > .arrow::after {
  border-right-color: var(--dh-bg-surface-2) !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  border-left-color: transparent !important;
}

body.dh-theme .bs-popover-bottom .popover-header::before,
body.dh-theme .bs-popover-auto[x-placement^="bottom"] .popover-header::before {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

body.dh-theme .popover-user-notifications {
  border-color: var(--dh-border-strong) !important;
  min-width: min(320px, calc(100vw - 24px));
  padding: 6px 8px;
  backdrop-filter: blur(14px);
}

body.dh-theme .popover-user-notifications ul li {
  border-bottom-color: var(--dh-border) !important;
}

body.dh-theme .popover-user-notifications ul li a {
  color: var(--dh-text-secondary) !important;
  border-radius: var(--dh-radius-sm);
}

body.dh-theme .popover-user-notifications ul li a:hover,
body.dh-theme .popover-user-notifications ul li a:focus {
  background-color: var(--dh-bg-hover) !important;
  color: var(--dh-text-primary) !important;
  outline: none;
}

body.dh-theme .popover-user-notifications ul li a:focus-visible {
  box-shadow: var(--dh-focus-ring);
}

body.dh-theme .popover-user-notifications ul li .message,
body.dh-theme .popover-user-notifications ul li .message a {
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .popover-user-notifications ul li .message a {
  color: var(--dh-link) !important;
  text-decoration: underline;
}
body.dh-theme .popover-user-notifications ul li .message a:hover {
  color: var(--dh-link-hover) !important;
}

body.dh-theme .popover-user-notifications ul li.none {
  color: var(--dh-text-muted) !important;
  font-weight: 600;
}

body.dh-theme .popover-user-notifications ul li.unread a,
body.dh-theme .popover-user-notifications ul li.active a {
  background-color: var(--dh-bg-selected);
}

/* Keep semantic notification icons */
body.dh-theme .popover-user-notifications ul li i.fas.fa-check-circle,
body.dh-theme .popover-user-notifications ul li i.far.fa-check-circle {
  color: var(--dh-success) !important;
}
body.dh-theme .popover-user-notifications ul li i.fas.fa-warning,
body.dh-theme .popover-user-notifications ul li i.far.fa-warning,
body.dh-theme .popover-user-notifications ul li i.fas.fa-exclamation-triangle {
  color: var(--dh-warning) !important;
}
body.dh-theme .popover-user-notifications ul li i.fas.fa-exclamation-circle,
body.dh-theme .popover-user-notifications ul li i.far.fa-exclamation-circle {
  color: var(--dh-danger) !important;
}
body.dh-theme .popover-user-notifications ul li i.fas.fa-info-circle,
body.dh-theme .popover-user-notifications ul li i.far.fa-info-circle {
  color: var(--dh-info) !important;
}

/* Notification count badge — keep visible */
body.dh-theme .nav-item .badge,
body.dh-theme #notification .badge,
body.dh-theme .account-notifications .badge,
body.dh-theme .notifications-badge {
  background-color: var(--dh-danger) !important;
  color: #fff !important;
}

/* ================================================================== */
/* Tooltips                                                           */
/* ================================================================== */
body.dh-theme .tooltip-inner {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
  border: 1px solid var(--dh-border);
}
body.dh-theme .tooltip.bs-tooltip-top .arrow::before,
body.dh-theme .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {
  border-top-color: var(--dh-bg-surface-3) !important;
}
body.dh-theme .tooltip.bs-tooltip-bottom .arrow::before,
body.dh-theme .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
  border-bottom-color: var(--dh-bg-surface-3) !important;
}
body.dh-theme .tooltip.bs-tooltip-left .arrow::before,
body.dh-theme .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow::before {
  border-left-color: var(--dh-bg-surface-3) !important;
}
body.dh-theme .tooltip.bs-tooltip-right .arrow::before,
body.dh-theme .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow::before {
  border-right-color: var(--dh-bg-surface-3) !important;
}

/* ================================================================== */
/* Alerts (default / light only — preserve semantic colours)          */
/* ================================================================== */
body.dh-theme .alert-light,
body.dh-theme .alert-secondary {
  background-color: var(--dh-bg-surface-3) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .alert-success {
  background-color: var(--dh-bg-success) !important;
  border-color: rgba(61, 214, 140, 0.35) !important;
  color: var(--dh-text-primary) !important;
}
body.dh-theme .alert-warning {
  background-color: var(--dh-bg-warning) !important;
  border-color: rgba(245, 200, 76, 0.35) !important;
  color: var(--dh-text-primary) !important;
}
body.dh-theme .alert-danger {
  background-color: var(--dh-bg-danger) !important;
  border-color: rgba(255, 107, 107, 0.35) !important;
  color: var(--dh-text-primary) !important;
}
body.dh-theme .alert-info {
  background-color: var(--dh-info-bg) !important;
  border-color: rgba(110, 168, 255, 0.35) !important;
  color: var(--dh-text-primary) !important;
}

/* ================================================================== */
/* Tabs / accordion / collapse / fieldset                             */
/* ================================================================== */
body.dh-theme .nav-tabs {
  border-bottom-color: var(--dh-border) !important;
}

body.dh-theme .nav-tabs .nav-link,
body.dh-theme .nav-tabs > li > a {
  color: var(--dh-text-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.dh-theme .nav-tabs .nav-link:hover,
body.dh-theme .nav-tabs > li > a:hover {
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
  background: var(--dh-bg-hover) !important;
}

body.dh-theme .nav-tabs .nav-link.active,
body.dh-theme .nav-tabs > li.active > a,
body.dh-theme .nav-tabs .nav-item.show .nav-link {
  background-color: var(--dh-bg-surface-2) !important;
  border-color: var(--dh-border) var(--dh-border) var(--dh-bg-surface-2) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .tab-content,
body.dh-theme .tab-pane,
#order-standard_cart .tab-content {
  background: transparent !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .accordion-item,
body.dh-theme .accordion .card {
  background: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .accordion-button,
body.dh-theme .accordion-button:not(.collapsed) {
  background-color: var(--dh-bg-surface-2) !important;
  color: var(--dh-text-primary) !important;
  box-shadow: none !important;
}

body.dh-theme .accordion-button::after {
  filter: invert(1) brightness(1.4);
}

body.dh-theme .accordion-body,
body.dh-theme .collapse,
body.dh-theme .collapsing {
  background: transparent;
  color: var(--dh-text-secondary);
}

body.dh-theme fieldset {
  border: 1px solid var(--dh-border) !important;
  background: var(--dh-bg-surface-1);
  border-radius: var(--dh-radius);
  padding: 1rem;
  color: var(--dh-text-secondary);
}

body.dh-theme legend {
  color: var(--dh-text-primary) !important;
  background: transparent;
  padding: 0 0.5rem;
  width: auto;
  font-size: 1rem;
}

/* ================================================================== */
/* Forms & input groups                                               */
/* ================================================================== */
body.dh-theme .form-control,
body.dh-theme .form-select,
body.dh-theme select.form-control,
body.dh-theme textarea.form-control,
body.dh-theme .custom-select,
#order-standard_cart .form-control,
#order-standard_cart .form-select,
#order-standard_cart select,
#order-standard_cart textarea {
  background-color: var(--dh-bg-input) !important;
  border-color: rgba(216, 233, 255, 0.22) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .form-control:focus,
body.dh-theme .form-select:focus,
#order-standard_cart .form-control:focus {
  background-color: var(--dh-bg-input) !important;
  border-color: var(--dh-accent-2) !important;
  color: var(--dh-text-primary) !important;
  box-shadow: var(--dh-focus-ring) !important;
}

body.dh-theme .form-control:disabled,
body.dh-theme .form-control[readonly],
#order-standard_cart .form-control:disabled,
#order-standard_cart .form-control[readonly] {
  background-color: rgba(23, 34, 53, 0.55) !important;
  color: var(--dh-text-muted) !important;
  opacity: 1;
}

body.dh-theme .input-group-text,
body.dh-theme .input-group-addon,
body.dh-theme .input-group-prepend .input-group-text,
body.dh-theme .input-group-append .input-group-text,
#order-standard_cart .input-group-text,
#order-standard_cart .input-group-addon {
  background-color: var(--dh-bg-surface-3) !important;
  border-color: rgba(216, 233, 255, 0.22) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .input-group-box,
#order-standard_cart .input-group-box,
#order-standard_cart .domain-checker-container .input-group-box {
  background-color: var(--dh-bg-surface-2) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .custom-file-label,
body.dh-theme .custom-file-label::after {
  background-color: var(--dh-bg-input) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .form-check-label,
body.dh-theme .custom-control-label,
#order-standard_cart .form-check-label,
#order-standard_cart label {
  color: var(--dh-text-secondary);
}

/* Autofill — keep dark */
body.dh-theme input:-webkit-autofill,
body.dh-theme input:-webkit-autofill:hover,
body.dh-theme input:-webkit-autofill:focus,
body.dh-theme textarea:-webkit-autofill,
body.dh-theme select:-webkit-autofill,
#order-standard_cart input:-webkit-autofill {
  -webkit-text-fill-color: var(--dh-text-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--dh-bg-input) inset !important;
  transition: background-color 99999s ease-out;
}

/* ================================================================== */
/* Tables + DataTables                                                */
/* ================================================================== */
body.dh-theme .table,
body.dh-theme .table-list,
body.dh-theme table.dataTable,
#order-standard_cart .table {
  background-color: var(--dh-bg-table) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .table thead th,
body.dh-theme .table thead td,
body.dh-theme .table-list thead th,
body.dh-theme table.dataTable thead th,
body.dh-theme table.dataTable thead td {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .table td,
body.dh-theme .table th,
body.dh-theme .table-list td,
body.dh-theme table.dataTable td {
  background-color: transparent !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .table-striped tbody tr:nth-of-type(odd),
body.dh-theme table.dataTable.stripe tbody tr.odd,
body.dh-theme table.dataTable.display tbody tr.odd {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

body.dh-theme .table-hover tbody tr:hover,
body.dh-theme table.dataTable.hover tbody tr:hover,
body.dh-theme table.dataTable.display tbody tr:hover {
  background-color: var(--dh-bg-table-hover) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .table-active,
body.dh-theme .table-active > td,
body.dh-theme .table-active > th,
body.dh-theme table.dataTable tbody tr.selected {
  background-color: var(--dh-bg-selected) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .dataTables_wrapper,
body.dh-theme .dataTables_wrapper .dataTables_length,
body.dh-theme .dataTables_wrapper .dataTables_filter,
body.dh-theme .dataTables_wrapper .dataTables_info,
body.dh-theme .dataTables_wrapper .dataTables_paginate {
  color: var(--dh-text-muted) !important;
}

body.dh-theme .dataTables_wrapper .dataTables_filter input,
body.dh-theme .dataTables_wrapper .dataTables_length select {
  background: var(--dh-bg-input) !important;
  border: 1px solid var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
  background: var(--dh-bg-surface-2) !important;
  border: 1px solid var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dh-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--dh-bg-selected) !important;
  color: var(--dh-text-primary) !important;
  border-color: var(--dh-border-strong) !important;
}

body.dh-theme table.dataTable tbody tr.child,
body.dh-theme table.dataTable tbody td.child {
  background-color: var(--dh-bg-surface-2) !important;
  color: var(--dh-text-secondary) !important;
}

/* ================================================================== */
/* Domain search / pricing / upsells / spotlight                      */
/* ================================================================== */
body.dh-theme .domain-checker-container,
body.dh-theme .domain-checker-bg,
#order-standard_cart .domain-checker-container,
#order-standard_cart .domain-checker-bg {
  background: var(--dh-bg-surface-1) !important;
  background-image: none !important;
  color: var(--dh-text-secondary) !important;
  border-radius: var(--dh-radius-lg);
}

#order-standard_cart .domain-checker-advanced label,
body.dh-theme .domain-checker-advanced label {
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .domain-checker-advanced input[type="checkbox"] {
  background: var(--dh-bg-input) !important;
}

body.dh-theme .domain-pricing,
#order-standard_cart .domain-pricing,
body.dh-theme .domain-pricing .bg-white,
#order-standard_cart .domain-pricing .bg-white {
  background: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-secondary) !important;
  border-color: var(--dh-border) !important;
}

.domain-pricing .tld-row,
#order-standard_cart .domain-pricing .tld-row,
body.dh-theme .domain-pricing .tld-row {
  border-bottom-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
  background: transparent !important;
}

.domain-pricing .tld-row.highlighted,
#order-standard_cart .domain-pricing .tld-row.highlighted,
body.dh-theme .domain-pricing .tld-row.highlighted {
  background: var(--dh-bg-selected) !important;
  color: var(--dh-text-primary) !important;
}

.domain-pricing .tld-pricing-header .col-xs-2,
.domain-pricing .tld-pricing-header .col-sm-2,
.domain-pricing .tld-pricing-header .col-xs-4,
.domain-pricing .tld-pricing-header .col-sm-4,
.domain-pricing .tld-pricing-header div:nth-child(odd),
.domain-pricing .tld-pricing-header div:nth-child(even),
#order-standard_cart .domain-pricing .tld-pricing-header div,
body.dh-theme .domain-pricing .tld-pricing-header div {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
  border-bottom-color: var(--dh-accent-2) !important;
}

.domain-pricing .tld-pricing-header .tld-column,
#order-standard_cart .domain-pricing .tld-pricing-header .tld-column {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
}

a.domain-tld-pricing-category {
  color: var(--dh-link) !important;
}

.spotlight-tlds,
#order-standard_cart .spotlight-tlds {
  background-color: var(--dh-bg-surface-2) !important;
  border-radius: var(--dh-radius);
  border: 1px solid var(--dh-border);
}

.spotlight-tld,
#order-standard_cart .spotlight-tld {
  background-color: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

.spotlight-tld span,
#order-standard_cart .spotlight-tld span {
  color: var(--dh-text-muted) !important;
}

.spotlight-tld .unavailable,
.spotlight-tld .invalid,
#order-standard_cart .spotlight-tld .unavailable,
#order-standard_cart .spotlight-tld .invalid {
  background-color: var(--dh-bg-surface-3) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-muted) !important;
}

.suggested-domains .domain-lookup-suggestions-message,
.suggested-domains .domain-lookup-suggestions-loader,
#order-standard_cart .suggested-domains .domain-lookup-suggestions-message,
#order-standard_cart .suggested-domains .domain-lookup-suggestions-loader {
  background-color: var(--dh-bg-surface-2) !important;
  color: var(--dh-text-secondary) !important;
}

.suggested-domains .list-group-item,
#order-standard_cart .suggested-domains .list-group-item {
  background-color: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-secondary) !important;
  border-color: var(--dh-border) !important;
}

.suggested-domains .price,
#order-standard_cart .suggested-domains .price {
  color: var(--dh-text-primary) !important;
}

.domain-promo-box,
#order-standard_cart .domain-promo-box {
  background-color: var(--dh-bg-surface-1) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius-lg) !important;
  color: var(--dh-text-secondary) !important;
  box-shadow: var(--dh-shadow-soft);
}

.domain-promo-box h3,
#order-standard_cart .domain-promo-box h3 {
  color: var(--dh-text-primary) !important;
}

.domain-promo-box .small,
#order-standard_cart .domain-promo-box .small {
  color: var(--dh-text-muted) !important;
}

.domain-promo-box p,
#order-standard_cart .domain-promo-box p {
  color: var(--dh-text-secondary) !important;
}

/* Domain results / availability */
body.dh-theme .domain-lookup-result,
#order-standard_cart .domain-lookup-result,
#order-standard_cart .domain-checker-result-headline,
#order-standard_cart .domain-available,
#order-standard_cart .domain-unavailable,
#order-standard_cart .domain-contact-support {
  color: var(--dh-text-secondary);
}

#order-standard_cart .domain-available,
body.dh-theme .domain-available {
  color: var(--dh-success) !important;
}

#order-standard_cart .domain-unavailable,
body.dh-theme .domain-unavailable {
  color: var(--dh-danger) !important;
}

#order-standard_cart .primary-domain-header,
body.dh-theme .primary-domain-header {
  color: var(--dh-text-primary) !important;
}

/* ================================================================== */
/* Renewals (services + domains)                                      */
/* ================================================================== */
.domain-renewals,
.service-renewals,
.addon-renewals .service-renewal,
#order-standard_cart .domain-renewals,
#order-standard_cart .service-renewals,
#order-standard_cart .addon-renewals .service-renewal {
  background-color: var(--dh-bg-surface-1) !important;
  border-top-color: var(--dh-border) !important;
  border-radius: var(--dh-radius);
  overflow: hidden;
}

.domain-renewals .domain-renewal,
.service-renewals .service-renewal,
#order-standard_cart .domain-renewals .domain-renewal,
#order-standard_cart .service-renewals .service-renewal {
  background-color: var(--dh-bg-surface-2) !important;
  border-bottom-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

.domain-renewals .domain-renewal:nth-child(even),
.service-renewals .service-renewal:nth-child(even),
.addon-renewals .service-renewal:nth-child(even),
#order-standard_cart .domain-renewals .domain-renewal:nth-child(even),
#order-standard_cart .service-renewals .service-renewal:nth-child(even) {
  background-color: var(--dh-bg-surface-3) !important;
}

.domain-renewals .domain-renewal h3,
.service-renewals .service-renewal h3,
#order-standard_cart .domain-renewals .domain-renewal h3,
#order-standard_cart .service-renewals .service-renewal h3 {
  color: var(--dh-text-primary) !important;
}

.service-renewals .div-renewal-ineligible,
#order-standard_cart .service-renewals .div-renewal-ineligible,
.service-renewals .div-renewal-period-label,
#order-standard_cart p.domain-renewal-desc {
  color: var(--dh-text-muted) !important;
}

.form-control.domain-renewals-filter,
.form-control.service-renewals-filter,
#order-standard_cart .form-control.domain-renewals-filter,
#order-standard_cart .form-control.service-renewals-filter {
  background-color: var(--dh-bg-input) !important;
  background-image: none !important;
  color: var(--dh-text-primary) !important;
  border: 1px solid var(--dh-border) !important;
  padding-left: 12px !important;
}

#order-standard_cart .domain-renewal .btn,
#order-standard_cart .service-renewal .btn,
#order-standard_cart .domain-renewal a,
#order-standard_cart .service-renewal a:not(.btn) {
  color: var(--dh-link);
}

#order-standard_cart .domain-renewal .added,
#order-standard_cart .service-renewal .added,
#order-standard_cart .domain-renewal.renewal-added,
#order-standard_cart .service-renewal.renewal-added {
  background-color: var(--dh-bg-selected) !important;
}

/* Keep warning/days badges readable */
#order-standard_cart .domain-renewal .label,
#order-standard_cart .service-renewal .label,
#order-standard_cart .domain-renewal .badge,
#order-standard_cart .service-renewal .badge {
  color: #fff !important;
}

/* ================================================================== */
/* Order form products / cart items / MC promo                        */
/* ================================================================== */
#order-standard_cart .products .product {
  background: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .products .product header {
  background: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
}

#order-standard_cart .products .product header span {
  color: var(--dh-text-primary) !important;
}

#order-standard_cart .products .product header .qty {
  color: var(--dh-text-muted) !important;
}

#order-standard_cart .products .product div.product-desc,
#order-standard_cart .products .product div.product-pricing {
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .view-cart-items,
#order-standard_cart .view-cart-items .item,
#order-standard_cart .view-cart-items .item:nth-child(even) {
  background-color: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .view-cart-items .item:nth-child(odd) {
  background-color: var(--dh-bg-surface-2) !important;
}

#order-standard_cart .view-cart-items .item-title,
#order-standard_cart .view-cart-items .item-domain,
#order-standard_cart .view-cart-items .item-price {
  color: var(--dh-text-primary) !important;
}

#order-standard_cart .order-summary,
#order-standard_cart .secondary-cart-sidebar,
#order-standard_cart .cart-sidebar .panel,
#order-standard_cart .cart-sidebar .card {
  background: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-secondary) !important;
  border-color: var(--dh-border) !important;
}

#order-standard_cart .mc-promo {
  background-color: var(--dh-bg-surface-1) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .mc-promo .headline,
#order-standard_cart .mc-promo .tagline,
#order-standard_cart .mc-promo .header {
  color: var(--dh-text-primary) !important;
  background: transparent !important;
}

#order-standard_cart .account-select-container {
  border-right-color: var(--dh-border) !important;
}

#order-standard_cart .account-select-container div.account {
  background: var(--dh-bg-surface-2) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .account-select-container div.account.active {
  background: var(--dh-bg-selected) !important;
  color: var(--dh-text-primary) !important;
}

#order-standard_cart .panel-addon .panel-price {
  background-color: var(--dh-bg-surface-3) !important;
  color: var(--dh-text-primary) !important;
}

/* Secondary cart body / configure panels */
#order-standard_cart .secondary-cart-body,
#order-standard_cart .cart-body,
#order-standard_cart .product-info,
#order-standard_cart .addon-promo-container,
#order-standard_cart .field-container,
#order-standard_cart .checkout-security-msg {
  color: var(--dh-text-secondary);
}

#order-standard_cart .header-lined h1,
#order-standard_cart .cart-body > p,
#order-standard_cart .cart-body label {
  color: var(--dh-text-secondary);
}

#order-standard_cart .header-lined h1 {
  color: var(--dh-text-primary) !important;
}

/* Empty / empty-state panels */
body.dh-theme .no-data,
body.dh-theme .empty-state,
#order-standard_cart .empty,
#order-standard_cart .no-results {
  background: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-muted) !important;
  border-color: var(--dh-border) !important;
}

/* ================================================================== */
/* Client-area common leftovers                                       */
/* ================================================================== */
body.dh-theme .tiles .tile,
body.dh-theme .client-home-panels .panel,
body.dh-theme .client-home-panels .card,
body.dh-theme .kb-article,
body.dh-theme .announcement,
body.dh-theme .ticket-reply,
body.dh-theme .invoice-container,
body.dh-theme .md-editor,
body.dh-theme .md-editor > textarea,
body.dh-theme .md-editor > .md-header,
body.dh-theme .md-editor > .md-footer {
  background-color: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-secondary) !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .pagination .page-link,
body.dh-theme .pagination > li > a,
body.dh-theme .pagination > li > span {
  background-color: var(--dh-bg-surface-2) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .pagination .page-item.active .page-link,
body.dh-theme .pagination > .active > a {
  background-color: var(--dh-bg-selected) !important;
  border-color: var(--dh-border-strong) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .progress {
  background-color: var(--dh-bg-surface-3) !important;
}

/* Do not restyle intentional status badges incorrectly */
body.dh-theme .badge-success,
body.dh-theme .label-success { background-color: #1f8a55 !important; color: #fff !important; }
body.dh-theme .badge-warning,
body.dh-theme .label-warning { background-color: #b8860b !important; color: #fff !important; }
body.dh-theme .badge-danger,
body.dh-theme .label-danger { background-color: #c0392b !important; color: #fff !important; }
body.dh-theme .badge-info,
body.dh-theme .label-info { background-color: #2a6fad !important; color: #fff !important; }
body.dh-theme .badge-primary,
body.dh-theme .label-primary { background-color: var(--dh-accent) !important; color: #fff !important; }

/* ================================================================== */
/* Module / third-party compatibility                                 */
/* ================================================================== */
body.dh-theme .dh-module-output,
body.dh-theme .module-client-area,
body.dh-theme .product-details-tab-container {
  background: var(--dh-bg-surface-1);
  color: var(--dh-text-secondary);
  border-radius: var(--dh-radius);
}

/* Never force backgrounds into iframes / hosted fields */
body.dh-theme iframe[src*="recaptcha"],
body.dh-theme iframe[src*="hcaptcha"],
body.dh-theme iframe[src*="stripe"],
body.dh-theme iframe[src*="paypal"],
body.dh-theme .StripeElement,
body.dh-theme .paypal-buttons,
body.dh-theme .dh-allow-light {
  /* intentionally untouched */
}

/* MarketConnect landings: soften only utility white wrappers when nested
   in client chrome; full vendor brand pages may keep .landing-page.bg-white
   (see WHITE-SURFACE-ALLOWLIST.md). */
body.dh-theme .landing-page.bg-white {
  /* allowlisted — do not force dark here */
}

body.dh-theme .store-domain-tab-content.bg-white {
  background-color: var(--dh-bg-surface-1) !important;
  color: var(--dh-text-secondary) !important;
}

#order-standard_cart .dh-domain-pricing-wrap,
body.dh-theme .dh-domain-pricing-wrap {
  background: var(--dh-bg-surface-1) !important;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  color: var(--dh-text-secondary);
  overflow: hidden;
}
