/* ============================================================================
   Compupod dark theme — operational workspaces
   ----------------------------------------------------------------------------
   Tickets, sales, repairs, trade-ins, refurbishing, inventory, receiving,
   purchase orders, cash register, and their operational dialogs.

   This layer deliberately changes surfaces and content contrast only. Ticket,
   inventory, warning, success, and money colors remain owned by their existing
   semantic classes so operational meaning is never flattened by the theme.
   ============================================================================ */

/* Token bridge for legacy components that predate the semantic token names. */
body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) {
  --surface: var(--cp-dashboard-dark-surface);
  --surface-2: var(--cp-dashboard-dark-surface-2);
  --surface-3: var(--cp-dashboard-dark-surface-3);
  --surface-hover: var(--cp-dashboard-dark-surface-hover);
  --content-1: var(--cp-dashboard-dark-content-1);
  --content-2: var(--cp-dashboard-dark-content-2);
  --content-3: var(--cp-dashboard-dark-content-3);
  --border-1: var(--cp-dashboard-dark-border-1);
  --border-2: var(--cp-dashboard-dark-border-2);
  --cp-accent-soft: var(--cp-dashboard-dark-accent-soft);
  --cp-danger-soft: color-mix(in srgb, var(--cp-danger) 10%, var(--surface));

  --surface-1: var(--surface);
  --surface-subtle: var(--surface-2);
  --content-primary: var(--content-1);
  --content-secondary: var(--content-2);
  --border-subtle: var(--border-1);
  --cp-bg: var(--surface-2);
  --cp-surface: var(--surface);
  --cp-surface-soft: var(--surface-3);
  --cp-ink: var(--content-1);
  --cp-muted: var(--content-2);
  --cp-line: var(--border-1);
  --cp-line-strong: var(--border-2);
  --accent: var(--cp-accent);

  color-scheme: dark;
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(h1, h2, h3, h4, h5, h6, legend, strong) {
  color: inherit;
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(p, small, .muted, .empty, .empty-body, .inventory-page-subtitle) {
  color: var(--content-2);
}

/* Shared page orientation and controls. */
body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(.dashboard-breadcrumb, .newpo-breadcrumb, .iim-back-link, .iim-edit-back) {
  color: var(--content-2);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(input, select, textarea) {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(input, select, textarea):focus {
  border-color: var(--cp-accent);
  outline: none;
  box-shadow: var(--focus-ring);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(input, select, textarea):disabled,
body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(input, textarea)[readonly] {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-3);
  opacity: 1;
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) input[type="checkbox"],
body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) input[type="radio"] {
  accent-color: var(--cp-accent);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(.btn-outline, .btn-secondary, .btn-ghost, .icon-btn, .round-action, .row-menu-btn) {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #tickets-page,
  #quick-sale-page,
  #sale-ticket-page,
  #post-sale-ticket-page,
  #repair-ticket-page,
  #repair-ticket-create-page,
  #trade-in-page,
  #trade-ticket-page,
  #refurbish-ticket-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(.btn-outline, .btn-secondary, .btn-ghost, .icon-btn, .round-action, .row-menu-btn):hover:not(:disabled) {
  border-color: var(--border-2);
  background: var(--surface-hover);
  color: var(--content-1);
}

/* Lists and tables: one perimeter, quiet row separators, no white contours. */
body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) :where(
  .tickets-table-wrap,
  .customers-table-wrap,
  .inventory-table-wrap,
  .catalog-table-wrap,
  .settings-table-wrap,
  .invord-table-wrap,
  .newpo-table-wrap,
  .cash-detail-table-wrap,
  .ics-compat-wrap,
  .cie-compat-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  box-shadow: none;
  scrollbar-color: var(--border-2) transparent;
}

body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) table {
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) table thead th {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) table tbody td {
  border-color: var(--border-1);
  background: transparent;
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page,
  #receive-page,
  #purchase-orders-page,
  #new-purchase-order-page,
  #cash-register-page
) table tbody tr:hover td {
  background: var(--surface-hover);
}

/* Tickets queue and ticket menus. */
body.dashboard-dark-active #tickets-list-view.panel {
  border-color: var(--border-1);
  background: var(--surface);
  box-shadow: none;
}

body.dashboard-dark-active #tickets-list-view .panel-head,
body.dashboard-dark-active #tickets-page :where(.tickets-filter, .tickets-filter-row) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #tickets-page :where(.tickets-filter, .tickets-filter-row) {
  box-shadow: none;
}

body.dashboard-dark-active #tickets-page :where(.ticket-menu, .filter-popover, .column-picker-popover) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active #tickets-page .ticket-menu-item:not(.danger):hover {
  background: var(--surface-hover);
  color: var(--content-1);
}

/* Ticket detail pages: retain type/status accents but remove light cards and
   large saturated bands. */
