/* ── HUB Dark Mode Overrides ──────────────────────────────────────────
   All rules gated by [data-theme="dark"].
   Additive only — zero changes to existing CSS.
   ──────────────────────────────────────────────────────────────────── */

/* ================================================================
   THEME TOGGLE UI (works in both light and dark)
   ================================================================ */
/* Theme-toggle wrapper sits in the page header (position: relative
   via inline style). Lifting it above .dtd-panel (9999) and
   .lpb-drawer-panel (10000) ensures the dropdown inside escapes
   the drawer's stacking context when an order is open. */
.theme-toggle-wrapper {
	z-index: 10010;
}
.theme-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.10);
	min-width: 130px;
	z-index: 10011;
	overflow: hidden;
}
.theme-dropdown.open { display: block; }
.theme-dropdown-item {
	padding: 8px 14px;
	cursor: pointer;
	font-size: 13px;
	color: #334155;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: background 0.15s;
}
.theme-dropdown-item:hover { background: #f1f5f9; }
.theme-dropdown-item.active {
	background: rgba(12,77,139,0.08);
	color: #0c4d8b;
	font-weight: 600;
}
.theme-dropdown-item i { width: 16px; text-align: center; font-size: 13px; }

/* ================================================================
   DARK MODE — toggle UI
   ================================================================ */
[data-theme="dark"] .theme-dropdown {
	background: #1f293c;
	border-color: #344058;
	box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
[data-theme="dark"] .theme-dropdown-item {
	color: #cbd5e1;
}
[data-theme="dark"] .theme-dropdown-item:hover {
	background: #263048;
}
[data-theme="dark"] .theme-dropdown-item.active {
	background: #1a3a5c;
	color: #4a9eff;
}

/* ================================================================
   GLOBAL / BODY
   ================================================================ */
[data-theme="dark"] body {
	background-color: #0e1525;
	color: #e2e8f0;
}
[data-theme="dark"] a { color: #4a9eff; }
[data-theme="dark"] a:hover { color: #6db3ff; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
[data-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #151e30; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #344058; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #4d4d66; }

/* ================================================================
   SIDEBAR / MENU (modern nav from menus.php)
   ================================================================ */

/* Desktop sidebar */
[data-theme="dark"] nav.bg-menu-theme {
	background: linear-gradient(180deg, #151e30 0%, #151525 100%) !important;
	color: #94a3b8;
	border-right-color: #263048 !important;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu > hr {
	border-color: #263048;
}
[data-theme="dark"] .link-gray {
	color: #94a3b8;
}
[data-theme="dark"] .menu-nav-item a.nav-link {
	color: #94a3b8;
}
/* Hover/focus: highlight accent blue (not muted gray / not light-mode navy #0c4d8b).
   Specificity matches light style.css/mobile-menu.css so pages that load those
   after theme.css still get the bright hover, not a darkened navy label. */
[data-theme="dark"] .menu-nav-item a.nav-link:hover,
[data-theme="dark"] .menu-nav-item a.nav-link:focus-visible,
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:hover,
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:focus-visible {
	color: #4a9eff;
	background-color: rgba(74, 158, 255, 0.12);
}
/* Hover accent bar — dark version */
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:not(.active)::before {
	background: #4a9eff;
}
/* Press / :active — override light-mode navy from style.css */
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:not(.active):active {
	color: #4a9eff;
	background-color: rgba(74, 158, 255, 0.18);
	box-shadow: inset 0 0 0 1.5px rgba(74, 158, 255, 0.28);
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:not(.active):active::before {
	background: #4a9eff;
	background-color: #4a9eff;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:not(.active):active i.menu-icon {
	color: #4a9eff;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:not(.active):focus-visible {
	outline-color: rgba(74, 158, 255, 0.35);
}
/* Active item */
[data-theme="dark"] .menu-nav-item a.nav-link.active {
	background: linear-gradient(135deg, rgba(74,158,255,0.12) 0%, rgba(74,158,255,0.06) 100%);
	color: #4a9eff;
}
[data-theme="dark"] .menu-nav-item a.nav-link.active::before {
	background: #4a9eff;
}
/* Desktop sidebar icon colors — dark mode */
[data-theme="dark"] .menu-nav-item i.menu-icon {
	color: #64748b;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:hover i.menu-icon,
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-nav-item a.nav-link:focus-visible i.menu-icon {
	color: #4a9eff;
}
[data-theme="dark"] .menu-nav-item a.nav-link.active i.menu-icon {
	color: #4a9eff;
}

/* Menu dropdown (user menu at bottom) */
[data-theme="dark"] .menu-dropdown-toggle {
	color: #94a3b8;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-dropdown a.menu-dropdown-toggle:hover,
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-dropdown a.menu-dropdown-toggle:focus-visible {
	color: #4a9eff;
	background-color: rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-dropdown a.menu-dropdown-toggle::before {
	background: #4a9eff;
}
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-dropdown a.menu-dropdown-toggle:hover i,
[data-theme="dark"] nav.bg-menu-theme.main_menu .menu-dropdown a.menu-dropdown-toggle:focus-visible i {
	color: #4a9eff;
}
[data-theme="dark"] .menu-dropdown-menu {
	background: #1f293c;
	border-color: #344058;
	box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
[data-theme="dark"] .menu-dropdown-item {
	color: #cbd5e1;
}
[data-theme="dark"] .menu-dropdown-item:hover {
	color: #4a9eff;
	background-color: rgba(74,158,255,0.08);
}
[data-theme="dark"] .menu-dropdown-item::before {
	background: #4a9eff;
}
[data-theme="dark"] .menu-dropdown-item:hover i {
	color: #4a9eff;
}
[data-theme="dark"] .menu-dropdown-item i {
	color: #64748b;
}
[data-theme="dark"] .menu-dropdown-divider {
	border-color: #263048;
}

/* Mobile nav menu */
[data-theme="dark"] nav.mobile-nav-bar {
	background-color: #0e1525 !important;
}
[data-theme="dark"] div.mobile-nav-menu {
	background: #182132;
	box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link {
	/* !important needed because style.css declares color:#1a1a2e !important
	   with equal specificity — without this override dark-mode text is
	   nearly invisible (near-black on a dark navy background). */
	color: #e2e8f0 !important;
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link i.menu-icon {
	color: #94a3b8 !important;
	background: #263048 !important;
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link:hover,
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link:active {
	background: #1f293c !important;
	color: #4a9eff !important;
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link:hover i.menu-icon,
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link:active i.menu-icon {
	color: #4a9eff !important;
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link.active {
	background: rgba(74,158,255,0.1);
	color: #4a9eff;
}
[data-theme="dark"] div.mobile-nav-menu .menu-nav-item a.nav-link.active i.menu-icon {
	color: #4a9eff;
}
[data-theme="dark"] div.mobile-nav-menu hr {
	border-color: #263048;
}
[data-theme="dark"] div.mobile-nav-menu .menu-dropdown-toggle {
	color: #cbd5e1;
}
[data-theme="dark"] div.mobile-nav-menu .menu-dropdown-toggle:hover {
	background: #1f293c !important;
	color: #4a9eff !important;
}
[data-theme="dark"] div.mobile-nav-menu .menu-dropdown-toggle i {
	color: #64748b;
}
[data-theme="dark"] .mobile-nav-menu .menu-dropdown-menu {
	background: #1f293c;
}
[data-theme="dark"] .mobile-nav-menu .menu-dropdown-menu .menu-dropdown-item {
	color: #94a3b8;
}
[data-theme="dark"] .mobile-nav-menu .menu-dropdown-menu .menu-dropdown-item:hover {
	background: #263048;
	color: #4a9eff;
}
[data-theme="dark"] .mobile-nav-menu .menu-dropdown-menu .menu-dropdown-divider {
	border-color: #263048;
}
[data-theme="dark"] .mobile-nav-close {
	background: #1f293c;
	color: #94a3b8;
}
[data-theme="dark"] .mobile-nav-close:hover {
	background: #263048;
	color: #e2e8f0;
}
/* Sidebar header (logo strip): light-mode frosted-white → dark navy with
   a subtle blue-tinted border so it reads as part of the dark sidebar. */
[data-theme="dark"] .mobile-nav-header {
	background: rgba(24, 33, 50, 0.75) !important;
	border-bottom-color: #263048 !important;
}
[data-theme="dark"] div#grey_out {
	background: rgba(0,0,0,0.6);
}

/* Legacy #menu (index_.php etc.) */
[data-theme="dark"] #menu {
	background-color: #151e30;
	border-right-color: #263048;
	border-bottom-color: #263048;
	box-shadow: 2px 0 6px -4px rgba(0,0,0,0.5);
}
[data-theme="dark"] #menu a {
	color: #cbd5e1;
	border-color: transparent;
}
[data-theme="dark"] #menu a:hover:not(.selected),
[data-theme="dark"] #menu .selected {
	background-color: #1a3a5c;
	border-color: rgba(74,158,255,0.35);
	color: #fff;
}
[data-theme="dark"] #menu .selected {
	border-left-color: #4a9eff;
}
[data-theme="dark"] div#menu_logo {
	background-color: #0a3260;
	border-bottom-color: #263048;
}

/* ================================================================
   HEADER BAR
   ================================================================ */
[data-theme="dark"] div#butt_container {
	background: #182132 !important;
	border-bottom-color: #263048 !important;
	box-shadow: 0 2px 6px -4px rgba(0,0,0,0.5);
}
[data-theme="dark"] div#butt_container.orders-header,
[data-theme="dark"] div#butt_container.reports-header {
	background: #182132 !important;
}
/* Header inner row border */
[data-theme="dark"] div#butt_container .header-row {
	border-bottom-color: #263048;
}
[data-theme="dark"] div#butt_container .header-btn {
	color: #cbd5e1;
	border-color: transparent;
}
[data-theme="dark"] div#butt_container .header-btn:hover {
	background: #263048;
	color: #4a9eff;
}
[data-theme="dark"] div.page_title_text,
[data-theme="dark"] div#page_title {
	color: #e2e8f0;
}
[data-theme="dark"] div#page_title i {
	color: #4a9eff;
}
[data-theme="dark"] div#butt_container .header-left #m_open {
	color: #94a3b8;
}
[data-theme="dark"] div#butt_container .header-left #m_open:hover {
	background: #263048;
	color: #e2e8f0;
}
/* Page title (Orders, Reports, Inventory, etc.) */
[data-theme="dark"] div#butt_container .page-title {
	color: #e2e8f0 !important;
}
[data-theme="dark"] div#butt_container .page-title i {
	color: #e2e8f0 !important;
	opacity: 1 !important;
}

/* ================================================================
   HEADER FILTER GROUPS (filters-row inside butt_container)
   ================================================================ */
[data-theme="dark"] div#butt_container .filters-row {
	border-top-color: #263048;
	background-color: #182132;
}
[data-theme="dark"] div#butt_container .filter-group {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div#butt_container .filter-group:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] div#butt_container .filter-group i {
	color: #94a3b8;
}
[data-theme="dark"] div#butt_container .filter-group input,
[data-theme="dark"] div#butt_container .filter-group select {
	color: #e2e8f0;
	background-color: transparent;
}
[data-theme="dark"] div#butt_container .filter-group input::placeholder {
	color: #64748b;
}
[data-theme="dark"] div#butt_container.reports-header .filter-group select,
[data-theme="dark"] div#butt_container.orders-header .filter-group select {
	color: #e2e8f0;
}
[data-theme="dark"] div#butt_container.reports-header .filter-group select option,
[data-theme="dark"] div#butt_container.orders-header .filter-group select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] div#butt_container.reports-header .filter-group select option:checked,
[data-theme="dark"] div#butt_container.orders-header .filter-group select option:checked {
	background-color: #1a3a5c;
	color: #fff;
}
[data-theme="dark"] div#butt_container.reports-header .filter-group.multi-summary .multi-select-summary,
[data-theme="dark"] div#butt_container.orders-header .filter-group.multi-summary .multi-select-summary {
	color: #e2e8f0;
}

/* ================================================================
   LABELS ([data-label]::before) — CRITICAL for all filter groups
   ================================================================ */
[data-theme="dark"] div#butt_container.reports-header .filter-group[data-label]::before,
[data-theme="dark"] div#butt_container.orders-header .filter-group[data-label]::before,
[data-theme="dark"] div.s_fields .filter-group[data-label]::before {
	background: #182132 !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] .comm-form .filter-group[data-label]::before {
	background: #1f293c !important;
	color: #94a3b8 !important;
}

/* ================================================================
   SEARCH FILTERS (s_fields)
   ================================================================ */
[data-theme="dark"] div.s_fields {
	background-color: #182132;
	border-bottom-color: #263048;
}
[data-theme="dark"] div.s_fields .filter-group {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.s_fields .filter-group:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] div.s_fields .filter-group i {
	color: #94a3b8;
}
[data-theme="dark"] div.s_fields .filter-group input,
[data-theme="dark"] div.s_fields .filter-group select {
	color: #e2e8f0;
}
[data-theme="dark"] div.s_fields .filter-group input::placeholder {
	color: #64748b;
}
[data-theme="dark"] div.s_fields .filter-group select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] div.s_fields .filter-group select option:checked {
	background-color: #1a3a5c;
	color: #fff;
}
[data-theme="dark"] div.s_fields .filter-group.multi-summary .multi-select-summary {
	color: #e2e8f0;
}
[data-theme="dark"] div.s_fields button {
	color: #cbd5e1;
	border-color: #344058;
	background-color: #1f293c;
}
[data-theme="dark"] div.s_fields button:hover {
	background: #263048;
	color: #e2e8f0;
}

/* ================================================================
   ORDER / REPORT TABLES
   ================================================================ */
[data-theme="dark"] table {
	color: #e2e8f0;
}
[data-theme="dark"] table thead th,
[data-theme="dark"] table thead td {
	background-color: #151e30 !important;
	color: #94a3b8;
	border-bottom-color: #263048;
}
[data-theme="dark"] tr.d0 td,
[data-theme="dark"] tr.cd0 td {
	background-color: #182132;
}
[data-theme="dark"] tr.d1 td,
[data-theme="dark"] tr.cd1 td {
	background-color: #1c2738;
}
[data-theme="dark"] table#report_list tbody tr.d0 td,
[data-theme="dark"] table#report_list tbody tr.cd0 td {
	background-color: transparent;
}
[data-theme="dark"] table#report_list tbody tr.d1 td,
[data-theme="dark"] table#report_list tbody tr.cd1 td {
	background-color: rgba(255,255,255,0.03);
}
[data-theme="dark"] table#ao_table tbody tr.d0 td,
[data-theme="dark"] table#ao_table tbody tr.cd0 td {
	background-color: transparent;
}
[data-theme="dark"] table#ao_table tbody tr.d1 td,
[data-theme="dark"] table#ao_table tbody tr.cd1 td {
	background-color: rgba(255,255,255,0.03);
}
/* nth-of-type alternating rows (reports that don't use .d0/.d1 classes) */
[data-theme="dark"] table#report_list tbody > tr:not(.ord_head, .tax_info, .tax_totals, .inv_details, .main, .main_top):nth-of-type(odd) td {
	background-color: transparent;
}
[data-theme="dark"] table#report_list tbody > tr:not(.ord_head, .tax_info, .tax_totals, .inv_details, .main, .main_top):nth-of-type(even) td {
	background-color: rgba(255,255,255,0.03);
}
/* Report table header */
[data-theme="dark"] table#report_list thead tr.main td,
[data-theme="dark"] table#report_list thead tr.main_top td {
	border-bottom-color: #344058 !important;
	color: #94a3b8 !important;
}
/* Report tbody main/group header rows */
[data-theme="dark"] table#report_list tbody tr.main td,
[data-theme="dark"] table#report_list tbody tr.main_top td {
	color: #e2e8f0;
}
[data-theme="dark"] table#dt_table tr.cd0 td.dt_inv,
[data-theme="dark"] table#dt_table tr.cd1 td.dt_inv,
[data-theme="dark"] table#dt_table tr.cd0.moh td,
[data-theme="dark"] table#dt_table tr.cd1.moh td {
	background: rgba(74,158,255,0.08);
}
[data-theme="dark"] tr.d0:hover td,
[data-theme="dark"] tr.d1:hover td {
	background-color: #263048;
}
[data-theme="dark"] .cd0:not(.no_hover):not(.cus_sel):hover td,
[data-theme="dark"] .cd1:not(.cus_sel):not(.no_hover):hover td,
[data-theme="dark"] .cd0.draft:hover td,
[data-theme="dark"] .cd1.draft:hover td,
[data-theme="dark"] .cd0.final:hover td,
[data-theme="dark"] .cd1.final:hover td {
	background-color: rgba(74,158,255,0.12);
	border-color: #4a9eff;
}
[data-theme="dark"] table#report_list tbody tr:hover td,
[data-theme="dark"] table#ao_table tbody tr:hover td {
	background-color: rgba(74,158,255,0.06);
}
[data-theme="dark"] td {
	border-color: #263048;
}
/* Report / invoice action icons & buttons */
[data-theme="dark"] span.action-icon {
	color: #94a3b8 !important;
}
[data-theme="dark"] span.action-icon:hover {
	color: #e2e8f0 !important;
}
[data-theme="dark"] button.snd_history,
[data-theme="dark"] button.tic_photos,
[data-theme="dark"] button.update_inv,
[data-theme="dark"] button.snd_inv,
[data-theme="dark"] button.snd_receipt,
[data-theme="dark"] button.print_rcpt,
[data-theme="dark"] button.del_inv,
[data-theme="dark"] button.del_payment,
[data-theme="dark"] button.upload {
	color: #94a3b8 !important;
}
[data-theme="dark"] button.snd_history:hover,
[data-theme="dark"] button.tic_photos:hover,
[data-theme="dark"] button.update_inv:hover {
	color: #4a9eff !important;
}
[data-theme="dark"] button.snd_inv:hover,
[data-theme="dark"] button.snd_receipt:hover,
[data-theme="dark"] button.print_rcpt:hover {
	color: #34d399 !important;
}
[data-theme="dark"] button.upload:hover {
	color: #f87171 !important;
}
[data-theme="dark"] button.del_inv:hover,
[data-theme="dark"] button.del_payment:hover {
	color: #f87171 !important;
}
/* pay_rpt sets icon color via !important — restate for the delete button hover */
[data-theme="dark"] button.pay_rpt.del_payment:hover i {
	color: #f87171 !important;
}
/* Invoice row — kebab "More actions" dropdown, dark theme */
[data-theme="dark"] .ic-row-actions > button.ic-actions-trigger {
	color: #94a3b8;
}
[data-theme="dark"] .ic-row-actions > button.ic-actions-trigger:hover {
	background: rgba(74, 158, 255, 0.12);
	color: #4a9eff;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu {
	background: #1f293c;
	border-color: #344058;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button {
	color: #e2e8f0;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button:hover {
	background: #263048;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button > i {
	color: #94a3b8;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button:hover > i {
	color: #4a9eff;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button.del_inv:hover,
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button.rm_att:hover {
	color: #f87171;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button.del_inv:hover > i,
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button.rm_att:hover > i {
	color: #f87171;
}
[data-theme="dark"] .ic-row-actions > .ic-row-actions-menu > button.tax_override.is-override > i {
	color: #22c55e;
}
/* Run / Generate Report button */
[data-theme="dark"] #run_report_btn,
[data-theme="dark"] #run_inventory_btn,
[data-theme="dark"] button.gen_report {
	background: linear-gradient(135deg, #4a9eff 0%, #2563eb 100%) !important;
	box-shadow: 0 2px 4px rgba(74, 158, 255, 0.3) !important;
}
[data-theme="dark"] #run_report_btn:hover,
[data-theme="dark"] #run_inventory_btn:hover,
[data-theme="dark"] button.gen_report:hover {
	background: linear-gradient(135deg, #60abff 0%, #3b82f6 100%) !important;
	box-shadow: 0 4px 8px rgba(74, 158, 255, 0.4) !important;
}
[data-theme="dark"] #run_report_btn:disabled,
[data-theme="dark"] #run_inventory_btn:disabled,
[data-theme="dark"] button.gen_report:disabled {
	background: linear-gradient(135deg, #344058 0%, #263048 100%) !important;
	box-shadow: none !important;
}

[data-theme="dark"] span.span_send_inv button.inv_view,
[data-theme="dark"] span.span_send_stmt button.inv_view {
	background-color: transparent !important;
	border-color: #344058 !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] button.inv_view.print:hover {
	border-color: #34d399 !important;
	color: #34d399 !important;
}
[data-theme="dark"] button.inv_view.print.selected {
	border-color: #34d399 !important;
	background-color: rgba(52, 211, 153, 0.1) !important;
	color: #34d399 !important;
}
[data-theme="dark"] button.inv_view.email:hover {
	border-color: #4a9eff !important;
	color: #4a9eff !important;
}
[data-theme="dark"] button.inv_view.email.selected {
	border-color: #4a9eff !important;
	background-color: rgba(74, 158, 255, 0.1) !important;
	color: #4a9eff !important;
}
[data-theme="dark"] button.inv_view.settings {
	color: #64748b !important;
}
/* Catch-all: any remaining dark icons in report tables */
[data-theme="dark"] table#report_list td button {
	color: #94a3b8;
}
[data-theme="dark"] table#report_list td button:hover {
	color: #4a9eff;
}
[data-theme="dark"] table#report_list td i.delete_hover,
[data-theme="dark"] table#report_list td i.dup_hover,
[data-theme="dark"] table#report_list td i.print_hover {
	color: #94a3b8 !important;
}
[data-theme="dark"] table#report_list td i.delete_hover:hover {
	color: #f87171 !important;
}
[data-theme="dark"] table#report_list td i.dup_hover:hover,
[data-theme="dark"] table#report_list td i.print_hover:hover {
	color: #e2e8f0 !important;
}
[data-theme="dark"] button.pay_rpt i {
	color: #94a3b8 !important;
}
[data-theme="dark"] button.pay_rpt:hover i {
	color: #4a9eff !important;
}
/* ao_table container + row borders */
[data-theme="dark"] table#ao_table {
	background: transparent !important;
	border-color: #263048 !important;
	box-shadow: none !important;
}
[data-theme="dark"] table#ao_table tbody tr {
	border-bottom-color: #263048;
}

/* Status rows */
[data-theme="dark"] tr.cd1.draft {
	background: rgba(200,120,30,0.15);
}
[data-theme="dark"] tr.cd0.draft {
	background: rgba(200,120,30,0.08);
}
[data-theme="dark"] tr.cd1.draft td {
	background-color: transparent;
}
[data-theme="dark"] tr.cd0.draft td {
	background-color: transparent;
}
[data-theme="dark"] tr.cd1.approved {
	background: rgba(50,180,80,0.14);
}
[data-theme="dark"] tr.cd0.approved {
	background: rgba(50,180,80,0.07);
}
[data-theme="dark"] tr.cd1.approved td {
	background-color: transparent;
}
[data-theme="dark"] tr.cd0.approved td {
	background-color: transparent;
}

/* Status icon colors — keep them visible in dark mode */
[data-theme="dark"] td.in_prod i {
	color: #94a3b8;
}

/* ================================================================
   ORDER CARDS (index.php inline styles)
   ================================================================ */
[data-theme="dark"] .order-card {
	background: #182132;
	border-color: #263048;
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
[data-theme="dark"] .order-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	border-color: #344058;
}
[data-theme="dark"] .order-card .card-header {
	border-bottom-color: #263048;
}
[data-theme="dark"] .order-card .card-header:hover {
	background: #1f293c;
}
[data-theme="dark"] .order-card .card-header:hover h3 {
	color: #4a9eff;
}
[data-theme="dark"] .order-card .card-header h3 {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .order-card .card-header h3 i {
	color: #4a9eff !important;
	opacity: 1 !important;
}
[data-theme="dark"] .order-card .card-header .card-toggle {
	color: #64748b !important;
}
[data-theme="dark"] .order-card .card-header .card-toggle:hover {
	color: #94a3b8 !important;
	background: #263048 !important;
}
[data-theme="dark"] .order-card .card-header .collapse-indicator {
	color: #94a3b8;
}
[data-theme="dark"] .order-card.collapsed .card-header {
	border-bottom-color: transparent;
	border-radius: 12px;
}

/* Order row action icons (dup, delete, plant, etc.) */
[data-theme="dark"] i.delete_hover,
[data-theme="dark"] i.dup_hover,
[data-theme="dark"] i.print_hover,
[data-theme="dark"] i.link_hover,
[data-theme="dark"] i.recode_hover {
	color: #94a3b8;
}
[data-theme="dark"] i.delete_hover:hover {
	color: #f87171;
}
[data-theme="dark"] i.dup_hover:hover {
	color: #e2e8f0;
}
[data-theme="dark"] i.print_hover:hover {
	color: #e2e8f0;
}
[data-theme="dark"] i.recode_hover:hover {
	color: #22d3ee;
}
[data-theme="dark"] i.link_hover:hover {
	color: #4a9eff;
}

/* ================================================================
   COMM FORM (Plant, Ordered By, Reminder, Email, Special Instr.)
   !important needed — inline <style> in index.php loads after theme.css
   ================================================================ */
[data-theme="dark"] .comm-form .filter-group {
	background: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .comm-form .filter-group:focus-within {
	border-color: #4a9eff !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15) !important;
}
[data-theme="dark"] .comm-form .filter-group select,
[data-theme="dark"] .comm-form .filter-group input,
[data-theme="dark"] .comm-form .filter-group textarea {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .comm-form .filter-group textarea::placeholder,
[data-theme="dark"] .comm-form .filter-group input::placeholder {
	color: #64748b !important;
}
[data-theme="dark"] .comm-form .filter-group[data-label]::before {
	background: #1f293c !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] .comm-form .filter-group:focus-within[data-label]::before {
	color: #4a9eff !important;
}
[data-theme="dark"] .comm-form .checkbox-row {
	color: #cbd5e1;
}
[data-theme="dark"] .comm-form .checkbox-row .checkers {
	color: #cbd5e1;
}

/* ID-based overrides — .order-card #details select has ID specificity (0,1,1,1)
   which beats class-only selectors above. Must use #details to win. */
[data-theme="dark"] .order-card #details select,
[data-theme="dark"] .order-card #details input,
[data-theme="dark"] .order-card #details textarea {
	background-color: transparent !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .order-card #details .filter-group {
	background: #1f293c !important;
	background-color: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .order-card #details .filter-group[data-label]::before {
	background: #1f293c !important;
	background-color: #1f293c !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] .order-card #details .filter-group:focus-within {
	border-color: #4a9eff !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15) !important;
}
[data-theme="dark"] .order-card #details .filter-group:focus-within[data-label]::before {
	color: #4a9eff !important;
}
[data-theme="dark"] .order-card #details .filter-group select::placeholder,
[data-theme="dark"] .order-card #details .filter-group input::placeholder,
[data-theme="dark"] .order-card #details .filter-group textarea::placeholder {
	color: #64748b !important;
}
/* Email Order To inline input */
[data-theme="dark"] #email_to input[name="email"] {
	color: #e2e8f0 !important;
}
[data-theme="dark"] #email_to input[name="email"]::placeholder {
	color: #64748b !important;
}
/* Select caret SVG for #details selects */
[data-theme="dark"] .order-card #details select {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M5 6L0 0h10z"/></svg>') !important;
	background-repeat: no-repeat !important;
	background-position: right 8px center !important;
	background-size: 10px 6px !important;
}

/* ================================================================
   EMAIL LIST & CONTACT LIST
   ================================================================ */
[data-theme="dark"] #email_to .email-list {
	background: #1f293c !important;
	border-color: #344058 !important;
}
/* Generic-account read-only note (Task 7) */
[data-theme="dark"] #email_to .contact-list-note {
	color: #94a3b8 !important;
}
[data-theme="dark"] #email_to .contact-list div.row {
	background-color: #182132 !important;
	border-color: #344058 !important;
}
[data-theme="dark"] #email_to .contact-list div.row:hover {
	border-color: #4d4d66 !important;
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit {
	color: #e2e8f0 !important;
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit:hover:not(:focus) {
	border-color: #344058 !important;
	background: #263048 !important;
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit:focus {
	border-color: #4a9eff !important;
	background: #1f293c !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit::placeholder {
	color: #64748b !important;
}
[data-theme="dark"] #email_to .contact-list div.row.row_select,
[data-theme="dark"] #email_to .email-list div.row.row_select {
	background: rgba(74,158,255,0.12) !important;
	border-color: rgba(74,158,255,0.4) !important;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.1);
}
[data-theme="dark"] #email_to .contact-list div.row.row_select .contact-name,
[data-theme="dark"] #email_to .contact-list div.row.row_select .contact-name-input,
[data-theme="dark"] #email_to .email-list div.row.row_select input.mail_2 {
	color: #4a9eff !important;
}

/* Modern pill treatment dark-mode coverage — matches the email-list
   pill recipe so the contact rows feel native on the dark theme. */
[data-theme="dark"] #email_to .contact-list {
	background: rgba(15, 23, 42, 0.35) !important;
}
[data-theme="dark"] #email_to .contact-list div.row:has(input[type="checkbox"]:checked),
[data-theme="dark"] #email_to .contact-list div.row.row_select {
	background: #1c3457 !important;
	border-color: #4a9eff !important;
	box-shadow: none !important;
}
/* Restyled native checkbox (circle marker) in dark mode. */
[data-theme="dark"] #email_to .contact-list div.row input[type="checkbox"] {
	background: #182132 !important;
	border-color: #4a5568 !important;
}
[data-theme="dark"] #email_to .contact-list div.row input[type="checkbox"]:hover {
	border-color: #4a9eff !important;
}
[data-theme="dark"] #email_to .contact-list div.row input[type="checkbox"]:checked {
	background: #4a9eff !important;
	border-color: #4a9eff !important;
}
/* Inline-edit inputs (name + email) — kill the hover background
   that the legacy rule sets, since the row now provides the hover lift. */
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit:hover:not(:focus) {
	background: transparent !important;
	border-color: transparent !important;
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit:focus {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	outline: 1px solid #4a9eff;
	outline-offset: 1px;
}
[data-theme="dark"] #email_to .contact-list div.row .contact-info .contact-email-input {
	color: #94a3b8 !important;
}
/* Round X delete button hover */
[data-theme="dark"] #email_to .contact-list div.row .delete_new {
	color: #64748b;
}
[data-theme="dark"] #email_to .contact-list div.row .delete_new:hover {
	background: rgba(239, 68, 68, 0.15) !important;
	color: #f87171 !important;
}

[data-theme="dark"] #email_to .email-list input[name="sr_em"] {
	background: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] #email_to .email-list input[name="sr_em"]::placeholder {
	color: #64748b;
}
/* Search result items */
[data-theme="dark"] #email_to .email-list .srch_res .srch_cus .cus_adds > span {
	background: #182132;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] #email_to .email-list .srch_res .srch_cus .cus_adds > span:hover {
	background: #1a3a5c;
	border-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] #email_to .email-list .srch_res .srch_cus .cus_adds > span b {
	color: #94a3b8;
}
[data-theme="dark"] #email_to .email-list .srch_res .srch_cus .cus_adds > span:hover b {
	color: rgba(255,255,255,0.8);
}
/* Contact-list container background (shown after selecting customer) */
[data-theme="dark"] #email_to .contact-list {
	background: #182132 !important;
}
/* Email-list individual rows */
[data-theme="dark"] #email_to .email-list div.row {
	background: #182132 !important;
	border-color: #344058 !important;
}
[data-theme="dark"] #email_to .email-list div.row:hover {
	border-color: #4d4d66 !important;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] #email_to .email-list div.row .delete_new {
	color: #94a3b8;
}
[data-theme="dark"] #email_to .email-list div.row .delete_new:hover {
	color: #f87171;
	background: rgba(248,113,113,0.12);
}
[data-theme="dark"] #email_to .email-list div.row div.low input.mail_2 {
	color: #e2e8f0 !important;
}
[data-theme="dark"] #email_to .email-list div.row div.low input.mail_2::placeholder {
	color: #64748b !important;
}
/* Add Contact / Add Recipient / Search Contacts buttons */
[data-theme="dark"] #email_to .new_contact button.add_contact {
	background: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] #email_to .new_contact button.add_contact:hover {
	background: rgba(74,158,255,0.08) !important;
	border-color: rgba(74,158,255,0.3) !important;
	color: #4a9eff !important;
}
[data-theme="dark"] #email_to .new_contact button.add_contact i {
	color: #94a3b8 !important;
}
[data-theme="dark"] #email_to .new_contact button.add_contact:hover i {
	color: #4a9eff !important;
}
/* Email autocomplete dropdown */
[data-theme="dark"] #email_to .email-list div.row div.em_res {
	background: #1f293c !important;
	border-color: #344058 !important;
	box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
[data-theme="dark"] #email_to .email-list div.row div.em_res .srch_cus:hover {
	background: rgba(74,158,255,0.08);
}
[data-theme="dark"] #email_to .email-list div.row div.em_res .srch_cus b {
	color: #e2e8f0;
}
[data-theme="dark"] #email_to .email-list div.row div.em_res .srch_cus i {
	color: #94a3b8;
}
/* Email-list checkbox accent in dark */
[data-theme="dark"] #email_to .email-list div.row input[type="checkbox"] {
	accent-color: #4a9eff;
}

/* ================================================================
   ACTION BUTTONS (card + floating panel)
   ================================================================ */
[data-theme="dark"] .action-buttons-card {
	background: #182132 !important;
	border-color: #263048 !important;
}
[data-theme="dark"] .action-buttons-card .card-header h3 {
	color: #cbd5e1 !important;
}
[data-theme="dark"] .action-buttons-card .card-header h3 i {
	color: #4a9eff;
}

[data-theme="dark"] .floating-actions-panel {
	background: #182132;
	border-color: #263048;
	box-shadow: 0 10px 40px rgba(0,0,0,0.35), 0 2px 10px rgba(0,0,0,0.25);
}
[data-theme="dark"] .floating-actions-panel button {
	background: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .floating-actions-panel button:hover {
	background: rgba(74,158,255,0.08);
	border-color: rgba(74,158,255,0.3);
	color: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel button:hover i {
	color: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel button:hover svg path {
	fill: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel button svg path {
	fill: #cbd5e1;
}
[data-theme="dark"] .floating-actions-panel button.primary-action {
	background: #1a5ab8;
	border-color: #1a5ab8;
	color: white;
}
[data-theme="dark"] .floating-actions-panel button.primary-action:hover {
	background: #1d6ad6;
}
[data-theme="dark"] .floating-actions-panel button.primary-action i {
	color: white;
}
[data-theme="dark"] .floating-actions-panel button[name=submit] {
	background: #1a5ab8 !important;
	color: white !important;
	border-color: #1a5ab8 !important;
}
[data-theme="dark"] .floating-actions-panel button[name=submit]:hover {
	background: #1d6ad6 !important;
}
[data-theme="dark"] .floating-actions-panel .floating-toggle {
	background: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .floating-actions-panel .floating-toggle:hover {
	background: rgba(74,158,255,0.08);
	color: #4a9eff;
	border-color: rgba(74,158,255,0.3);
}
[data-theme="dark"] .floating-actions-panel .panel-section {
	border-bottom-color: #263048;
}
[data-theme="dark"] .floating-actions-panel .section-label {
	color: #64748b;
}
/* Loading spinner in dark */
[data-theme="dark"] .floating-actions-panel button.loading::before {
	border-color: #344058;
	border-top-color: #4a9eff;
}

/* Section toggle headers (dark) */
[data-theme="dark"] .floating-actions-panel .section-toggle {
	color: #64748b;
}
[data-theme="dark"] .floating-actions-panel .section-toggle:hover {
	background: rgba(74, 158, 255, 0.08);
	color: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel .section-toggle:focus-visible {
	outline-color: rgba(74, 158, 255, 0.45);
}

/* "More" button (dark) */
[data-theme="dark"] .floating-actions-panel .more-toggle {
	background: linear-gradient(180deg, #1f293c 0%, #182132 100%);
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .floating-actions-panel .more-toggle i { color: #94a3b8; }
[data-theme="dark"] .floating-actions-panel .more-toggle:hover {
	background: rgba(74, 158, 255, 0.08);
	border-color: rgba(74, 158, 255, 0.4);
	color: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel .more-toggle:hover i { color: #4a9eff; }
[data-theme="dark"] .floating-actions-panel .more-toggle[aria-expanded="true"] {
	background: rgba(74, 158, 255, 0.12);
	border-color: rgba(74, 158, 255, 0.5);
	color: #4a9eff;
}
[data-theme="dark"] .floating-actions-panel .more-toggle[aria-expanded="true"] i { color: #4a9eff; }
[data-theme="dark"] .floating-actions-panel .more-toggle .more-badge {
	background: #1a5ab8;
	color: #fff;
}

/* Popover (dark) */
[data-theme="dark"] .floating-more-popover {
	background: #182132;
	border-color: #263048;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .floating-more-popover .more-popover-arrow {
	background: #182132;
	border-color: #263048;
}
[data-theme="dark"] .floating-more-popover .more-popover-header {
	color: #e2e8f0;
	border-bottom-color: #263048;
}
[data-theme="dark"] .floating-more-popover .more-popover-header i { color: #4a9eff; }
[data-theme="dark"] .floating-more-popover .more-popover-group {
	border-bottom-color: #263048;
}
[data-theme="dark"] .floating-more-popover .more-popover-label {
	color: #64748b;
}
[data-theme="dark"] .floating-more-popover button[data-action] {
	color: #cbd5e1;
}
[data-theme="dark"] .floating-more-popover button[data-action] i { color: #94a3b8; }
[data-theme="dark"] .floating-more-popover button[data-action]:hover {
	background: rgba(74, 158, 255, 0.10);
	color: #4a9eff;
}
[data-theme="dark"] .floating-more-popover button[data-action]:hover i { color: #4a9eff; }
[data-theme="dark"] .floating-more-popover .files_btn_count {
	background: rgba(74, 158, 255, 0.15);
	color: #4a9eff;
}

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
[data-theme="dark"] div#notify_content {
	background-color: #182132;
	border-color: #263048;
	box-shadow: 0 4px 50px rgba(0,0,0,0.4), 0 0 10px rgba(0,0,0,0.3);
}
[data-theme="dark"] div#notify_content div.n_item {
	border-bottom-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] div#notify_content div.n_item:hover {
	background: rgba(255,255,255,0.04);
}
[data-theme="dark"] div#notify_content div.n_header {
	background-color: #0a3260;
}
[data-theme="dark"] div#notify_content div.not_action i:hover {
	background-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] div.not_info input.no_style,
[data-theme="dark"] div.not_info select.no_style {
	border-bottom-color: #4d4d66;
	color: #e2e8f0;
}

/* ================================================================
   FORMS / INPUTS (global)
   ================================================================ */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] a.recent_ord {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] select option:checked {
	background-color: #1a3a5c;
	color: #fff;
}
[data-theme="dark"] select option:hover {
	background-color: #263048;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
	color: #64748b;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
/* Material design inputs use .bar underline, not border+shadow on focus */
[data-theme="dark"] #table1 input:focus,
[data-theme="dark"] #table1 select:focus,
[data-theme="dark"] #table2 input:focus,
[data-theme="dark"] #table2 select:focus,
[data-theme="dark"] div.price_e input:focus,
[data-theme="dark"] div.weight_t input:focus,
[data-theme="dark"] div.pr_name input:focus,
[data-theme="dark"] div.pr_qty input:focus,
[data-theme="dark"] input.editc_qb:focus,
[data-theme="dark"] div#pr_setup select:focus,
[data-theme="dark"] div.add_space select:focus,
[data-theme="dark"] div.add_space input:focus,
[data-theme="dark"] #ops input:focus,
[data-theme="dark"] div.s_date input:focus,
[data-theme="dark"] div.s_time input:focus,
[data-theme="dark"] div.s_terms select:focus,
[data-theme="dark"] #app_table input:focus,
[data-theme="dark"] input.no_style:focus,
[data-theme="dark"] select.no_style:focus,
[data-theme="dark"] div.cus_data select:focus,
[data-theme="dark"] div.cus_data input:focus,
[data-theme="dark"] span.span_so input:focus,
[data-theme="dark"] span.span_so select:focus {
	border-color: transparent;
	border-bottom-color: #344058;
	box-shadow: none;
}
/* Filter-group inputs — parent :focus-within handles the highlight, not the input itself */
[data-theme="dark"] .filter-group input:focus,
[data-theme="dark"] .filter-group select:focus,
[data-theme="dark"] .filter-group textarea:focus {
	border-color: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}
[data-theme="dark"] input.login {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}

/* Keep transparent inputs transparent inside containers that already have dark bg */
[data-theme="dark"] div.s_fields .filter-group input,
[data-theme="dark"] div.s_fields .filter-group select,
[data-theme="dark"] div#butt_container .filter-group input,
[data-theme="dark"] div#butt_container .filter-group select,
[data-theme="dark"] .comm-form .filter-group input,
[data-theme="dark"] .comm-form .filter-group select,
[data-theme="dark"] .comm-form .filter-group textarea,
[data-theme="dark"] span.span_so input,
[data-theme="dark"] span.span_so select,
[data-theme="dark"] table#details select,
[data-theme="dark"] table#details input.mail_2 {
	background-color: transparent;
	border-color: transparent;
}
/* Material design underline inputs — must stay transparent bg */
[data-theme="dark"] #table1 input,
[data-theme="dark"] #table1 select,
[data-theme="dark"] #table2 input,
[data-theme="dark"] #table2 select,
[data-theme="dark"] input.editc_qb,
[data-theme="dark"] div#pr_setup select,
[data-theme="dark"] div.add_space select,
[data-theme="dark"] div.add_space input[type="text"],
[data-theme="dark"] #ops input,
[data-theme="dark"] div.s_date input,
[data-theme="dark"] div.s_time input,
[data-theme="dark"] div.s_terms select,
[data-theme="dark"] #app_table input,
[data-theme="dark"] div.price_e input,
[data-theme="dark"] div.weight_t input,
[data-theme="dark"] div.pr_name input,
[data-theme="dark"] div.pr_qty input,
[data-theme="dark"] input.no_style,
[data-theme="dark"] select.no_style,
[data-theme="dark"] div.cus_data select,
[data-theme="dark"] div.cus_data input,
[data-theme="dark"] div.rep_content input {
	background-color: transparent;
	border-color: transparent;
	border-bottom-color: #344058;
}
[data-theme="dark"] select#bases,
[data-theme="dark"] select#pr_cats,
[data-theme="dark"] select#pr_plants,
[data-theme="dark"] input.srch_prd,
[data-theme="dark"] #order_list [id^=qty],
[data-theme="dark"] tr#delivery select,
[data-theme="dark"] #delivery select,
[data-theme="dark"] tr#grp_delivery select,
[data-theme="dark"] #tr_pdrw select,
[data-theme="dark"] div.drag_title input,
[data-theme="dark"] div.jBox-content input {
	background-color: transparent;
	border-color: transparent;
	border-bottom-color: #344058;
	color: #e2e8f0;
}

/* .form class (used in some admin/settings) */
[data-theme="dark"] .form {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}

/* Buttons */
[data-theme="dark"] button {
	color: #cbd5e1;
}
[data-theme="dark"] button.round {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] button.round:hover {
	background-color: #263048;
}

/* ================================================================
   MODALS — jBox
   ================================================================ */
[data-theme="dark"] .jBox-wrapper .jBox-container {
	background-color: #182132;
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .jBox-wrapper .jBox-title {
	background-color: #151e30;
	color: #e2e8f0;
	border-bottom-color: #263048;
}
[data-theme="dark"] .jBox-content {
	color: #e2e8f0;
}
[data-theme="dark"] .jBox-content input,
[data-theme="dark"] .jBox-content select,
[data-theme="dark"] .jBox-content textarea {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .jBox-content select.no_style {
	background-color: transparent;
	border-color: transparent;
	border-bottom-color: #344058;
}
[data-theme="dark"] .jBox-overlay {
	background: rgba(0,0,0,0.6) !important;
}
[data-theme="dark"] .jBox-closeButton {
	color: #94a3b8;
}
[data-theme="dark"] .jBox-closeButton:hover {
	color: #e2e8f0;
}
[data-theme="dark"] .jBox-pointer-top .jBox-pointer::after,
[data-theme="dark"] .jBox-pointer-bottom .jBox-pointer::after {
	background: #182132;
}

/* jBox Notice colors — muted but communicative in dark mode */
[data-theme="dark"] .jBox-Notice.jBox-Notice-green .jBox-container {
	background-color: #166534;
	color: #bbf7d0;
}
[data-theme="dark"] .jBox-Notice.jBox-Notice-red .jBox-container {
	background-color: #7f1d1d;
	color: #fecaca;
}
[data-theme="dark"] .jBox-Notice.jBox-Notice-blue .jBox-container {
	background-color: #1e3a5f;
	color: #bfdbfe;
}
[data-theme="dark"] .jBox-Notice.jBox-Notice-yellow .jBox-container {
	background-color: #713f12;
	color: #fef08a;
}

/* History modal */
/* History modal */
[data-theme="dark"] .history-modal,
[data-theme="dark"] div.history_content {
	background-color: #182132;
	color: #e2e8f0;
}
[data-theme="dark"] .history-modal-header {
	border-bottom-color: #344058;
}
[data-theme="dark"] .history-modal-header h2 {
	color: #e2e8f0;
}
[data-theme="dark"] .history-modal-close {
	color: #94a3b8;
}
[data-theme="dark"] .history-modal-close:hover {
	background-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .history-modal-toolbar {
	border-bottom-color: #344058;
}
[data-theme="dark"] .history-search input {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .history-search input:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] .history-search input::placeholder {
	color: #64748b;
}
[data-theme="dark"] .history-search i {
	color: #64748b;
}
[data-theme="dark"] .history-category-filter select {
	background-color: #1f293c;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .history-category-filter select:focus {
	border-color: #4a9eff;
}
[data-theme="dark"] .history-category-filter select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] .history-filter-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .history-filter-btn:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] .history-filter-btn.active {
	background-color: #1a3a5c;
	border-color: #2563eb;
	color: #93c5fd;
}
[data-theme="dark"] .history-item {
	background-color: #1f293c;
}
[data-theme="dark"] .history-item:hover {
	background-color: #263048;
}
[data-theme="dark"] .history-item.expanded {
	background-color: #1a2744;
}
/* Order History timeline — dark. The event card bg moves from .history-item to
   .history-item-main inside the rail; recolor the date tag, rail + icon ring. */
[data-theme="dark"] .oh-rail .history-item,
[data-theme="dark"] .oh-rail .history-item:hover { background-color: transparent; }
[data-theme="dark"] .oh-rail .history-item-main { background-color: #1f293c; }
[data-theme="dark"] .oh-rail .history-item:hover .history-item-main { background-color: #263048; }
[data-theme="dark"] .oh-rail .history-item.expanded .history-item-main { background-color: #1a2744; }
[data-theme="dark"] .oh-day-head { background: linear-gradient(180deg, #1e293b 70%, transparent); }
[data-theme="dark"] .oh-day-tag { background: #1559a0; color: #e2e8f0; }
[data-theme="dark"] .oh-rail::before { background: linear-gradient(180deg, rgba(96,165,250,0.40), rgba(96,165,250,0.10)); }
[data-theme="dark"] .oh-rail .history-item::after { background: #1e293b; box-shadow: 0 0 0 3px #1e293b; }
[data-theme="dark"] .history-item-title {
	color: #e2e8f0;
}
[data-theme="dark"] .history-item-meta {
	color: #94a3b8;
}
[data-theme="dark"] .history-item-details {
	border-top-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .history-item-action {
	background-color: #182132;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .history-item-action:hover {
	background-color: #4a9eff;
	border-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] .history-item-icon.email {
	background-color: #1e3a5f;
	color: #60a5fa;
}
[data-theme="dark"] .history-item-icon.email-reply {
	background-color: #134e4a;
	color: #5eead4;
}
[data-theme="dark"] .history-item-icon.email-outlook {
	background-color: #1e1b4b;
	color: #a5b4fc;
}
[data-theme="dark"] .hist-outlook-label { color: #a5b4fc; }
[data-theme="dark"] .hist-inbound-label { color: #5eead4; }
[data-theme="dark"] .history-item--inbound .history-item-title { color: #99f6e4; }
[data-theme="dark"] .history-item--inbound.expanded .history-item-main,
[data-theme="dark"] .oh-rail .history-item--inbound.expanded .history-item-main {
	background: rgba(15, 118, 110, 0.18);
	border-color: rgba(45, 212, 191, 0.35);
}
[data-theme="dark"] .history-item--inbound:hover .history-item-main,
[data-theme="dark"] .oh-rail .history-item--inbound:hover .history-item-main {
	background: rgba(15, 118, 110, 0.12);
}
[data-theme="dark"] .history-item-icon.phone {
	background-color: #14332a;
	color: #4ade80;
}
[data-theme="dark"] .history-item-icon.note {
	background-color: #3b2f1a;
	color: #fbbf24;
}
[data-theme="dark"] .history-item-icon.log {
	background-color: #263048;
	color: #94a3b8;
}
[data-theme="dark"] .history-item-icon.payment {
	background-color: #06302a;
	color: #34d399;
}
[data-theme="dark"] .history-item-icon.production {
	background-color: #3b1a2e;
	color: #f472b6;
}
[data-theme="dark"] .history-item-icon.delivery {
	background-color: #133040;
	color: #22d3ee;
}
[data-theme="dark"] .history-modal-footer {
	border-top-color: #344058;
	background-color: #0e1525;
}
[data-theme="dark"] .history-count {
	color: #94a3b8;
}
[data-theme="dark"] .history-empty {
	color: #64748b;
}

/* ================================================================
   SELECT2
   ================================================================ */
[data-theme="dark"] .select2-container--default .select2-selection--single,
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: #e2e8f0;
}
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: #94a3b8 transparent transparent transparent;
}
[data-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent #94a3b8 transparent;
}
[data-theme="dark"] .select2-dropdown {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .select2-search--dropdown .select2-search__field {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .select2-results__option {
	color: #e2e8f0;
}
[data-theme="dark"] .select2-results__option--highlighted,
[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #1a3a5c !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
	background-color: #263048;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
	background-color: #1a3a5c;
	border-color: #2d5a8c;
	color: #e2e8f0;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	color: #94a3b8;
}

/* ================================================================
   MESSAGING
   ================================================================ */
[data-theme="dark"] div.message_box {
	background-color: #182132;
	border-color: #263048;
	box-shadow: 0 0px 5px rgba(0,0,0,0.4);
	color: #e2e8f0;
}
[data-theme="dark"] div.mess_cont {
	background-color: #182132;
}
[data-theme="dark"] div.mess_cont_dash {
	border-left-color: #263048;
}
[data-theme="dark"] div.mess_overlay {
	background-color: rgba(30,30,47,0.95);
}
[data-theme="dark"] div.mess_div,
[data-theme="dark"] div.mess_div_dash {
	color: #e2e8f0;
}

/* ================================================================
   STACK MODULE
   ================================================================ */
[data-theme="dark"] div.stack_cont {
	color: #e2e8f0;
}
[data-theme="dark"] div.stack_tabs div.tab {
	background: rgba(30,30,47,0.5);
	color: #94a3b8;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
[data-theme="dark"] div.stack_tabs div.tab.selected,
[data-theme="dark"] div.stack_tabs div.tab:hover {
	background: rgba(30,30,47,0.95);
	color: #e2e8f0;
}
[data-theme="dark"] div.stack_dets {
	background-color: #182132;
	color: #e2e8f0;
}
[data-theme="dark"] .plan-view-cont {
	background-color: #182132;
}
[data-theme="dark"] .plan-detail-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .plan-detail-btn.active,
[data-theme="dark"] .plan-detail-btn:hover {
	background-color: #1a3a5c;
	color: #4a9eff;
}
/* Stack buttons */
[data-theme="dark"] div.sb_button,
[data-theme="dark"] div.sbs_button,
[data-theme="dark"] button.sb_button,
[data-theme="dark"] button.sbs_button {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.sb_button:not(.selected):hover,
[data-theme="dark"] div.sbs_button:not(.selected):hover,
[data-theme="dark"] button.sb_button:not(.selected):hover,
[data-theme="dark"] button.sbs_button:not(.selected):hover {
	background-color: rgba(74,158,255,0.1);
	border-color: rgba(74,158,255,0.35);
	color: #4a9eff;
}
[data-theme="dark"] div.sb_button.selected,
[data-theme="dark"] div.sbs_button.selected {
	background-color: #1a5ab8;
	border-color: #1a5ab8;
	color: #fff;
}
[data-theme="dark"] button.sbs_order_btn:hover {
	background-color: rgba(74,158,255,0.1);
	border-color: rgba(74,158,255,0.35);
	color: #4a9eff;
}
/* Stack specs components & parts */
[data-theme="dark"] div.stack-spec.comp {
	background-color: #1f293c;
}
[data-theme="dark"] div.spec-comp div.spec-part {
	background-color: rgba(30,30,47,0.75);
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.spec-comp div.spec-part:hover {
	background-color: rgba(45,45,68,0.82);
	border-color: #4a9eff;
}
[data-theme="dark"] div.spec-comp div.spec-part.active {
	background-color: rgba(79,206,112,0.25);
	border-color: rgba(79,206,112,0.5);
	color: #e2e8f0;
}
[data-theme="dark"] div.edit-part-title {
	background-color: #1a2e1d;
	color: #6ee77a;
}
[data-theme="dark"] input.select2-input {
	background-color: #182132;
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] div.stack_input div.title {
	color: #94a3b8;
}
[data-theme="dark"] div.stack_cont input.stack-input {
	border-bottom-color: #344058;
	color: #e2e8f0;
	background-color: transparent;
}
[data-theme="dark"] div.stock-select-container,
[data-theme="dark"] div.spec-select-container {
	border-bottom-color: #344058;
}
/* Stack visual tab info header */
[data-theme="dark"] div.sb_vis_specs {
	background-color: #1a2a3e;
	border-color: #2d4a66;
}
/* Stack summary header & metrics */
[data-theme="dark"] div.summary-header {
	background: linear-gradient(135deg, #1a2a3e 0%, #1e2e42 100%);
	border-color: #2d4a66;
}
[data-theme="dark"] span.summary-metric-label {
	color: #7aa3c4;
}
[data-theme="dark"] span.summary-metric-value {
	color: #e2e8f0;
}
/* Stack summary table */
[data-theme="dark"] table.summary-table th {
	background-color: #151e30;
	border-bottom-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] table.summary-table td {
	border-bottom-color: #263048;
	color: #cbd5e1;
}
[data-theme="dark"] table.summary-table tbody tr:hover {
	background-color: #1f293c;
}
/* Stack summary section titles & accessories */
[data-theme="dark"] div.summary-section-title {
	color: #6ee77a;
	border-bottom-color: #2d4a33;
}
[data-theme="dark"] div.summary-accessory-line {
	color: #cbd5e1;
}
[data-theme="dark"] div.summary-accessory-line:hover {
	background-color: #1f293c;
}
[data-theme="dark"] div.summary-accessory-line .acc-qty,
[data-theme="dark"] div.summary-accessory-line .acc-weight {
	color: #94a3b8;
}
/* Stack summary totals bar */
[data-theme="dark"] div.summary-stack-totals {
	background: linear-gradient(135deg, #1a2e1d 0%, #1a2a3e 100%);
	border-color: #2d4a33;
}
[data-theme="dark"] div.summary-stack-totals .summary-total-item {
	color: #94a3b8;
}
[data-theme="dark"] div.summary-stack-totals .summary-total-item strong {
	color: #e2e8f0;
}
/* Stack detail selects & select2 chosen */
[data-theme="dark"] div.stack_dets select {
	color: #e2e8f0;
	border-bottom-color: rgba(80,175,87,0.4);
}
[data-theme="dark"] div.stack-stock span.select2-container.chosen .select2-selection,
[data-theme="dark"] div.stack-spec span.select2-container.chosen .select2-selection {
	border-color: rgba(110,231,122,0.3);
	background-color: #182132;
}
[data-theme="dark"] div.stack-stock span.select2-container.chosen .select2-selection .select2-selection__rendered,
[data-theme="dark"] div.stack-spec span.select2-container.chosen .select2-selection .select2-selection__rendered {
	color: #6ee77a;
}
/* Stack spec/type/size Select2 dropdowns */
[data-theme="dark"] div.select2-small .select2.select2-container .select2-selection .select2-selection__rendered {
	color: #e2e8f0;
}
[data-theme="dark"] div.select2-small .select2-container--default .select2-selection__placeholder {
	color: #64748b;
}
[data-theme="dark"] div.select2-small .select2-container--disabled .select2-selection__placeholder {
	color: #475569 !important;
}
[data-theme="dark"] div.select2-small .select2-container--default .select2-selection--single {
	background-color: transparent;
	border-color: #344058;
}
[data-theme="dark"] div.select2-small .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: #64748b transparent transparent transparent;
}
[data-theme="dark"] div.select2-small .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent #64748b transparent;
}
/* Stack visual dets panel */
[data-theme="dark"] div.sb-visual.dets.third {
	color: #e2e8f0;
}

/* ================================================================
   JQUERY UI — Datepicker
   ================================================================ */
[data-theme="dark"] .ui-datepicker {
	background: #182132 !important;
	border-color: #344058 !important;
	box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-header {
	border-bottom-color: #263048 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-title {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-month,
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
	color: #e2e8f0 !important;
	background-color: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-month:hover,
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-year:hover,
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-month:focus,
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-year:focus {
	background-color: #263048 !important;
	border-color: #4a9eff !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-month option,
[data-theme="dark"] .ui-datepicker .ui-datepicker-title select.ui-datepicker-year option {
	background-color: #182132 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .ui-datepicker th {
	color: #64748b !important;
}
[data-theme="dark"] .ui-datepicker td a.ui-state-default,
[data-theme="dark"] .ui-datepicker td span.ui-state-default {
	color: #cbd5e1 !important;
}
[data-theme="dark"] .ui-datepicker td a.ui-state-default:hover {
	background: #263048 !important;
	border-color: #344058 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .ui-datepicker td a.ui-state-active {
	background: #1a3a5c !important;
	border-color: #4a9eff !important;
	color: #4a9eff !important;
}
[data-theme="dark"] .ui-datepicker td a.ui-state-highlight,
[data-theme="dark"] .ui-datepicker td span.ui-state-highlight {
	background: #1f293c !important;
	border-color: #4a9eff !important;
	color: #4a9eff !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-prev,
[data-theme="dark"] .ui-datepicker .ui-datepicker-next {
	background: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-prev:hover,
[data-theme="dark"] .ui-datepicker .ui-datepicker-next:hover {
	background: #263048 !important;
	border-color: #4a9eff !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-prev::after,
[data-theme="dark"] .ui-datepicker .ui-datepicker-next::after {
	border-color: #cbd5e1 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-unselectable .ui-state-default {
	color: #344058 !important;
}
[data-theme="dark"] .ui-datepicker .ui-datepicker-buttonpane {
	border-top-color: #263048 !important;
}

/* MDTimePicker */
[data-theme="dark"] .mdtimepicker {
	background-color: rgba(0,0,0,.7);
}
[data-theme="dark"] .mdtp__wrapper {
	box-shadow: 0 11px 30px rgba(0,0,0,.5);
}
[data-theme="dark"] .mdtp__time_holder {
	background-color: #0e1525;
}
[data-theme="dark"] .mdtp__clock_holder {
	background-color: #182132;
}
[data-theme="dark"] .mdtp__clock_holder .mdtp__clock {
	background-color: #0e1525;
}
[data-theme="dark"] .mdtp__clock .mdtp__digit:not(.digit--disabled) {
	color: #e2e8f0;
}
[data-theme="dark"] .mdtp__clock .mdtp__digit.digit--disabled span {
	color: #344058;
}
[data-theme="dark"] .mdtp__clock .mdtp__am:not(.active),
[data-theme="dark"] .mdtp__clock .mdtp__pm:not(.active) {
	color: #cbd5e1;
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .mdtp__clock .mdtp__am:hover,
[data-theme="dark"] .mdtp__clock .mdtp__pm:hover {
	background-color: #263048;
}
[data-theme="dark"] .mdtp__clock .mdtp__am.active,
[data-theme="dark"] .mdtp__clock .mdtp__pm.active {
	background-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] .mdtp__clock .mdtp__clock_dot {
	background-color: #4a9eff;
}
[data-theme="dark"] .mdtp__digit.active span,
[data-theme="dark"] .mdtp__clock .mdtp__digit:not(.digit--disabled) span:hover {
	background-color: #4a9eff !important;
	color: #fff;
}
[data-theme="dark"] .mdtp__digit.active:before {
	background-color: #4a9eff;
}
[data-theme="dark"] .mdtp__buttons {
	background-color: #182132;
}
[data-theme="dark"] .mdtp__button {
	color: #4a9eff;
}
[data-theme="dark"] .mdtp__button:hover {
	background-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .mdtp__button:active {
	background-color: rgba(255,255,255,.12);
}
[data-theme="dark"] .mdtp__button.clear-btn {
	color: #ef5350 !important;
}

/* jQuery UI Autocomplete */
[data-theme="dark"] .ui-autocomplete {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper {
	color: #e2e8f0;
}
[data-theme="dark"] .ui-autocomplete .ui-state-active,
[data-theme="dark"] .ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
	background-color: #1a3a5c !important;
	color: #e2e8f0 !important;
	border-color: #4a9eff;
}
[data-theme="dark"] .autocomplete-dropdown {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
/* Job/site contact typeahead rows (base in style.css) */
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop li:hover,
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop li.active {
	background: #2c3852;
}
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop .jc-name {
	color: #e2e8f0;
}
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop .jc-phone {
	color: #93a3b8;
}
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop .jc-del {
	color: #64707d;
}
[data-theme="dark"] ul.autocomplete-dropdown.jobcontact-drop .jc-del:hover {
	color: #fff;
	background: #c0453d;
}

/* ================================================================
   TRUMBOWYG (Rich Text Editor)
   ================================================================ */
[data-theme="dark"] .trumbowyg-box {
	border-color: #344058;
}
[data-theme="dark"] .trumbowyg-box svg {
	fill: #cbd5e1 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] .trumbowyg-editor {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] .trumbowyg-button-pane {
	background-color: #151e30;
	border-color: #263048;
}
[data-theme="dark"] .trumbowyg-button-pane::after {
	background: #263048;
}
[data-theme="dark"] .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::before {
	background-color: #263048;
}
[data-theme="dark"] .trumbowyg-button-pane button {
	color: #cbd5e1 !important;
}
[data-theme="dark"] .trumbowyg-button-pane button:hover,
[data-theme="dark"] .trumbowyg-button-pane button.trumbowyg-active {
	background-color: #263048;
}
[data-theme="dark"] .trumbowyg-button-pane button:hover svg {
	fill: #e2e8f0 !important;
}
[data-theme="dark"] .trumbowyg-button-pane .trumbowyg-open-dropdown::after {
	border-top-color: #cbd5e1;
}
[data-theme="dark"] .trumbowyg-dropdown {
	background-color: #1f293c;
	border-color: #344058;
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .trumbowyg-dropdown button {
	background-color: #1f293c;
	color: #cbd5e1 !important;
}
[data-theme="dark"] .trumbowyg-dropdown button:hover {
	background-color: #263048;
}
[data-theme="dark"] .trumbowyg-modal-box {
	background-color: #182132;
	color: #e2e8f0;
}

/* ================================================================
   PAGINATION
   ================================================================ */
[data-theme="dark"] .pagination-inline-wrapper {
	border-left-color: rgba(148,163,184,0.15);
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-select {
	background: #1f293c;
	border-color: #344058;
	color: #4a9eff;
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-select:hover {
	background: #263048;
	border-color: #4a9eff;
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-per-page {
	color: #94a3b8;
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-btn {
	color: #94a3b8;
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-btn:hover:not(:disabled) {
	color: #4a9eff;
	background: rgba(74,158,255,0.08);
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-page {
	color: #94a3b8;
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-page:hover {
	color: #4a9eff;
	background: rgba(74,158,255,0.08);
}
[data-theme="dark"] .pagination-inline-wrapper .pagination-page.active {
	color: #fff;
	background: linear-gradient(135deg, #1a5ab8 0%, #4a9eff 100%);
}
/* History modal pagination */
[data-theme="dark"] .history-pagination-btn {
	background: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .history-pagination-btn:hover:not(:disabled) {
	border-color: #4a9eff;
	color: #4a9eff;
}
[data-theme="dark"] .history-pagination-info {
	color: #94a3b8;
}

/* ================================================================
   MISCELLANEOUS COMPONENTS
   ================================================================ */

/* Login container */
[data-theme="dark"] .login_container {
	background-color: #182132;
	color: #e2e8f0;
}

/* Content containers */
[data-theme="dark"] div.rep_content,
[data-theme="dark"] div.nc_content,
[data-theme="dark"] div.qbc_content {
	background-color: transparent;
	color: #e2e8f0;
}

/* Production cards (legacy) */
[data-theme="dark"] div.prod_card,
[data-theme="dark"] div.prod_setup {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}

/* Production loading spinner */
[data-theme="dark"] div.loading_prod span {
	color: #64748b;
}
[data-theme="dark"] div.loading_prod_spinner {
	border-color: #344058;
	border-top-color: #22c55e;
}

/* Production card container */
[data-theme="dark"] div.prod-title-bar .prod-title-text {
	color: #94a3b8;
}
[data-theme="dark"] div.prod-buttons button {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.prod-buttons button:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-buttons button i {
	color: #94a3b8;
}
[data-theme="dark"] div.prod-card {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div.prod-card:hover {
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
[data-theme="dark"] div.prod-card.prod-card-expanded {
	border-color: #4a9eff;
	box-shadow: 0 2px 8px rgba(74,158,255,0.1);
}
[data-theme="dark"] div.prod-card.prod-card-grp {
	border-left-color: #22c55e;
}
[data-theme="dark"] div.prod-grp-item {
	border-bottom-color: #344058;
}
[data-theme="dark"] div.prod-card-header:hover {
	background-color: #1f293c;
}
[data-theme="dark"] div.prod-card-expanded .prod-card-header {
	background-color: rgba(34,197,94,0.08);
	border-bottom-color: #344058;
}
[data-theme="dark"] div.prod-card-grp.prod-card-expanded .prod-card-header {
	background-color: rgba(34,197,94,0.1);
}
[data-theme="dark"] div.prod-card-header .prod-card-name {
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-card-header .prod-card-qty-badge {
	color: #22c55e;
	background-color: rgba(34,197,94,0.12);
}
[data-theme="dark"] div.prod-card-header .prod-card-progress {
	background-color: #344058;
}
[data-theme="dark"] div.prod-card-header .prod-card-progress-bar {
	background-color: #22c55e;
}
[data-theme="dark"] div.prod-card-header .prod-card-stats {
	color: #94a3b8;
}
[data-theme="dark"] div.prod-card-header .prod-card-chevron {
	color: #64748b;
}
[data-theme="dark"] div.prod-card-header .prod-card-sort {
	color: #64748b;
}
[data-theme="dark"] div.prod-card-header .prod-card-sort:hover {
	color: #22c55e;
	background-color: rgba(34,197,94,0.08);
}
[data-theme="dark"] div.prod-card-draws {
	border-bottom-color: #263048;
}
[data-theme="dark"] .coring-pill {
	background: rgba(180,83,9,0.18);
	color: #fbbf24;
	border-color: rgba(251,191,36,0.28);
}
[data-theme="dark"] .coring-pill--done {
	background: rgba(4,120,87,0.2);
	color: #6ee7b7;
	border-color: rgba(110,231,183,0.3);
}

/* ── Drawing elements (global dark mode fixes) ── */
[data-theme="dark"] div.check i {
	color: rgba(255,255,255,0.85);
}
[data-theme="dark"] i.o_draw {
	color: #e2e8f0;
	background-color: rgba(30,41,59,0.7);
}
[data-theme="dark"] i.o_draw:hover {
	background-color: rgba(30,41,59,0.9);
}
[data-theme="dark"] img.dt_draw_sel ~ div.check {
	background-color: rgba(34,197,94,0.25);
}
[data-theme="dark"] span.sp_draw_name {
	background: rgba(34,197,94,0.92);
}

/* ── Draws toolbar (dark) ── */
[data-theme="dark"] div.prod-draws-toolbar {
	border-bottom-color: #263048;
}
[data-theme="dark"] input.prod-draws-search {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] input.prod-draws-search:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] span.prod-draws-count {
	color: #64748b;
}

/* ── Draws action buttons (dark) ── */
[data-theme="dark"] button.prod-draws-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] button.prod-draws-btn:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] button.prod-draws-btn i {
	color: #94a3b8;
}
[data-theme="dark"] button.prod-draws-btn:hover i {
	color: #e2e8f0;
}

/* ── Draw cards (dark) ── */
[data-theme="dark"] div.prod-draw-card:hover {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.prod-draw-card .dt_draw img {
	border-color: #344058;
}
[data-theme="dark"] div.prod-draw-card .dt_draw img:hover {
	border-color: rgba(34,197,94,0.6);
}
[data-theme="dark"] span.prod-draw-label {
	color: #94a3b8;
}
[data-theme="dark"] a.prod-draw-link {
	color: #64748b;
}
[data-theme="dark"] a.prod-draw-link:hover {
	color: #4a9eff;
}

/* ── Draws pagination (dark) ── */
[data-theme="dark"] div.prod-draws-pag {
	border-top-color: #263048;
}
[data-theme="dark"] div.prod-draws-pag button {
	border-color: #344058;
	background-color: #182132;
	color: #94a3b8;
}
[data-theme="dark"] div.prod-draws-pag button:hover:not(:disabled) {
	background-color: #1f293c;
	color: #e2e8f0;
}

/* ── Upload pill buttons (dark) ── */
[data-theme="dark"] div.draw_div, [data-theme="dark"] div.pd_item {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.draw_div:hover, [data-theme="dark"] div.pd_item:hover {
	background-color: #263048;
	border-color: #4a5568;
}
[data-theme="dark"] div.prod-item-header {
	background-color: #151e30;
	border-bottom-color: #344058;
	color: #64748b;
}
[data-theme="dark"] div.prod-item {
	border-bottom-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-item:hover {
	/* Match the dark order line-item hover (#1c2840) instead of the green tint. */
	background-color: #1c2840;
}
[data-theme="dark"] div.prod-item.pd_sel {
	background-color: rgba(34,197,94,0.1);
}
[data-theme="dark"] div.prod-card-grp .prod-item:hover {
	background-color: #1c2840;
}
[data-theme="dark"] div.prod-item.highlight {
	background-color: rgba(234, 179, 8, 0.20);
}
[data-theme="dark"] div.prod-item input[type=text],
[data-theme="dark"] div.prod-item select {
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-item input[type=text]:focus {
	background-color: rgba(30,41,59,0.8);
	box-shadow: 0 0 0 1.5px #4a9eff;
}
/* Hover-reveal in dark mode — transparent at rest (beats the solid base
   .prod-field paint), frame appears on hover/focus. (0,2,2) > base (0,2,1). */
[data-theme="dark"] div.prod-item > .prod-field {
	background: transparent;
	border-color: transparent;
}
[data-theme="dark"] div.prod-item > .prod-field:hover {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.prod-item > .prod-field:focus-within {
	background: #1f293c;
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] div.prod-item i.fa-trash-alt {
	color: #64748b;
}
[data-theme="dark"] div.prod-item i.fa-trash-alt:hover {
	color: #ef4444;
}
[data-theme="dark"] div.prod-item-draws {
	border-bottom-color: #263048;
	background-color: rgba(34,197,94,0.05);
}
/* ── Search + Filter Toolbar ── */
[data-theme="dark"] div.prod-toolbar {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div.prod-toolbar .filter-group {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.prod-toolbar .filter-group:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] div.prod-toolbar .filter-group[data-label]::before {
	background-color: #182132;
	color: #64748b;
}
[data-theme="dark"] div.prod-toolbar .filter-group i {
	color: #64748b;
}
[data-theme="dark"] div.prod-toolbar .filter-group input {
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-toolbar .filter-group input::placeholder {
	color: #64748b;
}
[data-theme="dark"] div.prod-toolbar .filter-group select {
	color: #cbd5e1;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2364748b" d="M5 6L0 0h10z"/></svg>');
}
[data-theme="dark"] div.prod-toolbar .filter-group select option {
	color: #cbd5e1;
	background-color: #1f293c;
}
[data-theme="dark"] button.prod-filter-clear {
	background-color: #1f293c;
	border-color: #344058;
	color: #64748b;
}
[data-theme="dark"] button.prod-filter-clear:hover {
	background-color: rgba(220, 38, 38, 0.15);
	border-color: rgba(220, 38, 38, 0.4);
	color: #f87171;
}
[data-theme="dark"] div.prod-no-results {
	color: #64748b;
}
[data-theme="dark"] div.prod-pagination button {
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] div.prod-pagination button:hover:not(:disabled) {
	background-color: #1f293c;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-pagination .prod-page-info {
	color: #94a3b8;
}
[data-theme="dark"] div.prod-pagination select {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.prod-card-pagination {
	border-top-color: #263048;
}
[data-theme="dark"] div.prod-card-pagination button {
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] div.prod-card-pagination button:hover:not(:disabled) {
	background-color: #1f293c;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-card-pagination .prod-card-page-info {
	color: #64748b;
}

/* ── AI Production Assistant (dark mode) ── */
[data-theme="dark"] div.prod-ai-bar {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div.prod-ai-header {
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-ai-header i {
	color: #64748b;
}
[data-theme="dark"] input.prod-ai-input {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] input.prod-ai-input:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] input.prod-ai-input::placeholder {
	color: #64748b;
}
[data-theme="dark"] button.prod-ai-btn-outline {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] button.prod-ai-btn-outline:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-ai-status {
	color: #64748b;
}
[data-theme="dark"] div.prod-ai-insight.prod-ai-type-warning {
	background-color: rgba(245,158,11,0.1);
	border-left-color: #f59e0b;
}
[data-theme="dark"] div.prod-ai-insight.prod-ai-type-info {
	background-color: rgba(59,130,246,0.1);
	border-left-color: #3b82f6;
}
[data-theme="dark"] div.prod-ai-insight.prod-ai-type-success {
	background-color: rgba(34,197,94,0.1);
	border-left-color: #22c55e;
}
[data-theme="dark"] div.prod-ai-insight-title {
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-ai-insight-detail {
	color: #94a3b8;
}
[data-theme="dark"] div.prod-ai-preview {
	border-color: #344058;
}
[data-theme="dark"] div.prod-ai-preview-header {
	background-color: #1f293c;
	border-bottom-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] div.prod-ai-preview-row {
	color: #cbd5e1;
	border-bottom-color: #263048;
}
[data-theme="dark"] div.prod-ai-preview-desc {
	background-color: #1f293c;
	border-bottom-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] button.prod-ai-cancel {
	background-color: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] button.prod-ai-cancel:hover {
	background-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod-ai-match-table {
	border-color: #344058;
}
[data-theme="dark"] div.prod-ai-match-row {
	color: #cbd5e1;
	border-bottom-color: #263048;
}

/* Custom dropdowns */
[data-theme="dark"] .cus-dropdown {
	background-color: #1f293c;
	border-color: #344058;
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
	color: #e2e8f0;
}
[data-theme="dark"] .cus-dropdown div:hover {
	background-color: #263048;
}

/* Drag & drop */
[data-theme="dark"] div.drag_title {
	background-color: #151e30;
	color: #e2e8f0;
	border-color: #263048;
}

/* Tooltips */
[data-theme="dark"] .jBox-Tooltip .jBox-container {
	background-color: #1f293c;
	color: #e2e8f0;
}
/* ── jt-panel tooltip dark mode ── */
[data-theme="dark"] .jBox-Tooltip .jBox-container:has(.jt-panel),
[data-theme="dark"] .jBox-Tooltip.jt-tooltip .jBox-container { background-color: #182132; border-color: #344058; box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2); }
[data-theme="dark"] .jBox-Tooltip.jt-tooltip .jBox-pointer::after { background: #182132; }
[data-theme="dark"] .jt-panel { color: #e2e8f0; }
[data-theme="dark"] .jt-qty { background: #4a9eff; }
[data-theme="dark"] .jt-name input[name=name] { color: #e2e8f0; border-color: transparent; border-bottom-color: transparent; }
[data-theme="dark"] .jt-name input[name=name]:hover { background-color: #1f293c; border-color: #344058; }
[data-theme="dark"] .jt-name input[name=name]:focus { background-color: #182132; border-color: #4a9eff; box-shadow: none; }
[data-theme="dark"] .jt-weight { color: #64748b; }
[data-theme="dark"] .jt-stock-name { color: #e2e8f0; }
[data-theme="dark"] .jt-desc { color: #94a3b8; }
[data-theme="dark"] .jt-date-banner { background: #1a2744; border-color: #263048; color: #e2e8f0; }
[data-theme="dark"] .jt-date-banner i { color: #4a9eff; }
[data-theme="dark"] .jt-date-val { color: #94a3b8; }
[data-theme="dark"] .jt-date-banner.jt-urgent { background: #2d1519; border-color: #5f2020; color: #fecaca; }
[data-theme="dark"] .jt-date-banner.jt-urgent i { color: #f87171; }
[data-theme="dark"] .jt-date-banner.jt-soon { background: #2d2410; border-color: #5f4b1a; color: #fde68a; }
[data-theme="dark"] .jt-date-banner.jt-soon i { color: #fbbf24; }
[data-theme="dark"] .jt-date-banner.jt-tent { background: #182132; border-color: #344058; }
[data-theme="dark"] .jt-date-banner.jt-tent i { color: #94a3b8; }
[data-theme="dark"] .jt-field { border-color: #344058; background-color: #1f293c; }
[data-theme="dark"] .jt-field:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74,158,255,0.12); }
[data-theme="dark"] .jt-field[data-label]::before { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .jt-field input, [data-theme="dark"] .jt-field select { color: #e2e8f0; }
[data-theme="dark"] .jt-field input:focus, [data-theme="dark"] .jt-field select:focus { outline: none; box-shadow: none; }
[data-theme="dark"] .jt-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E"); }
[data-theme="dark"] .jt-field select.no_style { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E"); }
[data-theme="dark"] .jt-field-muted { background: #152030; }
[data-theme="dark"] .jt-info { background: #1f293c; border-color: #263048; }
[data-theme="dark"] .jt-info-row { color: #e2e8f0; }
[data-theme="dark"] .jt-info-row i { color: #4a9eff; }
[data-theme="dark"] .jt-info-row em { color: #64748b; }
[data-theme="dark"] .jt-type-badge span { color: #94a3b8; }
[data-theme="dark"] .jt-type-badge i { color: #64748b; }
[data-theme="dark"] .jt-missed-badge { background: #2d1519; }
[data-theme="dark"] .jt-missed-badge i { color: #f87171 !important; }
[data-theme="dark"] .jt-missed-badge span { color: #fecaca !important; }
[data-theme="dark"] .jt-inline-note { background: #2d2410; border-color: #5f4b1a; color: #fde68a; }
[data-theme="dark"] .jt-att { background: #1f293c; border-color: #263048; }
[data-theme="dark"] .jt-att-head { color: #94a3b8; }
[data-theme="dark"] .jt-att-head i { color: #4a9eff; }
[data-theme="dark"] .jt-att-count { background: #1a2744; color: #4a9eff; }
[data-theme="dark"] .jt-att-item { color: #cbd5e1; }
[data-theme="dark"] .jt-att-item::before { background: #64748b; }
[data-theme="dark"] .jt-att-tag { background: #312e81; color: #c7d2fe; }
[data-theme="dark"] .jt-notes-wrap textarea { background-color: #1f293c; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] .jt-notes-wrap textarea:focus { border-color: #4a9eff; box-shadow: none; }
[data-theme="dark"] .jt-notes-wrap textarea::placeholder { color: #64748b; }
[data-theme="dark"] .jt-actions { border-top-color: #263048; }
[data-theme="dark"] .jt-act { color: #64748b; }
[data-theme="dark"] .jt-act:hover { color: #4a9eff; background: #1a2744; }
[data-theme="dark"] .jt-act-rm { color: #4b5563; }
[data-theme="dark"] .jt-act-rm:hover { background: #2d1519; color: #f87171; }

/* Status badges */
[data-theme="dark"] div.approved {
	background-color: rgba(38,148,68,0.75);
}
/* Account flags — dark amber treatment so it's still readable on the dark
   background but doesn't blow out the eyes. Borders + chips inverted from
   light mode. */
[data-theme="dark"] div.account_flags {
	background: linear-gradient(180deg, rgba(217, 119, 6, 0.10) 0%, rgba(217, 119, 6, 0.05) 100%);
	border-color: rgba(240, 200, 122, 0.35);
	border-left-color: #f59e0b;
	color: #fcd34d;
	box-shadow: none;
}
[data-theme="dark"] div.account_flags .account-flags-label,
[data-theme="dark"] div.account_flags .account-flags-label i {
	color: #fbbf24;
}
[data-theme="dark"] div.account_flags .account-flag-chip {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(240, 200, 122, 0.30);
	color: #fde68a;
}
[data-theme="dark"] div.account_flags .account-flag-chip:hover {
	background: rgba(217, 119, 6, 0.18);
	border-color: #f59e0b;
}
[data-theme="dark"] div.account_flags .account-flag-chip i {
	color: #fbbf24;
}
/* Customer account-note indicator (compact, on the customer field) — dark. */
[data-theme="dark"] table#table1 .indiv .cust-note { color: #fbbf24; }
[data-theme="dark"] table#table1 .indiv .cust-note:hover,
[data-theme="dark"] table#table1 .indiv .cust-note:focus-visible {
	background: rgba(217, 119, 6, 0.18);
	color: #fcd34d;
}
[data-theme="dark"] .cust-note .cust-note-pop {
	background: #1e293b;
	border-color: rgba(240, 200, 122, 0.35);
	border-left-color: #f59e0b;
	color: #cbd5e1;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .cust-note .cust-note-pop-head { color: #fbbf24; }
[data-theme="dark"] .cust-note .cust-note-pop-body { color: #cbd5e1; }
[data-theme="dark"] .cust-note .cust-note-pop::after { border-bottom-color: #1e293b; }
[data-theme="dark"] .cust-note .cust-note-pop::before { border-bottom-color: rgba(240, 200, 122, 0.45); }
/* Mini timeline — dark. The navy #0f172a date chip vanishes on the dark
   popover, so lift it to a readable blue. */
[data-theme="dark"] .cust-note .cust-note-tl::before,
[data-theme="dark"] .job-proj-note .job-proj-note-tl::before { background: linear-gradient(180deg, rgba(96,165,250,0.40), rgba(96,165,250,0.10)); }
[data-theme="dark"] .cust-note .cnt-dot,
[data-theme="dark"] .job-proj-note .cnt-dot { background: #1e293b; border-color: #60a5fa; box-shadow: 0 0 0 2px #1e293b; }
[data-theme="dark"] .cust-note .cnt-date,
[data-theme="dark"] .job-proj-note .cnt-date { background: #1559a0; color: #e2e8f0; }
[data-theme="dark"] .cust-note .cnt-text,
[data-theme="dark"] .job-proj-note .cnt-text { color: #cbd5e1; }
/* HOLD state — dark. */
[data-theme="dark"] table#table1 .indiv .cust-note.is-hold { color: #f87171; }
[data-theme="dark"] table#table1 .indiv .cust-note.is-hold:hover,
[data-theme="dark"] table#table1 .indiv .cust-note.is-hold:focus-visible { background: rgba(185,28,28,0.22); color: #fca5a5; }
[data-theme="dark"] .cust-note.is-hold .cust-note-pop { border-color: rgba(248,113,113,0.45); border-left-color: #ef4444; }
[data-theme="dark"] .cust-note.is-hold .cust-note-pop-head { color: #f87171; }
[data-theme="dark"] .cust-note.is-hold .cust-note-pop::before { border-bottom-color: rgba(248,113,113,0.5); }
[data-theme="dark"] .cust-note.is-hold .cnt-dot { border-color: #ef4444; }

/* Project-notes icon on Job Notes field — dark (navy/blue family) */
[data-theme="dark"] table#table1 .indiv .job-proj-note { color: #93c5fd; }
[data-theme="dark"] table#table1 .indiv .job-proj-note:hover,
[data-theme="dark"] table#table1 .indiv .job-proj-note:focus-visible {
	background: rgba(59, 130, 246, 0.18);
	color: #bfdbfe;
}
[data-theme="dark"] .job-proj-note .job-proj-note-count { background: #3b82f6; color: #0f172a; }
[data-theme="dark"] .job-proj-note .job-proj-note-pop {
	background: #1e293b;
	border-color: rgba(147, 197, 253, 0.35);
	border-left-color: #4a9eff;
	color: #cbd5e1;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .job-proj-note .job-proj-note-pop-head { color: #93c5fd; }
[data-theme="dark"] .job-proj-note .job-proj-note-pop::after { border-bottom-color: #1e293b; }
[data-theme="dark"] .job-proj-note .job-proj-note-pop::before { border-bottom-color: rgba(147, 197, 253, 0.45); }
[data-theme="dark"] .job-proj-note .job-proj-note-tl::before { background: linear-gradient(180deg, rgba(96,165,250,0.40), rgba(96,165,250,0.10)); }
[data-theme="dark"] .job-proj-note .cnt-dot { background: #1e293b; border-color: #60a5fa; box-shadow: 0 0 0 2px #1e293b; }
[data-theme="dark"] .job-proj-note .cnt-date { background: #1559a0; color: #e2e8f0; }
[data-theme="dark"] .job-proj-note .cnt-who { color: #94a3b8; }
[data-theme="dark"] .job-proj-note .cnt-text { color: #cbd5e1; }
[data-theme="dark"] .job-proj-note-more { border-top-color: #334155; color: #93c5fd; }
/* legacy tr#approved dark override removed — see .approved-banner overrides above */

/* Loading / cog */
[data-theme="dark"] div.cog_load {
	color: #94a3b8;
}

/* Editing spans */
[data-theme="dark"] tr.d0 td div.editing span:hover,
[data-theme="dark"] tr.d1 td div.editing span:hover,
[data-theme="dark"] tr.selected td div.editing span:hover,
[data-theme="dark"] .edit_elem:hover,
[data-theme="dark"] span.edit_elem:hover {
	border-color: #344058;
	background-color: #263048;
}

/* Tab bars / page sub-navigation */
[data-theme="dark"] .nav-tabs {
	border-bottom-color: #263048;
}
[data-theme="dark"] .nav-tabs .nav-link {
	color: #94a3b8;
}
[data-theme="dark"] .nav-tabs .nav-link:hover {
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .nav-tabs .nav-link.active {
	color: #4a9eff;
	border-bottom-color: #4a9eff;
	background-color: transparent;
}

/* Bootstrap cards (generic) */
[data-theme="dark"] .card {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .card-header {
	background-color: #151e30;
	border-bottom-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .card-footer {
	background-color: #151e30;
	border-top-color: #263048;
}

/* Alerts */
[data-theme="dark"] .alert {
	border-color: #344058;
}

/* HR */
[data-theme="dark"] hr {
	border-color: #263048;
}

/* Labels / small text */
[data-theme="dark"] label {
	color: #cbd5e1;
}
[data-theme="dark"] .text-muted {
	color: #64748b !important;
}

/* Contact inline inputs */
[data-theme="dark"] input.contact-email-input,
[data-theme="dark"] input.contact-name-input {
	background-color: transparent;
	border-color: transparent;
	color: #e2e8f0;
}

/* Sage link labels (stack) */
[data-theme="dark"] .sage-link-label {
	color: #94a3b8;
}

/* ================================================================
   ORDER DETAILS TABLE & ORDER LIST (inside order cards)
   ================================================================ */
[data-theme="dark"] table#details {
	color: #e2e8f0;
}
[data-theme="dark"] table#details td {
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] table#details select,
[data-theme="dark"] table#details input {
	color: #e2e8f0;
}
[data-theme="dark"] #order_list {
	color: #e2e8f0;
}
[data-theme="dark"] #order_list td {
	border-color: #263048;
}

/* Order card tables: all inputs/selects inside order-card */
[data-theme="dark"] .order-card table td {
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .order-card table.form {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .order-card table.form.light-blue {
	background-color: #151e30;
}
[data-theme="dark"] .order-card.items-card table#order_list {
	border-top-color: #263048;
}
[data-theme="dark"] .order-card tr.line td {
	color: #e2e8f0;
	border-color: #263048;
}
[data-theme="dark"] .order-card tr.main td {
	color: #94a3b8;
	border-color: #263048;
}
/* Customer search input in header area */
[data-theme="dark"] input[name="customer"] {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] input[name="customer"]:focus {
	border-color: #4a9eff;
}
/* Table1 (order details layout table) */
[data-theme="dark"] #table1 td {
	color: #e2e8f0;
}
/* tfoot totals/tax rows */
[data-theme="dark"] .order-card tfoot td {
	color: #cbd5e1;
	border-color: #263048;
}

/* ================================================================
   GENERAL TEXT COLOR OVERRIDES
   ================================================================ */
[data-theme="dark"] .order-card .card-content {
	color: #e2e8f0;
}
[data-theme="dark"] span.span_so {
	color: #e2e8f0;
}
[data-theme="dark"] span.span_so select,
[data-theme="dark"] span.span_so input {
	color: #e2e8f0;
}

/* ================================================================
   IMAGES & SVGs — invert dark-unfriendly logos if needed
   ================================================================ */
/* Select caret SVGs inside dark filter groups — lighten the arrow */
[data-theme="dark"] .comm-form .filter-group select,
[data-theme="dark"] div.s_fields .filter-group select,
[data-theme="dark"] div#butt_container .filter-group select {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M5 6L0 0h10z"/></svg>');
}

/* ================================================================
   ORDER FORM CONTAINER (#ord_form / #ord_sales / #flip_me)
   ================================================================ */
[data-theme="dark"] div#ord_form,
[data-theme="dark"] div#ord_sales {
	background: #182132 !important;
	background-color: #182132 !important;
	border-color: #263048;
	box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.2);
}
[data-theme="dark"] div#ord_form.front {
	background: #151e30 !important;
	background-color: #151e30 !important;
}
/* Error boxes */
[data-theme="dark"] div#cus_err,
[data-theme="dark"] div#qb_err,
[data-theme="dark"] div#fn_err {
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div#qb_err svg path {
	fill: #94a3b8;
}
/* So_proc */
[data-theme="dark"] div#so_proc {
	color: #e2e8f0;
}

/* ================================================================
   MODERN BORDERED INPUTS (table#table1 div.indiv — from index.php)
   These use !important in index.php inline styles, so we must too.
   ================================================================ */
/* Input containers — dark background + dark border */
[data-theme="dark"] table#table1 td div.indiv {
	background: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] table#table1 td div.indiv:focus-within {
	border-color: #4a9eff !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15) !important;
}
/* Inputs inside the bordered containers */
[data-theme="dark"] table#table1 input[type="text"],
[data-theme="dark"] table#table1 input:not([type]),
[data-theme="dark"] table#table1 select {
	color: #e2e8f0 !important;
}
/* Labels — dark background to cover the border line + light text */
[data-theme="dark"] table#table1 td div.indiv label {
	background: #1f293c !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] table#table1 td div.indiv:focus-within label {
	color: #4a9eff !important;
}
/* Map label hover */
[data-theme="dark"] table#table1 td div.indiv label.map-label:hover {
	color: #6db3ff !important;
}
[data-theme="dark"] table#table1 td div.indiv label.map-label i.fa-map-marker-alt {
	color: #4a9eff !important;
}
[data-theme="dark"] table#table1 td div.indiv label.map-label:hover i.fa-map-marker-alt {
	color: #6db3ff !important;
}
/* Order-page monument status modal (dark) */
[data-theme="dark"] .mm-ord-modal { color: #cbd5e1; }
[data-theme="dark"] .mm-ord-modal-lead { color: #e8eef7; }
[data-theme="dark"] .mm-ord-modal-help { color: #94a3b8; }
[data-theme="dark"] .mm-ord-mm-num { color: #e8eef7; }
[data-theme="dark"] .mm-ord-state {
	background: rgba(139, 92, 246, 0.18);
	color: #ddd6fe;
	border-color: #4c1d95;
}
[data-theme="dark"] .mm-ord-sub { color: #94a3b8; }
[data-theme="dark"] .mm-ord-status-label { color: #94a3b8; }
[data-theme="dark"] .mm-ord-state-sel {
	background: #131c2e;
	border-color: #33415b;
	color: #e8eef7;
}
[data-theme="dark"] .mm-ord-facts {
	background: #131c2e;
	border-color: #243049;
}
[data-theme="dark"] .mm-ord-fact-l { color: #64748b; }
[data-theme="dark"] .mm-ord-fact-v { color: #e8eef7; }
[data-theme="dark"] .mm-ord-open-link { color: #c4b5fd; }
[data-theme="dark"] .mm-ord-open-link:hover { color: #ddd6fe; }
/* Customer field action icons */
[data-theme="dark"] table#table1 a.close:hover {
	background: rgba(220,38,38,0.15);
	color: #f87171;
}
[data-theme="dark"] table#table1 a.new:hover {
	background: rgba(74,158,255,0.12);
	color: #4a9eff;
}
/* Autocomplete dropdown */
[data-theme="dark"] table#table1 td div.indiv ul.autocomplete-dropdown {
	background: #1f293c;
	border-color: #344058;
	box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
[data-theme="dark"] table#table1 td div.indiv ul.autocomplete-dropdown li:hover {
	background: #263048;
}
/* Customer dropdown */
[data-theme="dark"] ul.cus-dropdown {
	background: #1f293c;
	border-color: #344058;
	box-shadow: 0 8px 20px rgba(0,0,0,0.35);
	color: #e2e8f0;
}

/* Tax-row inputs — bordered containers */
[data-theme="dark"] .tax-row-input {
	background: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .tax-row-input:focus-within {
	border-color: #4a9eff !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] .tax-row-input select {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .tax-row-input select[name="terms"] {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M5 6L0 0h10z"/></svg>') !important;
	background-repeat: no-repeat !important;
	background-position: right 4px center !important;
	background-size: 10px 6px !important;
	padding-right: 20px !important;
}
[data-theme="dark"] .tax-row-input label {
	background: #1f293c !important;
	color: #94a3b8 !important;
}
/* Loading shimmer for tax row */
[data-theme="dark"] div.tax-row-input.tax-loading {
	border-color: #344058;
	background: linear-gradient(90deg, #1f293c 0%, #263048 35%, #1f293c 50%, #263048 65%, #1f293c 100%);
	background-size: 200% 100%;
}
[data-theme="dark"] div.tax-row-input.tax-loading label {
	color: #94a3b8;
	background: transparent !important;
}

/* Paid + Retail .sch-pill chips in the tax row — match Terms/Tax borders.
   The inline `.tax-row-left .sch-pill` rule (in index.php, after style.css)
   sets the LIGHT-MODE border color and beats the base dark-mode rule on
   source-order with equal specificity, leaving the pills with light borders
   in dark mode. These !important overrides snap them back to #344058 so
   they read as part of the same row cluster as the Terms/Tax containers. */
[data-theme="dark"] .tax-row-left .sch-pill {
	background: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] .tax-row-left .sch-pill:hover {
	background: #243152 !important;
	border-color: #4a9eff !important;
	color: #f1f5f9 !important;
}
[data-theme="dark"] .tax-row-left .sch-pill:has(input:checked) {
	background: #1e63b5 !important;
	border-color: #1e63b5 !important;
	color: #fff !important;
}

/* Toggle inputs (Paid, Retail) — bordered containers */
[data-theme="dark"] .toggle-input {
	background: #1f293c !important;
	border-color: #344058 !important;
}
[data-theme="dark"] .toggle-input:has(input:checked) {
	border-color: #4a9eff !important;
}
[data-theme="dark"] .toggle-input label.toggle-label {
	background: #1f293c !important;
	color: #94a3b8 !important;
}
[data-theme="dark"] .toggle-input:has(input:checked) label.toggle-label {
	color: #4a9eff !important;
}
/* Toggle switch track */
[data-theme="dark"] .toggle-switch .toggle-track {
	background: #344058 !important;
}
[data-theme="dark"] .toggle-switch input:checked + .toggle-track {
	background: #4a9eff !important;
}

/* Order list line items */
[data-theme="dark"] table#order_list tbody tr.line {
	border-bottom-color: #263048 !important;
}
/* Even row alternating stripe — subtle dark tint */
[data-theme="dark"] table#order_list tbody tr:not(#tr_pdrw):not(.buffer):nth-child(even) {
	background-color: rgba(255,255,255,0.03);
}
/* Hover on order list rows */
[data-theme="dark"] table#order_list tbody tr:not(#tr_pdrw):not(.buffer):not(#grp_delivery):hover {
	background-color: rgba(74,158,255,0.08);
}
[data-theme="dark"] table#order_list tbody tr.line:hover td {
	background-color: transparent;
}
/* Order list header row */
[data-theme="dark"] table#order_list tr.main td {
	color: #64748b;
}
/* Total row borders */
[data-theme="dark"] tr#total td {
	border-top-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.ord_totals {
	color: #cbd5e1;
}
/* Order Financial Summary Card */
[data-theme="dark"] div.ord-summary {
    background-color: #1f293c;
    border-color: #344058;
}
[data-theme="dark"] span.ord-summary-label {
    color: #94a3b8;
}
[data-theme="dark"] i.ord-summary-icon {
    color: #64748b;
}
[data-theme="dark"] span.ord-summary-amt {
    color: #e2e8f0;
}
[data-theme="dark"] span.ord-summary-amt.ord-summary-neg {
    color: #f87171;
}
[data-theme="dark"] span.ord-summary-amt.ord-summary-fee {
    color: #fbbf24;
}
[data-theme="dark"] div.ord-summary-divider {
    background-color: #344058;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-total span.ord-summary-label {
    color: #e2e8f0;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-total span.ord-summary-amt {
    color: #f8fafc;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-total .ord-summary-info {
    color: #64748b;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-total .ord-summary-info:hover {
    color: #4a9eff;
}
[data-theme="dark"] i.ord-summary-toggle {
    color: #64748b;
}
[data-theme="dark"] i.ord-summary-toggle:hover {
    color: #e2e8f0;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-balance span.ord-summary-label {
    color: #e2e8f0;
}
[data-theme="dark"] div.ord-summary-row.ord-summary-balance span.ord-summary-amt {
    color: #f8fafc;
}
[data-theme="dark"] span.ord-summary-amt.ord-summary-paid {
    color: #4ade80 !important;
}

/* ================================================================
   PRODUCT SEARCH (#spr) — "Add Product or Group to Order"
   ================================================================ */
[data-theme="dark"] #ops div#spr {
	background: #1f293c !important;
	border-color: #4a9eff !important;
}
[data-theme="dark"] #ops div#spr:focus-within {
	border-color: #4a9eff !important;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.2) !important;
}
[data-theme="dark"] #ops div#spr input.srch_prd {
	color: #e2e8f0 !important;
}
[data-theme="dark"] #ops div#spr label {
	background: #1f293c !important;
	color: #4a9eff !important;
}
[data-theme="dark"] #ops div#spr > i {
	color: #4a9eff;
}
/* Product search results */
[data-theme="dark"] div.psrch_res {
	color: #e2e8f0;
}
[data-theme="dark"] div.psrch_res span.srch_cus {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.psrch_res span.srch_cus:hover {
	background-color: #263048;
	border-color: #4a9eff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] span.srch_cus i.fa-plus-circle {
	color: #4a9eff;
}
[data-theme="dark"] span.srch_cus i.fa-check-circle {
	color: #4ade80;
}
[data-theme="dark"] span.srch_cus.pr_select,
[data-theme="dark"] span.srch_cus.pr_select:hover {
	background-color: rgba(74, 158, 255, 0.12);
	border-color: #4a9eff;
}
[data-theme="dark"] span.srch_cat {
	color: #64748b;
}
[data-theme="dark"] div.qoh {
	background-color: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.2);
	color: #4ade80;
}
[data-theme="dark"] div.qoh.qoh_zero {
	background-color: rgba(255, 255, 255, 0.04);
	border-color: #344058;
	color: #64748b;
}
[data-theme="dark"] div.qoh.qoh_low {
	background-color: rgba(245, 158, 11, 0.1);
	border-color: rgba(245, 158, 11, 0.2);
	color: #fbbf24;
}
[data-theme="dark"] div.srch_edit_pill {
	background-color: #1f293c;
	border-color: #344058;
	color: #64748b;
}
[data-theme="dark"] div.srch_edit_pill:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}

/* ================================================================
   EDIT PRODUCT PANEL (#bases_select)
   ================================================================ */
[data-theme="dark"] div#bases_select {
	background-color: #1a2a3e !important;
	border-color: #2d5a8c !important;
}
[data-theme="dark"] div#bases_select > div:first-child {
	background-color: #0a3d6e !important;
}
[data-theme="dark"] div#bases_select b,
[data-theme="dark"] div#bases_select strong {
	color: #cbd5e1;
}
[data-theme="dark"] div#category_select {
	color: #cbd5e1;
}
[data-theme="dark"] div#pr_setup {
	color: #cbd5e1;
}
[data-theme="dark"] div#pr_setup b {
	color: #cbd5e1;
}

/* ================================================================
   TR#OPS BUTTONS (Products, Add Custom, Add Group, etc.)
   ================================================================ */
[data-theme="dark"] #ops button.round {
	background-color: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] #ops button.round:hover {
	background-color: #263048 !important;
	border-color: #4a9eff !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] #ops button.round i {
	color: #4a9eff !important;
}
/* Change Category / Drawings / Add to Order buttons inside bases_select */
[data-theme="dark"] div#bases_select button.round {
	background-color: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] div#bases_select button.round:hover {
	background-color: #263048 !important;
	border-color: #4a9eff !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] div#bases_select button.round i {
	color: #4a9eff !important;
}

/* ================================================================
   ACTION BUTTONS CARD — btn-group backgrounds & labels
   ================================================================ */
[data-theme="dark"] .action-buttons-container .btn-group {
	background: #151e30 !important;
	border-color: #263048 !important;
}
[data-theme="dark"] .action-buttons-container .btn-group.primary-actions {
	background: #182132 !important;
	border-color: #263048 !important;
}
[data-theme="dark"] .action-buttons-container .btn-group-label {
	color: #64748b !important;
	border-right-color: #344058 !important;
}
[data-theme="dark"] .action-buttons-container .btn-group.primary-actions .btn-group-label {
	color: #94a3b8 !important;
}
/* Individual action buttons inside the card */
[data-theme="dark"] .action-buttons-card #act_buttons button {
	background: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button:hover {
	background: rgba(74,158,255,0.1) !important;
	border-color: rgba(74,158,255,0.3) !important;
	color: #4a9eff !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button:hover i {
	color: #4a9eff !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button:hover svg path {
	fill: #4a9eff !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button svg path {
	fill: #cbd5e1 !important;
}
/* Send/Submit button stays primary blue */
[data-theme="dark"] .action-buttons-card #act_buttons button[name=submit] {
	background: #1a5ab8 !important;
	color: white !important;
	border-color: #1a5ab8 !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button[name=submit]:hover {
	background: #1d6ad6 !important;
}
[data-theme="dark"] .action-buttons-card #act_buttons button[name=submit]:hover i {
	color: white !important;
}

/* ================================================================
   CONTACT LIST — selected state, inline-edit text, row backgrounds
   ================================================================ */
/* Contact list container & email list rows */
[data-theme="dark"] #email_to .contact-list div.row {
	background-color: #182132 !important;
	border-color: #344058 !important;
}
[data-theme="dark"] #email_to .contact-list div.row:hover {
	border-color: #4d4d66 !important;
}
[data-theme="dark"] #email_to .email-list {
	background: #1f293c !important;
	border-color: #344058 !important;
}
/* Selected state */
[data-theme="dark"] #email_to .contact-list div.row.row_select,
[data-theme="dark"] #email_to .email-list div.row.row_select {
	background: rgba(74,158,255,0.12) !important;
	border-color: rgba(74,158,255,0.4) !important;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.1);
}
[data-theme="dark"] #email_to .contact-list div.row.row_select .contact-name,
[data-theme="dark"] #email_to .contact-list div.row.row_select .contact-name-input,
[data-theme="dark"] #email_to .email-list div.row.row_select input.mail_2 {
	color: #4a9eff !important;
}
[data-theme="dark"] #email_to .contact-list div.row.row_select input[type="checkbox"],
[data-theme="dark"] #email_to .email-list div.row.row_select input[type="checkbox"] {
	accent-color: #4a9eff;
}
/* Inline edit input text color */
[data-theme="dark"] #email_to .contact-list div.row .contact-info input.inline-edit {
	color: #e2e8f0 !important;
}
/* Email-to input at top of contact section */
[data-theme="dark"] #email_to > input[name="email"] {
	color: #e2e8f0 !important;
}
[data-theme="dark"] #email_to > input[name="email"]::placeholder {
	color: #64748b !important;
}

/* Checkbox row text */
[data-theme="dark"] .comm-form .checkbox-row .checkers {
	color: #cbd5e1;
}

/* File upload dropzone */
[data-theme="dark"] div#fu_drop {
	background-color: #151e30;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div#fu_drop i {
	color: #64748b !important;
}

/* Header/Footer text areas */
[data-theme="dark"] div.text_div {
	color: #e2e8f0;
}
[data-theme="dark"] div.text_div span.labeled {
	color: #94a3b8;
}

/* ================================================================
   MATERIAL DESIGN INPUTS — underline style (#table1, #table2, etc.)
   ================================================================ */
[data-theme="dark"] #table1 input,
[data-theme="dark"] #table1 select,
[data-theme="dark"] #table2 input,
[data-theme="dark"] #table2 select,
[data-theme="dark"] input.editc_qb,
[data-theme="dark"] div#pr_setup select,
[data-theme="dark"] div.add_space select,
[data-theme="dark"] div.add_space input[type="text"],
[data-theme="dark"] #ops input,
[data-theme="dark"] div.s_date input,
[data-theme="dark"] div.s_time input,
[data-theme="dark"] div.s_terms select,
[data-theme="dark"] #app_table input {
	border-bottom-color: #344058;
	color: #e2e8f0;
	background-color: transparent;
}
/* Inputs that share the material underline style */
[data-theme="dark"] select#bases,
[data-theme="dark"] select#pr_cats,
[data-theme="dark"] select#pr_plants,
[data-theme="dark"] input.srch_prd,
[data-theme="dark"] #order_list [id^=qty],
[data-theme="dark"] table#details select,
[data-theme="dark"] table#details input.mail_2,
[data-theme="dark"] span.span_so input,
[data-theme="dark"] span.span_so select,
[data-theme="dark"] tr#delivery select,
[data-theme="dark"] #delivery select,
[data-theme="dark"] tr#grp_delivery select,
[data-theme="dark"] #tr_pdrw select,
[data-theme="dark"] div.drag_title input,
[data-theme="dark"] div.jBox-content input,
[data-theme="dark"] div.rep_content input {
	border-bottom-color: #344058;
	color: #e2e8f0;
}
/* Price, quantity, product name inputs */
[data-theme="dark"] div.price_e input,
[data-theme="dark"] div.weight_t input,
[data-theme="dark"] div.pr_name input,
[data-theme="dark"] div.pr_qty input {
	color: #e2e8f0;
}
/* Quickbooks integration inputs */
[data-theme="dark"] div.qb_int.so input,
[data-theme="dark"] div.qb_int.so select {
	color: #e2e8f0;
}
[data-theme="dark"] div.qb_int.so div.drop_cc input,
[data-theme="dark"] div.qb_int.so div.drop_cc select {
	border-bottom-color: #344058;
}
/* QB data items */
[data-theme="dark"] div.qb_data span.ib input[type=text] {
	border-bottom-color: #344058;
	background-color: rgba(255, 237, 149, 0.15);
	color: #e2e8f0;
}
[data-theme="dark"] div.qb_data span.ib input[type=checkbox]:checked ~ input[type=text] {
	background-color: rgba(149, 255, 162, 0.15);
}

/* ================================================================
   BOTTOM BAR (span.bar) — underline decoration
   ================================================================ */
[data-theme="dark"] div.price_e span.bar,
[data-theme="dark"] div.weight_t span.bar,
[data-theme="dark"] table#grp_table td span.bar,
[data-theme="dark"] div.pr_qty span.bar,
[data-theme="dark"] div.pr_name span.bar,
[data-theme="dark"] div.like_prd span.bar,
[data-theme="dark"] div.grp_prd span.bar,
[data-theme="dark"] div.qb_int.so span.bar,
[data-theme="dark"] table#prod_setup span.bar,
[data-theme="dark"] tr#new_emp span.bar,
[data-theme="dark"] tr#new_area span.bar,
[data-theme="dark"] div.drag_title span.bar,
[data-theme="dark"] div.jBox-content span.bar {
	border-bottom-color: #344058;
}
/* Focus animation bar — brighter blue */
[data-theme="dark"] .bar:before,
[data-theme="dark"] .bar:after {
	background: #4a9eff;
}

/* ================================================================
   FLOATING LABELS — inactive & active states
   ================================================================ */
/* Inactive (resting) label — lighter for dark mode */
[data-theme="dark"] #table1 label,
[data-theme="dark"] #table2 label,
[data-theme="dark"] #prod_setup label,
[data-theme="dark"] span.span_so label,
[data-theme="dark"] div.login_container label,
[data-theme="dark"] #details label,
[data-theme="dark"] div#spr label,
[data-theme="dark"] div.qb_int.so label,
[data-theme="dark"] div.s_date label,
[data-theme="dark"] div.s_time label,
[data-theme="dark"] div.s_terms label,
[data-theme="dark"] div.s_notes label,
[data-theme="dark"] tr#new_emp label,
[data-theme="dark"] tr#new_area label,
[data-theme="dark"] div.drag_title label,
[data-theme="dark"] #app_table label,
[data-theme="dark"] div.adj_item label,
[data-theme="dark"] div.qty_div label,
[data-theme="dark"] div.nc_content label,
[data-theme="dark"] div.qbc_content label,
[data-theme="dark"] div.aic_content label,
[data-theme="dark"] div.pr_field label,
[data-theme="dark"] div.dc_content label {
	color: #64748b;
}
/* Active/focus label — bright blue */
[data-theme="dark"] #table1 input:focus ~ label,
[data-theme="dark"] #table1 select:focus ~ label,
[data-theme="dark"] #table1 input.not_empty ~ label,
[data-theme="dark"] #table1 select.not_empty ~ label,
[data-theme="dark"] #table2 input:focus ~ label,
[data-theme="dark"] #table2 select:focus ~ label,
[data-theme="dark"] #table2 input.not_empty ~ label,
[data-theme="dark"] #table2 select.not_empty ~ label,
[data-theme="dark"] span.span_so input:focus ~ label,
[data-theme="dark"] span.span_so select:focus ~ label,
[data-theme="dark"] span.span_so input.not_empty ~ label,
[data-theme="dark"] span.span_so select.not_empty ~ label,
[data-theme="dark"] #prod_setup input:focus ~ label,
[data-theme="dark"] #prod_setup input.not_empty ~ label,
[data-theme="dark"] div.login_container input.login:focus ~ label,
[data-theme="dark"] div.login_container input.login.not_empty ~ label,
[data-theme="dark"] div.login_container input.login:valid ~ label,
[data-theme="dark"] table#details input.mail_2:focus ~ label,
[data-theme="dark"] table#details input.mail_2.not_empty ~ label,
[data-theme="dark"] div#spr input.srch_prd:focus ~ label,
[data-theme="dark"] div#spr input.not_empty ~ label,
[data-theme="dark"] div.qb_int.so input:focus ~ label,
[data-theme="dark"] div.qb_int.so input.not_empty ~ label,
[data-theme="dark"] div.qb_int.so select:focus ~ label,
[data-theme="dark"] div.qb_int.so select.not_empty ~ label,
[data-theme="dark"] #table1 textarea ~ label,
[data-theme="dark"] #table2 textarea ~ label,
[data-theme="dark"] div.s_date input ~ label,
[data-theme="dark"] div.s_time input ~ label,
[data-theme="dark"] div.s_terms select ~ label,
[data-theme="dark"] div.s_notes textarea ~ label,
[data-theme="dark"] tr#new_emp input:focus ~ label,
[data-theme="dark"] tr#new_emp input.not_empty ~ label,
[data-theme="dark"] tr#new_emp select:focus ~ label,
[data-theme="dark"] tr#new_emp select.not_empty ~ label,
[data-theme="dark"] tr#new_area input:focus ~ label,
[data-theme="dark"] tr#new_area input.not_empty ~ label,
[data-theme="dark"] tr#new_area select:focus ~ label,
[data-theme="dark"] tr#new_area select.not_empty ~ label,
[data-theme="dark"] div.drag_title input:focus ~ label,
[data-theme="dark"] div.drag_title input.not_empty ~ label,
[data-theme="dark"] #app_table input:focus ~ label,
[data-theme="dark"] #app_table input.not_empty ~ label,
[data-theme="dark"] div.adj_item label,
[data-theme="dark"] div.qty_div label,
[data-theme="dark"] div.nc_content input.not_empty ~ label,
[data-theme="dark"] div.nc_content input:focus ~ label,
[data-theme="dark"] div.nc_content select.not_empty ~ label,
[data-theme="dark"] div.nc_content select:focus ~ label,
[data-theme="dark"] div.qbc_content input.not_empty ~ label,
[data-theme="dark"] div.qbc_content input:focus ~ label,
[data-theme="dark"] div.qbc_content select.not_empty ~ label,
[data-theme="dark"] div.qbc_content select:focus ~ label,
[data-theme="dark"] div.aic_content input.not_empty ~ label,
[data-theme="dark"] div.aic_content input:focus ~ label,
[data-theme="dark"] div.aic_content select.not_empty ~ label,
[data-theme="dark"] div.aic_content select:focus ~ label,
[data-theme="dark"] div.pr_field label,
[data-theme="dark"] div.dc_content input:focus ~ label,
[data-theme="dark"] div.dc_content input.not_empty ~ label {
	color: #4a9eff;
}

/* ================================================================
   ORD_TITLE — blue header bar in order form
   ================================================================ */
[data-theme="dark"] div#ord_form div.ord_title {
	background: linear-gradient(135deg, #0a3d6e 0%, #154d85 100%);
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .ord_title {
	background-color: #0a3d6e;
}

/* ================================================================
   ORDER LIST LINE ITEMS (tr.line, tr.main inside order_list)
   ================================================================ */
[data-theme="dark"] table#order_list tr.line {
	border-bottom-color: #263048;
}
[data-theme="dark"] table#order_list tr.line td {
	color: #e2e8f0;
}
[data-theme="dark"] table#order_list tr.main td {
	color: #64748b;
}
[data-theme="dark"] table#order_list tr.line:hover td {
	background-color: rgba(74,158,255,0.06);
}
/* Tax row */
[data-theme="dark"] #tax td {
	color: #cbd5e1;
	border-color: #263048;
}
/* Success/fail backgrounds */
[data-theme="dark"] .success {
	background-color: rgba(33, 255, 33, 0.1);
}
[data-theme="dark"] .fail {
	background-color: rgba(255, 100, 100, 0.15);
}
/* Approved / status banner — dark mode */
[data-theme="dark"] .approved-banner {
	background-color: rgba(16, 185, 129, 0.08);
	color: #6ee7b7;
}
[data-theme="dark"] .approved-banner .ab-sep { color: rgba(110,231,183,0.3); }
[data-theme="dark"] .approved-banner .ab-detail { color: #a7f3d0; }
[data-theme="dark"] .approved-banner.idle {
	background-color: rgba(245, 158, 11, 0.08);
	color: #fcd34d;
	border-left-color: #f59e0b;
}
[data-theme="dark"] .approved-banner.idle .ab-sep { color: rgba(252,211,77,0.3); }
[data-theme="dark"] .approved-banner.idle .ab-detail { color: #fde68a; }
[data-theme="dark"] .approved-banner.lost {
	background-color: rgba(239, 68, 68, 0.08);
	color: #fca5a5;
	border-left-color: #ef4444;
}
[data-theme="dark"] .approved-banner.lost .ab-sep { color: rgba(252,165,165,0.3); }
[data-theme="dark"] .approved-banner.lost .ab-detail { color: #fecaca; }
/* No-style inputs inside order forms */
[data-theme="dark"] input.no_style,
[data-theme="dark"] select.no_style {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
/* Customer data */
[data-theme="dark"] div.cus_data {
	color: #e2e8f0;
}
[data-theme="dark"] div.cus_data select,
[data-theme="dark"] div.cus_data input {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
/* Complete styling for QB */
[data-theme="dark"] div.drop_cc input.complete,
[data-theme="dark"] div.drop_cc select.complete {
	border-bottom-color: #22c55e;
	color: #22c55e;
}
[data-theme="dark"] span.comp {
	color: #22c55e;
}
/* So_title */
[data-theme="dark"] span.so_title {
	color: #cbd5e1;
}
/* Table headers inside order form */
[data-theme="dark"] #table1 td,
[data-theme="dark"] #table2 td {
	color: #e2e8f0;
}
/* Select carets for order form selects */
[data-theme="dark"] #table1 select,
[data-theme="dark"] #table2 select,
[data-theme="dark"] div#pr_setup select,
[data-theme="dark"] div.s_terms select {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M5 6L0 0h10z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 4px center;
	background-size: 10px 6px;
}

/* ─── Account Page — card layout dark mode ────────────────────── */
/* Cards */
[data-theme="dark"] .acc-card {
	background: #182132;
	border-color: #263048;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
[data-theme="dark"] .acc-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	border-color: #344058;
}
[data-theme="dark"] .acc-card .card-header {
	border-bottom-color: #263048;
}
[data-theme="dark"] .acc-card .card-header:hover {
	background: #1f293c;
}
[data-theme="dark"] .acc-card .card-header h3 {
	color: #e2e8f0;
}
[data-theme="dark"] .acc-card .card-header h3 i {
	color: #4a9eff;
}
[data-theme="dark"] .acc-card .card-header .collapse-indicator {
	color: #64748b;
}
[data-theme="dark"] .acc-card.collapsed .card-header {
	border-bottom-color: transparent;
}
/* Field containers */
[data-theme="dark"] .acc-field {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .acc-field:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] .acc-field[data-label]::before {
	background: #1f293c;
	color: #94a3b8;
}
[data-theme="dark"] .acc-field input,
[data-theme="dark"] .acc-field select,
[data-theme="dark"] .acc-field textarea {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .acc-field select {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M5 6L0 0h10z"/></svg>') !important;
}
[data-theme="dark"] .acc-field.checkbox-field .checkbox-label {
	color: #cbd5e1;
}
[data-theme="dark"] .acc-field.checkbox-field input[type="checkbox"] {
	accent-color: #4a9eff;
}
/* Password validation */
[data-theme="dark"] div.pass_valid {
	background: #151e30;
	border-color: #263048;
}
[data-theme="dark"] div.pass_item {
	color: #22c55e;
}
[data-theme="dark"] div.pass_item.fail {
	color: #f87171;
}
/* Passkey section */
[data-theme="dark"] #passkey_section button.round {
	background: #1a5ab8;
}
[data-theme="dark"] #passkey_section button.round:hover {
	background: #1d6ad6;
}
[data-theme="dark"] .passkey-content .passkey-desc {
	color: #94a3b8;
}
[data-theme="dark"] #passkey_section div {
	color: #cbd5e1;
}
/* Mod icons */
[data-theme="dark"] i.mod {
	color: #94a3b8 !important;
}
/* Signature section */
[data-theme="dark"] .sig-row .sig-preview-wrap {
	background: #151e30;
	border-color: #263048;
}
[data-theme="dark"] .sig-row .sig-preview-wrap .sig-preview-label {
	color: #94a3b8;
}
[data-theme="dark"] .sig-row .sig_preview {
	color: #e2e8f0;
}
/* Editor fields inherit .acc-field dark mode above */
/* Footer */
[data-theme="dark"] .acc-footer {
	color: #64748b;
}
[data-theme="dark"] .acc-container .a-res {
	color: #f87171;
}

/* ─── Admin page — dark mode ──────────────────────────────────── */
[data-theme="dark"] .admin-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .admin-btn:hover {
	background-color: #263048;
	border-color: #64748b;
}
[data-theme="dark"] .admin-btn i {
	color: #94a3b8;
}
[data-theme="dark"] .btn-action {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .btn-action:hover {
	background-color: #263048;
}
[data-theme="dark"] .btn-action.primary,
[data-theme="dark"] .btn-action.new-user-btn {
	background-color: #1a5ab8;
	border-color: #1a5ab8;
	color: #fff;
}
[data-theme="dark"] .btn-action.primary:hover,
[data-theme="dark"] .btn-action.new-user-btn:hover {
	background-color: #2563eb;
}
[data-theme="dark"] .pass_valid {
	color: #94a3b8;
}
[data-theme="dark"] .pass_valid .fa-check {
	color: #4ade80;
}

/* ─── AI Query Builder — dark mode ────────────────────────────── */
[data-theme="dark"] .ai-query-input-area,
[data-theme="dark"] .ai-sql-panel,
[data-theme="dark"] .ai-status {
	background-color: #182132;
	border-color: #263048;
}

[data-theme="dark"] .ai-query-input-area label,
[data-theme="dark"] .ai-sql-title {
	color: #e2e8f0;
}

[data-theme="dark"] #ai_question,
[data-theme="dark"] .ai-sql-edit {
	background-color: #1f293c;
	border-color: #3d3d5c;
	color: #e2e8f0;
}

[data-theme="dark"] #ai_question:focus,
[data-theme="dark"] .ai-sql-edit:focus {
	border-color: #6366f1;
}

[data-theme="dark"] .ai-sql-code {
	background-color: #1f293c;
	border-color: #3d3d5c;
	color: #e2e8f0;
}

[data-theme="dark"] .ai-explanation,
[data-theme="dark"] .ai-explanation-inline {
	color: #94a3b8;
}

[data-theme="dark"] .aiq-sqltoggle {
	background: #182132;
	border-color: #263048;
	color: #94a3b8;
}

[data-theme="dark"] .aiq-sqltoggle:hover {
	background: #1f293c;
	color: #e2e8f0;
}

[data-theme="dark"] .aiq-chart-panel,
[data-theme="dark"] .aiq-chart-canvas-wrap {
	background-color: #182132;
	border-color: #263048;
}

[data-theme="dark"] .aiq-chart-ctl,
[data-theme="dark"] .aiq-ds-label,
[data-theme="dark"] .aiq-ds-check-label { color: #94a3b8; }

[data-theme="dark"] .aiq-chart-ctl select,
[data-theme="dark"] .aiq-ds-rename {
	background: #1f293c;
	border-color: #3d3d5c;
	color: #e2e8f0;
}

[data-theme="dark"] .ai-btn-chart { background-color: #263048; color: #94a3b8; }
[data-theme="dark"] .ai-btn-chart:hover:not(:disabled) { background-color: #3d3d5c; }

[data-theme="dark"] .ai-status {
	color: #94a3b8;
}

[data-theme="dark"] .ai-btn-secondary {
	background-color: #263048;
	color: #94a3b8;
}

[data-theme="dark"] .ai-btn-secondary:hover:not(:disabled) {
	background-color: #3d3d5c;
}

[data-theme="dark"] .ai-btn-icon {
	border-color: #3d3d5c;
	color: #94a3b8;
}

[data-theme="dark"] .ai-btn-icon:hover {
	background-color: #263048;
	color: #e2e8f0;
}

[data-theme="dark"] .ai-sql-edit {
	background-color: #2a2a1e;
}

[data-theme="dark"] span.ai-null {
	color: #475569;
}

[data-theme="dark"] table#report_list tfoot tr.ai-totals-row td {
	border-top-color: #4a9eff;
	color: #e2e8f0;
	background-color: #1f293c;
}

[data-theme="dark"] .ai-saved-select {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}

[data-theme="dark"] .ai-btn-save {
	border-color: #22763a;
	color: #4ade80;
}
[data-theme="dark"] .ai-btn-save:hover {
	background-color: rgba(74,222,128,0.12);
}

[data-theme="dark"] .ai-btn-export {
	border-color: #065f46;
	color: #34d399;
}
[data-theme="dark"] .ai-btn-export:hover {
	background-color: rgba(52,211,153,0.12);
}

[data-theme="dark"] .ai-btn-delete {
	border-color: #7f1d1d;
	color: #f87171;
}
[data-theme="dark"] .ai-btn-delete:hover {
	background-color: rgba(248,113,113,0.12);
}
[data-theme="dark"] .ai-btn-clear {
	background-color: #263048;
	color: #94a3b8;
}
[data-theme="dark"] .ai-btn-clear:hover {
	background-color: #344058;
}

/* AI Column header controls - dark mode */
[data-theme="dark"] .ai-col-name:hover { color: #4a9eff; }
[data-theme="dark"] .ai-col-sort.asc,
[data-theme="dark"] .ai-col-sort.desc { color: #4a9eff; }
[data-theme="dark"] .ai-col-remove:hover { color: #f87171; }
[data-theme="dark"] .ai-col-rename-input { background-color: #1f293c; border-color: #4a9eff; color: #e2e8f0; }

/* AI Pagination */
.ai-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 16px;
	margin: 12px auto 0;
	max-width: 960px;
	font-size: 13px;
	box-sizing: border-box;
}
.ai-page-left {
	color: #64748b;
	font-size: 12px;
	white-space: nowrap;
}
.ai-page-left strong {
	color: #1e293b;
	font-weight: 600;
}
.ai-page-center {
	display: flex;
	align-items: center;
	gap: 2px;
}
.ai-page-right {
	display: flex;
	align-items: center;
	gap: 6px;
}
.ai-page-btn {
	min-width: 30px;
	height: 30px;
	padding: 0 6px;
	border: none;
	background: transparent;
	color: #64748b;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-family: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ai-page-btn:hover:not(:disabled):not(.active) {
	background: #f1f5f9;
	color: #1e293b;
}
.ai-page-btn.active {
	background: #6366f1;
	color: #fff;
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}
.ai-page-btn:disabled {
	opacity: 0.3;
	cursor: default;
}
.ai-page-btn.ai-page-nav {
	width: 30px;
	height: 30px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 12px;
}
.ai-page-btn.ai-page-nav:hover:not(:disabled) {
	background: #f1f5f9;
	border-color: #cbd5e1;
}
.ai-page-ellipsis {
	color: #94a3b8;
	padding: 0 2px;
	font-size: 13px;
	letter-spacing: 1px;
}
.ai-page-jump {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	font-size: 12px;
	white-space: nowrap;
}
.ai-page-jump input {
	width: 48px;
	height: 28px;
	border: 1px solid #e2e8f0;
	border-radius: 5px;
	text-align: center;
	font-size: 12px;
	font-family: inherit;
	color: #1e293b;
	background: #f8fafc;
	transition: border-color 0.15s;
	box-sizing: border-box;
}
.ai-page-jump input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
}
.ai-page-sep {
	color: #cbd5e1;
	margin: 0 6px;
	font-size: 10px;
}
.ai-page-size {
	height: 28px;
	border: 1px solid #e2e8f0;
	border-radius: 5px;
	font-size: 12px;
	font-family: inherit;
	color: #475569;
	background: #f8fafc;
	padding: 0 6px;
	cursor: pointer;
	transition: border-color 0.15s;
}
.ai-page-size:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
}
.ai-pagination-top {
	margin: 0 auto 6px;
}
.ai-pagination-bottom {
	margin: 6px auto 0;
}

/* Dark mode */
[data-theme="dark"] .ai-pagination {
	background: #182132;
	border-color: #263048;
}
[data-theme="dark"] .ai-page-left { color: #64748b; }
[data-theme="dark"] .ai-page-left strong { color: #e2e8f0; }
[data-theme="dark"] .ai-page-sep { color: #344058; }
[data-theme="dark"] .ai-page-btn {
	color: #64748b;
}
[data-theme="dark"] .ai-page-btn:hover:not(:disabled):not(.active) {
	background: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .ai-page-btn.active {
	background: #6366f1;
	color: #fff;
	box-shadow: 0 1px 4px rgba(99,102,241,0.35);
}
[data-theme="dark"] .ai-page-btn.ai-page-nav {
	border-color: #344058;
}
[data-theme="dark"] .ai-page-btn.ai-page-nav:hover:not(:disabled) {
	background: #263048;
	border-color: #475569;
}
[data-theme="dark"] .ai-page-ellipsis { color: #475569; }
[data-theme="dark"] .ai-page-jump { color: #64748b; }
[data-theme="dark"] .ai-page-jump input {
	background: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .ai-page-jump input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}
[data-theme="dark"] .ai-page-size {
	background: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .ai-page-size:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}

/* ─── Passkey Dark Mode ────────────────────────────────────────── */
[data-theme="dark"] .passkey-row {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .passkey-icon {
	color: #4a9eff;
}
[data-theme="dark"] .passkey-name {
	color: #e2e8f0;
}
[data-theme="dark"] .passkey-meta {
	color: #64748b;
}
[data-theme="dark"] .passkey-action {
	color: #64748b;
}
[data-theme="dark"] .passkey-action:hover {
	color: #4a9eff;
	background-color: #1f293c;
}
[data-theme="dark"] .passkey-login-btn {
	background-color: #182132;
	color: #4a9eff;
	border-color: #263048;
}
[data-theme="dark"] .passkey-login-btn:hover {
	background-color: #1f293c;
	border-color: #4a9eff;
}
[data-theme="dark"] .divider-line {
	background-color: #263048;
}
[data-theme="dark"] .passkey-divider span {
	color: #64748b;
}
[data-theme="dark"] .login_container {
	border-color: #263048;
}
[data-theme="dark"] div.login_container input.login {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.login_container input.login:focus {
	border-color: #4a9eff;
}
[data-theme="dark"] div.login_container input.login:focus ~ label,
[data-theme="dark"] div.login_container input.login:valid ~ label {
	background-color: #182132;
}
/* Sign in / to continue to HUB text */
[data-theme="dark"] #logo span {
	color: #e2e8f0;
}
/* First time here link */
[data-theme="dark"] span.first_time {
	color: #cbd5e1;
}
[data-theme="dark"] span.first_time a {
	color: #4a9eff;
}
/* Recaptcha / human check status */
[data-theme="dark"] .goog_res,
[data-theme="dark"] .goog_res1 {
	color: #4a9eff !important;
}
/* Fail message */
[data-theme="dark"] div.fail {
	color: #f87171;
}
[data-theme="dark"] div.fail a {
	color: #4a9eff;
}
/* New customer flow — search input */
[data-theme="dark"] .login_container input.no_style {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
[data-theme="dark"] .login_container input.no_style ~ label {
	color: #94a3b8;
}
/* Customer search results */
[data-theme="dark"] div.srch_res {
	color: #e2e8f0;
}
[data-theme="dark"] div.srch_cus {
	color: #e2e8f0;
	border-color: #344058;
	background-color: #1f293c;
}
[data-theme="dark"] div.srch_cus:hover {
	border-color: #4a9eff;
	background-color: #1a3a5c;
}
[data-theme="dark"] div.select_cus {
	color: #e2e8f0;
	border-color: #4a9eff;
	background-color: #1a3a5c;
}
/* Customer result text */
[data-theme="dark"] div.cus_res {
	color: #cbd5e1;
}
[data-theme="dark"] div.cus_res a {
	color: #4a9eff;
}
/* Email select dropdown in new customer flow */
[data-theme="dark"] .login_container select.no_style {
	color: #e2e8f0;
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] select#email.login {
	color: #e2e8f0;
	background-color: #182132;
	border-bottom-color: #344058;
}
[data-theme="dark"] .email_select {
	color: #cbd5e1;
}
/* Forgot password section */
[data-theme="dark"] .for_section {
	color: #cbd5e1;
}
[data-theme="dark"] .em_res {
	color: #f87171 !important;
}
/* Round buttons on login page */
[data-theme="dark"] .login_container button.round {
	background-color: #1a5ab8;
	color: #fff;
}
[data-theme="dark"] .login_container button.round:hover {
	background-color: #1d6ad6;
}
/* Passkey status on login */
[data-theme="dark"] .passkey-status {
	color: #f87171;
}

/* ─── Portal page — dark mode ─────────────────────────────────── */
/* Invoice table header */
[data-theme="dark"] #inv_table .thead {
	background-color: #151e30;
}
[data-theme="dark"] #inv_table .thead .tr {
	background-color: #151e30;
	color: #94a3b8;
}
[data-theme="dark"] #inv_table .thead .td {
	color: #94a3b8;
}
[data-theme="dark"] #inv_table .cl_sort span {
	color: #94a3b8;
}
/* Invoice rows */
[data-theme="dark"] #inv_table .tbody .tr {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
	box-shadow: 0 0 4px rgba(0,0,0,0.1);
}
[data-theme="dark"] #inv_table .tbody .tr:hover {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] #inv_table .tbody .tr.selected {
	background-color: rgba(74,158,255,0.1);
	border-color: #4a9eff;
}
[data-theme="dark"] #inv_table .tbody .tr.pending {
	border-color: rgba(148,163,184,0.3);
}
/* Invoice row text */
[data-theme="dark"] #inv_table .inv_num {
	color: #e2e8f0;
}
[data-theme="dark"] #inv_table .inv_cn {
	color: #cbd5e1;
}
[data-theme="dark"] #inv_table .inv_cn i,
[data-theme="dark"] #inv_table .inv_jn i,
[data-theme="dark"] #inv_table .inv_dd i {
	color: #64748b;
}
[data-theme="dark"] #inv_table .inv_jn {
	color: #94a3b8;
}
[data-theme="dark"] #inv_table .inv_dd {
	color: #94a3b8;
}
[data-theme="dark"] #inv_table .inv_total {
	color: #e2e8f0;
}
/* Invoice action buttons */
[data-theme="dark"] #inv_table .inv_act button.pay {
	color: #4a9eff;
	background-color: rgba(74,158,255,0.15);
}
[data-theme="dark"] #inv_table .inv_act button.pay:hover {
	background-color: rgba(74,158,255,0.25);
}
[data-theme="dark"] #inv_table .inv_act button.view {
	color: #4ade80;
	background-color: rgba(74,222,128,0.12);
}
[data-theme="dark"] #inv_table .inv_act button.view:hover {
	background-color: rgba(74,222,128,0.22);
}
/* Status badges */
[data-theme="dark"] #inv_table span.paid {
	color: #4ade80;
	border-color: rgba(74,222,128,0.3);
}
[data-theme="dark"] #inv_table span.paid.credit {
	color: #94a3b8;
	border-color: rgba(148,163,184,0.3);
}
[data-theme="dark"] #inv_table span.pending {
	color: #94a3b8;
}
[data-theme="dark"] #inv_table .td.paid {
	color: #4ade80;
}
[data-theme="dark"] #inv_table .td.pending {
	color: #94a3b8;
}
/* Send/history/upload buttons */
[data-theme="dark"] #inv_table .inv_act button.snd_inv,
[data-theme="dark"] #inv_table .inv_act button.snd_history,
[data-theme="dark"] #inv_table .inv_act button.upload {
	color: #64748b;
}
[data-theme="dark"] #inv_table .inv_act button.snd_inv:hover,
[data-theme="dark"] #inv_table .inv_act button.snd_history:hover,
[data-theme="dark"] #inv_table .inv_act button.upload:hover {
	color: #4a9eff;
}
/* Clear all icon */
[data-theme="dark"] #inv_table .clear_all {
	color: #64748b;
}
/* Portal payment modal */
[data-theme="dark"] div#ord_form {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] #table1 input,
[data-theme="dark"] #table1 select {
	color: #e2e8f0;
}
[data-theme="dark"] #table1 input.not_empty ~ label,
[data-theme="dark"] #table1 input:focus ~ label {
	color: #4a9eff;
}
[data-theme="dark"] #table1 div#save_for_later label,
[data-theme="dark"] #table1 div#cc_fee label {
	color: #cbd5e1;
}
/* Orders payment dialog */
[data-theme="dark"] div#pay_form {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .pay-title-bar {
	background: linear-gradient(135deg, #0c4d8b 0%, #1a5c9e 100%);
}
[data-theme="dark"] .pay-tab-toggle {
	background: rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .pay-tab-toggle::before {
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] div.jBox-content div#pay_form .pay-tab-toggle button.pay-tab {
	color: rgba(255, 255, 255, 0.45) !important;
}
[data-theme="dark"] div.jBox-content div#pay_form .pay-tab-toggle button.pay-tab:hover {
	color: rgba(255, 255, 255, 0.75) !important;
}
[data-theme="dark"] div.jBox-content div#pay_form .pay-tab-toggle button.pay-tab.active {
	color: #e2e8f0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
[data-theme="dark"] div.jBox-content div#pay_form .pay-tab-toggle button.pay-tab.active:hover {
	color: #e2e8f0 !important;
	background: transparent !important;
}
[data-theme="dark"] .pay-body {
	color: #e2e8f0;
}
[data-theme="dark"] div#pay_form input,
[data-theme="dark"] div#pay_form select:not([name=form_type]) {
	color: #e2e8f0 !important;
}
/* Pay hint — informational callout above the action buttons, dark theme */
[data-theme="dark"] div#pay_form div#pay-hint {
	background: #182238;
	border-color: #2c4265;
	color: #9cb6d9;
}
[data-theme="dark"] div#pay_form div#pay-hint > i {
	color: #6f8fbb;
}

/* Disabled email container (receipt = Print Only) */
[data-theme="dark"] #pay_form #em_cont.is-disabled {
	background: #182132;
	border-color: #344058;
}
[data-theme="dark"] #pay_form #em_cont.is-disabled input[name=email] {
	color: #64748b !important;
}
[data-theme="dark"] #pay_form #em_cont.is-disabled > label {
	color: #64748b;
}
/* Bordered box wrappers in dark mode */
[data-theme="dark"] #pay_form .indiv,
[data-theme="dark"] #pay_form .pay_for > div,
[data-theme="dark"] #pay_form .cus_amt_div,
[data-theme="dark"] #pay_form .ref_amt_div,
[data-theme="dark"] #pay_form .payment_cont,
[data-theme="dark"] #pay_form .credit_cont,
[data-theme="dark"] #pay_form .pay-field-group > div {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] #pay_form .indiv:focus-within,
[data-theme="dark"] #pay_form .pay_for > div:focus-within,
[data-theme="dark"] #pay_form .cus_amt_div:focus-within,
[data-theme="dark"] #pay_form .ref_amt_div:focus-within,
[data-theme="dark"] #pay_form .payment_cont:focus-within,
[data-theme="dark"] #pay_form .credit_cont:focus-within,
[data-theme="dark"] #pay_form .pay-field-group > div:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
/* Labels on dark bordered boxes */
[data-theme="dark"] #pay_form .indiv > label,
[data-theme="dark"] #pay_form .pay_for > div > label,
[data-theme="dark"] #pay_form .cus_amt_div > label,
[data-theme="dark"] #pay_form .ref_amt_div > label,
[data-theme="dark"] #pay_form .payment_cont > label,
[data-theme="dark"] #pay_form .credit_cont > label,
[data-theme="dark"] #pay_form .pay-field-group > div > label {
	color: #64748b !important;
	background: #1f293c !important;
}
[data-theme="dark"] #pay_form .indiv:focus-within > label,
[data-theme="dark"] #pay_form .pay_for > div:focus-within > label,
[data-theme="dark"] #pay_form .cus_amt_div:focus-within > label,
[data-theme="dark"] #pay_form .ref_amt_div:focus-within > label,
[data-theme="dark"] #pay_form .payment_cont:focus-within > label,
[data-theme="dark"] #pay_form .credit_cont:focus-within > label,
[data-theme="dark"] #pay_form .pay-field-group > div:focus-within > label {
	color: #4a9eff !important;
}
/* Select caret in dark mode */
[data-theme="dark"] div.jBox-content div#pay_form select:not([name=form_type]) {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2364748b" d="M5 6L0 0h10z"/></svg>');
}
[data-theme="dark"] div#pay_form .save-row {
	background: #1a2538;
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .save-label {
	color: #94a3b8;
}
[data-theme="dark"] div#pay_form .save-slider {
	background: #475569;
}
[data-theme="dark"] div#pay_form .save-toggle input:checked + .save-slider {
	background: #4a9eff;
}
[data-theme="dark"] div#pay_form .surcharge-row {
	background: #1a2538;
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .surcharge-label {
	color: #94a3b8;
}
[data-theme="dark"] div#pay_form .surcharge-pct {
	background: rgba(74, 158, 255, 0.15);
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .surcharge-amt {
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .surcharge-slider {
	background: #475569;
}
[data-theme="dark"] div#pay_form .surcharge-toggle input:checked + .surcharge-slider {
	background: #4a9eff;
}
[data-theme="dark"] div#pay_form div#cc_fee.bypass .surcharge-row {
	background: #131d2e;
	border-color: #263048;
}
[data-theme="dark"] div#pay_form div#cc_fee.bypass .surcharge-label,
[data-theme="dark"] div#pay_form div#cc_fee.bypass .surcharge-amt {
	color: #475569;
}
[data-theme="dark"] div#pay_form div#cc_fee.bypass .surcharge-pct {
	background: rgba(255,255,255,0.05);
	color: #475569;
}
/* Saved-on-file methods — neutral default in dark theme */
[data-theme="dark"] div#pay_form .card-row:not(.form-row),
[data-theme="dark"] div#pay_form .bank-row:not(.form-row) {
	background-color: #1f293c;
	border-color: #344058;
}
/* Hover */
[data-theme="dark"] div#pay_form .card-row:not(.form-row):hover,
[data-theme="dark"] div#pay_form .bank-row:not(.form-row):hover {
	background-color: #22304a;
	border-color: #4a6890;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
/* Saved FOR THIS ORDER — green marker (class-driven, one row at most) */
[data-theme="dark"] div#pay_form .card-row.saved,
[data-theme="dark"] div#pay_form .card-row.cus_default,
[data-theme="dark"] div#pay_form .bank-row.saved {
	border-color: #22c55e;
	background-color: #162a1f;
}
[data-theme="dark"] div#pay_form .card-row.saved:hover,
[data-theme="dark"] div#pay_form .card-row.cus_default:hover,
[data-theme="dark"] div#pay_form .bank-row.saved:hover {
	border-color: #16a34a;
	background-color: #1b3226;
}
/* Currently selected — blue ring, driven by actual radio state */
[data-theme="dark"] div#pay_form .card-row:not(.form-row):has(input[type=radio]:checked),
[data-theme="dark"] div#pay_form .bank-row:not(.form-row):has(input[type=radio]:checked) {
	border-color: #4a9eff;
	background-color: #1a2a42;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
}
/* Saved-for-order AND currently selected — keep green fill under blue ring */
[data-theme="dark"] div#pay_form .card-row.saved:has(input[type=radio]:checked),
[data-theme="dark"] div#pay_form .card-row.cus_default:has(input[type=radio]:checked),
[data-theme="dark"] div#pay_form .bank-row.saved:has(input[type=radio]:checked) {
	background-color: #1a2f24;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3), 0 2px 8px rgba(34, 197, 94, 0.18);
}
[data-theme="dark"] div#pay_form .card-row.new-card-row {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .card-row.new-card-row:hover {
	border-color: #4a9eff;
}
[data-theme="dark"] div#pay_form .bank-row.bank-add-row {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .bank-row.bank-add-row:hover {
	background-color: #1f293c;
	border-color: #4a9eff;
}
[data-theme="dark"] div#pay_form .bank-row.bank-add-row span {
	color: #64748b;
}
[data-theme="dark"] div#pay_form .bank-row.bank-add-row:hover span {
	color: #4a9eff;
}
/* Check add row — dark theme, mirrors bank-add-row */
[data-theme="dark"] div#pay_form .check-row.check-add-row {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:hover {
	background-color: #1f293c;
	border-color: #4a9eff;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row .check_image i,
[data-theme="dark"] div#pay_form .check-row.check-add-row .check-element > span {
	color: #64748b;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:hover .check_image i,
[data-theme="dark"] div#pay_form .check-row.check-add-row:hover .check-element > span {
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) {
	background-color: #1a2a42;
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) .check_image i,
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) .check-element > span {
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row .check-element > span {
	color: #cbd5e1;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row > .check_no input[name=check_no] {
	background: transparent !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(74, 158, 255, 0.3) !important;
	color: #4a9eff !important;
	box-shadow: none !important;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row > .check_no input[name=check_no]:focus {
	border-bottom-color: #4a9eff !important;
	box-shadow: none !important;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row > .check_no input[name=check_no]::placeholder {
	color: #64748b;
}
/* When Check Payment is SELECTED, keep its label/icon and the check# font +
   underline WHITE in dark mode (the blue accent used for other selected rows
   reads poorly here). :has(:checked) + later position beats the blue rules above. */
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) .check_image i,
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) .check-element > span {
	color: #ffffff;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) > .check_no input[name=check_no] {
	color: #ffffff !important;
	border-bottom-color: rgba(255, 255, 255, 0.55) !important;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) > .check_no input[name=check_no]:focus {
	border-bottom-color: #ffffff !important;
}
/* Consistent payment-type icons in dark mode (check + bank + card line): a light
   off-white when idle, full white when that method is selected. !important is
   required to beat the light-mode `.bank-element .bank_image i { … !important }`. */
[data-theme="dark"] div#pay_form .check-row.check-add-row .check_image i,
[data-theme="dark"] div#pay_form .bank-row.bank-add-row .bank-element .bank_image i {
	color: #cbd5e1 !important;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:hover .check_image i,
[data-theme="dark"] div#pay_form .bank-row.bank-add-row:hover .bank-element .bank_image i {
	color: #e2e8f0 !important;
}
[data-theme="dark"] div#pay_form .check-row.check-add-row:has(input[type=radio]:checked) .check_image i,
[data-theme="dark"] div#pay_form .bank-row.bank-add-row:has(input[type=radio]:checked) .bank-element .bank_image i {
	color: #ffffff !important;
}
/* NB: the light-mode rules for these carry a `div.jBox-content` prefix, so the dark
   overrides must too or they lose the specificity race and the saved-card text
   renders in the light #374151 (unreadable on the dark row). */
[data-theme="dark"] div.jBox-content div#pay_form .saved-card > span,
[data-theme="dark"] div.jBox-content div#pay_form .bank-element > span {
	color: #cbd5e1;
}
[data-theme="dark"] div.jBox-content div#pay_form .bank-element .bank_image i {
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .rm_card i {
	color: #475569;
}
[data-theme="dark"] div#pay_form .rm_card i:hover {
	color: #f87171;
	background-color: rgba(248, 113, 113, 0.1);
}
[data-theme="dark"] div#pay_form .up_card i:hover {
	color: #4a9eff;
	background-color: rgba(74, 158, 255, 0.1);
}
[data-theme="dark"] div#pay_form div#card_notes {
	color: #94a3b8;
	background: #1a2538;
	border-color: #344058;
}
[data-theme="dark"] div.jBox-content div#pay_form div#card_notes i {
	color: #22c55e;
}
[data-theme="dark"] div#pay_form div#card_notes span {
	color: #94a3b8;
}
[data-theme="dark"] div.jBox-content button.payment_but,
[data-theme="dark"] div.jBox-content button#print_receipt {
	border-color: #4a9eff;
	color: #4a9eff;
}
[data-theme="dark"] div.jBox-content button#pay_now {
	background: linear-gradient(135deg, #1a6fc4 0%, #4a9eff 100%);
	border-color: transparent;
	color: #fff;
}
[data-theme="dark"] div.jBox-content button#pay_now:enabled:hover {
	background: linear-gradient(135deg, #2078cc 0%, #5aacff 100%);
	border-color: transparent;
}
[data-theme="dark"] div.jBox-content button.payment_but:enabled:hover,
[data-theme="dark"] div.jBox-content button#print_receipt:enabled:hover {
	border-color: #4a9eff;
	background-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] div.jBox-content button#canc_term {
	border-color: #f87171;
	color: #f87171;
}
[data-theme="dark"] div.jBox-content button#canc_term:hover {
	background-color: #dc2626;
	border-color: #dc2626;
	color: #fff;
}
[data-theme="dark"] div.jBox-content button.payment_but:disabled:not(.success):not(.processing) {
	border-color: rgba(74, 158, 255, 0.25);
	color: rgba(74, 158, 255, 0.35);
}
[data-theme="dark"] div.jBox-content button#pay_now:disabled:not(.success):not(.processing) {
	background: rgba(74, 158, 255, 0.12);
	color: rgba(74, 158, 255, 0.4);
}
[data-theme="dark"] div.jBox-content button.payment_but.processing,
[data-theme="dark"] div.jBox-content button.payment_but.success {
	color: #4a9eff;
	border-color: #4a9eff;
}
[data-theme="dark"] div#card-errors {
	color: #f87171;
}
[data-theme="dark"] div#pay_form div#bank-status.bank-status-info {
	background: rgba(74, 158, 255, 0.1);
	color: #4a9eff;
	border-color: rgba(74, 158, 255, 0.2);
}
[data-theme="dark"] div#pay_form div#bank-status.bank-status-error {
	background: rgba(248, 113, 113, 0.1);
	color: #f87171;
	border-color: rgba(248, 113, 113, 0.2);
}
[data-theme="dark"] div#pay_form div#bank-status.bank-status-success {
	background: rgba(34, 197, 94, 0.1);
	color: #4ade80;
	border-color: rgba(34, 197, 94, 0.2);
}
[data-theme="dark"] div#pay_form .pay_detail {
	background: linear-gradient(135deg, #1a2538 0%, #162030 100%);
	border-color: #344058;
}
[data-theme="dark"] div#pay_form .pay-breakdown-label {
	color: #64748b;
}
[data-theme="dark"] div#pay_form .pay-breakdown-amt {
	color: #cbd5e1;
}
[data-theme="dark"] div#pay_form .pay-breakdown-row.deduct .pay-breakdown-amt {
	color: #f87171;
}
[data-theme="dark"] div#pay_form .pay-breakdown-divider {
	background: linear-gradient(90deg, transparent 0%, #344058 20%, #344058 80%, transparent 100%);
}
[data-theme="dark"] div#pay_form .pay-breakdown-row.total .pay-breakdown-label {
	color: #e2e8f0;
}
[data-theme="dark"] div#pay_form .pay-breakdown-row.total .pay-breakdown-amt {
	color: #4a9eff;
}
[data-theme="dark"] div#pay_form .ref_sur span {
	color: #cbd5e1;
}
[data-theme="dark"] div#pay_form .exp_div input {
	color: #4a9eff;
}
[data-theme="dark"] table#paid {
	color: #e2e8f0;
}
[data-theme="dark"] .form-row.bank-row,
[data-theme="dark"] .form-row.card-row {
	border-color: #344058;
}
[data-theme="dark"] .bank_span,
[data-theme="dark"] .bank-element {
	color: #cbd5e1;
}
/* Portal pagination */
[data-theme="dark"] .pagination-select {
	color: #4a9eff;
	border-bottom-color: #344058;
}
[data-theme="dark"] .pagination-per-page-label {
	color: #64748b;
}
[data-theme="dark"] .pagination-btn {
	color: #64748b;
}
[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
	color: #4a9eff;
}
[data-theme="dark"] .pagination-page {
	color: #64748b;
}
[data-theme="dark"] .pagination-page:hover {
	color: #4a9eff;
}
[data-theme="dark"] .pagination-page.active {
	color: #4a9eff;
}

/* ─── Catalog & Customers — dark mode ─────────────────────────── */
/* Search input */
[data-theme="dark"] input#search {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
	box-shadow: 2px 4px 10px rgba(0,0,0,0.2);
}
[data-theme="dark"] input#search:focus {
	border-color: #4a9eff;
	background-color: #1f293c;
	box-shadow: 2px 6px 16px rgba(0,0,0,0.3);
}
[data-theme="dark"] input#search::placeholder {
	color: #64748b;
}
[data-theme="dark"] #search-box-icon i,
[data-theme="dark"] #search-box-filter-icon i {
	color: #64748b;
}
[data-theme="dark"] input#search:focus ~ div i {
	color: #4a9eff;
}
/* Customer / product list items */
[data-theme="dark"] div.cd0,
[data-theme="dark"] div.cd1 {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] div.cd0.hub_cus:not(.cus_sel):hover,
[data-theme="dark"] div.cd1.hub_cus:not(.cus_sel):hover {
	background-color: rgba(74,158,255,0.1) !important;
	border-color: #4a9eff !important;
	color: #e2e8f0;
}
[data-theme="dark"] .hub_cus {
	color: #e2e8f0;
}
[data-theme="dark"] .hub_cus .cus_main_line,
[data-theme="dark"] .hub_cus .cus_main_line .product_name,
[data-theme="dark"] .hub_cus .cus_main_line .customer {
	color: #e2e8f0;
}
[data-theme="dark"] .hub_cus .cus_sub_line {
	color: #64748b;
}
[data-theme="dark"] .hub_cus .avatar {
	background-color: #1f293c;
	color: #94a3b8;
}
[data-theme="dark"] .hub_cus:not(.cus_sel):hover .avatar {
	background-color: #263048;
}
[data-theme="dark"] .hub_cus.cus_sel {
	background-color: rgba(74,158,255,0.12);
	border-color: #4a9eff;
}
[data-theme="dark"] .hub_cus.cus_sel .cus_main_line,
[data-theme="dark"] .hub_cus.cus_sel .cus_main_line .product_name,
[data-theme="dark"] .hub_cus.cus_sel .cus_main_line .customer {
	color: #4a9eff;
}
[data-theme="dark"] .hub_cus.cus_sel .cus_sub_line {
	color: #4a9eff;
}
[data-theme="dark"] .hub_cus.cus_sel .avatar {
	background-color: #1a5ab8;
	color: #fff;
}
[data-theme="dark"] .hub_cus .cus_init div.acct_logo svg path {
	fill: #94a3b8 !important;
}
[data-theme="dark"] .hub_cus.cus_sel .cus_init div.acct_logo svg path {
	fill: #fff !important;
}
/* Customer/product detail panel */
[data-theme="dark"] .cus_data {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
	box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}
[data-theme="dark"] .cus_data input,
[data-theme="dark"] .cus_data select,
[data-theme="dark"] .cus_data textarea {
	color: #e2e8f0;
}
[data-theme="dark"] .cus_data .pr_details {
	color: #e2e8f0;
}
[data-theme="dark"] .cus_data .pr_field {
	color: #cbd5e1;
}
/* Detail panel sections */
[data-theme="dark"] .cus-section {
	background-color: #1f293c;
	border-color: #263048;
}
[data-theme="dark"] .cus-section-title {
	color: #e2e8f0;
}
[data-theme="dark"] .cus_body {
	color: #e2e8f0;
}
/* Form groups inside detail */
[data-theme="dark"] .form-group label {
	color: #94a3b8;
}
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
[data-theme="dark"] .form-group input:not(:read-only):focus {
	border-bottom-color: #667eea;
}
[data-theme="dark"] .cus_row:nth-child(odd) {
	background-color: rgba(255,255,255,0.02);
}
[data-theme="dark"] .cus_row:hover {
	background-color: rgba(74,158,255,0.06);
}
/* Inventory status cards */
[data-theme="dark"] div.live_inv div.status-card {
	background: linear-gradient(135deg, #1f293c 0%, #182132 100%);
	border-color: #263048;
}
[data-theme="dark"] div.live_inv div.status-value {
	color: #e2e8f0;
}
[data-theme="dark"] div.live_inv div.status-label {
	color: #94a3b8;
}
/* Status icon backgrounds in dark mode */
[data-theme="dark"] .status-customer-ready .status-icon {
	background-color: rgba(40,167,69,0.2);
}
[data-theme="dark"] .status-moh .status-icon {
	background-color: rgba(102,126,234,0.2);
}
[data-theme="dark"] .status-repair .status-icon {
	background-color: rgba(253,126,20,0.2);
}
[data-theme="dark"] .status-second .status-icon {
	background-color: rgba(255,193,7,0.2);
}
[data-theme="dark"] .status-available .status-icon {
	background-color: rgba(23,162,184,0.2);
}
[data-theme="dark"] .status-quoted .status-icon {
	background-color: rgba(111,66,193,0.2);
}
/* Order links in detail panel */
[data-theme="dark"] div.form-group.orders div.order_link {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] div.form-group.orders a.order_link {
	border-top-color: #263048;
}
[data-theme="dark"] a.order_link span:not(.order_status) {
	color: #e2e8f0;
}
[data-theme="dark"] a.order_link:hover {
	background-color: rgba(74,158,255,0.06);
}
/* Top header bar stays as-is (already dark blue) */
/* Empty state */
[data-theme="dark"] .empty-state {
	color: #e2e8f0;
}
[data-theme="dark"] .empty-state h3 {
	color: #e2e8f0;
}
[data-theme="dark"] .empty-state p {
	color: #94a3b8;
}
[data-theme="dark"] .empty-state .search-icon i {
	color: #4a9eff;
}
[data-theme="dark"] .stat-number {
	color: #e2e8f0;
}
[data-theme="dark"] .stat-label {
	color: #94a3b8;
}
[data-theme="dark"] .action-button {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .action-button:hover {
	background-color: #263048;
	border-color: #4a9eff;
	color: #4a9eff;
}
/* Customer detail content */
[data-theme="dark"] #cus_cont {
	color: #e2e8f0;
}
[data-theme="dark"] .editc_input {
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .cus_row {
	border-color: #263048;
}
[data-theme="dark"] .delete_new i {
	color: #64748b;
}
[data-theme="dark"] .delete_new:hover i {
	color: #f87171;
}
[data-theme="dark"] .add_contact {
	color: #4a9eff;
	border-color: #344058;
	background-color: #1f293c;
}
[data-theme="dark"] .add_contact:hover {
	background-color: #263048;
}
/* Payment methods */
[data-theme="dark"] div.card-row,
[data-theme="dark"] div.bank-row,
[data-theme="dark"] div.check-row {
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .saved-card span,
[data-theme="dark"] .bank_span,
[data-theme="dark"] .check-element span {
	color: #cbd5e1;
}
[data-theme="dark"] .rm_card i {
	color: #64748b;
}
[data-theme="dark"] .rm_card:hover i {
	color: #f87171;
}
/* Credit card form */
[data-theme="dark"] .drop_cc {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .drop_cc input.editc_qb,
[data-theme="dark"] .drop_cc select.editc_qb {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
/* Section dividers */
[data-theme="dark"] div.gen_login,
[data-theme="dark"] div.qb_int {
	border-bottom-color: #263048;
	color: #e2e8f0;
}
/* Catalog modals */
[data-theme="dark"] .modal-overlay {
	background-color: rgba(0,0,0,0.6);
}
[data-theme="dark"] .modal-content {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .modal-header {
	background-color: #151e30;
	color: #e2e8f0;
	border-color: #263048;
}
[data-theme="dark"] .modal-header h3 {
	color: #e2e8f0;
}
[data-theme="dark"] .modal-header h3 i {
	color: #4a9eff;
}
[data-theme="dark"] .modal-close {
	color: #64748b;
}
[data-theme="dark"] .modal-close:hover {
	color: #e2e8f0;
}
[data-theme="dark"] .modal-body {
	color: #e2e8f0;
}
[data-theme="dark"] .order-item {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .order-item:hover {
	background-color: #263048;
}
[data-theme="dark"] .customer-name {
	color: #cbd5e1;
}
[data-theme="dark"] .order-details {
	color: #94a3b8;
}
[data-theme="dark"] .empty-state-modal {
	color: #94a3b8;
}
/* Catalog inventory items */
[data-theme="dark"] .inventory-item {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .inventory-item:hover {
	border-color: #4a9eff;
	box-shadow: 0 2px 8px rgba(74,158,255,0.15);
}
[data-theme="dark"] .inventory-name {
	color: #e2e8f0;
}
[data-theme="dark"] .inventory-details {
	color: #94a3b8;
}
[data-theme="dark"] .inventory-notes {
	background-color: #182132;
	border-left-color: #4a9eff;
	color: #cbd5e1;
}
[data-theme="dark"] .ticket-number {
	background-color: #1a2744;
	border-left-color: #4a9eff;
	color: #4a9eff;
}
/* Catalog file items */
[data-theme="dark"] .file-item {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] .file-item:hover {
	background-color: #263048;
}
[data-theme="dark"] .file-name {
	color: #e2e8f0;
}
[data-theme="dark"] .file-size {
	color: #94a3b8;
}
/* Upload area */
[data-theme="dark"] .upload-area {
	border-color: #344058;
	background-color: #1f293c;
	color: #94a3b8;
}
[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .upload-area.drag-over {
	border-color: #667eea;
	background-color: #1e1e3a;
}
[data-theme="dark"] .progress-bar {
	background-color: #263048;
}
[data-theme="dark"] .progress-text {
	color: #94a3b8;
}
/* Catalog load more */
[data-theme="dark"] .catalog-load-more {
	color: #64748b;
}
/* Filter section */
[data-theme="dark"] #search_filters {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .filter-button {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] .filter-button:hover,
[data-theme="dark"] .filter-button.active {
	border-color: #4a9eff;
	color: #4a9eff;
}
[data-theme="dark"] .dropdown-content {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .dropdown-item {
	color: #cbd5e1;
}
[data-theme="dark"] .dropdown-item:hover {
	background-color: #263048;
	color: #4a9eff;
}
[data-theme="dark"] .filter-pill {
	background-color: #1a3a5c;
	color: #4a9eff;
	border-color: #2a5a8c;
}
[data-theme="dark"] .clear-filters-btn {
	color: #94a3b8;
}
[data-theme="dark"] .clear-filters-btn:hover {
	color: #f87171;
}

/* ─── Inventory page — dark mode ──────────────────────────────── */
/* Summary stats bar */
[data-theme="dark"] .inv-summary-bar {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .inv-summary-stat {
	background-color: #1f293c;
}
[data-theme="dark"] .stat-value {
	color: #e2e8f0;
}
[data-theme="dark"] .stat-value.stat-muted {
	color: #94a3b8;
}
/* Inventory cards (mobile) */
[data-theme="dark"] .inv-card {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .inv-card.inv-card--highlight {
	border-color: rgba(74,158,255,0.3);
	background-color: rgba(74,158,255,0.04);
}
[data-theme="dark"] .inv-card__title {
	color: #e2e8f0;
}
[data-theme="dark"] .inv-card__sub {
	color: #64748b;
}
[data-theme="dark"] .inv-pill {
	background-color: #263048;
	color: #4a9eff;
}
[data-theme="dark"] .inv-stat {
	background-color: #1f293c;
	border-color: #263048;
}
[data-theme="dark"] .inv-stat__val {
	color: #e2e8f0;
}
[data-theme="dark"] .inv-card__details {
	border-top-color: #263048;
}
[data-theme="dark"] .inv-detail {
	background-color: #1f293c;
	border-color: #263048;
}
[data-theme="dark"] .inv-detail__val {
	color: #e2e8f0;
}
[data-theme="dark"] .inv-details-btn,
[data-theme="dark"] .inv-copy-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #4a9eff;
}
[data-theme="dark"] .inv-details-btn:hover,
[data-theme="dark"] .inv-copy-btn:hover {
	background-color: #263048;
}
[data-theme="dark"] .inv-copy-btn.is-copied {
	border-color: rgba(74,222,128,0.35);
	background-color: rgba(74,222,128,0.08);
	color: #4ade80;
}
/* Inventory per-page selector + page navigation */
[data-theme="dark"] .inv-perpage-label {
	color: #94a3b8;
}
[data-theme="dark"] .inv-perpage-select {
	background-color: #1f293c;
	border-color: #344058;
	color: #4a9eff;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="5" viewBox="0 0 8 5"><path fill="%2394a3b8" d="M4 5L0 0h8z"/></svg>');
}
[data-theme="dark"] .inv-perpage-select:hover {
	background-color: #263048;
	border-color: #4a9eff;
}
[data-theme="dark"] .inv-perpage-select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] .inv-page-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .inv-page-btn:hover:not(:disabled) {
	background-color: #263048;
	color: #4a9eff;
	border-color: #4a9eff;
}
[data-theme="dark"] .inv-page-info {
	color: #94a3b8;
}
[data-theme="dark"] .inv-item-id-wrap .inv-item-id {
	color: #94a3b8;
	background-color: #263048;
}

/* Transfer mode */
[data-theme="dark"] .transfer-mode-container {
	background-color: #182132;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .transfer-header {
	border-bottom-color: #263048;
}
[data-theme="dark"] .transfer-plant-group label {
	color: #94a3b8;
}
[data-theme="dark"] .transfer-plant-group label i {
	color: #4a9eff;
}
[data-theme="dark"] .transfer-select {
	background-color: #1f293c !important;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 14px !important;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-select:hover {
	border-color: #4d4d66;
	background-color: #263048 !important;
}
[data-theme="dark"] .transfer-select:focus {
	border-color: #4a9eff;
	background-color: #1f293c !important;
}
[data-theme="dark"] .transfer-select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-section {
	background-color: #1f293c;
	border-color: #263048;
}
[data-theme="dark"] .transfer-section h3 {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-section h3 i {
	color: #4a9eff;
}
[data-theme="dark"] .transfer-search:focus-within::before {
	color: #4a9eff;
}
[data-theme="dark"] .transfer-search input {
	background-color: #182132 !important;
	background-image: none !important;
	border-color: #344058 !important;
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-search input:hover {
	border-color: #4d4d66 !important;
	background-color: #1f293c !important;
}
[data-theme="dark"] .transfer-search input:focus {
	border-color: #4a9eff !important;
	background-color: #1f293c !important;
}
[data-theme="dark"] .transfer-search input::placeholder {
	color: #64748b;
}
[data-theme="dark"] .transfer-search-results {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .transfer-search-result:hover {
	background: rgba(74,158,255,0.06);
}
[data-theme="dark"] .transfer-search-result .product-name {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-search-result .product-desc {
	color: #64748b;
}
[data-theme="dark"] .transfer-search-result .product-stock {
	color: #4a9eff;
	background-color: rgba(74,158,255,0.1);
}
[data-theme="dark"] .transfer-item-card {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .transfer-item-name {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-item-name .rename-input {
	color: #e2e8f0;
	background-color: #1f293c;
	border-color: #4a9eff;
}
[data-theme="dark"] .transfer-item-rename-icon {
	color: #64748b;
}
[data-theme="dark"] .transfer-item-meta {
	color: #64748b;
}
[data-theme="dark"] .transfer-item-qty .qty-select {
	background-color: #1f293c;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
	border-color: #344058;
	color: #4a9eff;
}
[data-theme="dark"] .transfer-item-qty .qty-select:hover {
	border-color: #4a9eff;
}
[data-theme="dark"] .transfer-item-notes {
	border-top-color: #344058;
}
[data-theme="dark"] .transfer-item-notes .notes-input {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-item-notes .notes-input::placeholder {
	color: #64748b;
}
[data-theme="dark"] .transfer-item-notes .notes-input:hover {
	border-color: #4d4d66;
	background-color: #1f293c;
}
[data-theme="dark"] .transfer-item-notes .notes-input:focus {
	border-color: #4a9eff;
	background-color: #1f293c;
}
[data-theme="dark"] .transfer-item-delete:hover {
	background-color: rgba(239, 68, 68, 0.15);
}
[data-theme="dark"] .transfer-search-result {
	border-bottom-color: #263048;
}
[data-theme="dark"] .transfer-search-results {
	scrollbar-color: #344058 transparent;
}
[data-theme="dark"] .transfer-search-divider {
	color: #64748b;
	background-color: #1f293c;
	border-bottom-color: #263048;
}
[data-theme="dark"] .transfer-inv-result .inv-order-name {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-inv-result .inv-product-name {
	color: #64748b;
}
[data-theme="dark"] .transfer-inv-result .inv-qty {
	color: #4a9eff;
}
[data-theme="dark"] .transfer-inv-result .inv-status-ready {
	background-color: #052e16;
	color: #4ade80;
}
[data-theme="dark"] .transfer-inv-result .inv-status-other {
	background-color: #1e1b4b;
	color: #818cf8;
}
[data-theme="dark"] .transfer-inv-result .inv-status-prod {
	background-color: #422006;
	color: #fbbf24;
}
[data-theme="dark"] .transfer-inv-result .inv-sched-date {
	color: #fbbf24;
}
[data-theme="dark"] .transfer-items-list {
	scrollbar-color: #344058 transparent;
}
[data-theme="dark"] .transfer-tickets-list .no-tickets {
	color: #64748b;
}
[data-theme="dark"] .transfer-ticket-card {
	background-color: #182132;
	border-color: #263048;
}
[data-theme="dark"] .transfer-ticket-route {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-ticket-route i {
	color: #4a9eff;
}
[data-theme="dark"] .transfer-ticket-meta {
	color: #64748b;
}
[data-theme="dark"] .transfer-ticket-actions .btn-view {
	background-color: #263048;
	color: #94a3b8;
}
[data-theme="dark"] .transfer-ticket-actions .btn-view:hover {
	background-color: #344058;
}
[data-theme="dark"] .transfer-ticket-actions .btn-print {
	background-color: #1c2942;
	color: #8ec2ff;
}
[data-theme="dark"] .transfer-ticket-actions .btn-print:hover {
	background-color: #24344f;
}
[data-theme="dark"] .transfer-ticket-actions .btn-forklift {
	background-color: #1c2942;
	color: #8ec2ff;
}
[data-theme="dark"] .transfer-ticket-actions .btn-forklift:hover {
	background-color: #24344f;
	color: #bfdbfe;
}
[data-theme="dark"] a.transfer-ticket-id:hover {
	color: #93c5fd;
	background: #1c2942;
}
[data-theme="dark"] .xfer-min-route-block a.transfer-ticket-id:hover {
	color: #93c5fd;
	background: none;
}
[data-theme="dark"] .transfer-ticket-actions .btn-delete {
	background-color: rgba(239, 68, 68, 0.15);
	color: #f87171;
}
[data-theme="dark"] .transfer-ticket-actions .btn-delete:hover {
	background-color: rgba(239, 68, 68, 0.25);
}
[data-theme="dark"] .transfer-empty-state {
	color: #64748b;
}
[data-theme="dark"] .transfer-empty-state i {
	color: #344058;
}
[data-theme="dark"] .transfer-ticket-status.pending {
	background-color: #422006;
	color: #fbbf24;
}
[data-theme="dark"] .transfer-ticket-status.loaded {
	background-color: #1e3a5f;
	color: #60a5fa;
}
[data-theme="dark"] .transfer-ticket-status.in_transit,
[data-theme="dark"] .transfer-ticket-status.in-transit {
	background-color: #1e1b4b;
	color: #818cf8;
}
[data-theme="dark"] .transfer-ticket-status.delivered {
	background-color: #052e16;
	color: #4ade80;
}
[data-theme="dark"] .transfer-ticket-status.complete {
	background-color: #052e16;
	color: #86efac;
}
[data-theme="dark"] .transfer-ticket-status.short {
	background-color: #450a0a;
	color: #fca5a5;
}

/* Office controls & pair-scoped board — dark variants (light in style.css).
   The complete/short pills are already dark-styled above. */
[data-theme="dark"] .xfer-trip.xfer-trip-roundtrip { border-color: #334155; background: #0f172a; }
[data-theme="dark"] .xfer-trip-combined > .xfer-trip-head { border-bottom: none; }
[data-theme="dark"] .xfer-trip-combined .xfer-trip-tabs,
[data-theme="dark"] .xfer-trip-combined .xfer-leg-tabs {
	background: #131a28;
	border: none;
	border-bottom: 1px solid #263048;
	box-shadow: none;
}
[data-theme="dark"] .xfer-trip-combined .xfer-nested-leg > .transfer-ticket-head {
	background: transparent !important;
	border: none !important;
	box-shadow: none;
}
[data-theme="dark"] .xfer-trip-combined > .xfer-trip-head .transfer-ticket-id { color: #94a3b8; background: none; }
[data-theme="dark"] .xfer-trip-combined .xfer-leg-tab {
	background: transparent;
	border-color: #263048;
	color: #94a3b8;
}
[data-theme="dark"] .xfer-trip-combined .xfer-leg-tab:hover {
	background: #1a2333;
	color: #4a9eff;
}
[data-theme="dark"] .xfer-trip-combined .xfer-leg-tab.is-active {
	background: #0f172a;
	color: #4a9eff;
	box-shadow: inset 0 -2px 0 0 #4a9eff;
}
[data-theme="dark"] .xfer-leg-tab { background: transparent; border-color: #263048; color: #94a3b8; }
[data-theme="dark"] .xfer-leg-tab:hover { background: #1a2333; color: #4a9eff; }
[data-theme="dark"] .xfer-leg-tab.is-active {
	background: #0f172a;
	color: #4a9eff;
	box-shadow: inset 0 -2px 0 0 #4a9eff;
}
[data-theme="dark"] .transfer-ticket-items,
[data-theme="dark"] .transfer-mode-container .transfer-ticket-items {
	border-radius: 0 0 8px 8px;
	border-top-color: #263048;
}
[data-theme="dark"] .xfer-trip-combined .xfer-nested-leg .transfer-ticket-items {
	border-top-color: #263048;
}
[data-theme="dark"] .xfer-item-source,
[data-theme="dark"] .fork-xfer-source { color: #94a3b8; }
[data-theme="dark"] .xfer-item-source .xfer-src-oid,
[data-theme="dark"] .fork-xfer-source .xfer-src-oid { color: #64748b; }
[data-theme="dark"] .transfer-inv-result .inv-product-name { color: #e2e8f0; }
[data-theme="dark"] .transfer-inv-result .inv-order-name { color: #94a3b8; }
[data-theme="dark"] .xfer-leg-trf { color: #64748b; }
[data-theme="dark"] .transfer-ticket-actions .btn-reopen        { background: #3f2d0e; color: #fbbf24; }
[data-theme="dark"] .transfer-ticket-actions .btn-reopen:hover   { background: #55400f; }
[data-theme="dark"] .transfer-ticket-actions .btn-complete       { background: #052e16; color: #4ade80; }
[data-theme="dark"] .transfer-ticket-actions .btn-complete:hover { background: #063a1c; }
[data-theme="dark"] .transfer-ticket-actions .btn-make-rt {
	background: #172554;
	color: #93c5fd;
}
[data-theme="dark"] .transfer-ticket-actions .btn-make-rt:hover {
	background: #1e3a8a;
}
[data-theme="dark"] .transfer-ticket-card[data-status="complete"] { box-shadow: inset 3px 0 0 0 #22c55e; }
[data-theme="dark"] .transfer-ticket-item.xfer-item-transferred .transfer-ticket-item-name::after { color: #4ade80; }
[data-theme="dark"] .xfer-min-meta { color: #94a3b8; }
[data-theme="dark"] .xfer-min-meta i { color: #64748b; }
[data-theme="dark"] .transfer-ticket-actions .btn-view-items { background: #172554; color: #93c5fd; }
[data-theme="dark"] .transfer-ticket-actions .btn-view-items:hover { background: #1e3a8a; }
[data-theme="dark"] .xfer-item-badge { background: #3b82f6; box-shadow: 0 0 0 2px #0f172a; }
[data-theme="dark"] .transfer-ticket-card.xfer-return-slot { border-color: #33455f; background: #131c2e; }
[data-theme="dark"] .transfer-ticket-card.xfer-return-slot::before { border-color: #33455f; }
[data-theme="dark"] .xfer-return-slot-label { color: #93a4bd; }
[data-theme="dark"] .xfer-return-slot-label i { color: #5b6e8c; }
[data-theme="dark"] .xfer-return-slot-route { color: #e2e8f0; }
[data-theme="dark"] .transfer-splitter-grip { background: #334155; }
[data-theme="dark"] .transfer-splitter:hover .transfer-splitter-grip,
[data-theme="dark"] body.xfer-splitting .transfer-splitter-grip { background: #4a9eff; }

/* ── Stock Transfer drag & drop board — dark mode ── */
[data-theme="dark"] .transfer-search-tabs { background: #131a28; }
[data-theme="dark"] .xfer-tab { color: #94a3b8; }
[data-theme="dark"] .xfer-tab:hover { color: #cbd5e1; }
[data-theme="dark"] .xfer-tab.is-active { background: #243049; color: #4a9eff; box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 0 0 1px rgba(74,158,255,.12); }
/* Round-trip Going | Returning leg tabs (edge-to-edge halves) */
[data-theme="dark"] .xfer-leg-tabs {
	background: #131a28;
	border-bottom: 1px solid #263048;
}
[data-theme="dark"] .xfer-leg-tab { color: #94a3b8; background: transparent; border-color: #263048; }
[data-theme="dark"] .xfer-leg-tab:hover { color: #4a9eff; background: #1a2333; }
[data-theme="dark"] .xfer-leg-tab.is-active {
	color: #4a9eff;
	background: #0f172a;
	box-shadow: inset 0 -2px 0 0 #4a9eff;
}
[data-theme="dark"] .xfer-return-badge { background: #243049 !important; color: #4a9eff !important; }
[data-theme="dark"] .xfer-rt-toggle { color: #94a3b8; }
[data-theme="dark"] .xfer-leg-add { color: #64748b; }
[data-theme="dark"] .xfer-board-loading i { color: #4a9eff; }

/* search + filter pills (orders look) — dark */
[data-theme="dark"] .transfer-queue-col .transfer-search,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter { background: #182132; border-color: #344058; }
[data-theme="dark"] .transfer-queue-col .transfer-search:focus-within,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74,158,255,.15); }
[data-theme="dark"] .transfer-queue-col .transfer-search > i.fa-search,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter > i.fa-filter { color: #94a3b8; }
[data-theme="dark"] .transfer-queue-col .transfer-search input,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter input { color: #e2e8f0; }
[data-theme="dark"] .transfer-queue-col .transfer-search input::placeholder,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter input::placeholder { color: #64748b; }
[data-theme="dark"] .transfer-queue-col .transfer-search[data-label]::after,
[data-theme="dark"] .transfer-queue-col .transfer-queue-filter[data-label]::after { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .transfer-queue-col .fb-clear { color: #475569; }
[data-theme="dark"] .transfer-queue-col .fb-clear:hover { color: #f87171; }
[data-theme="dark"] .xfer-filter-empty { color: #64748b; }

[data-theme="dark"] .xfer-drag-handle { color: #475569; }
[data-theme="dark"] .xfer-drag-handle:hover { color: #4a9eff; background: #1e293c; }
[data-theme="dark"] .xfer-handle-locked,
[data-theme="dark"] .xfer-handle-locked:hover { color: #344058; background: none; }
[data-theme="dark"] .xfer-expand-btn { color: #64748b; }
[data-theme="dark"] .xfer-expand-btn:hover { color: #4a9eff; background: #263048; }
[data-theme="dark"] .transfer-item-detail { border-top-color: #263048; }

[data-theme="dark"] .transfer-tickets-list .no-tickets { border-color: #263048; }
[data-theme="dark"] .transfer-tickets-list .no-tickets i { color: #344058; }
[data-theme="dark"] .transfer-tickets-list .no-tickets span { color: #94a3b8; }

[data-theme="dark"] .transfer-ticket-head { background: #1a2333; border-bottom-color: #263048; }
[data-theme="dark"] .transfer-ticket-id { color: #94a3b8; background: #263048; }
[data-theme="dark"] .transfer-ticket-submeta { color: #94a3b8; }
[data-theme="dark"] .transfer-ticket-submeta i { color: #64748b; }
[data-theme="dark"] .transfer-ticket-count { color: #cbd5e1; }

[data-theme="dark"] .transfer-ticket-items { background: #141c2b; border-color: #263048; }
[data-theme="dark"] .transfer-ticket-item { background: #1f293c; border-color: #2c3650; }
[data-theme="dark"] .transfer-ticket-item-name { color: #e2e8f0; }
[data-theme="dark"] .xfer-drop-hint { color: #64748b; }
[data-theme="dark"] .xfer-drop-hint-locked { color: #344058; }

[data-theme="dark"] body.xfer-is-dragging .transfer-ticket-card[data-status="pending"] .transfer-ticket-items,
[data-theme="dark"] body.xfer-is-dragging .transfer-ticket-placeholder .transfer-ticket-items,
[data-theme="dark"] body.xfer-is-dragging #transfer_items_list { border-color: #2f5e94; background: #16263c; }
[data-theme="dark"] .transfer-ticket-items.xfer-ghost-over { border-color: #4a9eff; background: #1b2c44; }

[data-theme="dark"] .transfer-ticket-card.is-locked .transfer-ticket-items { background: #1a2333; border-color: #263048; }
[data-theme="dark"] .transfer-ticket-card.is-locked .transfer-ticket-head { background: #141c2b; }

[data-theme="dark"] .transfer-ticket-placeholder { border-color: #2f456a; background: #16202f; }
[data-theme="dark"] .transfer-ticket-placeholder .transfer-ticket-head { background: #18243a; }
[data-theme="dark"] .xfer-new-badge { color: #93c5fd; background: #1e3a5f; }
[data-theme="dark"] .xfer-ph-field { background: #182132; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] .xfer-ph-field:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74,158,255,.15); }
[data-theme="dark"] .xfer-ph-field i { color: #94a3b8; }
[data-theme="dark"] .xfer-ph-field input { background: transparent; color: #e2e8f0; }
[data-theme="dark"] .xfer-ph-field input::placeholder { color: #64748b; }

/* Locked-ticket footer + preview modal — dark */
[data-theme="dark"] .transfer-ticket-locked-foot { color: #94a3b8; background: #1a2333; border-color: #263048; }
[data-theme="dark"] .transfer-ticket-locked-foot:hover { color: #4a9eff; background: #16263c; border-color: #2f5e94; }
[data-theme="dark"] .xfer-pv-route { color: #e2e8f0; }
[data-theme="dark"] .xfer-pv-route i.fa-arrow-right { color: #4a9eff; }
[data-theme="dark"] .xfer-pv-meta { color: #94a3b8; border-bottom-color: #263048; }
[data-theme="dark"] .xfer-pv-meta i { color: #64748b; }
[data-theme="dark"] .xfer-pv-item { background: #1f293c; border-color: #2c3650; }
[data-theme="dark"] .xfer-pv-qty { background: #2563eb; }
[data-theme="dark"] .xfer-pv-name { color: #e2e8f0; }
[data-theme="dark"] .xfer-pv-notes { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .xfer-pv-empty { color: #64748b; }

[data-theme="dark"] .transfer-item-card.xfer-ghost,
[data-theme="dark"] .transfer-ticket-item.xfer-ghost { background: #16263c; border-color: #2f5e94; }

/* Transfer ticket modal — dark mode */
[data-theme="dark"] .transfer-ticket-modal h3 {
	color: #e2e8f0;
}
[data-theme="dark"] .transfer-ticket-modal label {
	color: #94a3b8;
}
[data-theme="dark"] .transfer-ticket-modal input[type="text"],
[data-theme="dark"] .transfer-ticket-modal textarea {
	background-color: #182132 !important;
	border-color: #344058 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .transfer-ticket-modal input[type="text"]:focus,
[data-theme="dark"] .transfer-ticket-modal textarea:focus {
	border-color: #4a9eff !important;
}

/* ─── Transfer History + Custom Items — dark mode ─── */
[data-theme="dark"] .transfer-history-card { background-color: #182132; border-color: #263048; }
[data-theme="dark"] .transfer-history-card.expanded { border-color: #4a9eff; }
[data-theme="dark"] .transfer-history-header:hover { background-color: #1f293c; }
[data-theme="dark"] .transfer-history-card.expanded .transfer-history-header { background-color: #1f293c; border-bottom-color: #263048; }
[data-theme="dark"] .transfer-history-route { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-date { color: #94a3b8; }
[data-theme="dark"] .transfer-history-user { color: #94a3b8; }
[data-theme="dark"] .transfer-history-status { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .transfer-history-status.delivered { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .transfer-history-items td { border-bottom-color: #263048; }
[data-theme="dark"] .transfer-history-items .item-qty { color: #4a9eff; }
[data-theme="dark"] .transfer-history-items .item-name { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-items .item-text-badge { background: #312e81; color: #a5b4fc; }
[data-theme="dark"] #transfer_history_pagination button { background-color: #1f293c; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] #transfer_history_pagination button:hover { background-color: #263048; }
[data-theme="dark"] #transfer_history_pagination button.active { background-color: #4a9eff; border-color: #4a9eff; color: #fff; }
[data-theme="dark"] .btn-transfer-custom { background-color: #1f293c; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] .btn-transfer-custom:hover { background-color: #263048; }
[data-theme="dark"] .transfer-history-toggle { color: #64748b; }
[data-theme="dark"] .transfer-history-toggle:hover { color: #e2e8f0; }
[data-theme="dark"] .transfer-item-text-badge { background: #312e81; color: #a5b4fc; }
[data-theme="dark"] .transfer-item-form-badge { background: #0f3a44; color: #67e8f9; border-color: #155e75; }
[data-theme="dark"] .transfer-item-qty .qty-static { background: #1f293c; color: #4a9eff; border-color: #344058; }
[data-theme="dark"] .transfer-history-filter { background-color: #1f293c; border-color: #344058; }
[data-theme="dark"] .transfer-history-filter:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.1); }
[data-theme="dark"] .transfer-history-filter i { color: #64748b; }
[data-theme="dark"] .transfer-history-filter input { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-filter input::placeholder { color: #64748b; }
[data-theme="dark"] .transfer-history-empty { color: #64748b; }
[data-theme="dark"] .transfer-history-page-dots { color: #64748b; }
[data-theme="dark"] .btn-transfer-custom i { color: #e2e8f0; }

/* ─── Reports results — dark mode ─────────────────────────────── */
[data-theme="dark"] div.rep_content select {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.rep_content td {
	color: #e2e8f0;
}
[data-theme="dark"] div.rep_content td a {
	color: #4a9eff;
}
[data-theme="dark"] div.rep_content .inv_input,
[data-theme="dark"] div.rep_content .form_input {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.rep_content button.inv_input {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.rep_content button.inv_input:hover {
	background-color: #263048;
}
/* Report modal */
[data-theme="dark"] .modal-content {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .modal-close:hover,
[data-theme="dark"] .modal-close:focus {
	color: #e2e8f0;
}

/* ─── Inventory table rows — dark mode ────────────────────────── */
/* Remove .form wrapper border/bg so card rows float on page bg */
[data-theme="dark"] table#report_list.inventory.form {
	background-color: transparent;
	border-color: transparent;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight {
	background: transparent;
	box-shadow: none;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)) drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv td,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight td {
	background-color: #1c2738;
	color: #cbd5e1;
	border-top: 1px solid #263048;
	border-bottom: 1px solid #263048;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv td:first-child,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight td:first-child {
	border-left: 1px solid #263048;
	border-radius: 8px 0 0 8px;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv td:last-child,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight td:last-child {
	border-right: 1px solid #263048;
	border-radius: 0 8px 8px 0;
}
/* Product name brighter */
[data-theme="dark"] table#report_list.inventory tbody td.inv-product-name div {
	color: #e2e8f0;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv:hover,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight:hover {
	filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)) drop-shadow(0 0 0 rgba(74,158,255,0.15));
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv:nth-of-type(even) td,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight:nth-of-type(even) td {
	background-color: #1e2839;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv:hover td,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight:hover td {
	background-color: #2a3854;
	color: #fff;
	border-color: #344058;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight td:first-child {
	border-left-color: #4a9eff;
}
[data-theme="dark"] table#report_list.inventory thead tr.main td {
	color: #94a3b8;
	border: none;
}
/* Inventory summary stat borders + colors */
[data-theme="dark"] .inv-summary-stat {
	border-color: #263048;
}
[data-theme="dark"] .inv-summary-stat .stat-label {
	color: #94a3b8;
}
[data-theme="dark"] .stat-value.stat-success {
	color: #4ade80;
}
[data-theme="dark"] .stat-value.stat-warning {
	color: #facc15;
}
[data-theme="dark"] .stat-value.stat-primary {
	color: #4a9eff;
}
/* Inventory quantity pills */
[data-theme="dark"] table#report_list.inventory tbody td.qty:first-child div {
	background: rgba(74,222,128,0.15);
	color: #4ade80;
}
[data-theme="dark"] table#report_list.inventory tbody td.available div {
	background: rgba(74,158,255,0.15);
	color: #4a9eff;
}
[data-theme="dark"] table#report_list.inventory tbody td.available div:hover {
	background: rgba(74,158,255,0.25);
}
[data-theme="dark"] table#report_list.inventory tbody td.quoted div {
	background: rgba(250,204,21,0.15);
	color: #facc15;
}
[data-theme="dark"] table#report_list.inventory tbody td.quoted div:hover {
	background: rgba(250,204,21,0.25);
}
[data-theme="dark"] table#report_list.inventory tbody td.qty div {
	background: #263048;
	color: #cbd5e1;
}
/* Inventory detail rows */
[data-theme="dark"] table#report_list.inventory tr.inv_details {
	background-color: rgba(74,158,255,0.06);
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv.tr_open,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight.tr_open {
	filter: drop-shadow(0 -2px 5px rgba(0, 0, 0, 0.45));
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv.tr_open td,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight.tr_open td {
	background-color: #213353;
	border-top-color: rgba(74,158,255,0.45);
	border-bottom-color: rgba(74,158,255,0.45);
	color: #e2e8f0;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv.tr_open td:first-child,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight.tr_open td:first-child {
	border-left: 4px solid #4a9eff;
	/* Square the bottom corner so the open row joins the panel as one card —
	   the base dark row rule rounds all left corners (8px 0 0 8px); override
	   it here to match light mode (top-left only). */
	border-radius: 10px 0 0 0;
}
[data-theme="dark"] table#report_list.inventory tbody tr.inv.tr_open td:last-child,
[data-theme="dark"] table#report_list.inventory tbody tr.inv_highlight.tr_open td:last-child {
	border-right-color: rgba(74,158,255,0.45);
	border-radius: 0 10px 0 0;
}

/* Inventory detail panel — bottom half of the connected card */
[data-theme="dark"] .inv-details-panel {
	background: #182132;
	border-color: rgba(74,158,255,0.45);
	border-left: 4px solid #4a9eff;
	box-shadow: 0 10px 22px -8px rgba(0,0,0,0.65), 0 2px 6px rgba(0,0,0,0.4);
}
[data-theme="dark"] .inv-details-panel::before {
	background: #213353;
}
[data-theme="dark"] .inv-details-panel--loading .inv-loader { color: #94a3b8; }
[data-theme="dark"] .inv-details-panel--loading .inv-loader__spinner {
	border-color: rgba(74, 158, 255, 0.18);
	border-top-color: #4a9eff;
}
/* "Recode item code" pill — light grey chrome reads as a white blob in dark
   mode; recolour to match the panel's dark surface + blue accent on hover.
   Scoped under table#report_list so it out-specifies the generic ID-bearing
   `[data-theme="dark"] table#report_list td button` text-colour rule. */
[data-theme="dark"] table#report_list .inv-recode-btn {
	background: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] table#report_list .inv-recode-btn:hover {
	background: #263048;
	border-color: #4a9eff;
	color: #4a9eff;
}

/* On-hand Trends panel — dark mode. The pill buttons are <button>s inside
   table#report_list, so they're scoped the same way as the recode pill above
   to out-specify the generic `td button` colour rule. */
[data-theme="dark"] table#report_list .inv-trends-btn {
	background: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] table#report_list .inv-trends-btn:hover {
	background: #263048;
	border-color: #4a9eff;
	color: #4a9eff;
}
[data-theme="dark"] table#report_list .inv-trends-btn.is-active {
	background: #4a9eff;
	border-color: #4a9eff;
	color: #0b1220;
}
[data-theme="dark"] .inv-trends-panel {
	background: #0f1a2b;
	border-color: #243049;
}
[data-theme="dark"] .inv-trends-loading,
[data-theme="dark"] .inv-trends-empty { color: #64748b; }
[data-theme="dark"] .inv-trends-now-label { color: #64748b; }
[data-theme="dark"] .inv-trends-now-val { color: #60a5fa; }
[data-theme="dark"] .inv-trends-now-since { color: #64748b; }
[data-theme="dark"] .inv-trends-avail-val { color: #4ade80; }
/* Inventory Value — tile + breakdown modal (dark) */
[data-theme="dark"] .inv-summary-value:hover { border-color: #14532d; background: rgba(22,163,74,0.10); }
[data-theme="dark"] .inv-value-caret { color: #64748b; }
[data-theme="dark"] .inv-summary-value:hover .inv-value-caret { color: #4ade80; }
/* Trends History button + item-history timeline (dark) */
[data-theme="dark"] table#report_list .inv-trends-histbtn { background: #1f293c; border-color: #344058; color: #cbd5e1; }
[data-theme="dark"] table#report_list .inv-trends-histbtn:hover { background: #263048; border-color: #4a9eff; color: #4a9eff; }
[data-theme="dark"] .inv-itemhist-loading { color: #64748b; }
[data-theme="dark"] .inv-itemhist-note { color: #64748b; border-bottom-color: #1a2436; }
[data-theme="dark"] .inv-itemhist-level { color: #60a5fa; }
/* Item-history filter bar + scroll (dark) */
[data-theme="dark"] .inv-itemhist-filters { background: #131c2b; border-bottom-color: #243049; }
[data-theme="dark"] .inv-itemhist-search .inv-ih-q,
[data-theme="dark"] .inv-ih-field,
[data-theme="dark"] .inv-ih-reset { background: #0e1525; border-color: #2a3a52; color: #cbd5e1; }
[data-theme="dark"] .inv-itemhist-search .inv-ih-q { color: #e2e8f0; }
[data-theme="dark"] .inv-itemhist-search .inv-ih-q::placeholder { color: #5a6b80; }
[data-theme="dark"] .inv-itemhist-search .inv-ih-q:focus { border-color: #4a9eff; box-shadow: 0 0 0 3px rgba(74,158,255,.15); }
[data-theme="dark"] .inv-itemhist-search .inv-ih-clearq:hover { background: #1b2738; color: #cbd5e1; }
[data-theme="dark"] .inv-ih-field input[type="date"],
[data-theme="dark"] .inv-ih-field select { color: #e2e8f0; }
[data-theme="dark"] .inv-ih-field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; }
[data-theme="dark"] .inv-ih-reset:hover { background: #1b2738; border-color: #3a4a62; color: #4a9eff; }
[data-theme="dark"] .inv-itemhist-scroll::-webkit-scrollbar-thumb { background: #3a4a62; }
[data-theme="dark"] .inv-itemhist-meta { border-bottom-color: #1a2436; color: #64748b; }
[data-theme="dark"] .inv-itemhist-count { color: #94a3b8; }
[data-theme="dark"] .inv-itemhist-pageload { color: #64748b; }
[data-theme="dark"] .inv-itemhist-end { color: #475569; }
/* Sticky day-head opaque bg must match the dark modal card so dots hide */
[data-theme="dark"] .inv-itemhist-body .prod-history-day-head { background: #0e1525; }
[data-theme="dark"] .inv-val-card { background: #0f1a2b; border-color: #243049; }
[data-theme="dark"] .inv-val-card-label { color: #64748b; }
[data-theme="dark"] .inv-val-card-num { color: #60a5fa; }
[data-theme="dark"] .inv-val-card-num--avail { color: #4ade80; }
[data-theme="dark"] .inv-val-col-title { color: #94a3b8; }
[data-theme="dark"] .inv-val-table th { color: #64748b; border-bottom-color: #243049; }
[data-theme="dark"] .inv-val-table td { color: #cbd5e1; border-bottom-color: #1a2436; }
[data-theme="dark"] .inv-val-none,
[data-theme="dark"] .inv-val-foot { color: #64748b; }
[data-theme="dark"] .inv-trends-ranges { background: #18202f; }
[data-theme="dark"] table#report_list .inv-trends-range { background: transparent; color: #94a3b8; }
[data-theme="dark"] table#report_list .inv-trends-range:hover { color: #60a5fa; }
[data-theme="dark"] table#report_list .inv-trends-range.is-active {
	background: #243049;
	color: #60a5fa;
	box-shadow: none;
}
[data-theme="dark"] .inv-trends-asof { color: #94a3b8; }
[data-theme="dark"] .inv-trends-asof-date { color: #60a5fa; }
[data-theme="dark"] .inv-details-header {
	border-bottom-color: #263048;
}
[data-theme="dark"] .inv-details-title {
	color: #e2e8f0;
}
[data-theme="dark"] .inv-details-title i {
	color: #4a9eff;
}
/* Inventory item cards */
[data-theme="dark"] .inv-item-card {
	background: #1f293c;
	border-color: #263048;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
[data-theme="dark"] .inv-item-card:hover {
	border-color: #344058;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .inv-item-header {
	background: #182132;
	border-bottom-color: #263048;
}
[data-theme="dark"] .inv-item-name {
	color: #e2e8f0;
}
[data-theme="dark"] .inv-detail-label {
	color: #64748b;
}
[data-theme="dark"] .inv-detail-value {
	color: #cbd5e1;
}
[data-theme="dark"] .inv-item-footer {
	background: #182132;
	border-top-color: #263048;
}
[data-theme="dark"] .inv-action-btn {
	color: #64748b;
}
[data-theme="dark"] .inv-action-btn:hover {
	background: #263048;
	color: #4a9eff;
}
[data-theme="dark"] .inv-action-btn.has-note {
	color: #4a9eff;
}

/* ─── Reports — dark mode ─────────────────────────────────────── */
/* Quick summary cards */
[data-theme="dark"] .quick-summary {
	background: #182132;
}
[data-theme="dark"] table#quick_list.quick-summary {
	box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
[data-theme="dark"] .quick-summary__title {
	color: #e2e8f0;
}
[data-theme="dark"] .quick-summary__title i {
	color: #4a9eff;
}
[data-theme="dark"] .quick-summary__colTitle {
	color: #cbd5e1;
}
[data-theme="dark"] .quick-summary__colTitle i {
	color: #4a9eff;
}
[data-theme="dark"] .quick-summary__metric {
	background: #1f293c;
	border-color: #263048;
}
[data-theme="dark"] .quick-summary__label {
	color: #64748b;
}
[data-theme="dark"] .quick-summary__value {
	color: #e2e8f0;
}
[data-theme="dark"] .quick-summary__metric--money .quick-summary__value {
	color: #4a9eff;
}
/* Results state (empty/error) */
[data-theme="dark"] .results-state {
	background: #182132;
	border-color: #263048;
	color: #cbd5e1;
}
[data-theme="dark"] .results-state__icon {
	color: #4a9eff;
}
[data-theme="dark"] .results-state__title {
	color: #e2e8f0;
}
[data-theme="dark"] .results-state__text {
	color: #94a3b8;
}
[data-theme="dark"] .results-state--error {
	border-color: rgba(239,68,68,0.3);
	background: rgba(239,68,68,0.06);
}
[data-theme="dark"] .results-state--error .results-state__icon {
	color: #f87171;
}
/* Colored status columns (batch_mixes report) */
[data-theme="dark"] table#report_list td.brown_st {
	background: rgba(163,135,95,0.2) !important;
}
[data-theme="dark"] table#report_list td.green_st {
	background: rgba(165,173,122,0.25) !important;
}
[data-theme="dark"] table#report_list td.tan_st {
	background: rgba(210,190,170,0.15) !important;
}
[data-theme="dark"] table#report_list td.orange_st {
	background: rgba(233,185,119,0.2) !important;
}
[data-theme="dark"] table#report_list td.turq_st {
	background: rgba(182,205,185,0.18) !important;
}
[data-theme="dark"] table#report_list td.blue_st {
	background: rgba(134,208,209,0.15) !important;
}
[data-theme="dark"] table#report_list td.brown {
	background: rgba(163,135,95,0.15) !important;
}
[data-theme="dark"] table#report_list td.green {
	background: rgba(165,173,122,0.18) !important;
}
[data-theme="dark"] table#report_list td.tan {
	background: rgba(210,190,170,0.12) !important;
}
[data-theme="dark"] table#report_list td.orange {
	background: rgba(233,185,119,0.15) !important;
}
[data-theme="dark"] table#report_list td.turq {
	background: rgba(182,205,185,0.14) !important;
}
[data-theme="dark"] table#report_list td.blue {
	background: rgba(134,208,209,0.12) !important;
}
/* Mobile report cards */
@media (max-width: 768px) {
	[data-theme="dark"] .report-card {
		background: #182132;
		border-color: #263048;
		box-shadow: 0 1px 0 rgba(0,0,0,0.2);
	}
	[data-theme="dark"] .report-card.report-card--highlight {
		border-color: rgba(74,158,255,0.3);
		background: rgba(74,158,255,0.04);
	}
	[data-theme="dark"] .report-card__title {
		color: #e2e8f0;
	}
	[data-theme="dark"] .report-card__sub {
		color: #64748b;
	}
	[data-theme="dark"] .report-pill {
		background: #263048;
		color: #4a9eff;
	}
	[data-theme="dark"] .report-stat {
		background: #1f293c;
		border-color: #263048;
	}
	[data-theme="dark"] .report-stat__label {
		color: #64748b;
	}
	[data-theme="dark"] .report-stat__val {
		color: #e2e8f0;
	}
	[data-theme="dark"] .report-card__actions {
		border-top-color: #263048;
	}
	[data-theme="dark"] .report-card__action-text {
		color: #64748b;
	}
	[data-theme="dark"] .report-card__action-icon {
		color: #64748b;
	}
	[data-theme="dark"] .report-card__action-icon:hover {
		color: #4a9eff;
		background: #263048;
	}
	[data-theme="dark"] .report-card__details {
		border-top-color: #263048;
	}
	[data-theme="dark"] .report-card__detail-row {
		color: #94a3b8;
	}
	[data-theme="dark"] .report-card__detail-row strong {
		color: #e2e8f0;
	}
}

/* ─── Trucking / Production — dark mode ───────────────────────── */
/* Right panel (#dr) — dark mode now in dispatch.css */
/* Plant dropdown (trucking + production) */
[data-theme="dark"] div#flip_me select[name=plant] {
	background-color: rgba(255, 255, 255, 0.04) !important;
	border-color: rgba(255, 255, 255, 0.06);
	border-radius: 7px;
	color: #e2e8f0;
	box-shadow: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6a7d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="dark"] div#flip_me select[name=plant]:hover {
	background-color: rgba(255, 255, 255, 0.07) !important;
	border-color: rgba(255, 255, 255, 0.1);
}
/* ao_table thead inline background override */
[data-theme="dark"] table#ao_table thead {
	background: #0e1525 !important;
}
[data-theme="dark"] table#ao_table thead td {
	background: #0e1525 !important;
}
/* Calendar parent — no unnecessary background */
[data-theme="dark"] div#prod_today {
	background: transparent !important;
}
/* Old trucking table cell dark mode removed — now in css/dispatch.css (.sch-*) */
/* Plant select in schedule header */
[data-theme="dark"] div#prod_today select[name=plant] {
	background-color: rgba(74,158,255,0.1) !important;
	color: #e2e8f0;
}
/* Old tr.first td.half-hourly dark mode removed — now in css/dispatch.css */
/* Date container & counters */
[data-theme="dark"] div.date_cont,
[data-theme="dark"] div.day_scroll {
	color: #4a9eff;
}
[data-theme="dark"] div.date_cont input,
[data-theme="dark"] div.day_scroll input,
[data-theme="dark"] div#prod_today input#date,
[data-theme="dark"] div#prod_today input.other_dates {
	color: #4a9eff;
}
[data-theme="dark"] div.date_cont i.arrow:hover,
[data-theme="dark"] div.day_scroll i.arrow:hover {
	background: #1a3a5c;
	color: #4a9eff;
}
[data-theme="dark"] div.counter {
	color: #cbd5e1;
}
[data-theme="dark"] div#man_mode i:hover,
[data-theme="dark"] div#man_mode.selected i {
	background: transparent;
	color: inherit;
}
[data-theme="dark"] div#end_of_day i:hover,
[data-theme="dark"] div#end_of_day.selected i,
[data-theme="dark"] div#week_glance i:hover,
[data-theme="dark"] div#week_glance.selected i {
	background: transparent;
	color: inherit;
}
/* Search filter selects in right panel */
[data-theme="dark"] div.search_filter select {
	background-color: #1f293c;
	color: #e2e8f0;
	border-color: #344058;
}
/* Production selects inside ao_table */
[data-theme="dark"] div#prod_today select {
	background-color: transparent;
	color: #e2e8f0;
}
/* Prod header counters border */
[data-theme="dark"] div.tot_hrs {
	color: #cbd5e1;
}
/* Old td border-bottom override removed — grid uses .sch-time-area border */

/* ── Schedule Drag Items — Dark Mode ── */
/* Base drag items — slightly brighter on dark bg for contrast */
[data-theme="dark"] div.drag,
[data-theme="dark"] div.proj,
[data-theme="dark"] div.dragged,
[data-theme="dark"] div.emp_drag,
[data-theme="dark"] div.emp_dragged {
	box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
}
[data-theme="dark"] div.drag { background-color: rgba(55,110,140,0.95); }
[data-theme="dark"] div.drag:hover { background-color: rgba(40,90,118,0.95); }
/* Urgent */
[data-theme="dark"] div.drag.urgent { background-color: #a01015; }
[data-theme="dark"] div.drag.urgent:hover { background-color: #8B0609; }
/* Soon */
[data-theme="dark"] div.drag.soon { background-color: #4e8a0e; }
[data-theme="dark"] div.drag.soon:hover { background-color: #42740b; }
/* Task (no ListID) */
[data-theme="dark"] div.drag.task { background-color: rgba(140,98,58,0.95); }
[data-theme="dark"] div.drag.task:hover { background-color: rgba(112,76,42,0.95); }
/* Missed */
[data-theme="dark"] div.drag.missed { background-color: rgb(72,10,84); }
[data-theme="dark"] div.drag.missed:hover { background-color: rgb(53,3,62); }
/* Poured */
[data-theme="dark"] div.drag.poured { background-color: rgba(40,160,110,0.85); color: #fff; }
[data-theme="dark"] div.drag.poured:hover { background-color: rgba(30,140,95,0.9); }
/* Proj (missed — purple) */
[data-theme="dark"] div.proj { background-color: rgb(72,10,84); }
[data-theme="dark"] div.proj:hover { background-color: rgb(53,3,62); }
/* Dragging state */
[data-theme="dark"] div.dragged { background-color: rgba(185,165,65,0.95); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
[data-theme="dark"] div.emp_dragged { background-color: rgba(60,115,60,0.95); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
/* Selected — explicit :hover variants needed because the per-color
   :hover rules above (.urgent:hover, .soon:hover, .task:hover, etc.)
   share the same specificity as the plain .ui-selected rule and the
   :hover pseudo-class tips them past it. Without these the yellow
   selected fill flickered back to the underlying color on hover. */
[data-theme="dark"] div.drag.ui-selected,
[data-theme="dark"] div.drag.ui-selected:hover { background-color: rgba(180,185,100,0.95); color: #1e293b; }
[data-theme="dark"] div.emp_drag.ui-selected,
[data-theme="dark"] div.emp_drag.ui-selected:hover { background-color: rgba(100,185,135,0.95); color: #1e293b; }
/* sch_grp */
[data-theme="dark"] div.sch_grp { background-color: rgba(30,130,175,0.95); }
/* Old td.fill / td.break dark mode removed — grid doesn't use table cells */
/* s_area buttons */
[data-theme="dark"] div.s_area { background-color: #1a3a5c; color: #4a9eff; }
[data-theme="dark"] div.s_area:hover { background-color: #1f4570; }

/* Old tr.emp_* row gradients removed — now .sch-truck-row.emp_* in css/dispatch.css */
/* Old td.emp_name / tr.first dark mode removed — now .sch-truck-name in css/dispatch.css */
[data-theme="dark"] span.p_hrs,
[data-theme="dark"] span.m_hrs,
[data-theme="dark"] span.y_area {
	color: #94a3b8;
}
[data-theme="dark"] div.emp_t div.zone.rotated {
	color: #cbd5e1;
}
/* Old td.emp_name select/i dark mode removed — now .sch-truck-name in css/dispatch.css */
[data-theme="dark"] div#emp_res,
[data-theme="dark"] div#area_res {
	color: #4ade80;
}
/* Processing spinner */
[data-theme="dark"] div#processing i,
[data-theme="dark"] div#processing div {
	color: #64748b !important;
}
/* Old table#ao_table thead[style] removed — grid uses .sch-header-cell */
/* Mobile task cards */
[data-theme="dark"] .mob-task-status-bar { box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
[data-theme="dark"] .mob-task-status-bar.poured { background: rgba(40,160,110,0.85); }

/* ── Stack Modal — Dark Mode ── */
[data-theme="dark"] .stack-modal {
	background: #0e1525;
	box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
[data-theme="dark"] .stack-modal-header {
	background: #151e30;
	border-bottom-color: #263048;
}
[data-theme="dark"] .stack-modal-header .stack-modal-title {
	color: #e2e8f0;
}
[data-theme="dark"] .stack-modal-header .structure-select select.stack-select {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7"><path fill="%2394a3b8" d="M1 1l5 5 5-5"/></svg>');
}
[data-theme="dark"] .stack-modal-header .structure-select select.stack-select:hover {
	border-color: #344058;
}
[data-theme="dark"] .stack-modal-header .structure-select select.stack-select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.2);
}
[data-theme="dark"] .stack-modal-header .sbs_button {
	background: #182132;
	border-color: #263048;
	color: #94a3b8;
	box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
[data-theme="dark"] .stack-modal-header .sbs_button:hover {
	background: #1f293c;
	border-color: #4a9eff;
	color: #4a9eff;
	box-shadow: 0 2px 8px rgba(74,158,255,0.15);
}
[data-theme="dark"] .stack-modal-header .sbs_button[action="delete"]:hover {
	border-color: #f87171;
	color: #f87171;
	box-shadow: 0 2px 8px rgba(248,113,113,0.15);
}
/* Icon-first + kebab header (2026-07-02): the kebab ("⋯") trigger reuses
   .sbs_button (dark rules above already cover its resting/hover state) —
   this just adds its "menu open" state, matching the hover treatment. The
   dropdown itself reuses .theme-dropdown/.theme-dropdown-item (already
   dark-aware, above), but its icon color is hardcoded to the light-mode
   accent (#0c4d8b) in stack.css, which is too low-contrast on the dark
   dropdown background — swap it for the standard dark-mode accent blue. */
[data-theme="dark"] .stack-modal-header .stack-hdr-kebab-btn.is-open {
	background: #1f293c;
	border-color: #4a9eff;
	color: #4a9eff;
}
[data-theme="dark"] .stack-hdr-kebab-menu .theme-dropdown-item i {
	color: #4a9eff;
}
[data-theme="dark"] .stack-modal-close {
	color: #94a3b8;
	border-color: #263048;
}
[data-theme="dark"] .stack-modal-close:hover {
	background: rgba(220,38,38,0.2);
	color: #f87171;
	border-color: rgba(220,38,38,0.3);
}
[data-theme="dark"] .stack-modal-viewports {
	background: #0e1525;
}
[data-theme="dark"] .stack-viewport {
	background: #182132;
	border-color: #263048;
}
[data-theme="dark"] .stack-vp-toolbar {
	background: #151e30;
	border-bottom-color: #263048;
}
[data-theme="dark"] .stack-vp-select {
	background-color: #182132;
	border-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .stack-vp-select:focus {
	border-color: #4a9eff;
}
[data-theme="dark"] .stack-vp-canvas {
	background: #182132;
}
[data-theme="dark"] .stack-vp-canvas .vp-notice {
	color: #64748b;
}
[data-theme="dark"] .stack-modal-header .vis-specs-bar .summary-metric-label {
	color: #64748b;
}
[data-theme="dark"] .stack-modal-header .vis-specs-bar .summary-metric-value {
	color: #e2e8f0;
}
[data-theme="dark"] .stack-resize-handle {
	background: #151e30;
	border-bottom-color: #263048;
}
[data-theme="dark"] .stack-resize-handle:hover,
[data-theme="dark"] .stack-resizing .stack-resize-handle {
	background: #1f293c;
}
[data-theme="dark"] .stack-resize-grip {
	background: #344058;
}
[data-theme="dark"] .stack-resize-handle:hover .stack-resize-grip,
[data-theme="dark"] .stack-resizing .stack-resize-handle .stack-resize-grip {
	background: #64748b;
}
[data-theme="dark"] .stack-modal-body {
	background: #0e1525;
}
[data-theme="dark"] .stack-modal-body div.stack_tabs {
	background: #151e30;
	border-right-color: #263048;
}
[data-theme="dark"] .stack-modal-body div.stack_tabs div.tab {
	color: #94a3b8;
}
[data-theme="dark"] .stack-modal-body div.stack_tabs div.tab.selected,
[data-theme="dark"] .stack-modal-body div.stack_tabs div.tab:hover {
	background: #182132;
	color: #4a9eff;
	border-left-color: #4a9eff;
}
[data-theme="dark"] .stack-modal-body div.stack_dets {
	border-color: #263048;
}
@media (max-width: 1200px) {
	[data-theme="dark"] .stack-viewport {
		border-bottom-color: #263048;
	}
}

/* ================================================================
   EXECUTIVE OPERATIONS DASHBOARD — dark mode
   ================================================================ */
[data-theme="dark"] .exec-filter-select,
[data-theme="dark"] .exec-filter-input {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .exec-btn {
	background-color: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .exec-btn:hover {
	background-color: #263048;
	color: #4a9eff;
	border-color: #4a9eff;
}
[data-theme="dark"] .exec-refresh-btn {
	background: linear-gradient(135deg, #1a6fc4 0%, #4a9eff 100%);
}
[data-theme="dark"] .exec-refresh-btn:hover {
	background: linear-gradient(135deg, #0c4d8b 0%, #1a6fc4 100%);
	box-shadow: 0 4px 12px rgba(74,158,255,0.3);
}
[data-theme="dark"] .exec-kpi-card {
	background: #182132;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
}
[data-theme="dark"] .exec-kpi-card:hover {
	box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .exec-kpi-label { color: #94a3b8; }
[data-theme="dark"] .exec-kpi-value { color: #e2e8f0; }
[data-theme="dark"] .exec-kpi-trend.up { color: #34d399; background: rgba(52,211,153,0.12); }
[data-theme="dark"] .exec-kpi-trend.down { color: #f87171; background: rgba(248,113,113,0.12); }
[data-theme="dark"] .exec-kpi-trend.neutral { color: #64748b; background: rgba(100,116,139,0.12); }
[data-theme="dark"] .exec-kpi-tooltip .jBox-container { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .exec-kpi-tooltip .jBox-content { color: #cbd5e1; }
[data-theme="dark"] .exec-kpi-tooltip .jBox-pointer-top::after { border-bottom-color: #1f293c; }
[data-theme="dark"] .exec-widget {
	background: #182132;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
}
[data-theme="dark"] .exec-widget:hover {
	box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 4px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .exec-widget-title { color: #e2e8f0; }
[data-theme="dark"] .exec-widget-actions button { color: #64748b; }
[data-theme="dark"] .exec-widget-actions button:hover { color: #e2e8f0; background: #263048; }
[data-theme="dark"] .exec-widget-menu {
	background: #1f293c;
	box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}
[data-theme="dark"] .exec-widget-menu-item { color: #cbd5e1; }
[data-theme="dark"] .exec-widget-menu-item:hover { background: #263048; }
[data-theme="dark"] .exec-widget-menu-item.danger { color: #f87171; }
[data-theme="dark"] .exec-widget-menu-item.danger:hover { background: rgba(248,113,113,0.08); }
[data-theme="dark"] .exec-widget-picker {
	background: #182132;
	border-color: #344058;
}
[data-theme="dark"] .exec-wp-header {
	border-bottom-color: #263048;
}
[data-theme="dark"] .exec-wp-header strong { color: #e2e8f0; }
[data-theme="dark"] .exec-wp-header strong i { color: #4a9eff; }
[data-theme="dark"] .exec-wp-close-btn { color: #64748b; }
[data-theme="dark"] .exec-wp-close-btn:hover { background: #263048; color: #e2e8f0; }
[data-theme="dark"] .exec-wp-group h4 { color: #64748b; }
[data-theme="dark"] .exec-wp-item {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .exec-wp-item:hover {
	background: #263048;
	border-color: #4a5568;
}
[data-theme="dark"] .exec-wp-item.active {
	background: rgba(74,158,255,0.06);
	border-color: rgba(74,158,255,0.3);
}
[data-theme="dark"] .exec-wp-item-info { color: #cbd5e1; }
[data-theme="dark"] .exec-wp-slider { background: #4a5568; }
[data-theme="dark"] .exec-wp-toggle input:checked + .exec-wp-slider { background: #4a9eff; }
[data-theme="dark"] .exec-ai-modal {
	background: #182132;
	box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
[data-theme="dark"] .exec-ai-modal-overlay {
	background: rgba(0,0,0,0.6);
}
[data-theme="dark"] .exec-ai-modal-header {
	border-bottom-color: #344058;
}
[data-theme="dark"] .exec-ai-modal-header h3 { color: #e2e8f0; }
[data-theme="dark"] .exec-ai-modal-header h3 i { color: #4a9eff !important; }
[data-theme="dark"] .exec-ai-close-btn { color: #94a3b8; }
[data-theme="dark"] .exec-ai-close-btn:hover { background: #263048 !important; color: #e2e8f0; }
[data-theme="dark"] #exec_ai_question {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] #exec_ai_explanation {
	background: #1a3a5c;
	color: #cbd5e1;
}
[data-theme="dark"] #exec_ai_sql_wrap {
	background: #151e30;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .exec-btn-sm {
	background-color: #1f293c;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .exec-btn-sm:hover { background-color: #263048; }
[data-theme="dark"] #exec_ai_swap_btn.active { background-color: #1a6fc4; color: #fff; border-color: #1a6fc4; }
[data-theme="dark"] .exec-ai-ds-rename {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .exec-ai-ds-rename:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.2);
}
[data-theme="dark"] .exec-btn-primary {
	background: linear-gradient(135deg, #1a6fc4 0%, #4a9eff 100%);
}
[data-theme="dark"] .exec-btn-primary:hover {
	background: linear-gradient(135deg, #0c4d8b 0%, #1a6fc4 100%);
	box-shadow: 0 4px 12px rgba(74,158,255,0.3);
}
[data-theme="dark"] .exec-shimmer,
[data-theme="dark"] .exec-kpi-card.loading .exec-kpi-value,
[data-theme="dark"] .exec-kpi-card.loading .exec-kpi-trend,
[data-theme="dark"] .exec-kpi-card.refreshing .exec-kpi-value {
	background: linear-gradient(90deg, #1f293c 25%, #263048 50%, #1f293c 75%) !important;
	background-size: 200% 100% !important;
}
[data-theme="dark"] .exec-widget.refreshing::after {
	background: rgba(14, 21, 37, 0.6);
}
[data-theme="dark"] .exec-widget.refreshing .exec-widget-body::before {
	border-color: #344058;
	border-top-color: #4a9eff;
}
[data-theme="dark"] #butt_container {
	border-bottom-color: #344058;
}
[data-theme="dark"] .exec-widget-title-input {
	background: #1f293c;
	border-color: #4a9eff;
	color: #e2e8f0;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}
[data-theme="dark"] .exec-ai-name-row label { color: #94a3b8; }
[data-theme="dark"] .exec-ai-name-row label i { color: #4a9eff; }
[data-theme="dark"] .exec-ai-name-row input {
	background: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .exec-ai-name-row input:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}
[data-theme="dark"] .exec-chart-grid .ui-sortable-placeholder {
	background: rgba(74,158,255,0.05);
	border-color: #4a9eff;
}
[data-theme="dark"] .exec-kpi-grid .ui-sortable-placeholder {
	background: rgba(74,158,255,0.05);
	border-color: #4a9eff;
}

/* ================================================================
   QC Module
   ================================================================ */

/* QC Header */
[data-theme="dark"] .qc-header {
	background: linear-gradient(135deg, #0e1525 0%, #182132 100%);
	box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* QC Filter Bar */
[data-theme="dark"] div.row.buttons {
	background: rgba(24,33,50,0.72);
	border-bottom-color: rgba(52,64,88,0.5);
	box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Forklift modern action buttons (body.forklift-page) */
[data-theme="dark"] body.forklift-page button.fork-btn--primary {
	background: #3b82f6;
	border-color: #3b82f6;
	color: #fff;
	box-shadow: 0 2px 10px rgba(59, 130, 246, 0.28);
}
[data-theme="dark"] body.forklift-page button.fork-btn--primary:hover,
[data-theme="dark"] body.forklift-page button.fork-btn--primary:focus {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--secondary {
	background: rgba(31, 41, 60, 0.95);
	border: 1.5px solid #64748b;
	color: #93c5fd;
	box-shadow: none;
}
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--secondary:hover,
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--secondary:focus {
	background: #263048;
	border: 1.5px solid #4a9eff;
	color: #bfdbfe;
}
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--return {
	background: rgba(31, 41, 60, 0.95);
	border: 1.5px solid #ca8a04;
	color: #fbbf24;
	box-shadow: none;
}
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--return:hover,
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn--return:focus {
	background: rgba(251, 191, 36, 0.1);
	border: 1.5px solid #fbbf24;
	color: #fde68a;
}
[data-theme="dark"] body.forklift-page button.fork-btn--finish {
	background: #16a34a;
	border-color: #16a34a;
	color: #fff;
	box-shadow: none;
}
[data-theme="dark"] body.forklift-page button.fork-btn--finish:hover,
[data-theme="dark"] body.forklift-page button.fork-btn--finish:focus {
	background: #15803d;
	border-color: #15803d;
	color: #fff;
}
[data-theme="dark"] body.forklift-page div.row.buttons.main button.button.fork-btn:focus-visible,
[data-theme="dark"] body.forklift-page div.row.buttons.fork-finish-row button.button.fork-btn:focus-visible {
	outline-color: #4a9eff;
}

/* Ticket-loaded footer actions */
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--secondary {
	background: #1f293c;
	border-color: #344058;
	color: #93c5fd;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--secondary:hover,
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--secondary:focus {
	background: #263048;
	border-color: #4a9eff;
	color: #bfdbfe;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--trouble {
	background: #1f293c;
	border-color: rgba(248, 113, 113, 0.4);
	color: #f87171;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--trouble:hover,
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--trouble:focus {
	background: rgba(248, 113, 113, 0.1);
	border-color: #f87171;
	color: #fca5a5;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--finish {
	background: #16a34a;
	border-color: #16a34a;
	color: #fff;
	box-shadow: none;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--finish:hover,
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn--finish:focus {
	background: #15803d;
	border-color: #15803d;
	color: #fff;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-done-msg {
	background: rgba(34, 197, 94, 0.12);
	border-color: rgba(34, 197, 94, 0.3);
	color: #86efac;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-done-msg i {
	color: #4ade80;
}
[data-theme="dark"] body.forklift-page #qc_res .fork-load-actions .fork-btn:focus-visible {
	outline-color: #4a9eff;
}
[data-theme="dark"] #qc_date {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.row.buttons select {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='14' viewBox='0 0 29 14' width='29'><path fill='%2394a3b8' d='M9.37727 3.625l5.08154 6.93523L19.54036 3.625'/></svg>");
}

/* QC Product Cards */
[data-theme="dark"] div.prod,
[data-theme="dark"] div.fork_prod {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.prod:hover,
[data-theme="dark"] div.fork_prod:hover {
	border-color: #4a9eff;
	box-shadow: 0 2px 8px rgba(74,158,255,0.12);
}

/* QC Status Colors (dark) */
[data-theme="dark"] div.qc_pre_pour {
	background-color: rgba(250, 204, 21, 0.1);
	border-color: rgba(250, 204, 21, 0.3);
}
[data-theme="dark"] div.qc_pouring {
	background-color: rgba(34, 197, 94, 0.12);
	border-color: rgba(34, 197, 94, 0.3);
}
[data-theme="dark"] div.qc_post_pour {
	background-color: rgba(59, 130, 246, 0.12);
	border-color: rgba(59, 130, 246, 0.3);
}
[data-theme="dark"] div.qc_customer_ready {
	background-color: rgba(74, 158, 255, 0.25);
	border-color: #4a9eff;
}
[data-theme="dark"] div.qc_task {
	background-color: rgba(255, 172, 144, 0.15);
	border-color: rgba(255, 123, 79, 0.4);
}

/* QC Slide-Down Menu */
[data-theme="dark"] .menu {
	background: #182132;
	border-bottom-color: #344058;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .menu a { color: #e2e8f0; }
[data-theme="dark"] .menu a i { color: #4a9eff; }
[data-theme="dark"] .menu .column:hover { background-color: #263048; }
[data-theme="dark"] .menu .column:active { background-color: #1f293c; }

/* QC Selected / Night Shift / Misc */
[data-theme="dark"] div.prod.sel {
	background: rgba(74,158,255,0.15);
	border-color: #4a9eff;
}
[data-theme="dark"] div.prod.night_shift { border-color: #64748b; }
[data-theme="dark"] div.prod > span:not(.fa-stack) { color: #cbd5e1; }
/* QC Detail pills — dark mode */
[data-theme="dark"] .qc-pills > span {
	background: rgba(30,41,60,0.6);
	border-color: rgba(52,64,88,0.6);
	color: #94a3b8;
}
[data-theme="dark"] .qc-pills > span:hover {
	background: rgba(38,48,72,0.8);
	border-color: #475569;
}
[data-theme="dark"] .qc-pills span.emp_name i { color: #60a5fa; }
[data-theme="dark"] .qc-pills span.sched_time i { color: #fbbf24; }
[data-theme="dark"] .qc-pills span.prod_notes i { color: #a78bfa; }
[data-theme="dark"] .qc-pills span.job_name i { color: #818cf8; }
/* QC Pour Group Headers — dark mode */
[data-theme="dark"] .qc-pour-group { color: #94a3b8; }
/* QC Badges — dark mode bookmark gradients */
[data-theme="dark"] .qc-badges div.qc_qty {
	background: linear-gradient(180deg, #0c3d6e 0%, #2563eb 100%);
	box-shadow: 0 4px 10px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="dark"] .qc-badges div.qc_qty_chk {
	background: linear-gradient(180deg, #065f16 0%, #16a34a 100%);
	box-shadow: 0 4px 10px rgba(22,163,74,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="dark"] .qc-badges div.qc_inv {
	background: linear-gradient(180deg, #0e5e6b 0%, #0891b2 100%);
	box-shadow: 0 4px 10px rgba(8,145,178,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="dark"] .qc-badges div.qc_del_inv {
	background: linear-gradient(180deg, #991b1b 0%, #dc2626 100%);
	box-shadow: 0 4px 10px rgba(220,38,38,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="dark"] .qc-badges div.attach {
	background: linear-gradient(180deg, #056107 0%, #16a34a 100%);
	box-shadow: 0 4px 10px rgba(22,163,74,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
[data-theme="dark"] div.attach, [data-theme="dark"] div.fork_attach {
	background: linear-gradient(135deg, #056107 0%, #16a34a 100%);
}
[data-theme="dark"] div.inv_item {
	background: rgba(74,158,255,0.1);
	border-color: #344058;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
[data-theme="dark"] div.inv_item textarea,
[data-theme="dark"] div.inv_item select:not(:focus) {
	border-color: #344058;
	color: #e2e8f0;
	background-color: #1f293c;
}
[data-theme="dark"] div.inv_item div.qc_name input {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
/* QC Modal — dark mode */
[data-theme="dark"] .jBox-Modal .jBox-title {
	background: #151e30;
	border-bottom-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] div.qc_check select[name=check] {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='14' viewBox='0 0 29 14' width='29'><path fill='%2394a3b8' d='M9.37727 3.625l5.08154 6.93523L19.54036 3.625'/></svg>");
}
[data-theme="dark"] div.qc_check .inp_div label {
	color: #cbd5e1;
}
[data-theme="dark"] div.qc_check input[name=qty_check] {
	color: #e2e8f0;
	border-bottom-color: #344058;
}
[data-theme="dark"] div.qc_check input[name=qty_check]:focus {
	border-bottom-color: #4a9eff;
}
[data-theme="dark"] div.qc_dynamic textarea[name=prod_notes] {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.qc_dynamic textarea[name=prod_notes]:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.1);
}
[data-theme="dark"] div.qc_check .inp_div:has(input[name=qc_pouring_df]) {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.qc_check .inp_div:has(input[name=qc_pouring_df]):focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.1);
}
[data-theme="dark"] div.qc_check .inp_div:has(input[name=qc_pouring_df]) .lab_div {
	color: #64748b;
}
[data-theme="dark"] div.qc_check input[name=qc_pouring_df] {
	color: #e2e8f0;
}
[data-theme="dark"] div.qc_dynamic button.r_button {
	background: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.qc_dynamic button.r_button:hover {
	background: #263048;
	border-color: #475569;
}
[data-theme="dark"] div.qc_dynamic button#submit_qc {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}
[data-theme="dark"] div.qc_dynamic button#submit_qc:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

/* QC Inventory panel dark-mode styling now lives in css/qc.css alongside the
   light rules (single source — these stale overrides fought the new
   colour-coded design, e.g. the green qc_text gradient). */

/* QC Drawing thumbnails */
[data-theme="dark"] div.dt_draw {
	border-color: #344058;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
[data-theme="dark"] div.dt_draw:hover {
	border-color: #4a9eff;
	box-shadow: 0 4px 14px rgba(74,158,255,0.2);
}
[data-theme="dark"] div.dt_draw:has(img.dt_draw_sel) {
	border-color: #22c55e;
	box-shadow: 0 0 0 2px rgba(34,197,94,0.3);
}
[data-theme="dark"] div.dt_draw.lpb {
	background: linear-gradient(135deg, #1f293c 0%, #182132 100%);
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] div.dt_draw.lpb a { color: #cbd5e1; }
[data-theme="dark"] div.dt_draw.lpb i { color: #4a9eff; }
[data-theme="dark"] div.dt_draw.lpb:hover {
	background: linear-gradient(135deg, #263048 0%, #1f293c 100%);
	border-color: #4a9eff;
}

/* QC Tickets / Tasks */
[data-theme="dark"] div.dr_tic {
	background-color: rgba(74,158,255,0.1);
	border-color: rgba(74,158,255,0.25);
}
[data-theme="dark"] div.dr_tic.selected {
	background-color: rgba(74,158,255,0.2);
}
[data-theme="dark"] div.dr_task {
	background-color: rgba(232,205,155,0.1);
	border-color: rgba(139,93,12,0.3);
}
[data-theme="dark"] div.dr_tic.complete,
[data-theme="dark"] div.dr_task.complete {
	background-color: rgba(100,116,139,0.2);
	border-color: #475569;
	color: #94a3b8;
}

/* QC Search results */
[data-theme="dark"] span.srch_cus {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] span.srch_cus:hover {
	background-color: #263048;
	border-color: #4a9eff;
}

/* QC Add form */
[data-theme="dark"] div.qc_add select,
[data-theme="dark"] div.qc_add input {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.qc_add label { color: #94a3b8; }
[data-theme="dark"] div.qc_add select:focus ~ label,
[data-theme="dark"] div.qc_add input:focus ~ label {
	color: #4a9eff;
}

/* Address bar cards */
[data-theme="dark"] .addr-card {
	background-color: #182132;
	border-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .addr-card.dt_customer {
	border-left-color: #4a9eff;
}
[data-theme="dark"] .addr-card.dt_shipto {
	border-left-color: #2dd4bf;
}
[data-theme="dark"] .addr-card.dt_ontruck {
	border-left-color: #818cf8;
}
[data-theme="dark"] .addr-card.dt_sales {
	border-left-color: #fbbf24;
}
[data-theme="dark"] .addr-card .addr-label { color: #64748b; }
[data-theme="dark"] .addr-card .addr-value { color: #e2e8f0; }
[data-theme="dark"] .addr-card .addr-value i { color: #4a9eff; }
[data-theme="dark"] .addr-card .addr-detail { color: #94a3b8; }
[data-theme="dark"] .addr-card .addr-paid {
	background: rgba(34,197,94,0.1);
	border-color: rgba(34,197,94,0.2);
	color: #4ade80;
}

/* QC Signature box */
[data-theme="dark"] div#sig_box {
	border-color: #344058;
	background-color: #1f293c;
}

/* QC Load status (dark) */
[data-theme="dark"] div.prod.load_done {
	border-color: #22c55e;
	background-color: rgba(34,197,94,0.12);
}
[data-theme="dark"] div.prod.load_half {
	border-color: #eab308;
	background-color: rgba(234,179,8,0.12);
}
[data-theme="dark"] div.prod.load_error {
	border-color: #ef4444;
	background-color: rgba(239,68,68,0.15);
}

/* QC Banned products */
[data-theme="dark"] div.prod.dt_ban div.qc_name { color: #64748b; }

/* QC Theme toggle dropdown */
[data-theme="dark"] .qc-header__right .theme-dropdown {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .qc-header__right .theme-dropdown-item:hover {
	background: #263048;
}

/* QC Sub-items */
[data-theme="dark"] div.q_sub_item {
	border-color: #344058;
	color: #e2e8f0;
}

/* QC Loader */
[data-theme="dark"] .qc-loader span { color: #64748b; }
[data-theme="dark"] .qc-loader-spinner {
	border-color: #344058;
	border-top-color: #4a9eff;
}

/* ================================================================
   FORKLIFT — Dark Mode
   ================================================================ */

/* Fork qty badge */
[data-theme="dark"] div.fork_qty {
	background: linear-gradient(135deg, #0c3d6e 0%, #2563eb 100%);
	box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
[data-theme="dark"] div.fork_qty.back_order {
	background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
	box-shadow: 0 2px 6px rgba(220,38,38,0.3);
}

/* Fork loaded badge */
[data-theme="dark"] div.fork_loaded {
	background: linear-gradient(135deg, #665000 0%, #ca8a04 100%);
	box-shadow: 0 2px 6px rgba(202,138,4,0.3);
}

/* Fork ops table */
[data-theme="dark"] table.fork_ops {
	background-color: #182132;
	border-color: #344058;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Fork check checkbox */
[data-theme="dark"] div.fork_check input[type=checkbox] {
	accent-color: #4a9eff;
}
[data-theme="dark"] div.fork_check:hover {
	background-color: rgba(74,158,255,0.08);
	box-shadow: 0 0 0 4px rgba(74,158,255,0.06);
}
[data-theme="dark"] div.fork_check:has(input:checked) {
	background-color: rgba(74,158,255,0.1);
	box-shadow: 0 0 0 6px rgba(74,158,255,0.08);
}

/* Fork check select */
[data-theme="dark"] select[name=fork_check] {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='14' viewBox='0 0 29 14' width='29'><path fill='%2394a3b8' d='M9.37727 3.625l5.08154 6.93523L19.54036 3.625'/></svg>");
}
[data-theme="dark"] select[name=fork_check]:focus {
	border-color: #4a9eff;
}

/* Fork menu button */
[data-theme="dark"] div.fork_prod button.f_menu {
	color: #4a9eff;
}
[data-theme="dark"] div.fork_prod button.f_menu:hover {
	background: rgba(74,158,255,0.1);
}

/* Fork unable button */
[data-theme="dark"] button.unable {
	background-color: #991b1b;
	border-color: #991b1b;
}

/* Backorder products */
[data-theme="dark"] div.prod.fork_prod.bo_prod {
	border-color: #dc2626;
}
[data-theme="dark"] div.prod.fork_prod.bo_prod button {
	background-color: #991b1b;
	border-color: #991b1b;
}

/* Banned fork qty */
[data-theme="dark"] div.prod.dt_ban div.fork_qty {
	background: rgba(74,158,255,0.25);
}

/* Forklift product name + sub-text */
[data-theme="dark"] div.qc_name.fork_name {
	color: #f1f5f9;
}
[data-theme="dark"] span.item_weight, [data-theme="dark"] span.item_plant {
	color: #94a3b8;
}
[data-theme="dark"] span.item_weight i, [data-theme="dark"] span.item_plant i {
	color: #64748b;
}

/* Delivery-component rows */
[data-theme="dark"] div.prod.dtc_prod div.qc_name.fork_name {
	color: #cbd5e1;
}
[data-theme="dark"] div.prod.dtc_prod div.fork_qty {
	background: linear-gradient(135deg, #2a3f55 0%, #3e5c7d 100%);
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
[data-theme="dark"] span.dtc_tag {
	background: rgba(74,158,255,0.18);
	color: #7cb6ff;
}
[data-theme="dark"] span.dtc_tag.optional {
	background: rgba(245,158,11,0.16);
	color: #fbbf24;
}
[data-theme="dark"] span.dtc_state {
	background: #1f293c;
	color: #94a3b8;
	border-color: #344058;
}
[data-theme="dark"] span.dtc_state.taking {
	background: rgba(34,197,94,0.14);
	color: #4ade80;
	border-color: rgba(34,197,94,0.35);
}
[data-theme="dark"] div.prod.dtc_prod div.fork_qty {
	background: transparent;
	border: 1px solid rgba(124,182,255,0.4);
	color: #7cb6ff;
	box-shadow: none;
}
[data-theme="dark"] div.prod.dtc_prod div.dtc_connector::before {
	border-left-color: #4a5568;
	border-bottom-color: #4a5568;
}
[data-theme="dark"] div.prod.dtc_prod.dtc_sub {
	background: #1c2536;
}
[data-theme="dark"] div.dtc_opt_section { border-top-color: #344058; }
[data-theme="dark"] div.dtc_opt_section .dtc_opt_head { color: #cbd5e1; }
[data-theme="dark"] div.qc_add div.dtc_opt_row { border-color: #344058; color: #cbd5e1; }
[data-theme="dark"] div.qc_add div.dtc_opt_row label.dtc_opt_takewrap { color: #cbd5e1; }
[data-theme="dark"] div.qc_add div.dtc_opt_row span.dtc_opt_name { color: #cbd5e1; }
[data-theme="dark"] div.qc_add div.dtc_opt_row span.dtc_opt_bullet { color: #64748b; }
[data-theme="dark"] div.qc_add div.dtc_opt_row button.dtc_row_step {
	background: #1f293c;
	border-color: #344058;
	color: #7cb6ff;
}
[data-theme="dark"] div.qc_add div.dtc_opt_row input.dtc_row_qty {
	background: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
/* MOH label text */
[data-theme="dark"] div.is_moh {
	color: #60a5fa;
}

/* Scanner icon (inline color:#003366 needs !important override) */
[data-theme="dark"] div.fork_prod i.fa-scanner {
	color: #60a5fa !important;
}
[data-theme="dark"] div.fork_prod .fa-stack i.fa-scanner {
	color: #e2e8f0 !important;
}
[data-theme="dark"] div.fork_prod .fa-stack i.fa-slash {
	color: #ef4444 !important;
}

/* No-QR button */
[data-theme="dark"] div.fork_prod.no_qr button.qr_button,
[data-theme="dark"] button.qr_button.no_qr {
	background-color: #991b1b;
	border-color: #991b1b;
}

/* Include-seconds button */
[data-theme="dark"] button.sec_button.inc_seconds {
	background-color: #991b1b;
	border-color: #991b1b;
}

/* Banned/disabled product name */
[data-theme="dark"] div.prod.dt_ban div.qc_name {
	color: #64748b;
}

/* Ticket type banner */
[data-theme="dark"] .return-ticket-bar {
	background-color: rgba(74,158,255,0.08);
	border-color: rgba(74,158,255,0.25);
	box-shadow: 0 2px 8px rgba(0,0,0,0.18);
	color: #4a9eff;
}
[data-theme="dark"] .return-ticket-bar::after {
	background: linear-gradient(110deg, transparent 30%, rgba(74,158,255,0.12) 50%, transparent 70%);
}
[data-theme="dark"] .return-ticket-bar::before {
	background:
		radial-gradient(circle 400px, rgba(74,158,255,0.07) 0%, transparent 60%),
		radial-gradient(circle 350px, rgba(37,99,235,0.05) 0%, transparent 60%);
	background-size: 800px 800px, 700px 700px;
}

/* Ticket notes */
[data-theme="dark"] div.ticket_notes {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div.ticket_notes .tn-label {
	color: #64748b;
}
[data-theme="dark"] div.ticket_notes .tn-label i {
	color: #4a9eff;
}
[data-theme="dark"] div.ticket_notes textarea {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.ticket_notes textarea:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.1);
	background-color: #1f293c;
}
[data-theme="dark"] div.ticket_notes {
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Forklift empty state (dark) */
[data-theme="dark"] .fork-empty-state { color: #344058; }
[data-theme="dark"] .fork-empty-state > span { color: #64748b; }
[data-theme="dark"] .fork-empty-state::before {
	background:
		radial-gradient(circle 400px, rgba(74,158,255,0.06) 0%, transparent 60%),
		radial-gradient(circle 350px, rgba(37,99,235,0.04) 0%, transparent 60%);
	background-size: 800px 800px, 700px 700px;
}

/* ================================================================
   DRIVER — Dark Mode
   ================================================================ */

/* Delivery tickets */
[data-theme="dark"] div.dr_tic, [data-theme="dark"] div.dr_task {
	background-color: rgba(74,158,255,0.08);
	border-color: #344058;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
[data-theme="dark"] div.dr_tic:hover, [data-theme="dark"] div.dr_task:hover {
	box-shadow: 0 4px 12px rgba(74,158,255,0.15);
	border-color: rgba(74,158,255,0.35);
}
[data-theme="dark"] div.dr_tic.selected {
	background-color: rgba(74,158,255,0.15);
	border-color: rgba(74,158,255,0.4);
}
[data-theme="dark"] div.dr_tic.selected.active, [data-theme="dark"] div.dr_tic.active {
	background-color: rgba(34,197,94,0.12);
	border-color: rgba(34,197,94,0.35);
}
[data-theme="dark"] div.dr_tic.complete, [data-theme="dark"] div.dr_task.complete {
	background-color: rgba(100,116,139,0.1);
	border-color: rgba(100,116,139,0.25);
	color: #94a3b8;
}
[data-theme="dark"] div.dr_tic.complete:hover, [data-theme="dark"] div.dr_task.complete:hover {
	background-color: rgba(34,197,94,0.1);
	border-color: rgba(34,197,94,0.25);
}
[data-theme="dark"] div.dr_task {
	background-color: rgba(245,158,11,0.08);
	border-color: rgba(245,158,11,0.2);
}

/* Driver progress table */
[data-theme="dark"] div.dr_progress th {
	color: #cbd5e1;
	border-color: #344058;
}
[data-theme="dark"] span.loc-status {
	color: #4a9eff;
}
[data-theme="dark"] div.dr_progress td {
	border-color: #344058;
}

/* Directions container */
[data-theme="dark"] div#dir_cont {
	background-color: #182132;
	border-color: #344058;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* Directions distance */
[data-theme="dark"] div.dir_dist {
	background-color: transparent;
	color: #4a9eff;
}

/* Directions box */
[data-theme="dark"] div#dir_box {
	background: linear-gradient(135deg, #0c3d6e 0%, #1d4ed8 100%);
}

/* Signature box */
[data-theme="dark"] div#sig_box {
	border-color: #344058;
	background-color: #1f293c;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* Customer name input */
[data-theme="dark"] div#name_box input {
	color: #e2e8f0;
	background-color: #1f293c;
	border-color: #344058;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.12);
}
[data-theme="dark"] div#name_box input:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.15), inset 0 1px 2px rgba(0,0,0,0.12);
}
[data-theme="dark"] div#name_box input::placeholder {
	color: #64748b;
}

/* Customer title */
[data-theme="dark"] div.cus_title {
	color: #cbd5e1;
}

/* Bypass label */
[data-theme="dark"] .bypass-label {
	color: #94a3b8;
}
[data-theme="dark"] .bypass-label input[type=checkbox] {
	accent-color: #4a9eff;
}

/* Check list products */
[data-theme="dark"] div#check_list div.fork_prod {
	border-color: #344058;
}
[data-theme="dark"] div#check_list div.fork_prod:hover {
	border-color: #344058;
	box-shadow: none;
}

/* Cus sign container */
[data-theme="dark"] div.row.buttons.cus_sign {
	background-color: transparent;
}

/* Greeting text */
[data-theme="dark"] div.dr_greeting, [data-theme="dark"] div.dr_tic span, [data-theme="dark"] div.dr_task span {
	color: #e2e8f0;
}

/* Driver action button containers — no frosted bg */
[data-theme="dark"] div.row.buttons:has(.finish_load),
[data-theme="dark"] div.row.buttons.dr_progress,
[data-theme="dark"] div.row.buttons.cus_sign {
	background: transparent;
	box-shadow: none;
	border-bottom-color: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
/* Driver action buttons */
[data-theme="dark"] .row.buttons button.button[name=arrive_check],
[data-theme="dark"] .row.buttons button.button[name=dr_check],
[data-theme="dark"] .row.buttons button.button[name=st_task],
[data-theme="dark"] .row.buttons button.button[name=dr_return],
[data-theme="dark"] .row.buttons button.button[name=cus_check] {
	color: #4a9eff;
	border-color: #344058;
	background-color: transparent;
}
[data-theme="dark"] .row.buttons button.button[name=arrive_check]:hover,
[data-theme="dark"] .row.buttons button.button[name=dr_check]:hover,
[data-theme="dark"] .row.buttons button.button[name=st_task]:hover,
[data-theme="dark"] .row.buttons button.button[name=dr_return]:hover,
[data-theme="dark"] .row.buttons button.button[name=cus_check]:hover {
	border-color: #4a9eff;
	background-color: #131b2e;
}
[data-theme="dark"] .row.buttons button.button[name=arrive_check] i,
[data-theme="dark"] .row.buttons button.button[name=dr_check] i,
[data-theme="dark"] .row.buttons button.button[name=st_task] i,
[data-theme="dark"] .row.buttons button.button[name=dr_return] i,
[data-theme="dark"] .row.buttons button.button[name=cus_check] i {
	color: #4a9eff;
}

/* Driver map sections */
[data-theme="dark"] div#dr_map.row {
	background: transparent;
}
[data-theme="dark"] div#dr_map.row div.dt_customer.column {
	background: transparent;
}
[data-theme="dark"] div#dr_map.row div.dt_shipto.column {
	background: transparent;
}

/* ================================================================
   TICKET PHOTOS MODAL — Dark Mode
   ================================================================ */

/* Modal chrome */
.photo-modal[data-theme="dark"] .jBox-title,
[data-theme="dark"] .photo-modal .jBox-title {
	background-color: #151e30;
	color: #e2e8f0;
	border-bottom-color: #263048;
}

/* Upload zone */
[data-theme="dark"] div.photo-upload-zone {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.photo-upload-zone:hover {
	border-color: rgba(74,158,255,0.4);
	background-color: rgba(74,158,255,0.06);
}
[data-theme="dark"] div.photo-upload-zone.dragover {
	border-color: #4a9eff;
	background-color: rgba(74,158,255,0.1);
}
[data-theme="dark"] div.photo-upload-zone i.upload-icon {
	color: #64748b;
}
[data-theme="dark"] div.photo-upload-zone:hover i.upload-icon {
	color: #4a9eff;
}
[data-theme="dark"] div.photo-upload-zone .upload-text {
	color: #94a3b8;
}
[data-theme="dark"] div.photo-upload-zone .upload-text strong {
	color: #4a9eff;
}
[data-theme="dark"] div.photo-upload-zone .upload-hint {
	color: #64748b;
}

/* Upload button */
[data-theme="dark"] button.photo-upload-btn {
	background: #2563eb;
	box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}
[data-theme="dark"] button.photo-upload-btn:hover {
	background: #1d4ed8;
	box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

/* Take Photo divider + secondary Upload (dark) */
[data-theme="dark"] .photo-or-divider {
	color: #64748b;
}
[data-theme="dark"] .photo-or-divider::before,
[data-theme="dark"] .photo-or-divider::after {
	background: #334155;
}
[data-theme="dark"] button.photo-upload-btn.photo-upload-btn--secondary {
	background: #1e293b;
	color: #93c5fd;
	border: 1px solid #334155;
	box-shadow: none;
}
[data-theme="dark"] button.photo-upload-btn.photo-upload-btn--secondary:hover {
	background: #273449;
	box-shadow: none;
}

/* Photos container */
[data-theme="dark"] div.photos_container div.photo {
	background-color: #1f293c;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
[data-theme="dark"] div.photos_container div.photo:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Photo overlay */
[data-theme="dark"] div.photos_container div.photo_ops {
	background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.0) 100%);
}

/* Status indicators */
[data-theme="dark"] div.photo-status.status-offline {
	background-color: rgba(245,158,11,0.1);
	border-color: rgba(245,158,11,0.25);
	color: #fbbf24;
}
[data-theme="dark"] div.photo-status.status-pending {
	background-color: rgba(74,158,255,0.08);
	border-color: rgba(74,158,255,0.2);
	color: #4a9eff;
}
[data-theme="dark"] div.photo-status.status-saved {
	background-color: rgba(34,197,94,0.1);
	border-color: rgba(34,197,94,0.2);
	color: #4ade80;
}

/* File name tags */
[data-theme="dark"] div.photo-file-names {
	color: #94a3b8;
}
[data-theme="dark"] div.photo-file-names span {
	background-color: #263048;
}

/* ================================================================
   DARK MODE — Delivery panel (tickets, table, shipment bar)
   ================================================================ */
/* Generated ticket cards */
[data-theme="dark"] div.dt_old div.past_ticket {
	background-color: #182132;
	border-color: #344058;
	border-left-color: #10b981;
	box-shadow: 0 1px 3px rgba(0,0,0,0.20);
}
[data-theme="dark"] div.dt_old div.past_ticket.ret_pending {
	border-left-color: #f59e0b;
}
[data-theme="dark"] div.dt_old div.past_ticket.closed {
	border-left-color: #64748b;
}
[data-theme="dark"] div.dt_old div.past_ticket.pending {
	border-left-color: #3b82f6;
}
[data-theme="dark"] div.dt_old div.past_ticket:hover {
	background-color: #1f293c;
	box-shadow: 0 4px 12px rgba(0,0,0,0.30);
}
[data-theme="dark"] div.dt_old div.past_ticket .t_icon i,
[data-theme="dark"] div.dt_old div.past_ticket .t_icon b,
[data-theme="dark"] div.dt_old div.past_ticket .t_user,
[data-theme="dark"] div.dt_old div.past_ticket .t_date {
	color: #cbd5e1;
}
[data-theme="dark"] div.dt_old div.past_ticket .t_user i,
[data-theme="dark"] div.dt_old div.past_ticket .t_date i {
	color: #64748b;
}
[data-theme="dark"] div.dt_old div.past_ticket .t_actions i {
	color: #94a3b8 !important;
}
[data-theme="dark"] div.dt_old div.past_ticket .t_actions i.delete_hover:hover {
	color: #f87171 !important;
}
[data-theme="dark"] div.dt_old div.past_ticket .t_actions i:not(.delete_hover):hover {
	color: #e2e8f0 !important;
}
[data-theme="dark"] .dt_old_label {
	color: #64748b;
}

/* Shipment summary bar (tfoot) */
[data-theme="dark"] table#dt_table tfoot tr td {
	background-color: #182132;
	border-top-color: #344058;
	color: #e2e8f0;
}

/* Delivery table — regular line items */
[data-theme="dark"] table#dt_table tr.cd0 td {
	background-color: transparent;
}
[data-theme="dark"] table#dt_table tr.cd1 td {
	background-color: rgba(255,255,255,0.02);
}
[data-theme="dark"] table#dt_table tr.cd0 td,
[data-theme="dark"] table#dt_table tr.cd1 td {
	color: #e2e8f0;
	border-bottom: 1px solid #1f293c;
}
[data-theme="dark"] table#dt_table tr.cd0 td.dt_inv,
[data-theme="dark"] table#dt_table tr.cd1 td.dt_inv,
[data-theme="dark"] table#dt_table tr.cd0.moh td,
[data-theme="dark"] table#dt_table tr.cd1.moh td {
	background-color: rgba(74,158,255,0.08);
}

/* Delivery table — group/structure rows */
[data-theme="dark"] table#dt_table tr.grp {
	background-color: rgba(16,185,129,0.10);
}
[data-theme="dark"] table#dt_table tr.grp.cd1 {
	background-color: rgba(16,185,129,0.06);
}
[data-theme="dark"] table#dt_table tr.grp_head {
	background-color: rgba(16,185,129,0.16);
}
[data-theme="dark"] table#dt_table tr.grp td,
[data-theme="dark"] table#dt_table tr.grp_head td {
	color: #e2e8f0;
	border-bottom: 1px solid rgba(16,185,129,0.12);
}
[data-theme="dark"] table#dt_table tr.grp_head td {
	font-weight: 600;
}

/* Delivery table — returned rows */
[data-theme="dark"] table#dt_table tr.returned td {
	color: #94a3b8;
	text-decoration: line-through;
	text-decoration-color: #475569;
}

/* Delivery table — selected rows */
[data-theme="dark"] table#dt_table tr.grp.selected td,
[data-theme="dark"] table#dt_table tr.grp_head.selected td {
	background-color: rgba(74,158,255,0.15);
}

/* Delivery table — header row */
[data-theme="dark"] table#dt_table tr.main td {
	background-color: #182132;
	border-bottom: 1px solid #344058;
	color: #94a3b8;
}

/* Delivery table — ship qty select/input */
[data-theme="dark"] select.dt_qty {
	background-color: #1f293c;
	border: 1px solid #344058;
	color: #4a9eff;
}
[data-theme="dark"] input.dt_qty {
	color: #4a9eff;
}

/* Delivery loading spinner */
[data-theme="dark"] div.loading_dlv span {
	color: #64748b;
}
[data-theme="dark"] div.loading_dlv_spinner {
	border-color: #344058;
	border-top-color: #4a9eff;
}
/* Delivery buttons bar */
[data-theme="dark"] div#dt_buttons {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div#dt_buttons button {
	background-color: #1f293c !important;
	border-color: #344058 !important;
	color: #cbd5e1 !important;
}
[data-theme="dark"] div#dt_buttons button:hover {
	background-color: rgba(74,158,255,0.10) !important;
	border-color: rgba(74,158,255,0.3) !important;
	color: #4a9eff !important;
}
[data-theme="dark"] div#dt_buttons button[name=dt_gen] {
	background-color: #059669 !important;
	border-color: #059669 !important;
	color: #fff !important;
}
[data-theme="dark"] div#dt_buttons button[name=dt_gen]:hover {
	background-color: #047857 !important;
	border-color: #047857 !important;
	color: #fff !important;
}
[data-theme="dark"] div#dt_buttons button[name=dt_save] {
	background-color: #0d9488 !important;
	border-color: #0d9488 !important;
	color: #fff !important;
}
[data-theme="dark"] div#dt_buttons button[name=dt_save]:hover {
	background-color: #0f766e !important;
	border-color: #0f766e !important;
}

/* Delivery form — filter-group fields dark mode */
[data-theme="dark"] div.dt_form .dt_field {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.dt_form .dt_field:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74,158,255,0.15);
}
[data-theme="dark"] div.dt_form .dt_field[data-label]::before {
	background-color: #1f293c;
	color: #94a3b8;
}
[data-theme="dark"] div.dt_form .dt_field input,
[data-theme="dark"] div.dt_form .dt_field select,
[data-theme="dark"] div.dt_form .dt_field_ta textarea {
	color: #e2e8f0;
}
[data-theme="dark"] div.dt_form .dt_field_ta textarea::placeholder {
	color: #64748b;
}
[data-theme="dark"] .dt_copy_notes {
	background-color: #1f293c;
	color: #4a9eff;
}
[data-theme="dark"] .dt_copy_notes:hover {
	color: #93c5fd;
}
[data-theme="dark"] div.dt_form .dt_field select option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] label.dt_pill {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] label.dt_pill::before {
	border-color: #4a5568;
}
[data-theme="dark"] label.dt_pill:hover {
	background-color: #263048;
	border-color: #4a9eff;
	color: #f1f5f9;
}
[data-theme="dark"] label.dt_pill:hover::before {
	border-color: #4a9eff;
}
[data-theme="dark"] label.dt_pill:has(input:checked) {
	background-color: #1e63b5;
	border-color: #1e63b5;
	color: #fff;
}
[data-theme="dark"] label.dt_pill:has(input:checked):hover {
	background-color: #1d6ad6;
	border-color: #1d6ad6;
	color: #fff;
}
[data-theme="dark"] label.dt_pill:has(input:checked)::before {
	background: #fff;
	border-color: #fff;
	color: #1e63b5;
}
[data-theme="dark"] label.dt_pill.dt_pill_print:has(input:checked) {
	background-color: #047857;
	border-color: #047857;
	color: #fff;
}
[data-theme="dark"] label.dt_pill.dt_pill_print:has(input:checked):hover {
	background-color: #065f46;
	border-color: #065f46;
	color: #fff;
}
[data-theme="dark"] label.dt_pill.dt_pill_print:has(input:checked)::before {
	color: #1e63b5;
}
[data-theme="dark"] .dt_toggle_label {
	color: #64748b;
}
[data-theme="dark"] span.dt_sep {
	color: #64748b;
}

/* Ticket search, per-page, pagination */
[data-theme="dark"] input.dt_tick_filter,
[data-theme="dark"] select.dt_tpp,
[data-theme="dark"] select.dt_type_filter,
[data-theme="dark"] select.dt_status_filter {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] select.dt_tpp option,
[data-theme="dark"] select.dt_type_filter option,
[data-theme="dark"] select.dt_status_filter option {
	background-color: #1f293c;
	color: #e2e8f0;
}
[data-theme="dark"] input.dt_tick_filter::placeholder {
	color: #64748b;
}
[data-theme="dark"] input.dt_tick_filter:focus {
	border-color: #4a9eff;
}
[data-theme="dark"] .dt_search_wrap i {
	color: #64748b;
}
[data-theme="dark"] span.dt_pg_btn {
	color: #4a9eff;
}
[data-theme="dark"] span.dt_pg_btn:hover {
	background: rgba(74,158,255,0.10);
}
[data-theme="dark"] span.dt_pg_info {
	color: #94a3b8;
}

/* Selected order row in left list */
[data-theme="dark"] tr.selected td {
	background-color: rgba(74,158,255,0.15) !important;
}

/* ================================================================
   DARK MODE — Datepicker prev/next arrows (sprite fix)
   ================================================================ */
[data-theme="dark"] .ui-datepicker .ui-datepicker-prev .ui-icon,
[data-theme="dark"] .ui-datepicker .ui-datepicker-next .ui-icon {
	background-image: url(ui-lightness/images/ui-icons_ffffff_256x240.png) !important;
}

/* ================================================================
   STRUCTURE / GROUP EXPANSION AREA (#tr_pdrw, grp_table, prd_details)
   ================================================================ */
/* Expanded detail row background — navy surface */
[data-theme="dark"] .buffer,
[data-theme="dark"] #tr_pdrw {
	background-color: #182132 !important;
	background-image: none;
}
[data-theme="dark"] tr.buf_prd,
[data-theme="dark"] #tr_pdrw.buf_prd {
	background-color: rgba(180, 150, 50, 0.1) !important;
}
/* Vertical separator bar */
[data-theme="dark"] #tr_pdrw hr {
	background: #344058;
}
/* Action buttons (Add Grouped Products, Stack Structure, Notes, etc.) */
[data-theme="dark"] #tr_pdrw .prd_details,
[data-theme="dark"] #tr_pdrw .prd_group,
[data-theme="dark"] #tr_pdrw .prdi_items,
[data-theme="dark"] #tr_pdrw #dropzone,
[data-theme="dark"] #tr_pdrw .wzone {
	background-color: #1f293c;
	border-color: #344058;
	color: #cbd5e1;
}
[data-theme="dark"] #tr_pdrw .prd_details:hover,
[data-theme="dark"] #tr_pdrw .prd_group:hover,
[data-theme="dark"] #tr_pdrw .prdi_items:hover,
[data-theme="dark"] #tr_pdrw #dropzone:hover,
[data-theme="dark"] #tr_pdrw .wzone:hover {
	background-color: #263048;
	border-color: #4a5568;
	color: #e2e8f0;
}
/* Icon color inside action buttons */
[data-theme="dark"] #tr_pdrw .prd_details i,
[data-theme="dark"] #tr_pdrw .prd_group i,
[data-theme="dark"] #tr_pdrw .prdi_items i,
[data-theme="dark"] #tr_pdrw #dropzone i,
[data-theme="dark"] #tr_pdrw .wzone i {
	color: #94a3b8 !important;
}
[data-theme="dark"] #tr_pdrw .prd_details:hover i,
[data-theme="dark"] #tr_pdrw .prd_group:hover i,
[data-theme="dark"] #tr_pdrw .prdi_items:hover i,
[data-theme="dark"] #tr_pdrw #dropzone:hover i,
[data-theme="dark"] #tr_pdrw .wzone:hover i {
	color: #e2e8f0 !important;
}
/* SVG icons inside action buttons */
[data-theme="dark"] #tr_pdrw .prd_details svg path,
[data-theme="dark"] #tr_pdrw .prd_group svg path,
[data-theme="dark"] #tr_pdrw .prdi_items svg path {
	fill: #94a3b8;
}
[data-theme="dark"] #tr_pdrw .prd_details:hover svg path,
[data-theme="dark"] #tr_pdrw .prd_group:hover svg path,
[data-theme="dark"] #tr_pdrw .prdi_items:hover svg path {
	fill: #e2e8f0;
}
/* Text spans inside action buttons */
[data-theme="dark"] #tr_pdrw .prd_details span,
[data-theme="dark"] #tr_pdrw .prd_group span,
[data-theme="dark"] #tr_pdrw .prdi_items span {
	color: #cbd5e1;
}
[data-theme="dark"] #tr_pdrw .prd_details:hover span,
[data-theme="dark"] #tr_pdrw .prd_group:hover span,
[data-theme="dark"] #tr_pdrw .prdi_items:hover span {
	color: #e2e8f0;
}
/* Disabled state */
[data-theme="dark"] #tr_pdrw .wdisabled {
	background-color: #141c2b !important;
	border-color: #263048 !important;
	color: #475569 !important;
	opacity: 0.5;
	filter: grayscale(0.5);
}
[data-theme="dark"] #tr_pdrw .wdisabled i {
	color: #475569 !important;
}
[data-theme="dark"] #tr_pdrw .wdisabled span {
	color: #475569 !important;
}
[data-theme="dark"] #tr_pdrw div.wdisabled:hover {
	background-color: #141c2b !important;
	border-color: #263048 !important;
	box-shadow: none !important;
}
/* Inputs & selects inside action buttons */
[data-theme="dark"] #tr_pdrw .prd_details input,
[data-theme="dark"] #tr_pdrw .prd_details select,
[data-theme="dark"] #tr_pdrw .prdi_items input,
[data-theme="dark"] #tr_pdrw .prdi_items select {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] #tr_pdrw .prd_details select,
[data-theme="dark"] #tr_pdrw .prdi_items select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
[data-theme="dark"] #tr_pdrw .prd_details input:focus,
[data-theme="dark"] #tr_pdrw .prd_details select:focus,
[data-theme="dark"] #tr_pdrw .prdi_items input:focus,
[data-theme="dark"] #tr_pdrw .prdi_items select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

/* --- Grouped Items Table (#grp_table) --- */
[data-theme="dark"] table#grp_table {
	color: #e2e8f0;
}
[data-theme="dark"] td.grp_table_head {
	background-color: #182132;
	color: #94a3b8;
	border-bottom-color: #263048;
}
[data-theme="dark"] table#grp_table thead td span.grp_items {
	color: #94a3b8;
}
[data-theme="dark"] table#grp_table thead td i {
	color: #94a3b8 !important;
}
[data-theme="dark"] table#grp_table thead td i:hover {
	background-color: rgba(74, 158, 255, 0.12) !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] table#grp_table thead td i.fa-check:hover {
	background-color: rgba(34, 197, 94, 0.15) !important;
	color: #4ade80 !important;
}
[data-theme="dark"] div.grp_items {
	border-color: #263048;
}
[data-theme="dark"] table#grp_table tbody td {
	color: #e2e8f0;
	border-bottom: none;
}
[data-theme="dark"] table#grp_table tbody tr:nth-child(even) {
	background-color: #192438;
}
[data-theme="dark"] table#grp_table tbody tr:hover {
	background-color: #1f2d45;
}
[data-theme="dark"] table#grp_table input.no_style {
	color: #e2e8f0;
}
[data-theme="dark"] table#grp_table input.prd_qty {
	color: #e2e8f0;
	background-color: transparent;
	border-color: #344058;
}
[data-theme="dark"] table#grp_table i.delete_hover {
	color: #f87171;
}
[data-theme="dark"] table#grp_table i.recode_hover {
	color: #94a3b8;
}
[data-theme="dark"] table#grp_table tbody tr::before {
	background-image: radial-gradient(circle, #475569 1px, transparent 1px);
}

/* --- Add Grouped Product search panel (div.grp_find) --- */
[data-theme="dark"] div.grp_find {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] div.grp_find_header {
	background-color: #1f293c;
	border-bottom-color: #344058;
}
[data-theme="dark"] span.grp_find_label {
	color: #94a3b8;
}
[data-theme="dark"] i.grp_find_icon {
	color: #64748b;
}
[data-theme="dark"] input.grp_find_input {
	background-color: #0e1525;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] input.grp_find_input:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
/* Search results inside grp_find */
[data-theme="dark"] div.grp_find div.psrch_res {
	border-top-color: #344058;
}
[data-theme="dark"] div.grp_find span.srch_gr {
	color: #cbd5e1;
}
[data-theme="dark"] div.grp_find span.srch_gr:hover {
	background-color: #263048;
	border-color: #4a9eff;
}
[data-theme="dark"] div.qoh {
	color: #94a3b8;
}

/* --- Product notes textarea (div.pr_notes) --- */
[data-theme="dark"] div.pr_notes textarea {
	background-color: #1f293c;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] div.pr_notes textarea:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

/* --- Dropzone draw area --- */
[data-theme="dark"] #tr_pdrw div.prd_draw {
	color: #e2e8f0;
}
[data-theme="dark"] #tr_pdrw span.draw_ops i {
	color: #94a3b8;
}
[data-theme="dark"] #tr_pdrw span.draw_ops i.delete_hover:hover {
	color: #f87171;
}
[data-theme="dark"] #tr_pdrw span.draw_ops i.sort_ar:hover {
	color: #e2e8f0;
}
/* Dark-mode chrome for the Split pill now flows from the shared
   `[data-theme="dark"] .sch-pill` rules in style.css (~line 23160+).
   Legacy `label.draw_split_pill` selectors were higher-specificity
   and would have shadowed the sch-pill dark-mode look; kept as a
   no-op for diff stability. */
[data-theme="dark"] label.draw_split_pill { /* see [data-theme="dark"] .sch-pill */ }
/* Dropzone upload progress bar */
[data-theme="dark"] #tr_pdrw #dropzone div.progress {
	background: rgba(255,255,255,0.06);
}
/* Drag-hover state */
[data-theme="dark"] #dropzone.hover {
	background-color: #1f293c !important;
	border-color: #4a9eff !important;
	color: #93c5fd !important;
	box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}
[data-theme="dark"] #dropzone.hover i {
	color: #93c5fd !important;
}

/* ── Delivery Row Dark Mode ── */
[data-theme="dark"] tr#delivery,
[data-theme="dark"] #delivery {
	background-color: #182132;
}
[data-theme="dark"] tr#delivery td,
[data-theme="dark"] tr#grp_delivery td {
	border-color: #263048;
}
[data-theme="dark"] tr#delivery div.deldiv i.dlv-icon,
[data-theme="dark"] #delivery div.deldiv i.dlv-icon,
[data-theme="dark"] tr#grp_delivery div.deldiv i.dlv-icon {
	color: #64748b;
}
[data-theme="dark"] tr#delivery div.deldiv.mileage i.dlv-icon,
[data-theme="dark"] #delivery div.deldiv.mileage i.dlv-icon,
[data-theme="dark"] tr#grp_delivery div.deldiv.mileage i.dlv-icon {
	color: #4a9eff;
}
[data-theme="dark"] span.dlv-label {
	color: #4a9eff;
}
[data-theme="dark"] tr#delivery span.delivery_title,
[data-theme="dark"] #delivery span.delivery_title,
[data-theme="dark"] tr#grp_delivery span.delivery_title {
	color: #e2e8f0;
}
[data-theme="dark"] span.dlv-sep {
	color: #344058;
}
[data-theme="dark"] tr#delivery div.deldiv select,
[data-theme="dark"] #delivery div.deldiv select,
[data-theme="dark"] tr#grp_delivery div.deldiv select {
	color: #e2e8f0;
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] tr#delivery div.deldiv select:focus,
[data-theme="dark"] #delivery div.deldiv select:focus,
[data-theme="dark"] tr#grp_delivery div.deldiv select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] div.dlv-rates-card {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] div.dlv-rate-row {
	color: #94a3b8;
}
[data-theme="dark"] span.dlv-rate-val {
	color: #e2e8f0;
}
[data-theme="dark"] div.dlv-rates-card input.no_style {
	color: #e2e8f0;
	background-color: transparent;
	border-color: transparent;
}
[data-theme="dark"] div.dlv-rates-card input.no_style:hover {
	background-color: rgba(255, 255, 255, 0.04);
	border-color: #344058;
}
[data-theme="dark"] div.dlv-rates-card input.no_style:focus {
	background-color: #1f293c;
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] div.dlv-rate-row.dlv-rate-total span.dlv-rate-val input.no_style {
	background-color: transparent;
	border-color: transparent;
	color: #f8fafc;
}
/* Surcharge pill — dark mode */
[data-theme="dark"] label.dlv-sur-pill {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] label.dlv-sur-pill .dlv-sur-pill-label {
	color: #64748b;
}
[data-theme="dark"] label.dlv-sur-pill.active {
	background-color: rgba(74, 158, 255, 0.1);
	border-color: rgba(74, 158, 255, 0.25);
}
[data-theme="dark"] label.dlv-sur-pill.active .dlv-sur-pill-label {
	color: #4a9eff;
}
[data-theme="dark"] label.dlv-sur-pill.active .dlv-sur-check {
	color: #4a9eff;
}
[data-theme="dark"] label.dlv-sur-pill:hover {
	border-color: #4a6a8a;
}
[data-theme="dark"] .dlv-dollar {
	color: #64748b;
}
/* Surcharge row — dark mode */
[data-theme="dark"] div.dlv-rate-row.dlv-rate-sur label:not(.dlv-sur-pill) {
	color: #94a3b8;
}
[data-theme="dark"] div.dlv-rate-divider {
	background-color: #344058;
}
[data-theme="dark"] div.dlv-rate-row.dlv-rate-total span.dlv-rate-label {
	color: #e2e8f0;
}
[data-theme="dark"] div.dlv-rate-row.dlv-rate-total span.dlv-rate-val {
	color: #f8fafc;
}
[data-theme="dark"] div.dlv-rate-row.dlv-rate-total span.dlv-rate-val input.no_style {
	color: #f8fafc;
}
[data-theme="dark"] div.dlv_order button {
	background-color: #4a9eff;
	border-color: #3b8ce6;
	color: #0e1525;
}
[data-theme="dark"] div.dlv_order button:hover {
	background-color: #5ca9ff;
}

/* Mobile invoice cards — dark mode */
@media (max-width: 69.999rem) {
	[data-theme="dark"] #inv_table .tbody .td.inv_num::before,
	[data-theme="dark"] #inv_table .tbody .td.inv_cn::before,
	[data-theme="dark"] #inv_table .tbody .td.inv_jn::before,
	[data-theme="dark"] #inv_table .tbody .td.inv_dd::before,
	[data-theme="dark"] #inv_table .tbody .td.inv_total::before {
		color: #64748b;
	}

	[data-theme="dark"] #inv_table .tbody .tr {
		background-color: #182132;
		border-color: #263048;
		box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	}

	[data-theme="dark"] #inv_table .tbody .td.inv_num { color: #e2e8f0; }
	[data-theme="dark"] #inv_table .tbody .td.inv_cn,
	[data-theme="dark"] #inv_table .tbody .td.inv_jn,
	[data-theme="dark"] #inv_table .tbody .td.inv_dd { color: #cbd5e1; }
	[data-theme="dark"] #inv_table .tbody .td.inv_total { color: #4a9eff; }

	[data-theme="dark"] #inv_table .tbody .tr.selected {
		border-left: 4px solid #4a9eff;
		background-color: rgba(74, 158, 255, 0.08);
		box-shadow: 0 4px 16px rgba(74,158,255,0.12);
	}

	[data-theme="dark"] #inv_table .tbody .td.inv_act {
		border-top-color: #263048;
	}

	[data-theme="dark"] .mobile-sel-bar {
		background: rgba(24, 33, 50, 0.92);
		border-top-color: #263048;
		color: #e2e8f0;
	}
	[data-theme="dark"] .mobile-sel-all {
		color: #cbd5e1;
	}
	[data-theme="dark"] .mobile-sel-count {
		color: #64748b;
	}
	[data-theme="dark"] .mobile-pay-sel {
		background: linear-gradient(135deg, #1a6fc9 0%, #4a9eff 100%);
		color: #fff;
	}

	[data-theme="dark"] #filter_toggle.active {
		color: #4a9eff;
		background-color: rgba(74, 158, 255, 0.12);
	}

	/* Pagination dark mode */
	[data-theme="dark"] #invoices_per_page_selector .pagination-select {
		background: #1f293c;
		border-color: #344058;
		color: #4a9eff;
	}
	[data-theme="dark"] #invoices_pagination .pagination-btn {
		color: #64748b;
	}
	[data-theme="dark"] #invoices_pagination .pagination-page {
		color: #94a3b8;
	}
	[data-theme="dark"] #invoices_pagination .pagination-page.active {
		color: #fff;
		background: linear-gradient(135deg, #1a6fc9 0%, #4a9eff 100%);
	}
}

/* ===== Order Items — Div-based Layout (oli-*) ===== */
/* Stats bar + pills */
[data-theme="dark"] .oli-stats-bar {
	background: linear-gradient(180deg, #182132 0%, #151d2e 100%);
	border-bottom-color: #344058;
	color: #94a3b8;
}
[data-theme="dark"] .oli-stat {
	background-color: rgba(31, 41, 60, 0.7);
	border-color: #344058;
	backdrop-filter: blur(4px);
}
[data-theme="dark"] .oli-stat-val {
	color: #e2e8f0;
}
[data-theme="dark"] .oli-stat-label {
	color: #64748b;
}
[data-theme="dark"] .oli-stat select.oli-load-select {
	color: #cbd5e1;
}
[data-theme="dark"] .oli-stat select.oli-load-select:focus {
	color: #4a9eff;
}
/* Bulk actions — the .oli-bulk-bar is now a fixed-position dark
   slate toast in BOTH light and dark modes (toast bars are
   conventionally dark for legibility against any page background),
   so no light/dark variants are needed here. The base styling in
   css/order-items.css covers both themes. */
/* Header */
[data-theme="dark"] .oli-header {
	background-color: transparent;
	border-bottom-color: #263048;
	color: #475569;
}
/* Items container gap color */
[data-theme="dark"] .oli-items {
	background-color: #0e1525;
}
/* Item rows */
[data-theme="dark"] div.line.oli-item {
	background-color: #182132;
}
[data-theme="dark"] div.line.oli-item:nth-child(even) {
	background-color: #151d2e;
}
[data-theme="dark"] div.line.oli-item:hover {
	background-color: #1c2840;
}
[data-theme="dark"] div.line.oli-item:nth-child(even):hover {
	background-color: #1c2840;
}
[data-theme="dark"] div.line.oli-item.buffer {
	background-color: #1a2540;
	box-shadow: inset 3px 0 0 #4a9eff;
}
/* All inputs — transparent by default in dark mode */
[data-theme="dark"] div.line.oli-item input.no_style,
[data-theme="dark"] div.line.oli-item div.pr_qty input {
	background-color: transparent;
	border-color: transparent;
	color: #e2e8f0;
}
[data-theme="dark"] div.line.oli-item input.no_style:hover,
[data-theme="dark"] div.line.oli-item div.pr_qty input:hover {
	background-color: #1f293c;
	border-color: #2d3a50;
}
[data-theme="dark"] div.line.oli-item input.no_style:focus,
[data-theme="dark"] div.line.oli-item div.pr_qty input:focus {
	border-color: #4a9eff;
	background-color: #263048;
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] div.line.oli-item input[readonly].no_style,
[data-theme="dark"] div.line.oli-item div.pr_qty input[readonly] {
	background-color: transparent;
	border-color: transparent;
}
/* Name field auto-grow <textarea> — dark counterpart of the input.no_style
   colors above (see order-items.css for the light + layout rules). */
[data-theme="dark"] #oli_items div.line.oli-item .oli-col-name .pr_name textarea.oli-name {
	background-color: transparent;
	border-color: transparent;
	color: #e2e8f0;
}
[data-theme="dark"] #oli_items div.line.oli-item .oli-col-name .pr_name textarea.oli-name:hover {
	background-color: #1f293c;
	border-color: #2d3a50;
}
[data-theme="dark"] #oli_items div.line.oli-item .oli-col-name .pr_name textarea.oli-name:focus {
	border-color: #4a9eff;
	background-color: #263048;
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] #oli_items div.line.oli-item .oli-col-name .pr_name textarea.oli-name[readonly] {
	background-color: transparent;
	border-color: transparent;
}
/* Hover tray — dark */
[data-theme="dark"] .oli-hover-tray {
	background: #1c2840;
	border-color: #344058;
	box-shadow: -3px 0 8px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] div.line.oli-item.oli-checked .oli-hover-tray {
	background: #1a2540;
	border-color: #263048;
}
[data-theme="dark"] .oli-hover-tray .oli-grip {
	color: #475569;
}
[data-theme="dark"] .oli-hover-tray .oli-grip:hover {
	color: #64748b;
}
[data-theme="dark"] .oli-hover-tray i.dup_hover,
[data-theme="dark"] .oli-hover-tray i.delete_hover {
	color: #64748b;
}
[data-theme="dark"] .oli-hover-tray i.dup_hover:hover {
	color: #4a9eff !important;
	background-color: rgba(74, 158, 255, 0.08);
}
[data-theme="dark"] .oli-hover-tray i.delete_hover:hover {
	color: #f87171 !important;
	background-color: rgba(248, 113, 113, 0.08);
}
/* Plant column grip dots — dark */
[data-theme="dark"] .oli-col-plant::after {
	background-image: radial-gradient(circle, #475569 1.2px, transparent 1.2px);
}
/* Price total — dark */
[data-theme="dark"] .oli-col-total .price_t {
	background-color: transparent;
}
[data-theme="dark"] .oli-col-total .price_t span.prc-s {
	color: #475569;
}
[data-theme="dark"] .oli-col-total .price_t span.prc-n {
	color: #f1f5f9;
}
/* Retail reprice spinner — dark: brand-blue glyph reads on the dark surface. */
[data-theme="dark"] .oli-col-total .price_t .reprice-spin {
	color: #7dd3fc;
}
/* Price each — dark: $ prefix */
[data-theme="dark"] .oli-col-each .price_e .prc-prefix {
	color: #475569;
}
[data-theme="dark"] .oli-col-each .price_e {
	color: #475569;
}
/* SortableJS — dark */
[data-theme="dark"] .sortable-ghost {
	background: rgba(74, 158, 255, 0.04) !important;
}
[data-theme="dark"] .sortable-drag {
	background: #1c2840 !important;
	box-shadow:
		0 12px 24px -4px rgba(0, 0, 0, 0.4),
		0 4px 8px -2px rgba(0, 0, 0, 0.3),
		0 0 0 1px rgba(74, 158, 255, 0.1) !important;
}
/* Checkbox — dark (inside hover tray) */
[data-theme="dark"] .oli-hover-tray .oli-check {
	background-color: #142036;
	border-color: rgba(74, 158, 255, 0.30);
}
[data-theme="dark"] .oli-hover-tray .oli-check:hover {
	border-color: #4a9eff;
}
[data-theme="dark"] .oli-hover-tray .oli-check:checked {
	background-color: #4a9eff;
	border-color: #4a9eff;
}
[data-theme="dark"] .oli-hover-tray .oli-check:focus-visible {
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.28);
}
/* Selected row — dark */
[data-theme="dark"] div.line.oli-item.oli-checked {
	background-color: #1a2540;
	border-bottom-color: #263048;
}
/* Footer */
[data-theme="dark"] .oli-footer {
	border-top-color: #344058;
}
[data-theme="dark"] .oli-footer-row {
	border-top-color: #344058;
}
/* Tax total — dark.
   No background fill; matches the light-mode treatment which is transparent. */
[data-theme="dark"] #tax .tax-total-cell .price_t span.prc-s {
	color: #475569;
}
[data-theme="dark"] #tax .tax-total-cell .price_t span.prc-n {
	color: #f1f5f9;
}
/* Detail panel */
[data-theme="dark"] .oli-detail-panel {
	background-color: #1a2438;
	border-bottom-color: #344058;
	box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
}
/* Sortable */
[data-theme="dark"] .sortable-ghost {
	background-color: rgba(74, 158, 255, 0.06) !important;
}
[data-theme="dark"] .sortable-drag {
	background-color: #182132 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 158, 255, 0.12) !important;
}
[data-theme="dark"] .sortable-chosen {
	background-color: rgba(74, 158, 255, 0.03) !important;
}
/* Calculating indicator — dark mode */
[data-theme="dark"] .oli-calculating::after {
	background-color: rgba(14, 21, 37, 0.45);
}
[data-theme="dark"] .oli-calculating .oli-col-expand::after {
	border-color: #344058;
	border-top-color: #4a9eff;
}
/* Undo toast — dark mode (already dark, just tweak) */
[data-theme="dark"] .oli-undo-toast {
	background: #0e1525;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(74, 158, 255, 0.1);
}
/* Ripple — dark mode */
[data-theme="dark"] .oli-check.oli-ripple::after {
	background: rgba(74, 158, 255, 0.2);
}
/* Delivery + LPB */
[data-theme="dark"] #delivery.oli-footer-row {
	background-color: #182132;
	border-top-color: #344058;
}
[data-theme="dark"] #delivery.dlv-card,
[data-theme="dark"] #grp_delivery.dlv-card {
	border-top-color: #344058;
	background:
		linear-gradient(135deg, rgba(74, 158, 255, 0.04) 0%, transparent 40%, rgba(74, 158, 255, 0.02) 100%),
		linear-gradient(90deg, transparent 0%, rgba(74, 158, 255, 0.04) 50%, transparent 100%),
		#182132;
	background-size: 100% 100%, 200% 100%, 100% 100%;
	animation: dlvCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, dlvShimmer 10s ease-in-out infinite;
}
[data-theme="dark"] #grp_delivery.dlv-card {
	border-top-color: #344058;
}
/* Delivery card — dark mode */
[data-theme="dark"] .dlv-truck-runner { color: #4a9eff; filter: none; }
[data-theme="dark"] .dlv-truck-runner.dlv-truck-arrived { color: #4a9eff; }
[data-theme="dark"] .dlv-distance .delivery_title { color: #4a9eff; }
[data-theme="dark"] .dlv-distance .dlv-loading-icon { color: #64748b; }
[data-theme="dark"] .dlv-distance .dlv-label { color: #64748b; }
[data-theme="dark"] .dlv-field {
	background-color: #182132; border-color: #344058;
}
[data-theme="dark"] .dlv-field:hover {
	border-color: #475569;
}
[data-theme="dark"] .dlv-field:focus-within {
	background-color: #1f293c; border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] .dlv-field[data-label]::before {
	background-color: #182132; color: #64748b;
}
[data-theme="dark"] .dlv-field:focus-within[data-label]::before {
	color: #4a9eff;
}
/* Delivery header — dark mode */
[data-theme="dark"] .dlv-header {
	color: #4a9eff;
}
/* id-scoped to beat the light rule #delivery.dlv-card .dlv-field select (1,2,1),
   which set color:#1e293b — that dark slate was winning in dark mode and rendering
   the dropdown text invisible on the dark field. (1,3,1) > (1,2,1). Covers both the
   regular (#delivery) and group/structure (#grp_delivery) delivery-charge panels. */
[data-theme="dark"] #delivery.dlv-card .dlv-field select,
[data-theme="dark"] #grp_delivery.dlv-card .dlv-field select {
	color: #e2e8f0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
}
/* The native option popup also needs colors or it's white-on-light / invisible. */
[data-theme="dark"] #delivery.dlv-card .dlv-field select option,
[data-theme="dark"] #grp_delivery.dlv-card .dlv-field select option {
	color: #e2e8f0;
	background-color: #1f293c;
}
[data-theme="dark"] .dlv-bottom { border-top-color: #263048; }
[data-theme="dark"] .dlv-add-btn { background: #4a9eff; color: #0e1525; }
[data-theme="dark"] .dlv-add-btn:hover { background: #5ca9ff; box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3); }
[data-theme="dark"] .dlv-rates-inline .dlv-rate-divider { background: #344058; }
[data-theme="dark"] .lpb {
	background-color: #1f293c;
}

/* Expand column */
[data-theme="dark"] .oli-col-expand { color: #475569; }
[data-theme="dark"] .oli-col-expand:hover { color: #4a9eff; }
[data-theme="dark"] div.line.oli-item.buffer .oli-col-expand i { color: #4a9eff; }

/* Group dimming */
[data-theme="dark"] .oli-group-active .line:not(.buffer) { opacity: 0.2; }

/* Group-mode panel + animated accent bar */
[data-theme="dark"] .oli-group-active .line.buffer::before {
	background: #4a9eff;
}
[data-theme="dark"] #tr_pdrw.oli-group-mode {
	background: #1a2438;
	box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.12);
	border-bottom-color: #263048;
}
[data-theme="dark"] #tr_pdrw.oli-group-mode::before {
	background: #4a9eff;
}
[data-theme="dark"] #tr_pdrw.oli-group-mode::after {
	background: linear-gradient(180deg,
		#4a9eff 0%, #4a9eff 25%,
		#60a5fa 38%, #4a9eff 52%,
		#3b82f6 66%, #4a9eff 80%,
		#4a9eff 100%);
}

/* ==========================================================================
   Grouped Items (grp_table) — Dark Mode (navy)
   ========================================================================== */
[data-theme="dark"] table#grp_table tbody {
	background-color: transparent;
}
[data-theme="dark"] table#grp_table tbody tr {
	background-color: #1c2840;
	border-color: transparent;
}
[data-theme="dark"] table#grp_table tbody tr:hover {
	border-color: #263048;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Trucking Mobile — Dark Mode
   ========================================================================== */
@media (max-width: 70rem) {
	[data-theme="dark"] .mob-truck-card { background-color: #182132; border-color: #344058; }
	[data-theme="dark"] .mob-truck-card.mob-truck-expanded { border-color: #4a9eff; }
	[data-theme="dark"] .mob-truck-header { background-color: #1f293c; }
	[data-theme="dark"] .mob-truck-expanded .mob-truck-header { background-color: #263048; }
	[data-theme="dark"] .mob-truck-name { color: #4a9eff; }
	[data-theme="dark"] .mob-truck-driver { color: #94a3b8; }
	[data-theme="dark"] .mob-truck-count { background-color: #344058; color: #cbd5e1; }
	[data-theme="dark"] .mob-truck-chevron { color: #64748b; }
	[data-theme="dark"] .mob-truck-empty { color: #64748b; }
	[data-theme="dark"] .mob-task-card { border-bottom-color: #263048; }
	[data-theme="dark"] .mob-task-time { color: #4a9eff; }
	[data-theme="dark"] .mob-task-name { color: #e2e8f0; }
	[data-theme="dark"] .mob-task-detail { color: #94a3b8; }
	[data-theme="dark"] .mob-task-icon { color: #64748b; }
	[data-theme="dark"] div#flip_me select[name=plant] { background-color: rgba(255, 255, 255, 0.04) !important; border-color: rgba(255, 255, 255, 0.06); border-radius: 7px; color: #e2e8f0; box-shadow: none; }

	/* Mobile date nav */
	[data-theme="dark"] .mob-date-label { background: #1f293c; color: #4a9eff; }
	[data-theme="dark"] .mob-date-label:active { background: #263048; }
	[data-theme="dark"] .mob-date-arrow { background: #1f293c; color: #4a9eff; }
	[data-theme="dark"] .mob-date-arrow:active { background: #263048; }
	[data-theme="dark"] .mob-date-spinner { color: #64748b; }
}
[data-theme="dark"] table#grp_table thead td i.fa-save:hover,
[data-theme="dark"] table#grp_table thead td i.fa-dollar-sign:hover,
[data-theme="dark"] table#grp_table thead td i.fa-tag:hover,
[data-theme="dark"] table#grp_table thead td i.fa-exchange:hover {
	background-color: rgba(148, 163, 184, 0.12);
	color: #e2e8f0;
}
[data-theme="dark"] table#grp_table thead td i.fa-check:hover {
	background-color: rgba(74, 158, 255, 0.12);
	color: #4a9eff;
}
/* Active dollar-sign (auto group-pricing toggled ON) — light mode uses
   dark-navy fill + white icon; dark mode uses the brand-blue fill + white
   icon so contrast reads the same way in both. */
[data-theme="dark"] table#grp_table thead td i.group-pricing {
	background-color: #1e63b5 !important;
	color: #ffffff !important;
}
/* Hover on the active state — slight brightening, consistent with the
   pattern used for .sch-pill:has(input:checked):hover above. */
[data-theme="dark"] table#grp_table thead td i.group-pricing:hover {
	background-color: #2974c9 !important;
	color: #ffffff !important;
}
/* In-flight auto-pricing spinner, dark mode — brand-blue glyph on a faint fill. */
[data-theme="dark"] table#grp_table thead td i.gp_toggle_loading {
	color: #7dd3fc;
	background-color: rgba(125, 211, 252, 0.15);
}
/* Inputs inside grp_table rows — dark navy, no bottom border */
[data-theme="dark"] table#grp_table tbody tr td:nth-child(2) input,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(3) input,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(4) input,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(5) input,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(6) input {
	background-color: transparent;
	border: 1px solid transparent !important;
	color: #e2e8f0;
}
/* !important required because order-items.css loads after theme.css and the
   light-mode :hover / :focus rules have equal specificity, so without it
   they win — qty/name/weight/price inputs would flash white on hover/focus
   in dark mode. */
[data-theme="dark"] table#grp_table tbody tr td:nth-child(2) input:hover,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(3) input:hover,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(4) input:hover,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(5) input:hover {
	border-color: #2d3a50 !important;
	background-color: #1f293c !important;
}
[data-theme="dark"] table#grp_table tbody tr td:nth-child(2) input:focus,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(3) input:focus,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(4) input:focus,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(5) input:focus {
	border-color: #4a9eff !important;
	background-color: #263048 !important;
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12) !important;
}
[data-theme="dark"] table#grp_table tbody tr td:nth-child(6) input {
	color: #e2e8f0;
}
/* $ prefix text in dark mode */
[data-theme="dark"] table#grp_table tbody tr td:nth-child(5) > b,
[data-theme="dark"] table#grp_table tbody tr td:nth-child(6) > b {
	color: #64748b;
}
[data-theme="dark"] table#grp_table tbody tr td.trash i {
	color: #64748b;
}
[data-theme="dark"] table#grp_table tbody tr td.trash i:hover {
	color: #f87171;
	background-color: rgba(248, 113, 113, 0.08);
}
[data-theme="dark"] table#grp_table tbody tr td.trash .prd_loc i.plant_ind {
	color: #4a9eff;
}
[data-theme="dark"] table#grp_table tbody tr td.trash .prd_loc i.plant_ind.wr_plant {
	color: #cd853f;
}
[data-theme="dark"] table#grp_table tbody tr td.trash .prd_loc i.plant_ind:hover,
[data-theme="dark"] table#grp_table tbody tr td.trash .prd_loc i.plant_ind.wr_plant:hover {
	background-color: transparent;
}
/* grip dots dark handled above */
[data-theme="dark"] table#grp_table .ui-sortable-helper {
	background-color: #1c2840;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] table#grp_table .ui-sortable-placeholder {
	border-color: #344058;
	background-color: rgba(74, 158, 255, 0.03);
}
/* Group loading spinner — dark */
[data-theme="dark"] div.loading_grp span {
	color: #94a3b8;
}
[data-theme="dark"] div.loading_grp_spinner {
	border-color: #263048;
	border-top-color: #4a9eff;
}
/* Alternating row tint — dark navy */
[data-theme="dark"] table#grp_table tr:nth-child(even) {
	background-color: #192438;
}

/* ── Truck Dashboard Dark Mode ── */
[data-theme="dark"] div.truck_info {
	color: #e2e8f0;
}
[data-theme="dark"] span.map_content {
	color: #cbd5e1;
}
[data-theme="dark"] span.map_content.driver {
	color: #4a9eff;
}
[data-theme="dark"] span.map_content.dest {
	color: #e2e8f0;
}
[data-theme="dark"] span.map_content.status {
	color: #94a3b8;
}
[data-theme="dark"] i.mi {
	color: #94a3b8;
}
[data-theme="dark"] i.mi:hover {
	color: #4a9eff;
}
[data-theme="dark"] img.driver_circle_thumb {
	border: 2px solid #344058;
}
[data-theme="dark"] div.map_progress {
	color: #e2e8f0;
}

/* Google Maps InfoWindow dark mode */
[data-theme="dark"] .gm-style .gm-style-iw-c {
	background-color: #182132 !important;
	border: 1px solid #344058 !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .gm-style .gm-style-iw-d {
	overflow: auto !important;
}
[data-theme="dark"] .gm-style .gm-style-iw-tc::after {
	background: #182132 !important;
}
[data-theme="dark"] .gm-style .gm-style-iw button[aria-label="Close"],
[data-theme="dark"] .gm-style .gm-ui-hover-effect {
	filter: invert(1) !important;
}

/* Truck info returning state */
[data-theme="dark"] div.truck_info.returning span.map_content.driver {
	color: #f97316;
}

/* ─── Toast ─── */
[data-theme="dark"] .oli-toast {
	background: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .oli-toast.undo,
[data-theme="dark"] .oli-toast.redo {
	background: #1e3a5f;
}

/* ─── Undo Dropdown Menu ─── */
[data-theme="dark"] .undo-dropdown {
	background: #182132;
	border-color: #344058;
	box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
[data-theme="dark"] .undo-dropdown-item {
	color: #e2e8f0;
}
[data-theme="dark"] .undo-dropdown-item:hover {
	background: #263048;
}
[data-theme="dark"] .undo-dropdown-item i {
	color: #64748b;
}
[data-theme="dark"] .undo-dropdown-item .undo-drop-time {
	color: #475569;
}
[data-theme="dark"] .undo-caret {
	border-left-color: rgba(255,255,255,0.08) !important;
}

/* ─── Version Restore Button ─── */
[data-theme="dark"] .version-restore-btn {
	background: #1f293c;
	color: #4a9eff;
	border-color: #344058;
}
[data-theme="dark"] .version-restore-btn:hover {
	background: #4a9eff;
	color: #fff;
	border-color: #4a9eff;
}
[data-theme="dark"] .version-restore-btn.redo-restore-btn {
	background: rgba(22, 163, 74, 0.15);
	color: #4ade80;
	border-color: rgba(22, 163, 74, 0.3);
}
[data-theme="dark"] .version-restore-btn.redo-restore-btn:hover {
	background: #16a34a;
	color: #fff;
	border-color: #16a34a;
}

/* ─── Version + Undo items in history modal ─── */
[data-theme="dark"] .history-item-icon.version {
	background: rgba(74, 158, 255, 0.15);
	color: #4a9eff;
}
[data-theme="dark"] .history-item-icon.undo {
	background: rgba(124, 58, 237, 0.15);
	color: #a78bfa;
}
[data-theme="dark"] .history-item-icon.undo.undone {
	background: #1f293c;
	color: #475569;
}

/* ─── Customer Version Modal ─── */
[data-theme="dark"] .version-modal {
	background: #182132;
	border-color: #344058;
}
[data-theme="dark"] .version-modal-header {
	border-bottom-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .version-modal-header h2 {
	color: #e2e8f0;
}
[data-theme="dark"] .version-modal-close {
	color: #94a3b8;
}
[data-theme="dark"] .version-modal-close:hover {
	background: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .version-list-item {
	border-bottom-color: #263048;
}
[data-theme="dark"] .version-summary {
	color: #e2e8f0;
}
[data-theme="dark"] .version-list-item-meta {
	color: #64748b;
}
[data-theme="dark"] .version-date {
	color: #475569;
}
[data-theme="dark"] .version-num {
	background: rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] .version-empty {
	color: #64748b;
}

/* ─── Version History Button on Customer Page ─── */
[data-theme="dark"] .x_history:hover {
	background-color: #4a9eff;
	color: #fff;
}

/* ─── Photo Gallery ──────────────────────────────────────────────── */
[data-theme="dark"] .gallery-card {
	background-color: #182132;
	border-color: #344058;
}
[data-theme="dark"] .gallery-card:hover {
	box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
[data-theme="dark"] .gallery-card-category {
	background-color: #1f293c;
	color: #4a9eff;
}
[data-theme="dark"] .gallery-card-job {
	color: #e2e8f0;
}
[data-theme="dark"] .gallery-card-meta {
	color: #8899aa;
}
[data-theme="dark"] .gallery-count {
	color: #8899aa;
}
[data-theme="dark"] .gallery-toolbar button {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .gallery-toolbar button:hover {
	background-color: #263048;
	border-color: #4a9eff;
}
[data-theme="dark"] .gallery-toolbar button.active {
	background-color: #4a9eff;
	border-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] .gallery-per-page {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .gallery-per-page:focus {
	border-color: #4a9eff;
}
[data-theme="dark"] .gallery-card-fav {
	background-color: rgba(0,0,0,.5);
}
[data-theme="dark"] .gallery-card-fav:hover {
	background-color: rgba(0,0,0,.7);
}
[data-theme="dark"] .gallery-card-fav.favorited {
	color: #ef4444;
	background-color: rgba(30,33,50,.9);
}
[data-theme="dark"] .gallery-card-fav.favorited:hover {
	background-color: rgba(30,33,50,1);
}
[data-theme="dark"] .gallery-empty {
	color: #8899aa;
}
[data-theme="dark"] .gallery-empty i {
	color: #344058;
}
[data-theme="dark"] .gallery-loading {
	color: #8899aa;
}
[data-theme="dark"] .gallery-loading i.fa-brain {
	color: #4a9eff;
}
[data-theme="dark"] .gallery-mode-toggle {
	border-color: #344058;
}
[data-theme="dark"] .gallery-mode-toggle .gallery-mode-btn {
	background-color: #182132;
	border-color: #344058;
	color: #8899aa;
}
[data-theme="dark"] .gallery-mode-toggle .gallery-mode-btn:hover {
	background-color: #263048;
	color: #e2e8f0;
}
[data-theme="dark"] .gallery-mode-toggle .gallery-mode-btn.active {
	background-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] .gallery-pagination button {
	background-color: #182132;
	border-color: #344058;
	color: #e2e8f0;
}
[data-theme="dark"] .gallery-pagination button:hover:not(:disabled) {
	background-color: #263048;
	border-color: #4a9eff;
}
[data-theme="dark"] .gallery-pagination button.active {
	background-color: #4a9eff;
	border-color: #4a9eff;
	color: #fff;
}
[data-theme="dark"] .gallery-pagination button:disabled {
	opacity: .3;
}
[data-theme="dark"] .gallery-pagination-ellipsis {
	color: #556677;
}

/* ── Production Attachments ── */
[data-theme="dark"] .prod-att-icon { color: #6d9eff; }
[data-theme="dark"] .prod-att-icon.has-att { color: #4ade80; }
[data-theme="dark"] .att-config-modal { background-color: #182132; color: #e2e8f0; }
[data-theme="dark"] .att-row { border-bottom-color: #344058; }
[data-theme="dark"] .att-qty-input {
	background-color: #1f293c;
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .att-consumed { background-color: #052e16; color: #4ade80; }
[data-theme="dark"] .att-reversed { background-color: #451a03; color: #fbbf24; }
[data-theme="dark"] .att-source-sibling { background-color: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .att-source-search { background-color: #2e1065; color: #a78bfa; }
[data-theme="dark"] .att-add-section { border-top-color: #344058; }
[data-theme="dark"] .att-sibling-select {
	background-color: #1f293c;
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .att-search-input {
	background-color: #1f293c;
	color: #e2e8f0;
	border-color: #344058;
}
[data-theme="dark"] .att-search-results {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .att-search-item { border-bottom-color: #263048; }
[data-theme="dark"] .att-search-item:hover { background-color: #263048; }
[data-theme="dark"] .att-empty { color: #64748b; }
/* ── Catalog Default Attachments dark mode ── */
[data-theme="dark"] .cat-att-title { color: #e2e8f0; }
[data-theme="dark"] .cat-att-title i { color: #4a9eff; }
[data-theme="dark"] .cat-att-badge { background: #4a9eff; }
[data-theme="dark"] .cat-att-desc { color: #64748b; }
[data-theme="dark"] .cat-att-row { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .cat-att-row:hover { background: #263048; }
[data-theme="dark"] .cat-att-row-icon { background: #263048; }
[data-theme="dark"] .cat-att-row-icon i { color: #4a9eff; }
[data-theme="dark"] .cat-att-row-name { color: #e2e8f0; }
[data-theme="dark"] .att-type-pill.delivery_optional { background: rgba(245,158,11,0.16); color: #fbbf24; }
[data-theme="dark"] .cat-att-stepper { border-color: #344058; }
[data-theme="dark"] .cat-att-stepper button { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .cat-att-stepper button:hover { background: #263048; color: #e2e8f0; }
[data-theme="dark"] .cat-att-stepper input { background: #182132; color: #e2e8f0; border-color: #344058; }
[data-theme="dark"] .cat-att-rm { color: #475569; }
[data-theme="dark"] .cat-att-rm:hover { background: rgba(220,38,38,0.12); color: #f87171; }
[data-theme="dark"] .cat-att-empty { border-color: #344058; }
[data-theme="dark"] .cat-att-empty i { color: #475569; }
[data-theme="dark"] .cat-att-empty span { color: #64748b; }
[data-theme="dark"] .cat-att-add-field { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .cat-att-add-field:focus-within { border-color: #4a9eff; background: #182132; box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.1); }
[data-theme="dark"] .cat-att-add-field i { color: #64748b; }
[data-theme="dark"] .cat-att-add-field:focus-within i { color: #4a9eff; }
[data-theme="dark"] .cat-att-add-field input { color: #e2e8f0 !important; }
[data-theme="dark"] .cat-att-add-field input::placeholder { color: #64748b; }
[data-theme="dark"] .cat-att-dropdown { background: #1f293c; border-color: #344058; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
[data-theme="dark"] .cat-att-dropdown-item { color: #e2e8f0; border-bottom-color: #263048; }
[data-theme="dark"] .cat-att-dropdown-item:hover { background: #263048; }
[data-theme="dark"] .cat-att-dropdown-item i { color: #4a9eff; }
[data-theme="dark"] .cat-att-dropdown-empty { color: #64748b; }
[data-theme="dark"] .qc-att-section {
	background-color: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .qc-att-title { color: #94a3b8; }
[data-theme="dark"] .qc-att-qty { color: #94a3b8; }
[data-theme="dark"] .qc-att-pending { background-color: #0c4a6e; color: #38bdf8; }
[data-theme="dark"] .qc-att-consumed { background-color: #052e16; color: #4ade80; }
[data-theme="dark"] .qc-att-reversed { background-color: #451a03; color: #fbbf24; }
/* Stock item modal attachment section — dark mode */
[data-theme="dark"] .stock-att-section { border-top-color: #344058; }
[data-theme="dark"] .stock-att-row { border-bottom-color: #263048; }
[data-theme="dark"] .stock-att-qty { background-color: #1f293c; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] .stock-att-results { background-color: #1f293c; border-color: #344058; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
[data-theme="dark"] .stock-att-result-item { color: #e2e8f0; border-bottom-color: #263048; }
[data-theme="dark"] .stock-att-result-item:hover { background-color: #263048; }
[data-theme="dark"] .stock-att-empty { color: #64748b; }
[data-theme="dark"] .stock-att-name { color: #e2e8f0; }

/* ---- Stock Production Modal (sp-) dark mode ---- */
[data-theme="dark"] .sp-overlay { background: rgba(0, 0, 0, 0.55); }
/* Standalone outer-shell dark chrome — applies only to the legacy
   `.sp-modal`. The new `.stock-prod-modal` inherits its background +
   shadow from `.prod-panel` dark-mode rules instead. */
[data-theme="dark"] .sp-modal { background: #182132; box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.2); }
[data-theme="dark"] .sp-modal::-webkit-scrollbar-thumb { background: #344058; }
[data-theme="dark"] .sp-header { border-bottom-color: #263048; }
[data-theme="dark"] .sp-header-title { color: #e2e8f0; }
[data-theme="dark"] .sp-header-title i { color: #4a9eff; }
[data-theme="dark"] .sp-close { color: #64748b; }
[data-theme="dark"] .sp-close:hover { background: #263048; color: #e2e8f0; }
[data-theme="dark"] .sp-search-group { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .sp-search-group:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 3px rgba(74,158,255,0.12); }
[data-theme="dark"] .sp-search-group input { color: #e2e8f0; }
[data-theme="dark"] .sp-search-group input::placeholder { color: #64748b; }
[data-theme="dark"] .sp-search-group i.sp-search-icon { color: #64748b; }
[data-theme="dark"] .sp-search-group:focus-within i.sp-search-icon { color: #4a9eff; }
[data-theme="dark"] .sp-results .char { color: #64748b; }
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) span.srch_cus { background-color: #1f293c; border-color: #344058; color: #e2e8f0; }
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) span.srch_cus:hover { background-color: #263048; border-color: #4a9eff; box-shadow: 0 2px 8px rgba(74,158,255,0.1); }
[data-theme="dark"] .sp-selected { background: rgba(74,158,255,0.1); border-color: rgba(74,158,255,0.25); }
[data-theme="dark"] .sp-selected:hover { background: rgba(74,158,255,0.15); border-color: rgba(74,158,255,0.35); }
[data-theme="dark"] .sp-selected-icon { background: #4a9eff; }
[data-theme="dark"] .sp-selected-name { color: #e2e8f0; }
[data-theme="dark"] .sp-selected-change { color: #4a9eff; }
[data-theme="dark"] .sp-section-head { color: #94a3b8; }
[data-theme="dark"] .sp-badge { background: rgba(74,158,255,0.15); color: #4a9eff; }
[data-theme="dark"] .sp-field { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .sp-field:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74,158,255,0.15); }
[data-theme="dark"] .sp-field[data-label]::before { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .sp-field select, [data-theme="dark"] .sp-field input { color: #e2e8f0; }
[data-theme="dark"] .sp-field.sp-disabled { background: #152030; }
[data-theme="dark"] .sp-field select { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%2364748b" d="M5 6L0 0h10z"/></svg>'); }
[data-theme="dark"] .sp-field.sp-field-error { border-color: #f87171; }
[data-theme="dark"] .sp-field.sp-field-error[data-label]::before { color: #f87171; }
[data-theme="dark"] .sp-divider { background: #263048; }
[data-theme="dark"] .sp-att-row { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .sp-att-row:hover { background: #263048; border-color: #3d5070; }
[data-theme="dark"] .sp-att-icon { background: rgba(74,158,255,0.15); color: #4a9eff; }
[data-theme="dark"] .sp-att-name { color: #e2e8f0; }
[data-theme="dark"] .sp-att-stepper { border-color: #344058; background: #182132; }
[data-theme="dark"] .sp-att-stepper button { color: #94a3b8; }
[data-theme="dark"] .sp-att-stepper button:hover { background: #263048; color: #4a9eff; }
[data-theme="dark"] .sp-att-stepper input { color: #e2e8f0; border-color: #344058; }
[data-theme="dark"] .sp-att-remove { color: #475569; }
[data-theme="dark"] .sp-att-remove:hover { background: rgba(220,38,38,0.15); color: #f87171; }
[data-theme="dark"] .sp-att-empty { border-color: #344058; }
[data-theme="dark"] .sp-att-empty i { color: #475569; }
[data-theme="dark"] .sp-att-empty span { color: #64748b; }
[data-theme="dark"] .sp-att-add-field { border-color: #344058; background: #152030; }
[data-theme="dark"] .sp-att-add-field:focus-within { border-color: #4a9eff; background: #1f293c; box-shadow: 0 0 0 2px rgba(74,158,255,0.1); }
[data-theme="dark"] .sp-att-add-field i { color: #64748b; }
[data-theme="dark"] .sp-att-add-field:focus-within i { color: #4a9eff; }
[data-theme="dark"] .sp-att-add-field input { color: #e2e8f0; }
[data-theme="dark"] .sp-att-add-field input::placeholder { color: #64748b; }
[data-theme="dark"] .sp-att-dropdown { background: #1f293c; border-color: #344058; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
[data-theme="dark"] .sp-att-dropdown-item { color: #e2e8f0; border-bottom-color: #263048; }
[data-theme="dark"] .sp-att-dropdown-item:hover { background: #263048; }
[data-theme="dark"] .sp-att-dropdown-item i { color: #4a9eff; }
[data-theme="dark"] .sp-att-dropdown-empty { color: #64748b; }
/* Suppress input-level focus in sp- containers — only the container shows focus */
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) .sp-search-group input:focus,
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) .sp-field input:focus,
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) .sp-field select:focus,
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) .sp-att-add-field input:focus,
[data-theme="dark"] :is(.sp-modal, .stock-prod-modal) .sp-att-stepper input:focus {
	border-color: transparent;
	box-shadow: none;
	outline: none;
}
[data-theme="dark"] .sp-submit { background: #4a9eff; }
[data-theme="dark"] .sp-submit:hover { background: #3a8eef; box-shadow: 0 4px 14px rgba(74,158,255,0.3); }

/* Schedule Attachment Modal — Dark Mode */
[data-theme="dark"] .sch-att-overlay { background: rgba(0,0,0,0.55); }
[data-theme="dark"] .sch-att-modal { background: #182132; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
[data-theme="dark"] .sch-att-header { background: linear-gradient(135deg,#1f293c,#182132); border-color: #344058; }
[data-theme="dark"] .sch-att-title { color: #e2e8f0; }
[data-theme="dark"] .sch-att-title i { color: #4a9eff; }
[data-theme="dark"] .sch-att-close { color: #64748b; }
[data-theme="dark"] .sch-att-close:hover { background-color: #1f293c; color: #e2e8f0; }
[data-theme="dark"] .sch-att-loading { color: #64748b; }
[data-theme="dark"] .sch-att-empty { color: #64748b; border-color: #344058; }
[data-theme="dark"] .sch-att-row { border-color: #1f293c; }
[data-theme="dark"] .sch-att-icon { color: #4a9eff; }
[data-theme="dark"] .sch-att-name { color: #e2e8f0; }
[data-theme="dark"] .sch-att-stepper { border-color: #344058; }
[data-theme="dark"] .sch-att-stepper button { background-color: #1f293c; color: #94a3b8; }
[data-theme="dark"] .sch-att-stepper button:hover { background-color: #263048; }
[data-theme="dark"] .sch-att-qty { background-color: #182132; color: #e2e8f0; border-color: #344058; }
[data-theme="dark"] .sch-att-remove { color: #475569; }
[data-theme="dark"] .sch-att-remove:hover { color: #ef4444; background-color: rgba(239,68,68,0.1); }
[data-theme="dark"] .sch-att-add-field { border-color: #344058; }
[data-theme="dark"] .sch-att-add-field:focus-within { border-color: #4a9eff; }
[data-theme="dark"] .sch-att-add-field i { color: #64748b; }
[data-theme="dark"] .sch-att-search { color: #e2e8f0; }
[data-theme="dark"] .sch-att-search::placeholder { color: #475569; }
[data-theme="dark"] .sch-att-dropdown,
[data-theme="dark"] .sch-att-dropdown-detached { background: #1f293c; border-color: #344058; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
[data-theme="dark"] .sch-att-dropdown-item { color: #e2e8f0; }
[data-theme="dark"] .sch-att-dropdown-item:hover { background-color: #263048; }
[data-theme="dark"] .sch-att-dropdown-item i { color: #4a9eff; }
[data-theme="dark"] .sch-att-dropdown-empty { color: #64748b; }
[data-theme="dark"] .sch-att-footer { background: #0e1525; border-color: #344058; }
[data-theme="dark"] .sch-att-btn-done { background: #4a9eff; }
[data-theme="dark"] .sch-att-btn-done:hover { background: #3a8eef; }
[data-theme="dark"] .sch-att-btn-clear { background: #1f293c; color: #94a3b8; }
[data-theme="dark"] .sch-att-btn-clear:hover { background: #263048; color: #e2e8f0; }
[data-theme="dark"] .sch-att-display { background: #1f293c; border-color: #344058; color: #94a3b8; }
[data-theme="dark"] .sch-att-display > i { color: #4a9eff; }
[data-theme="dark"] .sch-att-item { color: #64748b; }

/* Lasso selection box */
[data-theme="dark"] #s-rectBox {
	border-color: #4a9eff;
	background-color: rgba(74, 158, 255, 0.08);
}

/* Photo Upload */
[data-theme="dark"] .photo-preview { background: #1f293c; box-shadow: 0 0 0 3px #182132, 0 0 0 4px #344058; }
[data-theme="dark"] .photo-preview:hover { box-shadow: 0 0 0 3px #182132, 0 0 0 4px #475569; }
[data-theme="dark"] .photo-placeholder { color: #475569; }
[data-theme="dark"] .photo-btn { color: #94a3b8; }
[data-theme="dark"] .photo-btn:hover { color: #4a9eff; }
[data-theme="dark"] .photo-btn-remove:hover { color: #ef4444; }
[data-theme="dark"] .photo-upload-btns .photo-btn + .photo-btn::before { background: #344058; }
[data-theme="dark"] .emp-mgr-search { background: #0e1525; border-color: #1f293c; }
[data-theme="dark"] .emp-mgr-search i { color: #475569; }
[data-theme="dark"] .emp-mgr-search input { color: #e2e8f0; }
[data-theme="dark"] .emp-mgr-search input::placeholder { color: #475569; }
[data-theme="dark"] .emp-mgr-row { border-color: #1f293c; }
[data-theme="dark"] .emp-mgr-row:hover { background: #1a2435; }
[data-theme="dark"] .emp-mgr-row:active { background: #1f293c; }
[data-theme="dark"] .emp-mgr-name { color: #e2e8f0; }
[data-theme="dark"] .emp-mgr-dept { color: #64748b; }
[data-theme="dark"] .emp-mgr-thumb { box-shadow: 0 0 0 2px #182132, 0 0 0 3px #344058; }
[data-theme="dark"] .emp-mgr-thumb-placeholder { background: #1f293c; color: #475569; box-shadow: 0 0 0 2px #182132, 0 0 0 3px #344058; }
[data-theme="dark"] .emp-mgr-actions button { color: #64748b; }
[data-theme="dark"] .emp-mgr-actions button:hover { background: #263348; color: #cbd5e1; }
[data-theme="dark"] .emp-mgr-del:hover { color: #ef4444 !important; background: rgba(239,68,68,0.1) !important; }
[data-theme="dark"] .photo-crop-overlay { background: rgba(5,10,20,0.8); }
[data-theme="dark"] .photo-crop-modal { background: #182132; box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06); }
[data-theme="dark"] .photo-crop-header { border-color: #1f293c; color: #e2e8f0; }
[data-theme="dark"] .photo-crop-close { color: #64748b; }
[data-theme="dark"] .photo-crop-close:hover { color: #e2e8f0; }
[data-theme="dark"] .photo-crop-body { background: #0e1525; }
[data-theme="dark"] .photo-crop-footer { border-color: #1f293c; }
[data-theme="dark"] .photo-crop-cancel { border-color: #344058; color: #94a3b8; }
[data-theme="dark"] .photo-crop-cancel:hover { background-color: #1f293c; color: #e2e8f0; }

/* Print/PDF — never apply dark mode */
@media print {
	[data-theme="dark"] body,
	[data-theme="dark"] table,
	[data-theme="dark"] td,
	[data-theme="dark"] th,
	[data-theme="dark"] div {
		background-color: #fff !important;
		color: #000 !important;
		border-color: #ccc !important;
		box-shadow: none !important;
	}
}

/* ================================================================
   ADMIN — inline-styled "white pill" cards bleed through dark mode.
   These elements live inside .acc-body and use inline `background:`
   declarations like #f1f5f9 / #f8fafc that can't be overridden by
   regular cascade. Override them at high specificity here.
   ================================================================ */

/* Generic light backgrounds inside admin acc-body get a dark surface */
[data-theme="dark"] .acc-body div[style*="background:#f1f5f9"],
[data-theme="dark"] .acc-body div[style*="background: #f1f5f9"] {
	background: #1f293c !important;
	border-color: #263048 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .acc-body div[style*="background:#f8fafc"],
[data-theme="dark"] .acc-body div[style*="background: #f8fafc"] {
	background: #182132 !important;
	border-color: #263048 !important;
	color: #cbd5e1 !important;
}
/* Light borders on the panel containers */
[data-theme="dark"] .acc-body div[style*="border:1px solid #e2e8f0"],
[data-theme="dark"] .acc-body div[style*="border: 1px solid #e2e8f0"] {
	border-color: #263048 !important;
}
/* Buttons inside admin acc-body that lean on the same light pill */
[data-theme="dark"] .acc-body button[style*="background:#f1f5f9"],
[data-theme="dark"] .acc-body button[style*="background: #f1f5f9"] {
	background: #263048 !important;
	border: 1px solid #344058 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .acc-body button[style*="background:#f1f5f9"]:hover,
[data-theme="dark"] .acc-body button[style*="background: #f1f5f9"]:hover {
	background: #2f3b55 !important;
	border-color: #4a9eff !important;
	color: #e2e8f0 !important;
}
/* Inline grey copy text inside admin acc-body */
[data-theme="dark"] .acc-body p[style*="color:#64748b"],
[data-theme="dark"] .acc-body p[style*="color: #64748b"],
[data-theme="dark"] .acc-body span[style*="color:#64748b"],
[data-theme="dark"] .acc-body span[style*="color: #64748b"],
[data-theme="dark"] .acc-body span[style*="color:#94a3b8"],
[data-theme="dark"] .acc-body span[style*="color: #94a3b8"] {
	color: #94a3b8 !important;
}
/* "Image preview" tile labels (header/footer image upload rows) */
[data-theme="dark"] .acc-body img[src*="letter_top"],
[data-theme="dark"] .acc-body img[src*="letter_bot"],
[data-theme="dark"] .acc-body img[src*="logo"] {
	background: #fff;       /* keep image's own white bg — letterhead is white */
	border-radius: 4px;
	padding: 4px;
}

/* STRUCTURE PRICE MISMATCH MODAL — dark mode */
[data-theme="dark"] .str-sum-modal { color: #e2e8f0; }
[data-theme="dark"] .str-sum-intro { color: #94a3b8; }
[data-theme="dark"] .str-sum-list {
	background: #0f1a2e;
	border-color: #1e2a44;
}
[data-theme="dark"] .str-sum-row {
	background: #182132;
	border-color: #263048;
}
[data-theme="dark"] .str-sum-row:hover { border-color: #344058; }
[data-theme="dark"] .str-sum-row-locked { background: #141b2a; }
[data-theme="dark"] .str-sum-name { color: #e2e8f0; }
[data-theme="dark"] .str-sum-prices { color: #8da3be; }
[data-theme="dark"] .str-sum-price { color: #cbd5e1; }
[data-theme="dark"] .str-sum-delta { color: #fb923c; }
[data-theme="dark"] .str-sum-note { color: #fbbf24; }
[data-theme="dark"] .str-sum-btn-cancel {
	background: #182132;
	color: #cbd5e1;
	border-color: #344058;
}
[data-theme="dark"] .str-sum-btn-cancel:hover {
	background: #1f293c;
	color: #e2e8f0;
	border-color: #475569;
}
[data-theme="dark"] .str-sum-btn-adjust {
	background: #4a9eff;
	color: #0e1525;
}
[data-theme="dark"] .str-sum-btn-adjust:hover {
	background: #5ca9ff;
	box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

/* ================================================================
   Recode Product modal — dark mode
   Outer chrome (overlay, panel, header, close) inherits the
   .prod-modal dark-mode rules above. Only the .recode-* internals
   need their own dark-mode treatment.
   ================================================================ */
[data-theme="dark"] .recode-current-card {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .recode-current-label { color: #64748b; }
[data-theme="dark"] .recode-current-name { color: #f1f5f9; }
[data-theme="dark"] .recode-plant-pill {
	background: #4a9eff;
	color: #0e1525;
}
[data-theme="dark"] .recode-plant-pill--empty {
	background: #263048;
	color: #64748b;
}
/* "Seconds" per-line badge (order-items row) — mirrors the forklift's
   inc_seconds dark override (css/qc.css). */
[data-theme="dark"] .oli-seconds-badge {
	background: rgba(249, 115, 22, .16);
	color: #fdba74;
	border-color: rgba(249, 115, 22, .4);
}

[data-theme="dark"] .recode-toggle {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .recode-toggle:hover {
	background: #263048;
	border-color: #475569;
}
[data-theme="dark"] .recode-toggle-track { background: #344058; }
[data-theme="dark"] .recode-toggle-thumb { background: #e2e8f0; }
[data-theme="dark"] .recode-toggle-input:checked ~ .recode-toggle-track {
	background: #4a9eff;
}
[data-theme="dark"] .recode-toggle-input:checked ~ .recode-toggle-track .recode-toggle-thumb {
	background: #0e1525;
}
[data-theme="dark"] .recode-toggle:has(.recode-toggle-input:checked) {
	border-color: #4a9eff;
	background: rgba(74, 158, 255, 0.1);
}
[data-theme="dark"] .recode-toggle-title { color: #e2e8f0; }
[data-theme="dark"] .recode-toggle-desc { color: #94a3b8; }

[data-theme="dark"] .recode-search {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .recode-search:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] .recode-search-icon { color: #64748b; }
[data-theme="dark"] .recode-search:focus-within .recode-search-icon { color: #4a9eff; }
[data-theme="dark"] input.recode-search-input { color: #e2e8f0 !important; }
[data-theme="dark"] input.recode-search-input::placeholder { color: #64748b; }

[data-theme="dark"] .recode-results::-webkit-scrollbar-thumb { background: #344058; }
[data-theme="dark"] .recode-results::-webkit-scrollbar-thumb:hover { background: #475569; }
[data-theme="dark"] .recode-results span.srch_cus {
	background: #1f293c !important;
	border-color: #344058 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .recode-results span.srch_cus:hover {
	background: #263048 !important;
	border-color: #4a9eff !important;
	box-shadow: 0 2px 8px rgba(74, 158, 255, 0.12) !important;
}
[data-theme="dark"] .recode-results span.srch_cus div.prd_loc.srch_plant {
	background: #4a9eff;
}
[data-theme="dark"] .recode-results span.srch_cus div.prd_loc.srch_plant div.loc_let {
	color: #0e1525 !important;
}
[data-theme="dark"] .recode-results span.srch_cus .srch_info b { color: #e2e8f0; }
[data-theme="dark"] .recode-results span.srch_cus .srch_cat { color: #94a3b8; }
[data-theme="dark"] .recode-results span.srch_cus::after { color: #475569; }
[data-theme="dark"] .recode-results span.srch_cus:hover::after { color: #4a9eff; }
[data-theme="dark"] .recode-results:not(:empty):not(:has(span.srch_cus)) {
	border-color: #344058;
	color: #64748b;
}

[data-theme="dark"] .recode-confirm-title { color: #e2e8f0; }
[data-theme="dark"] .recode-confirm-sub { color: #94a3b8; }
[data-theme="dark"] .recode-confirm-sub em { color: #4a9eff; }

[data-theme="dark"] .recode-diff {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .recode-diff-label { color: #64748b; }
[data-theme="dark"] .recode-diff-from {
	background: #151e30;
	color: #94a3b8;
	border-color: #344058;
}
[data-theme="dark"] .recode-diff-to {
	background: rgba(74, 158, 255, 0.12);
	color: #4a9eff;
	border-color: #4a9eff;
}
[data-theme="dark"] .recode-diff-arrow { color: #64748b; }
[data-theme="dark"] .recode-diff-note {
	color: #4ade80;
	border-top-color: #344058;
}
[data-theme="dark"] .recode-diff-note.muted { color: #94a3b8; }

[data-theme="dark"] .recode-affected {
	background: #1f293c;
	border-color: #344058;
	box-shadow: none;
}
[data-theme="dark"] .recode-affected-title {
	color: #94a3b8;
	border-bottom-color: #344058;
}
[data-theme="dark"] .recode-affected-title i { color: #4a9eff; }
[data-theme="dark"] .recode-affected-list li { color: #e2e8f0; }
[data-theme="dark"] .recode-affected-bullet {
	background: linear-gradient(135deg, rgba(74, 158, 255, 0.18) 0%, rgba(74, 158, 255, 0.10) 100%);
	color: #4a9eff;
}
[data-theme="dark"] .recode-affected-name { color: #4a9eff; }

/* Wizard back button + title steps in dark mode */
[data-theme="dark"] .recode-overlay .prod-panel-back {
	color: #94a3b8;
}
[data-theme="dark"] .recode-overlay .prod-panel-back:hover {
	background: #263048;
	color: #4a9eff;
}
[data-theme="dark"] .recode-overlay .recode-title-step > i { color: #4a9eff; }

[data-theme="dark"] .recode-btn-cancel {
	background: #1f293c;
	color: #cbd5e1;
	border-color: #344058;
}
[data-theme="dark"] .recode-btn-cancel:hover:not(:disabled) {
	background: #263048;
	border-color: #475569;
	color: #e2e8f0;
}
[data-theme="dark"] .recode-btn-confirm {
	background: #4a9eff;
	color: #0e1525;
	border-color: #4a9eff;
	box-shadow: 0 1px 2px rgba(74, 158, 255, 0.25);
}
[data-theme="dark"] .recode-btn-confirm:hover:not(:disabled) {
	background: #5ca9ff;
	border-color: #5ca9ff;
	box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

[data-theme="dark"] .recode-success-icon {
	background: rgba(74, 222, 128, 0.15);
	color: #4ade80;
}
[data-theme="dark"] .recode-success-title { color: #e2e8f0; }
[data-theme="dark"] .recode-success-sub { color: #94a3b8; }

/* ================================================================
   Product Swap modal — dark mode
   ================================================================ */
[data-theme="dark"] .swap-context-card {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .swap-context-label { color: #64748b; }
[data-theme="dark"] .swap-context-name { color: #f1f5f9; }

[data-theme="dark"] .swap-row.dc_item {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .swap-row.swap-row--in {
	background: rgba(74, 158, 255, 0.10);
	border-color: #2c4a6e;
}
[data-theme="dark"] .swap-row:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}
[data-theme="dark"] .swap-row-name { color: #e2e8f0; }
[data-theme="dark"] .swap-row-pill {
	background: #4a9eff;
	color: #0e1525;
}

[data-theme="dark"] .swap-qty-select {
	background: #182132;
	border-color: #344058;
	color: #4a9eff;
}
[data-theme="dark"] .swap-qty-select:hover { border-color: #475569; }
[data-theme="dark"] .swap-qty-select:focus {
	border-color: #4a9eff;
	box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

[data-theme="dark"] .swap-row-remove { color: #64748b; }
[data-theme="dark"] .swap-row-remove:hover {
	background: rgba(248, 113, 113, 0.12);
	color: #f87171;
}

[data-theme="dark"] .swap-in-empty {
	border-color: #344058;
	color: #64748b;
}

[data-theme="dark"] .swap-search {
	background: #1f293c;
	border-color: #344058;
}
[data-theme="dark"] .swap-search:focus-within {
	border-color: #4a9eff;
	box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] .swap-search-icon { color: #64748b; }
[data-theme="dark"] .swap-search:focus-within .swap-search-icon { color: #4a9eff; }
[data-theme="dark"] input.swap-search-input { color: #e2e8f0 !important; }
[data-theme="dark"] input.swap-search-input::placeholder { color: #64748b; }

[data-theme="dark"] .swap-results::-webkit-scrollbar-thumb { background: #344058; }
[data-theme="dark"] .swap-results::-webkit-scrollbar-thumb:hover { background: #475569; }
[data-theme="dark"] .swap-results span.srch_cus {
	background: #1f293c !important;
	border-color: #344058 !important;
	color: #e2e8f0 !important;
}
[data-theme="dark"] .swap-results span.srch_cus:hover {
	background: #263048 !important;
	border-color: #4a9eff !important;
	box-shadow: 0 2px 8px rgba(74, 158, 255, 0.12) !important;
}
[data-theme="dark"] .swap-results span.srch_cus div.prd_loc.srch_plant {
	background: #4a9eff;
}
[data-theme="dark"] .swap-results span.srch_cus div.prd_loc.srch_plant div.loc_let {
	color: #0e1525 !important;
}
[data-theme="dark"] .swap-results span.srch_cus .srch_info b { color: #e2e8f0; }
[data-theme="dark"] .swap-results span.srch_cus .srch_cat { color: #94a3b8; }
[data-theme="dark"] .swap-results span.srch_cus::after { color: #475569; }
[data-theme="dark"] .swap-results span.srch_cus:hover::after { color: #4a9eff; }
[data-theme="dark"] .swap-results:not(:empty):not(:has(span.srch_cus)) {
	border-color: #344058;
	color: #64748b;
}

[data-theme="dark"] .swap-actions { border-top-color: #263048; }
[data-theme="dark"] .swap-btn-cancel {
	background: #1f293c;
	color: #cbd5e1;
	border-color: #344058;
}
[data-theme="dark"] .swap-btn-cancel:hover:not(:disabled) {
	background: #263048;
	border-color: #475569;
	color: #e2e8f0;
}
[data-theme="dark"] .swap-btn-confirm {
	background: #4a9eff;
	color: #0e1525;
	border-color: #4a9eff;
	box-shadow: 0 1px 2px rgba(74, 158, 255, 0.25);
}
[data-theme="dark"] .swap-btn-confirm:hover:not(:disabled) {
	background: #5ca9ff;
	border-color: #5ca9ff;
	box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

/* UNIFIED TICKET-ISSUE MODAL — dark mode */
[data-theme="dark"] .tic-issues-modal { color: #e2e8f0; }
[data-theme="dark"] .tic-summary { color: #94a3b8; }
[data-theme="dark"] .tic-summary b { color: #4a9eff; }
[data-theme="dark"] .tic-card { background: #182132; border-color: #263048; }
[data-theme="dark"] .tic-sev-block { background: linear-gradient(90deg, rgba(185, 28, 28, 0.15) 0%, #182132 45%); }
[data-theme="dark"] .tic-sev-warn  { background: linear-gradient(90deg, rgba(217, 119, 6, 0.15) 0%, #182132 45%); }
[data-theme="dark"] .tic-sev-fix   { background: linear-gradient(90deg, rgba(29, 78, 216, 0.18) 0%, #182132 45%); }
[data-theme="dark"] .tic-sev-info  { background: #182132; }
[data-theme="dark"] .tic-title { color: #f1f5f9; }
[data-theme="dark"] .tic-hint { color: #94a3b8; border-bottom-color: #263048; }
[data-theme="dark"] .tic-row { background: #0f1a2e; border-color: #263048; }
[data-theme="dark"] .tic-row-check { background: #182132; }
[data-theme="dark"] .tic-row-check:hover { border-color: #4a9eff; }
[data-theme="dark"] .tic-row-name { color: #f1f5f9; }
[data-theme="dark"] .tic-row-meta { color: #8da3be; }
[data-theme="dark"] .tic-row-meta .tic-mono { color: #e2e8f0; }
[data-theme="dark"] .tic-row-meta .tic-sep  { color: #334155; }
[data-theme="dark"] .tic-row-meta .tic-delta { color: #fb923c; }
[data-theme="dark"] .tic-row-note { color: #8da3be; }
[data-theme="dark"] .tic-pm-name { color: #f1f5f9; }
[data-theme="dark"] .tic-pm-plant { background: #2a2210; border-color: #5a4718; color: #fbbf24; }
[data-theme="dark"] .tic-struct-ic { color: #8da3be; }
[data-theme="dark"] .tic-struct-missing { border-left-color: #263048; }
[data-theme="dark"] .tic-struct-missing li { border-bottom-color: #1c2942; }
[data-theme="dark"] .tic-struct-miss-name { color: #f1f5f9; }
[data-theme="dark"] .tic-struct-miss-qty { color: #fbbf24; background: #2a2210; border-color: #5a4718; }
[data-theme="dark"] .tic-items-scroll::-webkit-scrollbar-thumb { background: #334155; }
[data-theme="dark"] .tic-items-scroll::-webkit-scrollbar-thumb:hover { background: #475569; }
[data-theme="dark"] .tic-row-btn { background: #182132; border-color: var(--tic-accent); color: var(--tic-accent); }
[data-theme="dark"] .tic-row-btn:hover { background: var(--tic-accent); color: #0e1525; }
[data-theme="dark"] .tic-actions { border-top-color: #263048; }
[data-theme="dark"] .tic-btn-cancel { background: #182132; color: #cbd5e1; border-color: #344058; }
[data-theme="dark"] .tic-btn-cancel:hover { background: #1f293c; color: #f1f5f9; border-color: #475569; }
[data-theme="dark"] .tic-btn-primary { background: #4a9eff; color: #0e1525; }
[data-theme="dark"] .tic-btn-primary:hover { background: #5ca9ff; box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3); }

/* ============================================
   Open / Quoted Orders modal (inv-ordered) — dark mode.
   The modal card is #0e1525; even rows are transparent over it, odd rows
   need a subtle lift (NOT the light-mode near-white #fafbfc), and body text
   must be light enough to read on the dark surface.
   ============================================ */
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row td {
	color: #cbd5e1;
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row {
	border-bottom-color: #1e293b;
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row + tr.inv-ordered-row td {
	border-top-color: #1e293b;
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row:nth-child(odd) td {
	background-color: rgba(255, 255, 255, 0.035);
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row:hover {
	background-color: rgba(74, 158, 255, 0.12);
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row:hover td {
	background-color: transparent;
}
[data-theme="dark"] .inv-ordered-modal tr.inv-ordered-row td:first-child {
	color: #60a5fa;
}

/* Vault-order auto-add-to-ticket toggle — dark mode (see style.css) */
[data-theme="dark"] .vo-ticket-opt { background:#16242f; border-color:#274050; border-left-color:#4a90d9; }
[data-theme="dark"] .vo-ticket-opt.is-billed { background:#2a1f1a; border-color:#4a352b; border-left-color:#cf6b34; }
[data-theme="dark"] .vo-ticket-opt-title { color:#e2e8f0; }
[data-theme="dark"] .vo-ticket-opt-title i { color:#4a90d9; }
[data-theme="dark"] .vo-ticket-opt.is-billed .vo-ticket-opt-title i { color:#cf6b34; }
[data-theme="dark"] .vo-ticket-opt-note { color:#94a3b8; }
[data-theme="dark"] .vo-ticket-slider { background:#3a4a57; }
[data-theme="dark"] .vo-ticket-switch input:checked + .vo-ticket-slider { background:#4a90d9; }
[data-theme="dark"] .vo-ticket-opt.is-billed .vo-ticket-slider { background:#5a4034; }


/* ═══════════════════════════════════════════════════════════════════════
   Quick inventory adjustment — dark mode
   ═══════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] .inv-adj-th i { color: #7c8aa0; }
[data-theme="dark"] .inv-adj-btn,
[data-theme="dark"] .inv-card__adjust {
	background: #0e1525; border-color: #2a3a52; color: #6fb0ef;
}
[data-theme="dark"] .inv-adj-btn:hover { background: #1d4e7e; border-color: #1d4e7e; color: #fff; }
[data-theme="dark"] .inv-card__adjust:active { background: #1d4e7e; color: #fff; }

@keyframes invAdjFlashDark { 0% { background: #3f3a1b; } 100% { background: transparent; } }
[data-theme="dark"] tr.inv-adj-flash > td { animation: invAdjFlashDark 1.5s ease; }
[data-theme="dark"] .inv-card.inv-adj-flash { animation: invAdjFlashDark 1.5s ease; }

[data-theme="dark"] .inv-adjust-loading { color: #94a3b8; }
[data-theme="dark"] .inv-adjust-ghead { color: #6b7a90; border-bottom-color: #243349; }
[data-theme="dark"] .inv-adjust-row { border-bottom-color: #1a2436; }
[data-theme="dark"] .inv-adjust-c-status { color: #dbe4f0; }
[data-theme="dark"] .inv-adjust-c-rec { color: #94a3b8; }
[data-theme="dark"] .inv-adjust-c-delta { color: #6b7a90; }
[data-theme="dark"] .inv-adjust-row.is-up   .inv-adjust-c-delta { color: #4ade80; }
[data-theme="dark"] .inv-adjust-row.is-down .inv-adjust-c-delta { color: #f87171; }
[data-theme="dark"] .inv-adjust-input,
[data-theme="dark"] .inv-adjust-date,
[data-theme="dark"] .inv-adjust-reason {
	background: #0e1525; border-color: #2a3a52; color: #e2e8f0;
}
[data-theme="dark"] .inv-adjust-input::placeholder { color: #3d4d63; }
[data-theme="dark"] .inv-adjust-input:focus,
[data-theme="dark"] .inv-adjust-date:focus,
[data-theme="dark"] .inv-adjust-reason:focus {
	border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.20);
}
[data-theme="dark"] .inv-adjust-flabel { color: #6b7a90; }
[data-theme="dark"] .inv-adjust-flabel i { color: #4a5a72; }
[data-theme="dark"] .inv-adjust-msg { background: #2a1416; border-color: #5b2326; color: #fca5a5; }
[data-theme="dark"] .inv-adjust-actions { background: #0c1320; border-top-color: #1f2c40; }

/* native datetime-local picker indicator → legible on dark */
[data-theme="dark"] .inv-adjust-date::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.7); }

/* Mobile/tablet inventory card action row — dark mode */
[data-theme="dark"] .inv-mobile-actions { border-bottom-color: #1f2c40; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn { background: #0e1525; border-color: #2a3a52; color: #94a3b8; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn:active { background: #1d4e7e; color: #fff; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn.has-note { color: #6fb0ef; border-color: #2f5a86; }

/* Inventory mobile/desktop polish — dark mode */
[data-theme="dark"] .inv-filters-toggle { background: #0e1525; border-color: #2a3a52; color: #6fb0ef; }
[data-theme="dark"] .inv-filters-toggle .inv-filters-caret { color: #64748b; }
[data-theme="dark"] .inv-card.is-open {
	border-color: #2f5a86; border-left-color: #4a9eff; background: #11203a;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .inv-id-copy { border-bottom-color: rgba(148, 163, 184, 0.45); }
[data-theme="dark"] .inv-id-copy:hover { color: #6fb0ef; border-bottom-color: #6fb0ef; }
[data-theme="dark"] .inv-id-copy.inv-id-copied { color: #4ade80 !important; border-bottom-color: #4ade80; }


/* Inventory mobile refinements v2 — dark mode */
[data-theme="dark"] .inv-stat--action .inv-stat__val { color: #6fb0ef; }
[data-theme="dark"] .inv-stat--action:active { background: #16284a; }
[data-theme="dark"] .inv-card__adjust-btn { background: #11203a; border-color: #2f5a86; color: #6fb0ef; }
[data-theme="dark"] .inv-card__adjust-btn:active { background: #16284a; }
[data-theme="dark"] .inv-id-copy { color: #6fb0ef; }
[data-theme="dark"] .inv-id-copy:hover { color: #93c5fd; }
[data-theme="dark"] .inv-id-copy.inv-id-copied { color: #4ade80 !important; }
[data-theme="dark"] .inv-card__details .inv-detail { border-color: #1f2c40; background: #0e1828; }

/* Physical-unit card (mobile expansion) — dark mode */
[data-theme="dark"] .inv-unit-card {
	background: #0e1828;
	border-color: #243349;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .inv-unit-card__id { color: #6fb0ef; }
[data-theme="dark"] .inv-unit-card__id.inv-id-copied { color: #4ade80 !important; }
[data-theme="dark"] .inv-unit-chip { color: #94a3b8; background: rgba(148,163,184,0.12); }
[data-theme="dark"] .inv-unit-card.status-customer_ready .inv-unit-chip { color: #34d399; background: rgba(16,185,129,0.14); }
[data-theme="dark"] .inv-unit-card.status-moh            .inv-unit-chip { color: #4a9eff; background: rgba(74,158,255,0.14); }
[data-theme="dark"] .inv-unit-card.status-wip            .inv-unit-chip { color: #fbbf24; background: rgba(245,158,11,0.16); }
[data-theme="dark"] .inv-unit-card.status-repair         .inv-unit-chip { color: #fca5a5; background: rgba(239,68,68,0.16); }
[data-theme="dark"] .inv-unit-card.status-truck          .inv-unit-chip { color: #a5b4fc; background: rgba(99,102,241,0.16); }
[data-theme="dark"] .inv-unit-card.status-delivered      .inv-unit-chip { color: #5eead4; background: rgba(20,184,166,0.16); }
[data-theme="dark"] .inv-unit-card.status-second         .inv-unit-chip { color: #fbbf24; background: rgba(245,158,11,0.16); }
[data-theme="dark"] .inv-unit-card.status-waste          .inv-unit-chip { color: #94a3b8; background: rgba(148,163,184,0.16); }
[data-theme="dark"] .inv-unit-card.status-deleted        .inv-unit-chip { color: #fca5a5; background: rgba(185,28,28,0.16); }
[data-theme="dark"] .inv-unit-card__name { color: #94a3b8; }
[data-theme="dark"] .inv-unit-row { border-bottom-color: #1a2436; }
[data-theme="dark"] .inv-unit-row__l { color: #6b7a90; }
[data-theme="dark"] .inv-unit-row__v { color: #dbe4f0; }
[data-theme="dark"] .inv-unit-block { border-top-color: #1a2436; }
[data-theme="dark"] .inv-unit-block__v { color: #b9c4d4; }
[data-theme="dark"] .inv-mobile-actions { border-top-color: #1f2c40; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn { background: #11203a; border-color: #2a3a52; color: #94a3b8; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn:active { background: #1d4e7e; border-color: #1d4e7e; color: #fff; }
[data-theme="dark"] .inv-mobile-actions .inv-action-btn.has-note { color: #6fb0ef; border-color: #2f5a86; }


/* ── Stock Transfer redesign — dark mode (new classes) ──────────────── */
[data-theme="dark"] .transfer-mode-container { background: transparent; box-shadow: none; }
[data-theme="dark"] .transfer-col {
	background: #182132;
	border-color: #263048;
	box-shadow: none;
}
[data-theme="dark"] .transfer-col-head { border-bottom-color: #263048; }
[data-theme="dark"] .transfer-col-head h3 { color: #e2e8f0; }
[data-theme="dark"] .transfer-col-head h3 i,
[data-theme="dark"] .transfer-history-title i { color: #4a9eff; }
[data-theme="dark"] .xfer-col-count { background: #22314a; color: #8ec2ff; }
[data-theme="dark"] .xfer-remove-btn { background: #1f293c; border-color: #344058; color: #94a3b8; }
[data-theme="dark"] .xfer-remove-btn:hover { background: #475569; border-color: #475569; color: #fff; }
[data-theme="dark"] .xfer-materializing { background: rgba(24,33,50,.85); color: #8ec2ff; }
/* Queue tools: ADD accented, FILTER muted; label notch on the dark column. */
[data-theme="dark"] .transfer-col-tools .xfer-tool-add > i { color: #4a9eff; }
[data-theme="dark"] .transfer-col-tools .xfer-tool-add[data-label]::after { color: #8ec2ff; background: #182132; }
[data-theme="dark"] .transfer-col-tools .transfer-search[data-label]::after,
[data-theme="dark"] .transfer-col-tools .transfer-queue-filter[data-label]::after { background: #182132; }

[data-theme="dark"] .xfer-add-btn {
	background: #1c2942; border-color: #31456a; color: #8ec2ff;
}
[data-theme="dark"] .xfer-add-btn:hover { background: #4a9eff; border-color: #4a9eff; color: #0b1220; }

[data-theme="dark"] .transfer-ticket-total { color: #8ec2ff; }
[data-theme="dark"] .transfer-ticket-total i { color: #8ec2ff !important; }

[data-theme="dark"] .transfer-ticket-card.is-active-ticket {
	border-color: #4a9eff !important;
	outline: 2px solid rgba(74, 158, 255, 0.55);
	outline-offset: 1px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .transfer-ticket-card.is-active-ticket .transfer-ticket-head { background: #1c2942; }
[data-theme="dark"] .xfer-trip-combined.is-active-ticket {
	border-color: #4a9eff !important;
	outline: 2px solid rgba(74, 158, 255, 0.55);
	outline-offset: 1px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .xfer-trip-combined.is-active-ticket > .xfer-trip-head {
	background: #1c2942;
}
[data-theme="dark"] .xfer-active-flag { color: #8ec2ff; background: #22314a; }
[data-theme="dark"] .transfer-ticket-card.xfer-focus-flash { animation: xferFocusFlashDark 2.4s ease-out 1; }
@keyframes xferFocusFlashDark {
	0%, 15%  { outline: 3px solid rgba(74,158,255,.70); outline-offset: 1px; border-color: #4a9eff; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
	100%     { outline-color: transparent; box-shadow: 0 2px 8px rgba(0,0,0,0); }
}

[data-theme="dark"] .transfer-tickets-list .no-tickets { border-color: #2b3750; }
[data-theme="dark"] .transfer-tickets-list .no-tickets span { color: #94a3b8; }

/* drag-in-flight lane highlight — dark */
[data-theme="dark"] body.xfer-is-dragging .transfer-ticket-card[data-status="pending"] .transfer-ticket-items,
[data-theme="dark"] body.xfer-is-dragging .transfer-ticket-placeholder .transfer-ticket-items,
[data-theme="dark"] body.xfer-is-dragging #transfer_items_list {
	border-color: #3b6aa0;
	background: #16263f;
}
[data-theme="dark"] #transfer_mode_container .transfer-ticket-items:has(.xfer-ghost),
[data-theme="dark"] .transfer-ticket-items.xfer-ghost-over {
	border-color: #4a9eff;
	background: #1c3350;
	box-shadow: inset 0 0 0 1px rgba(74,158,255,.28);
}

/* History strip — dark */
[data-theme="dark"] .transfer-history-strip { background: #182132; border-color: #263048; }
[data-theme="dark"] .transfer-history-title { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-strip .transfer-history-filter { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .transfer-history-strip .transfer-history-filter i { color: #94a3b8; }
[data-theme="dark"] .transfer-history-strip .transfer-history-filter input { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-caret { color: #94a3b8; }
[data-theme="dark"] #transfer_history_container { border-top-color: #263048; }


/* ── Transfer History redesign — dark ────────────────────────────────── */
[data-theme="dark"] .transfer-history-summary { color: #94a3b8; }
[data-theme="dark"] .transfer-history-max { background: #1f293c; border-color: #344058; color: #94a3b8; }
[data-theme="dark"] .transfer-history-max:hover { background: #22314a; border-color: #31456a; color: #8ec2ff; }

[data-theme="dark"] .transfer-history-toolbar { background: #182132; border-bottom-color: #263048; }
[data-theme="dark"] .thf-preset { background: #1f293c; border-color: #344058; color: #cbd5e1; }
[data-theme="dark"] .thf-preset:hover { border-color: #31456a; color: #8ec2ff; }
[data-theme="dark"] .thf-preset.is-active { background: #4a9eff; border-color: #4a9eff; color: #0b1220; }
[data-theme="dark"] .thf-clear { background: #1f293c; border-color: #344058; color: #94a3b8; }
[data-theme="dark"] .thf-clear:hover { background: #3a1d20; border-color: #7f3336; color: #fca5a5; }
[data-theme="dark"] .transfer-history-toolbar .filter-group { background: #1f293c; border-color: #344058; }
[data-theme="dark"] .transfer-history-toolbar .filter-group:focus-within { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74,158,255,.15); }
[data-theme="dark"] .transfer-history-toolbar .filter-group i { color: #94a3b8; }
[data-theme="dark"] .transfer-history-toolbar .filter-group input,
[data-theme="dark"] .transfer-history-toolbar .filter-group select { color: #e2e8f0; }
[data-theme="dark"] .transfer-history-toolbar .filter-group input::placeholder { color: #64748b; }
[data-theme="dark"] .transfer-history-toolbar .filter-group select option { background: #1f293c; color: #e2e8f0; }
[data-theme="dark"] .transfer-history-toolbar .filter-group[data-label]::before { background: #182132; color: #94a3b8; }

[data-theme="dark"] .transfer-history-thead { border-bottom-color: #263048; }
[data-theme="dark"] .thh { color: #7688a6; }
[data-theme="dark"] button.thh:hover,
[data-theme="dark"] .thh.is-sort { color: #8ec2ff; }

[data-theme="dark"] .transfer-history-row { background: #1b2537; border-color: #2b3750; }
[data-theme="dark"] .transfer-history-row:hover { background: #1e2c44; border-color: #31456a; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
[data-theme="dark"] .thc { color: #cbd5e1; }
[data-theme="dark"] .thc-route { color: #e2e8f0; }
[data-theme="dark"] .thc-route i,
[data-theme="dark"] .thc-pcs { color: #8ec2ff; }
[data-theme="dark"] .transfer-history-row:hover .thc-view { color: #8ec2ff; }
[data-theme="dark"] .transfer-history-empty { color: #7688a6; }

/* ── Vault pending-approval badge (sidebar) ──────────────────────────────────
   Port of vaults.wilbertprecast.com span.pending-orders on Services menu.
   Count of vault_orders_saved awaiting staff approval (funeral-home submissions). */
span.pending-orders {
	position: relative;
	display: inline-block;
	margin-left: 6px;
	padding: 0 5px;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	font-size: .7rem;
	font-weight: 700;
	color: #fff !important;
	background: #e11d48;
	text-align: center;
	border-radius: 20px;
	vertical-align: middle;
	box-sizing: border-box;
}
/* Keep badge readable on dark sidebar hover/active (don't inherit link blue). */
[data-theme="dark"] span.pending-orders,
[data-theme="dark"] .menu-nav-item a.nav-link:hover span.pending-orders,
[data-theme="dark"] .menu-nav-item a.nav-link.active span.pending-orders {
	color: #fff !important;
	background: #f43f5e;
}