body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(.repair-ticket-shell-v3, .sale-ticket-shell, .trade-ticket-shell, .refurbish-ticket-shell) {
  --ticket-nav-surface: var(--surface-3);
  --ticket-section-surface: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel {
  border-color: var(--border-1);
  background: var(--surface);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-section-body,
  .sale-section-body,
  .trade-section-body,
  .refurb-section-body,
  .repair-nav-body,
  .sale-nav-body,
  .trade-nav-body,
  .refurb-nav-body,
  .repair-totals-body,
  .sale-totals-body,
  .trade-finance-box-body,
  .refurb-totals-body,
  .repair-finance-table-wrap,
  .sale-payments-table-block,
  .trade-checklist-body,
  .refurb-items-table-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-customer-info,
  .repair-detail-fact,
  .repair-operational-card,
  .repair-problem-card,
  .repair-order-custom-panel,
  .repair-note-card,
  .repair-note-composer,
  .repair-notes-list-wrap,
  .sale-items-summary-card,
  .sale-exchange-section,
  .sale-history-list,
  .sale-note-composer,
  .sale-notes-list-wrap,
  .sale-protector-program,
  .trade-process-guide,
  .trade-inspection-task,
  .trade-note-block,
  .refurb-command-primary
) {
  border-color: var(--border-1);
  background: var(--surface-2) !important;
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-note-composer-head,
  .repair-operational-card-head,
  .sale-items-toolbar,
  .sale-protector-program-head,
  .trade-process-guide-head,
  .trade-inspection-task-head
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-customer-meta,
  .repair-line-meta,
  .repair-line-note,
  .repair-note-meta,
  .repair-note-date,
  .repair-note-type,
  .sale-item-meta,
  .sale-item-note-input,
  .sale-history-entry,
  .trade-detail-guidance,
  .trade-final-inspection-info,
  .refurb-item-note,
  .refurb-empty-line
) {
  color: var(--content-2);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel > :where(
  .repair-overview,
  .sale-command-center,
  .trade-overview,
  .refurb-command-center,
  .refurbish-ticket-breadcrumb,
  .repair-detail-work-timer
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel > :where(
  .repair-ticket-status-row,
  .sale-ticket-status-row,
  .trade-ticket-status-row,
  .refurbish-ticket-status-row
) {
  border-color: var(--border-1);
  background: color-mix(in srgb, var(--ticket-view-accent) 18%, var(--surface-3));
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel :where(
  .repair-status-bar,
  .sale-status-bar,
  .trade-status-bar,
  .refurb-status-bar,
  .repair-location-strip,
  .sale-location-strip,
  .trade-location-strip,
  .refurb-location-strip
) {
  color: var(--content-1);
  text-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-section,
  .sale-section,
  .trade-section,
  .refurb-section,
  .repair-nav-box,
  .sale-nav-box,
  .trade-nav-box,
  .refurb-nav-box,
  .repair-totals-box,
  .sale-totals-box,
  .trade-finance-box,
  .refurb-totals-box,
  .repair-balance-panel,
  .sale-balance-panel,
  .trade-finance-balance-panel,
  .refurb-balance-panel,
  .repair-hero-card,
  .sale-command-card,
  .trade-hero-card,
  .refurb-command-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(.repair-section, .sale-section, .trade-section, .refurb-section)::before {
  background: color-mix(in srgb, var(--ticket-view-accent) 58%, var(--border-1));
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-section-head,
  .sale-section-head,
  .trade-section-head,
  .refurb-section-head,
  .repair-nav-head,
  .sale-nav-head,
  .trade-nav-head,
  .refurb-nav-head,
  .repair-totals-head,
  .sale-totals-head,
  .trade-totals-head,
  .refurb-totals-head
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .sale-command-primary,
  .trade-hero-device,
  .refurb-command-primary,
  .repair-hero-device,
  .ticket-last-update-card,
  .ticket-detail-status-card
) {
  border-color: color-mix(in srgb, var(--ticket-status-accent) 45%, var(--border-1));
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(.repair-ai-summary-card, .ticket-ai-summary-card) {
  border-color: var(--border-1);
  border-left-color: var(--ticket-view-accent);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(.repair-ai-summary-card, .ticket-ai-summary-card).is-stale {
  background: color-mix(in srgb, var(--cp-warning) 7%, var(--surface-2));
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-ai-summary-head span,
  .ticket-ai-summary-head span,
  .repair-ai-summary-head em,
  .ticket-ai-summary-head em,
  .repair-overview-facts .repair-hero-card span,
  .repair-overview-facts .repair-hero-card em
) {
  color: var(--content-2);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(
  .repair-ai-summary-head strong,
  .ticket-ai-summary-head strong,
  .repair-ai-summary-body,
  .ticket-ai-summary-body,
  .repair-overview-facts .repair-hero-card strong
) {
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :where(.sale-items-table-wrap, .repair-items-table-wrap, .trade-table-wrap, .refurb-items-table-wrap) {
  border-color: var(--border-1);
  background: var(--surface);
  box-shadow: none;
}

/* Ticket creation / quick sale / trade-in intake. */
body.dashboard-dark-active :where(
  #quick-sale-page,
  #repair-ticket-create-page,
  #trade-in-page
) :where(
  .repair-fast-header,
  .ticket-fast-header,
  .repair-fast-panel,
  .ticket-create-nav-box,
  .ticket-create-financial-box,
  .repair-create-order-custom-panel,
  .ticket-item-catalog-panel,
  .repair-promise-picker,
  .repair-fast-derived-value
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}


/* New draft tickets render inside the normal ticket detail pages, while the
   legacy entry screens use the create-page IDs above. The shell itself is the
   stable contract shared by both paths. */
body.dashboard-dark-active .ticket-create-shell {
  --ticket-create-accent-soft: color-mix(in srgb, var(--ticket-create-accent) 10%, var(--surface-2));
  --ticket-create-accent-border: color-mix(in srgb, var(--ticket-create-accent) 30%, var(--border-1));
  --ticket-create-accent-ink: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-header,
  .repair-fast-panel,
  .ticket-create-nav-box,
  .ticket-create-financial-box
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell .repair-fast-panel-head {
  border-color: var(--ticket-create-accent-border);
  background: var(--ticket-create-accent-soft);
}

body.dashboard-dark-active .ticket-create-shell :is(.repair-fast-panel-head h3, .repair-fast-kicker) {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-panel-body,
  .repair-fast-linked-customer,
  .repair-fast-checkin-group,
  .repair-fast-ack-card,
  .ticket-fast-check-grid
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-linked-customer strong,
  .repair-fast-checkin-group-head strong,
  .repair-fast-ack-copy strong,
  .ticket-fast-check-grid label
) {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-linked-customer span,
  .repair-fast-checkin-group-head p,
  .repair-fast-ack-copy em,
  .ticket-fast-note,
  .repair-fast-field > span,
  .ticket-create-nav-foot span,
  .ticket-fast-finance-summary span
) {
  color: var(--content-2);
}

body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-body button:not(:disabled),
body.dashboard-dark-active .ticket-create-shell .ticket-fast-finance-summary strong {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-body button:disabled {
  color: var(--content-3);
}

body.dashboard-dark-active .ticket-create-shell :is(.ticket-create-nav-foot, .repair-fast-checkin-group-head) {
  border-color: var(--border-1);
}

body.dashboard-dark-active .ticket-create-shell .ticket-fast-finance-summary .ticket-fast-finance-balance {
  border-color: color-mix(in srgb, var(--cp-accent) 28%, var(--border-1));
  background: color-mix(in srgb, var(--cp-accent) 24%, var(--surface-2));
}

body.dashboard-dark-active .ticket-create-shell .ticket-fast-finance-summary .ticket-fast-finance-balance strong {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-customer-search-results,
  .ticket-inline-customer-results,
  .ticket-item-catalog-results,
  .quick-sale-inventory-search,
  .repair-catalog-search-results
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active .ticket-create-shell .ticket-work-timer,
body.dashboard-dark-active .ticket-create-shell .ticket-extra-add-btn {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell :is(
  .promised-time-option,
  .promised-time-clear,
  .repair-promise-option,
  .repair-promise-clear
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell .repair-promise-presets button,
body.dashboard-dark-active .ticket-create-shell .repair-promise-presets button.muted {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell .repair-promise-presets button:hover:not(:disabled) {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  color: var(--cp-accent);
}

body.dashboard-dark-active .ticket-create-shell .sale-section,
body.dashboard-dark-active .ticket-create-shell .rpc-quote-output {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #quick-sale-page,
  #repair-ticket-create-page,
  #trade-in-page
) :where(
  .repair-fast-panel-head,
  .ticket-create-nav-head,
  .ticket-create-financial-head,
  .ticket-item-picker-header,
  .ticket-item-catalog-label
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #quick-sale-page,
  #repair-ticket-create-page,
  #trade-in-page
) :where(
  .repair-fast-panel-body,
  .ticket-create-nav-body,
  .ticket-fast-finance-summary,
  .ticket-fast-finance-balance,
  .repair-fast-linked-customer,
  .ticket-item-selected,
  .quicksale-items-empty,
  .ticket-fast-note
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #quick-sale-page,
  #repair-ticket-create-page,
  #trade-in-page
) :where(
  .repair-customer-search-results,
  .ticket-inline-customer-results,
  .ticket-item-catalog-results,
  .quick-sale-inventory-search,
  .repair-catalog-search-results
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active :where(
  #quick-sale-page,
  #repair-ticket-create-page,
  #trade-in-page
) :where(
  .repair-catalog-result,
  [data-customer-result],
  [data-inventory-result],
  [data-catalog-result]
):hover {
  background: var(--surface-hover);
}

/* Inventory shells, catalog, counts, RMA, orders, and item workspaces. */
body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) .inventory-shell,
body.dashboard-dark-active #tickets-list-view.panel {
  border-color: var(--border-1);
  background: var(--surface);
  box-shadow: none;
}

body.dashboard-dark-active #purchase-orders-page .inventory-shell {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-page .devices-toolbar-row-filters,
body.dashboard-dark-active #new-purchase-order-page .devices-toolbar-row-filters {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-page :is(
  .field,
  .inv-adjust-money,
  .inventory-rma-batch-bar
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}


body.dashboard-dark-active #inventory-count-sheet-page :is(.ics-scan-row, .ics-search-mode-btn) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--cp-accent);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-orders-page #invord-itype-toggle {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-item-manage-page :is(.iim-action-btn, .iim-cancel-btn),
body.dashboard-dark-active :is(#catalog-item-view-page, #catalog-item-edit-page) .cie-action-btn {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--cp-accent);
  box-shadow: none;
}

body.dashboard-dark-active #new-purchase-order-page :is(
  .newpo-reconciled-view,
  .newpo-type-filter-toggle,
  .newpo-reorder-filter-menu
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #new-purchase-order-page :is(
  #newpo-header-status,
  #newpo-header-supplier,
  #newpo-header-lines,
  .po-import-ms-card
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #new-purchase-order-page :is(
  #newpo-reorder-filter-select-all,
  #newpo-reorder-filter-unselect-all
) {
  background: transparent;
  color: var(--cp-accent);
}

body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) :where(.inventory-title-bar, .devices-toolbar, .inventory-summary-strip) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) .inventory-title-bar .inventory-section-tabs button:not(.active) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) .inventory-title-bar .inventory-section-tabs button:not(.active):hover {
  border-color: var(--border-2);
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #tickets-page,
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) :where(.devices-toolbar-row-filters, .inventory-filter-pill, .devices-date-chip) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

/* Ticket filters have a legacy ID-scoped light surface. Match that specificity
   so the shared filter row does not flash as a white rail in dark mode. */
body.dashboard-dark-active #tickets-list-view .devices-toolbar-row-filters {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #tickets-list-view .devices-pagination-nav button {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #tickets-list-view .devices-pagination-nav button:hover:not(:disabled) {
  border-color: var(--border-2);
  background: var(--surface-hover);
}

body.dashboard-dark-active #tickets-list-view .devices-pagination-nav button:disabled {
  color: var(--content-3);
  opacity: 1;
}

body.dashboard-dark-active #inventory-page .devices-pagination-nav button,
body.dashboard-dark-active #purchase-orders-page .devices-pagination-nav button,
body.dashboard-dark-active #inventory-item-detail-page .devices-pagination-nav button {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-page .devices-pagination-nav button:hover:not(:disabled),
body.dashboard-dark-active #purchase-orders-page .devices-pagination-nav button:hover:not(:disabled),
body.dashboard-dark-active #inventory-item-detail-page .devices-pagination-nav button:hover:not(:disabled) {
  border-color: var(--border-2);
  background: var(--surface-hover);
}

body.dashboard-dark-active #inventory-page .devices-pagination-nav button:disabled,
body.dashboard-dark-active #purchase-orders-page .devices-pagination-nav button:disabled,
body.dashboard-dark-active #inventory-item-detail-page .devices-pagination-nav button:disabled {
  color: var(--content-3);
  opacity: 1;
}

body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) :where(
  .devices-add-filter-popover,
  .devices-date-popover,
  .inv-row-menu,
  .po-actions-menu,
  .po-row-menu
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active :where(
  #inventory-page,
  #receive-page,
  #purchase-orders-page
) :where(.devices-add-filter-popover, .devices-date-popover, .inv-row-menu, .po-actions-menu, .po-row-menu) button:not(.danger):hover {
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page
) :where(
  .iid-shell,
  .iim-shell,
  .civ-shell,
  .cie-shell,
  .ics-panel,
  .invord-shell,
  .civ-panel,
  .cie-section,
  .iim-sidebar,
  .iim-log,
  .iid-facet,
  .ics-current-card,
  .inventory-config-panel,
  .inventory-suppliers-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page
) :where(
  .iid-pagebar,
  .iim-pagebar,
  .iim-titlebar,
  .civ-pagebar,
  .civ-titlebar,
  .cie-pagebar,
  .cie-titlebar,
  .ics-panel-head,
  .invord-sidebar-head,
  .civ-panel-head,
  .cie-section-head,
  .iim-log-head
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page
) :where(
  .iid-attachments,
  .iid-attachments-upload,
  .cie-image-dropzone,
  .cie-duplicate-panel,
  .catalog-copy-card,
  .catalog-merge-card,
  .catalog-supplier-skus-card,
  .iim-m360-report,
  .iim-shelf-label-preview-wrap,
  .ics-current-empty,
  .ics-counted-empty
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-item-manage-page :where(.iim-catalog-options, .iim-catalog-combobox [role="listbox"]),
body.dashboard-dark-active #catalog-item-edit-page :where(.cie-lookup-results, .cie-duplicate-results),
body.dashboard-dark-active #inventory-count-sheet-page .ics-search-results {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active #inventory-item-detail-page :where(
  .iid-facet-strip,
  .iid-attachments,
  .iid-attach-card,
  .iid-harvest-modal-card,
  .iid-harvest-selected,
  .iid-harvest-results,
  .iid-harvest-result
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-item-detail-page :where(
  .iid-facet,
  .iid-attachments-head,
  .iid-attach-meta,
  .iid-harvest-selected-head
) {
  border-color: var(--border-1);
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-item-detail-page :where(
  .iid-attachments-upload,
  .iid-attachments-empty,
  .iid-attach-thumb,
  .iid-harvest-entry
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-item-detail-page .iid-banner-info {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-item-detail-page .iid-banner-error {
  border-color: color-mix(in srgb, var(--cp-danger) 30%, var(--border-1));
  background: color-mix(in srgb, var(--cp-danger) 9%, var(--surface));
  color: var(--cp-danger);
}

body.dashboard-dark-active #catalog-item-view-page :where(
  .civ-definition-grid,
  .civ-change-log-panel,
  .civ-change-log-wrap
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active #catalog-item-view-page .civ-definition-grid :where(dt, dd),
body.dashboard-dark-active #catalog-item-view-page .civ-change-log-table td {
  border-color: var(--border-1);
  color: var(--content-2);
}

body.dashboard-dark-active #catalog-item-view-page .civ-definition-grid dd {
  color: var(--content-1);
}

body.dashboard-dark-active #catalog-item-edit-page :where(
  .cie-lock-popover,
  .cie-duplicate-sticky,
  .cie-duplicate-result,
  .cie-lookup-results,
  .cie-lookup-result,
  .cie-compat-wrap,
  .cie-image-preview-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #catalog-item-edit-page :where(
  .cie-duplicate-header,
  .cie-section-head,
  .cie-image-dropzone,
  .cie-compat-empty,
  .cie-locked-field
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #catalog-item-edit-page :where(
  .cie-field > span,
  .cie-duplicate-header p,
  .cie-duplicate-result span,
  .cie-lookup-result span,
  .cie-section-hint
) {
  color: var(--content-2);
}

body.dashboard-dark-active #catalog-item-edit-page :where(.cie-duplicate-result, .cie-lookup-result):hover,
body.dashboard-dark-active #catalog-item-edit-page :where(.cie-duplicate-result, .cie-lookup-result):focus {
  background: var(--surface-hover);
}

body.dashboard-dark-active #inventory-item-manage-page :where(
  .iim-side-table,
  .iim-log-list,
  .iim-log-table,
  .iim-update-form,
  .iim-ref-popover,
  .iim-catalog-option
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-item-manage-page :where(
  .iim-side-table th,
  .iim-log-table tr,
  .iim-log-table tr:nth-child(odd),
  .iim-log-table tr:nth-child(even),
  .iim-form-row > label,
  .iim-form-row label span,
  .iim-field-stack small,
  .iim-log-empty,
  .iim-log-time
) {
  border-color: var(--border-1);
  background: transparent;
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-item-manage-page .iim-catalog-option:hover,
body.dashboard-dark-active #inventory-item-manage-page .iim-catalog-option:focus {
  background: var(--surface-hover);
}

body.dashboard-dark-active #inventory-count-sheet-page :where(
  .ics-panel-body,
  .ics-search-results,
  .ics-search-row,
  .ics-current-card,
  .ics-counted-toolbar
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-count-sheet-page .ics-search-row:hover {
  background: var(--surface-hover);
}

body.dashboard-dark-active #inventory-count-sheet-page :where(
  .ics-search-name,
  .ics-counted-name,
  .ics-current-card h2
) {
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-count-sheet-page :where(
  .ics-search-meta,
  .ics-search-empty,
  .ics-counted-toolbar label,
  .ics-counted-empty
) {
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-orders-page :where(
  .invord-sidebar,
  .invord-main,
  .invord-table-wrap,
  .invord-pagination
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #inventory-orders-page :where(
  .invord-sidebar-actions,
  .invord-filter-label,
  .invord-desc,
  .invord-pages
) {
  border-color: var(--border-1);
  color: var(--content-2);
}

/* Receive Station: initial scan, guided receiving, parts, labels, and recovery. */
body.dashboard-dark-active #receive-page :where(.receive-station-scan-panel, .receive-station-results-panel) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #receive-page .receive-station-panel-head {
  border-color: var(--border-1);
  color: var(--content-2);
}

body.dashboard-dark-active #receive-page .receive-station-panel-head strong {
  color: var(--content-1);
}

body.dashboard-dark-active #receive-page .receive-station-results-panel .receive-station-table :where(th, td) {
  border-color: var(--border-1);
}

body.dashboard-dark-active #receive-page .receive-station-results-panel .receive-station-result-action {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #receive-page .receive-station-results-panel .receive-station-result-action:hover {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  color: var(--cp-accent);
}

body.dashboard-dark-active #receive-page .receive-station-results-panel .receive-station-result-summary {
  color: var(--content-1);
}

body.dashboard-dark-active #receive-page .receive-station-field {
  color: var(--content-2);
}

body.dashboard-dark-active #receive-page .receive-station-field input {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #receive-page .receive-station-field input:focus {
  border-color: var(--cp-accent);
  box-shadow: var(--focus-ring);
}

body.dashboard-dark-active #receive-page :where(
  .trade-final-inspection-panel,
  .receive-station-workspace
) {
  border-color: color-mix(in srgb, var(--cp-accent) 22%, var(--border-1));
  background: color-mix(in srgb, var(--cp-accent) 5%, var(--surface-2));
  box-shadow: none;
}

body.dashboard-dark-active #receive-page :where(
  .ti-step-card,
  .receive-station-guided-order,
  .receive-station-guided-device-card,
  .receive-station-parts-order,
  .receive-station-label-unit,
  .receive-station-label-recovery-row
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #receive-page :where(
  .receive-station-guided-message,
  .receive-station-guided-identity,
  .receive-station-pending-chip,
  .receive-station-label-queue-index
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
}

body.dashboard-dark-active #receive-page .receive-station-guided-message.is-error,
body.dashboard-dark-active #receive-page .receive-station-guided-warnings .is-danger {
  border-color: color-mix(in srgb, var(--cp-danger) 30%, var(--border-1));
  background: color-mix(in srgb, var(--cp-danger) 9%, var(--surface));
  color: var(--cp-danger);
}

body.dashboard-dark-active #receive-page .receive-station-guided-complete {
  border-color: color-mix(in srgb, var(--cp-success) 30%, var(--border-1));
  background: color-mix(in srgb, var(--cp-success) 9%, var(--surface));
  color: var(--cp-success);
}

body.dashboard-dark-active #receive-page :where(
  .receive-station-label-queue,
  .receive-station-label-queue-head,
  .receive-station-label-queue-row,
  .receive-station-subsection,
  .receive-station-label-recovery-list,
  .receive-station-label-recovery-row + .receive-station-label-recovery-row
) {
  border-color: var(--border-1);
}

body.dashboard-dark-active #receive-page .receive-station-label-recovery-summary {
  border-color: color-mix(in srgb, var(--cp-danger) 24%, var(--border-1));
  background: color-mix(in srgb, var(--cp-danger) 7%, var(--surface));
  color: var(--content-1);
}

/* --------------------------------------------------------------------------
   Workflow harmony: receiving and ticket intake
   -------------------------------------------------------------------------- */
body.dashboard-dark-active #receive-page :is(
  .inventory-shell,
  .receive-station-layout,
  .receive-station-scan-panel,
  .receive-station-results-panel,
  .receive-station-table-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #receive-page .receive-station-scan-panel {
  border-right-color: var(--border-1);
}

body.dashboard-dark-active .ticket-create-shell {
  --ticket-create-accent-soft: color-mix(in srgb, var(--ticket-create-accent) 12%, var(--surface));
  --ticket-create-accent-border: color-mix(in srgb, var(--ticket-create-accent) 32%, var(--border-1));
  --ticket-create-accent-ink: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .ticket-create-main,
  .sale-ticket-main,
  .ticket-create-sidebar,
  .repair-fast-header,
  .sale-title-bar,
  .repair-fast-panel,
  .repair-fast-panel-body,
  .ticket-create-nav-box,
  .ticket-create-financial-box,
  .ticket-create-nav-body,
  .ticket-fast-finance-summary
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-header,
  .sale-title-bar,
  .repair-fast-panel-head,
  .ticket-create-nav-head,
  .ticket-create-financial-head
) {
  border-color: var(--border-1);
  background: color-mix(in srgb, var(--ticket-create-accent) 10%, var(--surface));
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-header h2,
  .sale-title-bar h2,
  .repair-fast-kicker,
  .repair-fast-panel-head h3,
  .ticket-create-nav-head,
  .ticket-create-financial-head
) {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-linked-customer,
  .repair-fast-checkin-group,
  .repair-fast-ack-card,
  .ticket-fast-check-grid,
  .ticket-fast-note
) {
  border-color: var(--border-1);
  background: transparent;
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-linked-customer strong,
  .repair-fast-field > span,
  .repair-fast-checkin-group-head strong,
  .repair-fast-ack-copy strong,
  .ticket-fast-check-grid label,
  .ticket-inline-customer-controls label
) {
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(
  .repair-fast-linked-customer span,
  .repair-fast-checkin-group-head p,
  .repair-fast-ack-copy em,
  .ticket-fast-note,
  .repair-fast-step-hint,
  .ticket-create-nav-foot span
) {
  color: var(--content-2);
}

body.dashboard-dark-active .ticket-create-shell :is(input, select, textarea) {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active .ticket-create-shell :is(input, textarea)::placeholder {
  color: var(--content-placeholder);
}

body.dashboard-dark-active .ticket-create-shell :is(input, select, textarea):disabled {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-3);
  opacity: 1;
}

body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-body :is(a, button:not(:disabled)),
body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-foot :is(a, button:not(:disabled)) {
  background: transparent;
  color: var(--content-2);
}

body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-body :is(a, button):is(:hover, .active) {
  background: color-mix(in srgb, var(--ticket-create-accent) 18%, var(--surface));
  color: var(--content-1);
  box-shadow: inset var(--space-1) 0 0 var(--ticket-create-accent);
}

body.dashboard-dark-active .ticket-create-shell .ticket-create-nav-body button:disabled {
  background: transparent;
  color: var(--content-3);
  opacity: 1;
}

@media (max-width: 760px) {
  body.dashboard-dark-active #receive-page .receive-station-scan-panel {
    border-right: 0;
    border-bottom-color: var(--border-1);
  }
}

/* Compact inventory tables contain local text colors for names and metadata.
   They are shared by Summary, Catalog, Detail, Counts, and RMA, so correct the
   family once instead of letting low-contrast gray repeat across subsections. */
body.dashboard-dark-active #inventory-page .customers-table th,
body.dashboard-dark-active #inventory-page .inventory-counts-table th {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #inventory-page .customers-table td,
body.dashboard-dark-active #inventory-page .inventory-counts-table td {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-page :where(
  .inventory-name-btn,
  .inv-sum-name-text,
  .invcounts-name-main,
  .inv-det-name-cell
) {
  color: var(--content-1);
}

body.dashboard-dark-active #inventory-page :where(
  .invcounts-name-sub,
  .inv-det-cell-sub
) {
  color: var(--content-3);
}

body.dashboard-dark-active #inventory-page .customers-table tbody tr:hover td,
body.dashboard-dark-active #inventory-page .inventory-counts-table tbody tr:hover td {
  background: var(--surface-hover);
}

/* Purchase orders and the PO editor. */
body.dashboard-dark-active #purchase-orders-page :where(
  .po-summary-card,
  .po-basket-strip,
  .po-basket-card,
  .inventory-supplier-form,
  .inventory-suppliers-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #new-purchase-order-page :where(
  .newpo-header,
  .newpo-summary,
  .newpo-supplier,
  .newpo-tracking,
  .newpo-main,
  .newpo-panel,
  .newpo-rte,
  .newpo-change-log,
  .newpo-recon-card,
  .newpo-recon-remarks,
  .newpo-recon-totals-card,
  .newpo-recon-reconciliation-card,
  .newpo-catalog-change-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #new-purchase-order-page :where(
  .newpo-section-head,
  .newpo-panel-head,
  .newpo-rte-toolbar,
  .newpo-change-log-head,
  .newpo-recon-titlebar,
  .newpo-cancelled-titlebar,
  .newpo-recon-toolbar,
  .newpo-cancelled-toolbar
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #new-purchase-order-page :where(
  .newpo-tabs,
  .newpo-subtabs,
  .newpo-table-actions,
  .newpo-il-actions,
  .newpo-catalog,
  .newpo-il-catalog,
  .newpo-totals,
  .newpo-recon-bottom-grid,
  .newpo-cancel-bottom-grid,
  .newpo-ms-preview,
  .newpo-catalog-change-warning
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #new-purchase-order-page :where(.newpo-tab, .newpo-subtab):not(.active) {
  border-color: transparent;
  background: transparent;
  color: var(--content-2);
}

body.dashboard-dark-active #new-purchase-order-page :where(.newpo-tab, .newpo-subtab):not(.active):hover {
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active #new-purchase-order-page :where(
  .newpo-type-filter-menu,
  .newpo-catalog-results,
  .newpo-modal-card,
  .newpo-ms-modal-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active #new-purchase-order-page :where(.newpo-type-filter-option, .newpo-catalog-result):hover {
  background: var(--surface-hover);
}

body.dashboard-dark-active #new-purchase-order-page .newpo-rte-editor {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

/* Cash register. Preserve green/red/amber meanings on status and amounts. */
body.dashboard-dark-active #cash-register-page :where(
  .cash-card,
  .cash-detail,
  .cash-petty-section
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #cash-register-page .cash-card.is-closed {
  background: var(--surface-2);
}

body.dashboard-dark-active #cash-register-page :where(
  .cash-register-head-text h2,
  .cash-card-name,
  .cash-card-row dd,
  .cash-detail-head h3,
  .cash-detail-meta strong,
  .cash-detail-summary-tile .tile-value
) {
  color: var(--content-1);
}

body.dashboard-dark-active #cash-register-page :where(
  .cash-register-sub,
  .cash-register-location,
  .cash-register-loading,
  .cash-card-row dt,
  .cash-card-empty,
  .cash-detail-meta,
  .cash-detail-empty,
  .cash-petty-head p
) {
  color: var(--content-2);
}

body.dashboard-dark-active #cash-register-page .cash-card-actions {
  border-color: var(--border-1);
}

body.dashboard-dark-active #cash-register-page .cash-card-view-btn {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #cash-register-page .cash-card-view-btn:hover {
  background: var(--surface-hover);
}

body.dashboard-dark-active #cash-register-page .cash-card-view-btn.is-active {
  border-color: var(--cp-accent);
  background: var(--cp-accent-soft);
  color: var(--content-1);
}

body.dashboard-dark-active #cash-register-page .cash-detail-summary-tile {
  border-color: var(--border-1);
  background: var(--surface-2);
}

body.dashboard-dark-active #cash-register-page .cash-detail-summary-tile .tile-label {
  color: var(--content-2);
}

body.dashboard-dark-active #cash-register-page .cash-register-no-slot {
  border-color: color-mix(in srgb, var(--cp-warning) 32%, var(--border-1));
  background: color-mix(in srgb, var(--cp-warning) 9%, var(--surface));
  color: var(--content-1);
}

body.dashboard-dark-active #cash-register-page .cash-no-slot-text strong {
  color: var(--cp-warning);
}

/* Operational overlays live outside their page roots, so they receive their
   own token bridge. Dedicated Chat dialogs are intentionally excluded. */
body.dashboard-dark-active :where(
  .inv-form-overlay,
  .newpo-modal-overlay,
  .pc-modal,
  .rpc-modal,
  .rpc-mode-modal,
  .post-sale-modal,
  .customer-picker-modal,
  #charge-modal,
  #manager-pin-modal,
  #register-picker-modal,
  #register-startup-modal,
  #cash-open-modal,
  #cash-payin-modal,
  #cash-payout-modal,
  #cash-close-modal,
  #cash-transfer-modal,
  #petty-open-modal,
  #petty-outflow-modal,
  #petty-close-modal,
  .repair-notes-modal-card,
  .repair-status-note-modal-card,
  .repair-technician-modal-card,
  .sale-exchange-panel,
  .iid-harvest-modal-card
) {
  --surface: var(--cp-dashboard-dark-surface);
  --surface-2: var(--cp-dashboard-dark-surface-2);
  --surface-3: var(--cp-dashboard-dark-surface-3);
  --surface-hover: var(--cp-dashboard-dark-surface-hover);
  --content-1: var(--cp-dashboard-dark-content-1);
  --content-2: var(--cp-dashboard-dark-content-2);
  --content-3: var(--cp-dashboard-dark-content-3);
  --border-1: var(--cp-dashboard-dark-border-1);
  --border-2: var(--cp-dashboard-dark-border-2);
  --cp-accent-soft: var(--cp-dashboard-dark-accent-soft);
  --cp-danger-soft: color-mix(in srgb, var(--cp-danger) 10%, var(--surface));
  --surface-1: var(--surface);
  --content-primary: var(--content-1);
  --content-secondary: var(--content-2);
  --border-subtle: var(--border-1);

  color-scheme: dark;
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .inv-form-panel,
  .newpo-modal-card,
  .pc-modal-content,
  .rpc-modal-content,
  .post-sale-modal-card,
  .customer-picker-panel,
  .charge-modal-panel,
  .register-picker-panel,
  .ticket-item-picker-panel,
  .ticket-return-panel,
  .ticket-warranties-panel,
  .repair-notes-modal-card,
  .repair-status-note-modal-card,
  .repair-technician-modal-card,
  .sale-exchange-panel,
  .iid-harvest-modal-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
  background-clip: padding-box;
}

body.dashboard-dark-active :where(
  .inv-form-header,
  .inv-form-head,
  .newpo-modal-head,
  .pc-modal-bar,
  .rpc-modal-bar,
  .post-sale-modal-head,
  .customer-picker-header,
  .ticket-item-picker-header,
  .ticket-return-head,
  .ticket-warranties-heading,
  .repair-notes-modal-head,
  .repair-technician-modal-head,
  .sale-exchange-title-wrap,
  .iid-harvest-selected-head
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .inv-form-body,
  .newpo-modal-body,
  .pc-modal-body,
  .rpc-modal-body,
  .post-sale-modal-body,
  .ticket-return-body,
  .ticket-warranties-body,
  .repair-notes-modal-body,
  .sale-exchange-section,
  .iid-harvest-body
) {
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .inv-form-footer,
  .newpo-modal-foot,
  .post-sale-modal-actions,
  .ticket-return-footer,
  .ticket-warranties-footer,
  .charge-footer
) {
  border-color: var(--border-1);
  background: var(--surface);
}

body.dashboard-dark-active :where(
  .inv-form-panel,
  .newpo-modal-card,
  .pc-modal-content,
  .rpc-modal-content,
  .post-sale-modal-card,
  .customer-picker-panel,
  .charge-modal-panel,
  .register-picker-panel,
  .ticket-item-picker-panel,
  .ticket-return-panel,
  .ticket-warranties-panel,
  .repair-notes-modal-card,
  .repair-status-note-modal-card,
  .repair-technician-modal-card,
  .sale-exchange-panel,
  .iid-harvest-modal-card
) :where(input, select, textarea) {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  .inv-form-panel,
  .newpo-modal-card,
  .pc-modal-content,
  .rpc-modal-content,
  .post-sale-modal-card,
  .customer-picker-panel,
  .charge-modal-panel,
  .register-picker-panel,
  .ticket-item-picker-panel,
  .ticket-return-panel,
  .ticket-warranties-panel,
  .repair-notes-modal-card,
  .repair-status-note-modal-card,
  .repair-technician-modal-card,
  .sale-exchange-panel,
  .iid-harvest-modal-card
) :where(input, select, textarea):focus {
  border-color: var(--cp-accent);
  outline: none;
  box-shadow: var(--focus-ring);
}

body.dashboard-dark-active .charge-modal-panel :where(
  .charge-modal-eyebrow,
  .charge-summary-label,
  .charge-field > span,
  .charge-balance-row span,
  .charge-tender-change,
  .charge-tender-note
) {
  color: var(--content-2);
}

body.dashboard-dark-active .charge-modal-panel :where(
  .charge-modal-header h2,
  .charge-summary-value,
  .charge-customer-line strong,
  .charge-balance-row strong
) {
  color: var(--content-1);
}

body.dashboard-dark-active .charge-modal-panel :where(
  .charge-summary-tile,
  .charge-customer-line,
  .cash-modal-context,
  .charge-tender-note,
  .charge-tender-change strong
) {
  border-color: var(--border-1);
  background: var(--surface-2);
}

body.dashboard-dark-active .charge-modal-panel :where(
  .charge-summary-tile-total,
  .charge-summary-tile-paid,
  .charge-summary-tile-balance
) {
  border-color: var(--border-1);
  background: var(--surface-2);
}

body.dashboard-dark-active .charge-modal-panel .charge-tender {
  background: var(--surface);
}

body.dashboard-dark-active .charge-modal-panel .charge-cash-chip {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active .charge-modal-panel .charge-cash-chip:hover {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active .charge-modal-panel .charge-cash-chip.is-primary {
  border-color: var(--cp-accent);
  background: var(--cp-accent);
  color: var(--cp-accent-content);
}

body.dashboard-dark-active :where(.cash-modal-context, .cash-close-summary) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active :where(.cash-modal-context, .cash-close-summary) strong {
  color: var(--content-1);
}

body.dashboard-dark-active .manager-pin-reason {
  border-color: color-mix(in srgb, var(--cp-warning) 30%, var(--border-1));
  background: color-mix(in srgb, var(--cp-warning) 9%, var(--surface));
  color: var(--content-1);
}

body.dashboard-dark-active .manager-pin-instruction,
body.dashboard-dark-active .manager-pin-status {
  color: var(--content-2);
}

body.dashboard-dark-active .manager-pin-instruction strong {
  color: var(--content-1);
}

body.dashboard-dark-active .manager-pin-input {
  border-color: var(--border-2);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .inv-adjust-rq-card,
  .inv-loc-overrides-card,
  .iid-harvest-modal-card,
  .catalog-modal-card,
  .catalog-copy-card,
  .catalog-merge-card,
  .catalog-supplier-skus-card
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :where(
  .inv-adjust-rq-head,
  .inv-adjust-editor-foot,
  .inv-loc-overrides-info,
  .iid-harvest-selected-head,
  .catalog-modal-summary
) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
}

body.dashboard-dark-active :where(
  .inv-adjust-filter-grid,
  .inv-adjust-edit-grid,
  .inv-adjust-transfer-grid,
  .inv-adjust-transfer-note,
  .inv-adjust-warning,
  .iid-harvest-selected,
  .iid-harvest-results,
  .catalog-merge-results,
  .catalog-table-wrap
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .pc-row,
  .pc-row-options,
  .pc-location-chip,
  .pc-type-btn,
  .pc-type-popover,
  .pc-type-quick-btn,
  .pc-results-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .pc-control-label,
  .pc-results-count,
  .pc-condition-small,
  .pc-supplier-small,
  .pc-empty-row td,
  .pc-loading-row td
) {
  color: var(--content-2);
}

body.dashboard-dark-active :where(.pc-type-quick-btn, .pc-type-list li):hover,
body.dashboard-dark-active .pc-results-table tbody tr:hover td {
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active .pc-results-table :where(th, td) {
  border-color: var(--border-1);
}

body.dashboard-dark-active .register-picker-card {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active .register-picker-card:hover {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
}

body.dashboard-dark-active .register-picker-card.is-current {
  border-color: var(--cp-accent);
  background: var(--cp-accent-soft);
}

body.dashboard-dark-active .register-picker-label,
body.dashboard-dark-active .register-picker-head h3 {
  color: var(--content-1);
}

body.dashboard-dark-active :where(.register-picker-hint, .register-picker-skip) {
  color: var(--content-2);
}

body.dashboard-dark-active .register-picker-skip:hover {
  background: var(--surface-hover);
  color: var(--content-1);
}

body.dashboard-dark-active :where(
  .customer-picker-results,
  .ticket-item-catalog-results,
  .iim-catalog-options,
  .repair-customer-search-results,
  .ticket-inline-customer-results,
  .repair-catalog-search-results,
  .newpo-catalog-results
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

/* Keep rounded corners visually intact without clipping menus/popovers. Direct
   children inherit the panel radius, avoiding the protruding header corners
   that appeared at zoomed and narrow viewport sizes. */
body.dashboard-dark-active :where(
  .ticket-detail-overview-panel,
  .repair-fast-panel,
  .ticket-create-nav-box,
  .ticket-create-financial-box,
  .inventory-shell,
  .ics-panel,
  .newpo-panel,
  .cash-card,
  .cash-detail,
  .cash-petty-section,
  .inv-form-panel,
  .newpo-modal-card,
  .charge-modal-panel,
  .register-picker-panel
) > :first-child {
  border-start-start-radius: inherit;
  border-start-end-radius: inherit;
  background-clip: padding-box;
}

body.dashboard-dark-active :where(
  .ticket-detail-overview-panel,
  .repair-fast-panel,
  .ticket-create-nav-box,
  .ticket-create-financial-box,
  .inventory-shell,
  .ics-panel,
  .newpo-panel,
  .cash-card,
  .cash-detail,
  .cash-petty-section,
  .inv-form-panel,
  .newpo-modal-card,
  .charge-modal-panel,
  .register-picker-panel
) > :last-child {
  border-end-start-radius: inherit;
  border-end-end-radius: inherit;
  background-clip: padding-box;
}

/* ===========================================================================
   Dark-mode completion audit — calculators and secondary workspaces
   ========================================================================== */

/* All four calculator paths use the same semantic surfaces. Diagnostic was
   already tokenized; these rules complete Repair, Trade-In and Special Order
   without flattening their meaningful success/warning accents. */
body.dashboard-dark-active :is(.rpc-modal-body, .rpc-mode-body) {
  border: 1px solid var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active :is(.rpc-modal-content, .rpc-mode-content) {
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active .rpc-mode-content {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--cp-accent) 12%, transparent), transparent 34%),
    var(--surface);
}

body.dashboard-dark-active :is(.rpc-mode-card, .rpc-trade-card) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active .rpc-mode-card:hover {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  box-shadow: var(--shadow-sm);
}

body.dashboard-dark-active .rpc-mode-card :is(span, strong),
body.dashboard-dark-active :is(.rpc-trade-card-title, .rpc-field span, .rpc-section-head) {
  color: var(--content-1);
}

body.dashboard-dark-active :is(.rpc-trade-card-title, .rpc-section-head) {
  border-color: var(--border-1);
}

body.dashboard-dark-active :is(
  .rpc-results-panel,
  .rpc-quote-panel,
  .rpc-trade-quote-panel,
  .rpc-manual-form,
  .rpc-diagnostic-intro,
  .rpc-diagnostic-report-stage .rpc-field,
  .rpc-diagnostic-actions
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :is(.rpc-section-head, .rpc-source-heading, .rpc-ticket-actions) {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :is(.rpc-section-head span:last-child, .rpc-option-meta, .rpc-option-price small, .rpc-empty) {
  color: var(--content-2);
}

body.dashboard-dark-active :is(.rpc-option, .rpc-quote-output) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active .rpc-option:hover,
body.dashboard-dark-active .rpc-option.is-selected {
  background: var(--surface-hover);
}

body.dashboard-dark-active :is(.rpc-option-name, .rpc-option-price, .rpc-price-details dd) {
  color: var(--content-1);
}

body.dashboard-dark-active .rpc-option-img,
body.dashboard-dark-active .rpc-option-img-empty {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active .rpc-price-details dt {
  color: var(--content-2);
}

body.dashboard-dark-active .rpc-pricing-analysis {
  border-color: var(--border-1);
  background: var(--surface-2);
}

body.dashboard-dark-active :is(.rpc-clear-btn, .rpc-manual-toggle-btn) {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active :is(.rpc-clear-btn, .rpc-manual-toggle-btn):hover {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  color: var(--cp-accent);
}

body.dashboard-dark-active :is(.rpc-status, .rpc-status.rpc-error) {
  border: 1px solid var(--border-1);
}

/* Ticket detail views are full dark canvases. Their semantic ticket/status
   accents stay intact; content and support rails use the shared surface
   hierarchy so no white cards or unreadable navy-on-charcoal text remain. */
body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) {
  min-height: 100%;
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .sale-ticket-main,
  .repair-ticket-main,
  .trade-ticket-main,
  .refurbish-ticket-main,
  .sale-ticket-sidebar,
  .repair-ticket-sidebar,
  .trade-ticket-sidebar,
  .refurbish-ticket-sidebar
) {
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel :is(
  .repair-hero-card,
  .sale-command-card,
  .trade-hero-card,
  .refurb-command-card,
  .sale-command-primary,
  .trade-hero-device,
  .refurb-command-primary,
  .repair-hero-device
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel :is(
  .repair-hero-card,
  .sale-command-card,
  .trade-hero-card,
  .refurb-command-card
) :is(span, em, small, p) {
  color: var(--content-2);
}

body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-detail-overview-panel :is(
  .repair-hero-card,
  .sale-command-card,
  .trade-hero-card,
  .refurb-command-card
) :is(strong, h2, h3) {
  color: var(--content-1);
}

body.dashboard-dark-active #repair-ticket-page .ticket-detail-overview-panel .repair-hero-equipment-bin {
  border-color: var(--border-1);
}

body.dashboard-dark-active #repair-ticket-page .ticket-detail-overview-panel .repair-hero-equipment-bin > strong {
  border-color: color-mix(in srgb, var(--cp-accent) 30%, var(--border-1));
  background: color-mix(in srgb, var(--cp-accent) 10%, var(--surface));
  color: var(--content-1);
}

body.dashboard-dark-active #repair-ticket-page .ticket-detail-overview-panel .repair-assignment-alert {
  border-color: color-mix(in srgb, var(--cp-danger) 32%, var(--border-1));
  background: color-mix(in srgb, var(--cp-danger) 10%, var(--surface));
  color: var(--cp-danger);
}

body.dashboard-dark-active :is(
  #sale-ticket-page,
  #repair-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-nav-box,
  .sale-nav-box,
  .trade-nav-box,
  .refurb-nav-box,
  .repair-totals-box,
  .sale-totals-box,
  .trade-finance-box,
  .refurb-totals-box
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active :is(
  .repair-nav-body,
  .sale-nav-body,
  .trade-nav-body,
  .refurb-nav-body
) :is(a, button, span, strong),
body.dashboard-dark-active :is(
  .repair-totals-body,
  .sale-totals-body,
  .trade-finance-box-body,
  .refurb-totals-body
) :is(span, strong, p, div) {
  color: var(--content-2);
}

body.dashboard-dark-active :is(
  .repair-balance-panel,
  .sale-balance-panel,
  .trade-finance-balance-panel,
  .refurb-balance-panel
),
body.dashboard-dark-active :is(
  .repair-balance-panel,
  .sale-balance-panel,
  .trade-finance-balance-panel,
  .refurb-balance-panel
) * {
  color: var(--content-inv);
}

body.dashboard-dark-active :is(
  .repair-nav-body,
  .sale-nav-body,
  .trade-nav-body,
  .refurb-nav-body
) :is(a, button):is(:hover, .active) {
  background: var(--surface-hover);
  color: var(--cp-accent);
}

body.dashboard-dark-active :is(
  .sale-ticket-action-bar,
  .repair-ticket-action-bar,
  .trade-ticket-action-bar,
  .refurbish-ticket-action-bar
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: var(--shadow-md);
}

/* The create flow reuses the Repair action-bar class, including the final Save
   Ticket footer shown after the step content. */
body.dashboard-dark-active .ticket-create-shell + :is(
  .sale-ticket-action-bar,
  .repair-ticket-action-bar,
  .trade-ticket-action-bar,
  .refurbish-ticket-action-bar
),
body.dashboard-dark-active .ticket-create-shell :is(
  .sale-ticket-action-bar,
  .repair-ticket-action-bar,
  .trade-ticket-action-bar,
  .refurbish-ticket-action-bar,
  .repair-fast-action-bar
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

/* Secondary inventory/catalog records own the full page canvas; previously
   only their inner panels were themed, leaving a large white page below. */
body.dashboard-dark-active #app-view > :is(
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page,
  #inventory-count-sheet-page,
  #inventory-orders-page
) {
  min-height: calc(100vh - var(--space-10));
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active :is(
  #inventory-item-detail-page,
  #inventory-item-manage-page,
  #catalog-item-view-page,
  #catalog-item-edit-page
) :is(.iid-shell, .iim-shell, .civ-shell, .cie-shell, .civ-content, .cie-content) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

/* A label is physical white stock even when the application is dark. Keep the
   editor chrome dark, but render the print preview as black ink on white. */
body.dashboard-dark-active #iim-shelf-label-modal #iim-shelf-label-preview {
  color-scheme: light;
  border-color: var(--cp-gray-90);
  background: var(--cp-gray-00);
  color: var(--cp-gray-90);
}

body.dashboard-dark-active #iim-shelf-label-modal #iim-shelf-label-preview :is(
  .iim-shelf-preview-field,
  .iim-shelf-preview-shape
) {
  color: var(--cp-gray-90);
}

body.dashboard-dark-active #iim-shelf-label-modal #iim-shelf-label-preview .iim-shelf-preview-shape.is-barcode {
  background: var(--cp-gray-00);
}

@media (max-width: 700px) {
  body.dashboard-dark-active #receive-page :where(
    .receive-station-workspace-head,
    .receive-station-subsection-head,
    .receive-station-guided-progress-copy,
    .receive-station-label-current-head,
    .receive-station-label-queue-head
  ) {
    align-items: stretch;
    flex-direction: column;
  }

  body.dashboard-dark-active #receive-page :where(
    .receive-station-guided-imei-form,
    .receive-station-guided-confirm-grid,
    .receive-station-guided-device-facts,
    .receive-station-label-layout,
    .receive-station-label-recovery-summary,
    .receive-station-label-complete
  ) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.dashboard-dark-active #receive-page .receive-station-guided-imei-form {
    align-items: stretch;
    flex-direction: column;
    max-width: none;
  }

  body.dashboard-dark-active #receive-page .receive-station-label-queue {
    border-left: 0;
    border-top: 1px solid var(--border-1);
    padding-top: var(--space-4);
    padding-left: 0;
  }

  body.dashboard-dark-active :where(.charge-modal-panel, .inv-form-panel, .newpo-modal-card, .register-picker-panel) {
    width: calc(100vw - var(--space-4));
    max-height: calc(100vh - var(--space-4));
    padding: var(--space-4);
  }
}
body.dashboard-dark-active #tickets-list-view .tickets-queue-table .ticket-note-button {
  background: transparent;
  color: var(--content-2);
}

body.dashboard-dark-active #tickets-list-view .tickets-queue-table .ticket-note-button:hover {
  color: var(--cp-accent);
}

body.dashboard-dark-active #tickets-list-view .tickets-queue-table .ticket-note-add {
  border-color: color-mix(in srgb, var(--cp-accent) 70%, var(--border-1));
  background: color-mix(in srgb, var(--cp-accent) 8%, var(--surface));
  color: color-mix(in srgb, var(--cp-accent) 82%, white);
}

/* ===========================================================================
   Ticket workbench — authoritative expanded-state dark contract

   Ticket renderers still contain older high-specificity light declarations.
   Anchor the override to the actual page root (without :where()) so every
   expanded section remains a dark work surface for repair, sale/special order,
   trade-in and refurbishment tickets.
   ========================================================================== */
body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) {
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-ticket-shell-v3,
  .sale-ticket-shell,
  .trade-ticket-shell,
  .refurbish-ticket-shell,
  .repair-ticket-main,
  .sale-ticket-main,
  .trade-ticket-main,
  .refurbish-ticket-main,
  .repair-ticket-sidebar,
  .sale-ticket-sidebar,
  .trade-ticket-sidebar,
  .refurbish-ticket-sidebar
) {
  background: var(--surface-2);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-section,
  .sale-section,
  .trade-section,
  .refurb-section,
  .repair-nav-box,
  .sale-nav-box,
  .trade-nav-box,
  .refurb-nav-box,
  .repair-totals-box,
  .sale-totals-box,
  .trade-finance-box,
  .refurb-totals-box,
  .repair-note-card,
  .sale-history-entry,
  .trade-history-entry,
  .refurb-history-entry
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-section-body,
  .sale-section-body,
  .trade-section-body,
  .refurb-section-body,
  .repair-readonly-body,
  .repair-notes-list-wrap,
  .sale-notes-list-wrap,
  .trade-notes-list-wrap,
  .refurb-notes-list-wrap,
  .repair-financial-body,
  .sale-payments-table-block,
  .trade-checklist-body,
  .refurb-items-table-wrap
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-brief-hero > div,
  .repair-detail-fact,
  .repair-operational-card,
  .repair-problem-card,
  .repair-intake-note-card,
  .repair-customer-actions-row,
  .repair-finance-summary > div:not(.repair-finance-balance),
  .sale-field,
  .sale-items-summary-card,
  .sale-items-empty-state,
  .sale-exchange-section,
  .trade-fact,
  .trade-note-block,
  .trade-process-guide,
  .trade-process-step:not(.is-done),
  .trade-inspection-task,
  .refurb-command-primary,
  .refurb-field,
  .repair-order-custom-panel,
  .repair-financial-locked-note
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-customer-actions-row > .repair-customer-info {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-brief-hero strong,
  .repair-detail-fact strong,
  .repair-operational-card strong,
  .repair-problem-card p,
  .repair-intake-note-card p,
  .repair-customer-info strong,
  .repair-finance-summary strong,
  .sale-field-value,
  .sale-items-summary-card strong,
  .sale-item-main strong,
  .sale-history-entry strong,
  .trade-fact strong,
  .trade-note-block p,
  .trade-process-guide strong,
  .trade-process-step strong,
  .refurb-field-value,
  .repair-note-body,
  .repair-note-composer-head strong
) {
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-brief-hero span,
  .repair-brief-hero em,
  .repair-detail-fact span,
  .repair-operational-card span,
  .repair-operational-field span,
  .repair-problem-card span,
  .repair-intake-note-card span,
  .repair-customer-meta,
  .repair-finance-summary span,
  .repair-line-meta,
  .repair-line-note,
  .sale-field label,
  .sale-items-summary-card span,
  .sale-items-summary-card em,
  .sale-item-meta,
  .sale-history-entry span,
  .sale-history-entry p,
  .trade-fact span,
  .trade-note-block span,
  .trade-process-guide span,
  .trade-process-step p,
  .trade-detail-guidance,
  .refurb-field label,
  .refurb-item-note,
  .repair-note-date,
  .repair-note-type,
  .repair-note-meta,
  .repair-note-composer-head span,
  .repair-notes-context
) {
  color: var(--content-2);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-operational-field input,
  .repair-operational-field select,
  .repair-catalog-search-field input,
  .repair-order-custom-field input,
  .sale-item-input,
  .sale-item-note-input,
  .sale-items-discount input,
  .sale-items-discount select,
  .sale-items-rule-discount select,
  .trade-table input,
  .trade-table select,
  .refurb-row-worker,
  .refurb-row-status,
  .ticket-extra-line-select
) {
  color-scheme: dark;
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-finance-table,
  .sale-items-table,
  .trade-table,
  .refurb-items-table
) th {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-finance-table,
  .sale-items-table,
  .trade-table,
  .refurb-items-table
) td {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-notes-context,
  .repair-note-composer,
  .sale-note-composer,
  .trade-note-composer,
  .refurb-note-composer
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-note-composer-head {
  border: 0;
  background: transparent;
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-note-toolbar,
  .repair-note-rich-editor,
  .repair-note-composer textarea,
  .repair-note-dropzone,
  .repair-note-file-label
) {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-note-toolbar button,
  .repair-note-dropzone small
) {
  color: var(--content-2);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-note-toolbar button,
  .repair-note-dropzone,
  .repair-note-file-label
):hover {
  border-color: var(--cp-accent);
  background: var(--cp-accent-soft);
  color: var(--cp-accent);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-photo-thumb,
  .repair-foto-file,
  .repair-photos-empty
) {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(.repair-foto-file-name, .repair-note-card, .repair-note-card *) {
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-note-type {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-2);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(
  .repair-nav-body,
  .sale-nav-body,
  .trade-nav-body,
  .refurb-nav-body,
  .repair-totals-body,
  .sale-totals-body,
  .trade-finance-box-body,
  .refurb-totals-body
) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(.repair-nav-badge, .sale-nav-badge, .trade-nav-badge, .refurb-nav-badge) {
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-order-custom-toggle {
  border-color: var(--border-2);
  background: var(--surface-2);
  color: var(--cp-accent);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-catalog-search-results {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: var(--shadow-lg);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-catalog-result {
  border-color: var(--border-1);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-catalog-result:hover {
  background: var(--surface-hover);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .ticket-header-status-table :is(
  span,
  strong,
  .ticket-detail-status-card,
  .ticket-last-update-card,
  .refurb-ticket-last-update
) {
  color: var(--ticket-status-chip-ink);
}

/* Customers is the visual reference for every queue-style data header.  The
   sticky Actions column keeps positioning only; it must never become a second
   darker header block. */
body.dashboard-dark-active.cp :is(
  #tickets-list-view .tickets-queue-table,
  #inventory-page .customers-table,
  #inventory-item-detail-page .iid-units-table,
  #customers-page .customers-table,
  #opportunities-contacts-page .opportunities-contacts-table
) thead th,
body.dashboard-dark-active.cp :is(
  #tickets-list-view .tickets-queue-table,
  #inventory-page .customers-table,
  #inventory-item-detail-page .iid-units-table,
  #customers-page .customers-table,
  #opportunities-contacts-page .opportunities-contacts-table
) thead th:last-child {
  border-color: var(--border-1);
  background: var(--surface-2);
  color: var(--content-2);
}

body.dashboard-dark-active.cp :is(
  #tickets-list-view .tickets-queue-table,
  #inventory-page .customers-table,
  #inventory-item-detail-page .iid-units-table,
  #customers-page .customers-table,
  #opportunities-contacts-page .opportunities-contacts-table
) tbody td:last-child {
  border-left: 0;
  background: var(--surface);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active.cp :is(
  #tickets-list-view .tickets-queue-table,
  #inventory-page .customers-table,
  #inventory-item-detail-page .iid-units-table,
  #customers-page .customers-table,
  #opportunities-contacts-page .opportunities-contacts-table
) tbody tr:hover td:last-child {
  background: var(--surface-hover);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) :is(.trade-checklist-box, .customer-ticket-menu-panel) {
  border-color: var(--border-1);
  background: var(--surface);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-customer-actions :is(
  .repair-customer-edit-btn,
  .repair-customer-clear-btn,
  .customer-ticket-trigger,
  .customer-ticket-action
) {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
  box-shadow: none;
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) .repair-customer-actions :is(
  .repair-customer-edit-btn,
  .repair-customer-clear-btn,
  .customer-ticket-trigger,
  .customer-ticket-action
):hover:not(:disabled) {
  border-color: var(--cp-accent);
  background: var(--surface-hover);
  color: var(--cp-accent);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) [data-repair-promise-preset] {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--content-1);
}

body.dashboard-dark-active #app-view > :is(
  #repair-ticket-page,
  #sale-ticket-page,
  #trade-ticket-page,
  #refurbish-ticket-page
) [data-repair-promise-preset]:hover {
  border-color: var(--cp-accent);
  background: var(--cp-accent-soft);
  color: var(--cp-accent);
}
