/* MAC'S unified theme — always loaded after page CSS */
:root,
html[data-theme="light"], html.theme-light {
  color-scheme: light;
  --bg:#edf2f7; --bg-soft:#f6f8fb; --surface:#ffffff; --surface-2:#f7f9fc;
  --surface-3:#eaf0f6; --input:#ffffff; --text:#172231; --muted:#607086;
  --border:#d6dee8; --border-strong:#bdc9d6; --accent:#2878d0; --accent-hover:#1f66b2;
  --success:#2f7a4c; --warning:#a06b18; --danger:#b93640;
  --shadow:0 12px 32px rgba(30,48,68,.11);
  --bg2:var(--bg-soft); --bg3:var(--surface-3); --panel:var(--surface); --panel2:var(--surface-2);
  --panel3:var(--surface); --line:var(--border); --line2:var(--border-strong);
}
html[data-theme="dark"], html.theme-dark {
  color-scheme: dark;
  --bg:#0f141b; --bg-soft:#141b24; --surface:#1b232e; --surface-2:#202a36;
  --surface-3:#273241; --input:#121922; --text:#eef3f8; --muted:#a8b4c3;
  --border:#344252; --border-strong:#46576b; --accent:#69a7ee; --accent-hover:#89bbf3;
  --success:#72c58e; --warning:#dfb96b; --danger:#ef7c85;
  --shadow:0 16px 44px rgba(0,0,0,.46);
  --bg2:var(--bg-soft); --bg3:var(--surface-3); --panel:var(--surface); --panel2:var(--surface-2);
  --panel3:var(--surface); --line:var(--border); --line2:var(--border-strong);
  /* Legacy extracted page tokens */
  --c-001:#121922;--c-002:#141b24;--c-003:#18212b;--c-004:#273241;--c-005:#1b232e;
  --c-006:#1b232e;--c-007:#18212b;--c-008:#202a36;--c-009:#273241;--c-010:#344252;
  --c-011:#46576b;--c-012:#9aa8b8;--c-013:#bac5d1;--c-014:#69a7ee;--c-015:#86b6ed;
  --c-016:#69a7ee;--c-017:#b0bcc9;--c-018:#b8c3cf;--c-019:#c4ced9;--c-020:#d0d8e1;
  --c-021:#dae2ea;--c-022:#e5ebf1;--c-023:#eef3f8;--c-024:#dfb96b;--c-025:#ef8b93;
  --c-026:#eef3f8;--c-027:#202a36;--c-028:rgba(255,255,255,.05);--c-029:rgba(255,255,255,.09);
  --c-030:#1b232e;--c-031:#1b232e;--c-032:rgba(105,167,238,.10);--c-033:#1b232e;
  --c-034:#18212b;--c-035:rgba(105,167,238,.11);--c-036:rgba(105,167,238,.14);
  --c-037:rgba(105,167,238,.18);--c-038:rgba(105,167,238,.22);--c-039:rgba(105,167,238,.25);
  --c-040:rgba(105,167,238,.30);--c-041:rgba(105,167,238,.35);--c-042:rgba(105,167,238,.46);
  --c-043:rgba(255,255,255,.035);--c-044:rgba(255,255,255,.16);--c-045:rgba(239,124,133,.34);
  --c-046:rgba(255,255,255,.055);--c-047:rgba(255,255,255,.11);--c-048:#141b24;--c-049:#1b232e;
  --c-050:rgba(239,124,133,.11);--c-051:rgba(239,124,133,.34);--c-052:rgba(239,124,133,.18);
  --c-053:rgba(239,124,133,.22);--c-054:rgba(223,185,107,.11);--c-055:rgba(223,185,107,.15);
  --c-056:rgba(223,185,107,.21);--c-057:rgba(255,255,255,.018);--c-058:rgba(255,255,255,.024);
  --c-059:rgba(255,255,255,.03);--c-060:rgba(255,255,255,.038);--c-061:rgba(255,255,255,.045);
  --c-062:rgba(255,255,255,.052);--c-063:rgba(255,255,255,.06);--c-064:rgba(255,255,255,.07);
  --c-065:rgba(255,255,255,.08);--c-066:rgba(255,255,255,.09);--c-067:rgba(255,255,255,.10);
  --c-068:rgba(255,255,255,.12);--c-069:rgba(255,255,255,.15);--c-070:#1b232e;
  --c-071:rgba(105,167,238,.06);--c-072:rgba(105,167,238,.09);--c-073:rgba(105,167,238,.11);
  --c-074:rgba(105,167,238,.13);--c-075:rgba(105,167,238,.16);--c-076:rgba(105,167,238,.19);
  --c-077:rgba(105,167,238,.22);--c-078:rgba(105,167,238,.36);--c-079:rgba(114,197,142,.10);
  --c-080:rgba(114,197,142,.16);--c-081:rgba(114,197,142,.40);--c-082:rgba(255,255,255,.08);
  --c-083:rgba(114,197,142,.12);--c-084:rgba(114,197,142,.22);--c-085:rgba(255,255,255,.08);
  --c-086:rgba(255,255,255,.24);--c-087:#1b232e;--c-088:#1b232e;--c-089:#1b232e;
  --c-090:transparent;--c-091:#eef3f8;
}
html,body{background:var(--bg)!important;color:var(--text)!important}
body{transition:background-color .18s ease,color .18s ease}
.header,.topbar{background:color-mix(in srgb,var(--surface) 94%,transparent)!important;color:var(--text)!important;border-color:var(--border)!important}
.sidebar{background:linear-gradient(180deg,var(--surface),var(--bg-soft))!important;color:var(--text)!important;border-color:var(--border)!important}
.themeToggle{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font:inherit;font-weight:800;cursor:pointer}
.themeToggleText{white-space:nowrap}.themeToggleIcon{font-size:17px}.isHidden{display:none!important}
input:not([type=checkbox]):not([type=radio]),select,textarea,.form-control,.searchInput{background:var(--input)!important;color:var(--text)!important;border-color:var(--border-strong)!important}
input::placeholder,textarea::placeholder{color:var(--muted)!important} option{background:var(--input);color:var(--text)}
.card,.panel,.box,.widget,.tile,.stat,.statBox,.statCard,.summaryCard,.profileCard,.infoCard,.formCard,.listCard,.contentCard,.filterCard,.searchCard,.tableWrap,.tableCard,.modalContent,.modal-content,.modalBox,.dialog,.drawer,.popover,.dropdown-menu,.autocomplete-list,.suggestions,.tabs,.tabBar,.pagination,.emptyState,.notice,.alert,.toolbar,.filterBar,.filters,.actionsBar,.pageHeader,.sectionHeader,.rowCard,.driverRow,.truckRow,.trailerRow{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:var(--shadow)}
table,thead,tbody,tr,th,td{color:var(--text)!important;border-color:var(--border)!important}th{background:var(--surface-3)!important}td{background:var(--surface)!important}tr:nth-child(even) td{background:var(--surface-2)!important}
h1,h2,h3,h4,h5,h6,label,strong,b,.title,.cardTitle{color:var(--text)!important}.muted,.sub,.hint,.help,.description,.subtitle,small{color:var(--muted)!important}
.btn.secondary,button.secondary,.tab:not(.active),.profileTab:not(.active){background:var(--surface-3)!important;color:var(--text)!important;border-color:var(--border)!important}
hr{border-color:var(--border)!important}

/* Dark mode hard reset: remove leftover light page backgrounds, then rebuild surfaces. */
html[data-theme="dark"] body :where(div,section,article,aside,main,nav,form,fieldset,ul,ol,li,header,footer){border-color:var(--border)}
html[data-theme="dark"] body :where(.content,.mainContent,.pageContent,.appContent,.wrap,.container,.workspace){background-color:transparent!important;color:var(--text)!important}
html[data-theme="dark"] body :where([class*="Card"],[class*="card"],[class*="Panel"],[class*="panel"],[class*="Box"],[class*="box"],[class*="Row"],[class*="row"],[class*="List"],[class*="list"],[class*="Bar"],[class*="bar"],[class*="Stats"],[class*="stats"]):not(.btn):not(button):not(.badge):not(.pill):not(.chip):not(.pdfPage):not(.pdfPageCard):not(.pdfBigStage){background-color:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}

/* PDF and image editor: charcoal UI with subtle gray/black grid workspaces. */
html[data-theme="dark"] :is(.pdfWork,.pdfPages,.pdfBigViewer,.pdfThumbPanel,.pdfCanvasArea,.imageEditorWorkspace,.editorCanvasWrap,.canvasWorkspace){
  background-color:#15191f!important;
  background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px)!important;
  background-size:22px 22px!important;
  color:var(--text)!important;
}
html[data-theme="dark"] :is(.pdfPanel,.pdfSideTools,.pdfModalTop,.pdfParsTop,.pdfToolbar){background:#20252d!important;color:var(--text)!important;border-color:#353d48!important}
html[data-theme="dark"] :is(.pdfBabyHero,.pdfUploadBox,.pdfModalBox,.pdfParsBox,.pdfParsCard){background:#1b2027!important;color:var(--text)!important;border-color:#363e49!important}
/* Actual documents/canvases remain white by design. */
html[data-theme="dark"] :is(.pdfPage,.pdfPageCanvas,.pdfBigStage,.rogersSheet,.printSheet,canvas.documentCanvas){background:#fff!important;color:#111!important}
@media(max-width:640px){.themeToggleText{display:none}.themeToggle{width:40px;justify-content:center;padding:8px}}

/* Operations command board — complete dark palette */
html[data-theme="dark"] .operationsPage{
  --ops-surface:#1b232e;
  --ops-surface-2:#202a36;
  --ops-surface-3:#273241;
  --ops-deep:#151c25;
  --ops-border:#39495b;
  --ops-border-strong:#4b5e73;
  --ops-text:#eef3f8;
  --ops-muted:#a9b6c6;
  --ops-link:#83baf4;
}
html[data-theme="dark"] .operationsPage .opsHero{
  background:linear-gradient(135deg,#1d2835 0%,#18222d 58%,#141c25 100%)!important;
  border-color:var(--ops-border-strong)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.34)!important;
}
html[data-theme="dark"] .operationsPage .opsHero:after{
  background:radial-gradient(circle,rgba(80,145,216,.20),rgba(80,145,216,0) 68%)!important;
}
html[data-theme="dark"] .operationsPage .opsEyebrow{color:#8bbcf0!important}
html[data-theme="dark"] .operationsPage .opsHero h2{color:var(--ops-text)!important}
html[data-theme="dark"] .operationsPage .opsHero p{color:var(--ops-muted)!important}
html[data-theme="dark"] .operationsPage .opsMini{
  background:rgba(10,16,23,.50)!important;
  border-color:var(--ops-border)!important;
}
html[data-theme="dark"] .operationsPage .opsMini strong{color:var(--ops-text)!important}
html[data-theme="dark"] .operationsPage .opsMini span{color:#9fb0c3!important}

html[data-theme="dark"] .operationsPage .opsStat,
html[data-theme="dark"] .operationsPage .opsCard{
  background:var(--ops-surface)!important;
  color:var(--ops-text)!important;
  border-color:var(--ops-border)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.27)!important;
}
html[data-theme="dark"] .operationsPage .opsStatLabel{color:#9eb0c4!important}
html[data-theme="dark"] .operationsPage .opsStat strong{color:var(--ops-text)!important}
html[data-theme="dark"] .operationsPage .opsStat small{color:var(--ops-muted)!important}

html[data-theme="dark"] .operationsPage .opsHead{
  background:linear-gradient(180deg,#263241,#202a36)!important;
  border-bottom-color:var(--ops-border-strong)!important;
}
html[data-theme="dark"] .operationsPage .opsHeadCopy strong{color:var(--ops-text)!important}
html[data-theme="dark"] .operationsPage .opsHeadCopy small{color:var(--ops-muted)!important}
html[data-theme="dark"] .operationsPage .opsCount{
  background:#18212b!important;
  border-color:#52657a!important;
  color:#dbe8f5!important;
}

html[data-theme="dark"] .operationsPage .opsQuickGrid{background:var(--ops-deep)!important}
html[data-theme="dark"] .operationsPage .opsQuick{
  background:linear-gradient(180deg,#263241,#202a36)!important;
  border-color:var(--ops-border)!important;
  color:var(--ops-text)!important;
}
html[data-theme="dark"] .operationsPage .opsQuick:hover{
  background:linear-gradient(180deg,#2b3b4d,#243242)!important;
  border-color:#679bd3!important;
}
html[data-theme="dark"] .operationsPage .opsQuick strong{color:var(--ops-text)!important}
html[data-theme="dark"] .operationsPage .opsQuick small{color:var(--ops-muted)!important}

html[data-theme="dark"] .operationsPage .opsOrder{
  background:#1c2530!important;
  border-bottom-color:var(--ops-border)!important;
}
html[data-theme="dark"] .operationsPage .opsOrder:nth-child(even){background:#202a36!important}
html[data-theme="dark"] .operationsPage .opsOrder:hover{background:#263646!important}
html[data-theme="dark"] .operationsPage .opsTrip a,
html[data-theme="dark"] .operationsPage .opsTimelineBody a{color:var(--ops-link)!important}
html[data-theme="dark"] .operationsPage .opsDate,
html[data-theme="dark"] .operationsPage .opsRoute,
html[data-theme="dark"] .operationsPage .opsTimelineBody small,
html[data-theme="dark"] .operationsPage .opsAvailableTitle span{color:var(--ops-muted)!important}
html[data-theme="dark"] .operationsPage .opsCustomer strong,
html[data-theme="dark"] .operationsPage .opsAvailableTitle strong{color:var(--ops-text)!important}

html[data-theme="dark"] .operationsPage .opsEquipment span,
html[data-theme="dark"] .operationsPage .opsAsset,
html[data-theme="dark"] .operationsPage .opsStatusBadge,
html[data-theme="dark"] .operationsPage .opsTimelineIcon{
  background:#263241!important;
  border-color:#4a5c70!important;
  color:#e5edf6!important;
}
html[data-theme="dark"] .operationsPage .opsEquipment .isMissing,
html[data-theme="dark"] .operationsPage .opsStatusBadge.isUrgent{
  background:#3b2228!important;
  border-color:#8f4c57!important;
  color:#ffb8c0!important;
}
html[data-theme="dark"] .operationsPage .opsStatusBadge.isOverdue{
  background:#3b3020!important;
  border-color:#8d713d!important;
  color:#f3d28b!important;
}
html[data-theme="dark"] .operationsPage .opsReadyTop{color:#c5d1de!important}
html[data-theme="dark"] .operationsPage .opsProgress{background:#101720!important}
html[data-theme="dark"] .operationsPage progress.opsProgress::-webkit-progress-bar{background:#101720!important}
html[data-theme="dark"] .operationsPage .opsIssueLine{color:#e6a4ae!important}

html[data-theme="dark"] .operationsPage .opsTimelineItem,
html[data-theme="dark"] .operationsPage .opsAvailableBlock{
  background:var(--ops-surface)!important;
  border-bottom-color:var(--ops-border)!important;
}
html[data-theme="dark"] .operationsPage .opsTimelineItem:nth-child(even),
html[data-theme="dark"] .operationsPage .opsAvailableBlock:nth-child(even){background:#1d2732!important}
html[data-theme="dark"] .operationsPage .opsTimelineBody small.isOverdue{color:#ff9ba4!important}
html[data-theme="dark"] .operationsPage .opsEmpty{color:#aab8c8!important}
html[data-theme="dark"] .operationsPage .opsAssetCloud{background:transparent!important}
html[data-theme="dark"] .operationsPage .opsAsset{color:#dfeafa!important}

/* Do not let generic extracted class matching repaint operation internals light. */
html[data-theme="dark"] .operationsPage :where(.opsHeroTop,.opsHeroActions,.opsHeroStrip,.opsStatLabel,.opsHeadCopy,.opsOrderList,.opsTrip,.opsCustomer,.opsEquipment,.opsReady,.opsReadyTop,.opsOrderStatus,.opsTimeline,.opsTimelineBody,.opsAvailableTitle,.opsAssetCloud){
  background-color:transparent!important;
  box-shadow:none!important;
}

/* ========================================================================
   FINAL SITE-WIDE DARK NORMALIZATION
   Operations is the visual reference. This block intentionally comes last.
   ======================================================================== */
html[data-theme="dark"],html.theme-dark{
  --bg:#111820;
  --bg-soft:#151e28;
  --surface:#1b2531;
  --surface-2:#202c39;
  --surface-3:#2a3848;
  --input:#151e28;
  --text:#eef4fa;
  --muted:#a9b7c7;
  --border:#3b4d60;
  --border-strong:#52677d;
  --accent:#4b96e6;
  --accent-hover:#68aaf0;
  --card:var(--surface);
  --card2:var(--surface-2);
  --primary:var(--accent);
  --primary2:var(--accent-hover);
  --panel:var(--surface);
  --panel2:var(--surface-2);
  --panel3:var(--surface-3);
  --line:var(--border);
  --line2:var(--border-strong);
  --bg2:var(--bg-soft);
  --bg3:var(--surface-3);
}

html[data-theme="dark"],html[data-theme="dark"] body{
  background:#111820!important;
  color:var(--text)!important;
}
html[data-theme="dark"] body{
  background-image:
    radial-gradient(circle at 15% 0%,rgba(58,111,166,.12),transparent 32rem),
    radial-gradient(circle at 92% 12%,rgba(58,111,166,.08),transparent 30rem),
    linear-gradient(145deg,#111820 0%,#151e28 52%,#111820 100%)!important;
  background-attachment:fixed!important;
}
html[data-theme="dark"] body::before{
  opacity:.12!important;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px)!important;
}
html[data-theme="dark"] :is(.appShell,.mainArea,.wrap,.page,.pageWrap,.pageShell,.content,.contentArea,.mainContent,.pageContent,.appContent){
  background-color:transparent!important;
  color:var(--text)!important;
}

/* Sidebar and top bar readability */
html[data-theme="dark"] .sidebar{
  background:linear-gradient(180deg,#18222d 0%,#131b24 100%)!important;
  border-right-color:#33475a!important;
  box-shadow:12px 0 34px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] :is(.sideBrand,.sideNavSection){border-color:#34485b!important}
html[data-theme="dark"] :is(.sideNavHeading,.navHeading,.sideSectionTitle){color:#91a6bc!important}
html[data-theme="dark"] .sideNav a,
html[data-theme="dark"] .sideNav a:visited{
  color:#c6d2df!important;
  background:transparent!important;
}
html[data-theme="dark"] .sideNav a:hover{
  color:#fff!important;
  background:#243448!important;
  border-color:#3d536b!important;
}
html[data-theme="dark"] .sideNav a.active{
  color:#fff!important;
  background:linear-gradient(#3f91e7,#2878d0)!important;
  border-color:#5ba3ed!important;
}
html[data-theme="dark"] :is(.header,.topbar){
  background:linear-gradient(180deg,#202c39 0%,#1a2430 100%)!important;
  border-bottom-color:#3b4d60!important;
  color:var(--text)!important;
  box-shadow:0 4px 16px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] :is(.header h1,.topbar h1,.headerTitle,.topbarTitle){color:#f4f8fc!important}
html[data-theme="dark"] :is(.header .sub,.topbar .sub,.headerSubtitle,.topbarSubtitle){color:#a9b7c7!important}
html[data-theme="dark"] :is(.themeToggle,.mobileMenuBtn,.mobileCloseBtn){background:#2a3848!important;color:#f4f8fc!important;border-color:#52677d!important}

/* Shared cards, sections, stats and headers */
html[data-theme="dark"] :is(
  .card,.panel,.box,.widget,.section,.sheet,.contentCard,.formCard,.profileCard,
  .driverEditorCard,.templateEditorCard,.ordersList,.operationCard,.fleetCard,
  .stat,.statCard,.stat-card,.stats-card,.pageStat,.summaryCard,.infoCard,
  .filterCard,.searchCard,.listCard,.tableCard,.rowCard,.driverRow,.truckRow,.trailerRow,
  .modalContent,.modal-content,.modalBox,.dialogContent,.dialog,.drawer,.popover,
  .dropdownMenu,.dropdown-menu,.menuPanel,.popoverPanel,.suggestions,.autocomplete-list
){
  background:#1b2531!important;
  background-image:none!important;
  color:var(--text)!important;
  border-color:#3b4d60!important;
  box-shadow:0 8px 22px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] :is(.pageStats,.stats,.profileStats,.summaryStats){background:transparent!important;box-shadow:none!important;border-color:transparent!important}
html[data-theme="dark"] :is(.pageStat,.statCard,.stat,.stat-card,.stats-card){
  background:linear-gradient(145deg,#202c39,#1b2531)!important;
  border:1px solid #405368!important;
}
html[data-theme="dark"] :is(.pageStat span,.statLabel,.stat-label,.stat small,.pageStat small,.statHint){color:#a9b7c7!important}
html[data-theme="dark"] :is(.pageStat strong,.statValue,.stat-value,.stat strong){color:#f4f8fc!important}
html[data-theme="dark"] :is(.sectionHeader,.pageHeader,.cardHeader,.panelHeader,.tableHeader,.moduleHeader,.opsHead,.quickLaunchHeader,[class*="Header"]):not(.header):not(.topbar){
  background:linear-gradient(180deg,#293746,#222e3b)!important;
  color:#f1f6fb!important;
  border-color:#465a70!important;
}
html[data-theme="dark"] :is(.sectionHeader h1,.sectionHeader h2,.sectionHeader h3,.pageHeader h1,.pageHeader h2,.cardHeader h2,.cardHeader h3,.panelHeader h2,.panelHeader h3){color:#f4f8fc!important}

/* Text normalization */
html[data-theme="dark"] body :is(p,span,div,td,li,dd,dt){border-color:var(--border)}
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,label,legend,strong,b,.title,.cardTitle,.cellPrimary,.detail strong){color:#eef4fa!important}
html[data-theme="dark"] :is(.sub,.subtitle,.description,.muted,.help,.hint,.meta,.small,.tiny,.cellSub,.statHint,small){color:#a9b7c7!important}
html[data-theme="dark"] a:not(.btn):not(.button){color:#7db8f4!important}
html[data-theme="dark"] a:not(.btn):not(.button):hover{color:#acd3fb!important}

/* Tables and list rows */
html[data-theme="dark"] :is(.tableWrap,.ordersTableWrap,.sheetTableWrap,.responsiveTable,.dispatchSheetScroll,.profTable){
  background:#18222d!important;
  border-color:#465a70!important;
  box-shadow:0 8px 22px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] table{background:#18222d!important;color:#eaf1f8!important}
html[data-theme="dark"] :is(thead th,.ordersTable th,.driverSheet thead th,.driverSheet thead th.stickyCol){
  background:#2b3948!important;
  background-image:none!important;
  color:#eef4fa!important;
  border-color:#52677d!important;
}
html[data-theme="dark"] :is(tbody tr,tbody tr:nth-child(odd),.ordersTable tbody tr){background:#1b2531!important}
html[data-theme="dark"] :is(tbody tr:nth-child(even),.driverSheet tbody tr[data-search]:nth-child(even),.driverSheet tbody tr[data-search]:nth-child(even) td){background:#202c39!important}
html[data-theme="dark"] :is(tbody td,.ordersTable td,.driverSheet td){
  background:transparent!important;
  color:#dbe5ef!important;
  border-color:#3b4d60!important;
}
html[data-theme="dark"] :is(tbody tr:hover,.ordersTable tbody tr:hover){background:#263649!important}
html[data-theme="dark"] .driverSheet tbody tr[data-search]:nth-child(odd),
html[data-theme="dark"] .driverSheet tbody tr[data-search]:nth-child(odd) td,
html[data-theme="dark"] .driverSheet tbody tr[data-search]:nth-child(odd) td.stickyCol{background:#1b2531!important}
html[data-theme="dark"] .driverNoMatchesRow td{background:#202c39!important;color:#eef4fa!important}

/* Forms */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .searchInput,
html[data-theme="dark"] .topbarSearchInput{
  background:#151e28!important;
  color:#eef4fa!important;
  border-color:#465a70!important;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#8295aa!important}
html[data-theme="dark"] :is(input,select,textarea):focus{background:#18222d!important;border-color:#5da5ee!important;box-shadow:0 0 0 3px rgba(75,150,230,.18)!important}
html[data-theme="dark"] option{background:#18222d!important;color:#eef4fa!important}
html[data-theme="dark"] fieldset{background:#18222d!important;border-color:#465a70!important}

/* Buttons: make secondary controls readable instead of nearly black */
html[data-theme="dark"] :is(button,.btn,.fullBtn,input[type="submit"],input[type="button"],a.button):not(.secondary):not(.ghost):not(.danger){
  background:linear-gradient(#3f91e7,#2878d0)!important;
  color:#fff!important;
  border-color:#5ba3ed!important;
}
html[data-theme="dark"] :is(.btn.secondary,button.secondary,a.secondary,.secondaryBtn,.btn.ghost,.ghostBtn,.actions .btn.secondary){
  background:linear-gradient(#304155,#273647)!important;
  color:#e9f1f8!important;
  border-color:#5a7088!important;
  box-shadow:inset 0 1px rgba(255,255,255,.06),0 2px 5px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] :is(.btn.secondary,button.secondary,a.secondary,.secondaryBtn,.btn.ghost,.ghostBtn):hover{
  background:linear-gradient(#3a4e64,#304156)!important;
  color:#fff!important;
  border-color:#75aee8!important;
}
html[data-theme="dark"] :is(button.danger,.btn.danger,.dangerBtn){background:#542f35!important;color:#ffced2!important;border-color:#8b4c55!important}
html[data-theme="dark"] :is(button:disabled,.btn:disabled,.disabled){color:#8998a8!important;background:#222e3b!important;border-color:#3b4d60!important}

/* Tabs, badges, pills, alerts */
html[data-theme="dark"] :is(.tabs,.tabBar,.segmented,.filterTabs,.profileTabs,.subnav){background:#18222d!important;border-color:#405368!important}
html[data-theme="dark"] :is(.tab,.tabs a,.tabBar a,.segmented button,.filterTabs a,.profileTabs a,.profileTab,.subnav a):not(.active){background:#202c39!important;color:#cbd6e1!important;border-color:#3f5266!important}
html[data-theme="dark"] :is(.tab.active,.tabs a.active,.tabBar a.active,.segmented button.active,.filterTabs a.active,.profileTabs a.active,.profileTab.active,.subnav a.active){background:#327fcf!important;color:#fff!important;border-color:#68aaf0!important}
html[data-theme="dark"] :is(.badge,.pill,.chip,.statusPill,.tag){background:#293746!important;color:#dbe5ef!important;border-color:#536a81!important}
html[data-theme="dark"] :is(.badge.good,.badge.success,.pill.success,.statusPill.success){background:#1f4635!important;color:#bde9ce!important;border-color:#397358!important}
html[data-theme="dark"] :is(.badge.warning,.badge.warn,.pill.warn,.statusPill.warn){background:#4e3b1d!important;color:#ffe0a5!important;border-color:#826633!important}
html[data-theme="dark"] :is(.badge.urgent,.badge.danger,.pill.danger,.statusPill.danger){background:#502d33!important;color:#ffced2!important;border-color:#86464f!important}
html[data-theme="dark"] :is(.badge.info,.pill.info,.statusPill.info){background:#203f60!important;color:#c9e4ff!important;border-color:#3d6f9e!important}
html[data-theme="dark"] :is(.alert,.notice,.flash,.message,.statusBox,.emptyState,.empty,.hintBox){background:#202c39!important;color:#cbd6e1!important;border-color:#465a70!important;box-shadow:none!important}

/* Force common legacy light backgrounds dark without touching actual documents */
html[data-theme="dark"] body :is(
  [class*="stat"],[class*="Stat"],[class*="summary"],[class*="Summary"],
  [class*="toolbar"],[class*="Toolbar"],[class*="filter"],[class*="Filter"],
  [class*="queue"],[class*="Queue"],[class*="equipment"],[class*="Equipment"],
  [class*="launch"],[class*="Launch"],[class*="result"],[class*="Result"]
):not(.pdfPage):not(.pdfPageCard):not(.pdfBigStage):not(canvas){
  border-color:var(--border)!important;
}

/* Editors: charcoal and gray/black grid work areas */
html[data-theme="dark"] :is(
  .pdfWork,.pdfPages,.pdfBigViewer,.pdfThumbPanel,.pdfCanvasArea,.pdfWorkspace,
  .imageEditorWorkspace,.editorCanvasWrap,.canvasWorkspace,.imageWorkspace,.editorStage
){
  background-color:#11161c!important;
  background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.38) 1px,transparent 1px)!important;
  background-size:22px 22px!important;
}
/* Documents themselves intentionally stay white. */
html[data-theme="dark"] :is(.pdfPage,.pdfPageCanvas,.pdfBigStage,.rogersSheet,.printSheet,canvas.documentCanvas){background:#fff!important;color:#111!important}

/* Final screenshot-driven dark-mode cleanup */
html[data-theme="dark"] body{background:#0f1822!important;color:#e8eef6!important}
html[data-theme="dark"] .mainContent,
html[data-theme="dark"] .content,
html[data-theme="dark"] .pageContent,
html[data-theme="dark"] main{background:#0f1822!important}

/* Dispatch calendar: remove light control bar, stats and alert surfaces */
html[data-theme="dark"] :is(.dispatchToolbar,.calendarToolbar,.viewToolbar,.dateToolbar,.dispatchFilters,.dispatchTopBar){background:#1b2734!important;border-color:#3d5064!important;color:#eef4fa!important}
html[data-theme="dark"] :is(.dispatchStat,.dispatchStats>*,.calendarStat,.summaryCard,.metricCard){background:linear-gradient(145deg,#202c39,#1a2531)!important;color:#eef4fa!important;border-color:#405368!important}
html[data-theme="dark"] :is(.dispatchStat,.calendarStat,.summaryCard,.metricCard) :is(h1,h2,h3,h4,strong,b,span,p,small){color:inherit!important}
html[data-theme="dark"] :is(.attentionCentre,.attentionCenter,.dispatchAlert,.alertBar){background:#332d1f!important;color:#ffe7a3!important;border-color:#7d6631!important}
html[data-theme="dark"] :is(.dayHeader,.dateHeader,.dispatchDateHeader){background:#263545!important;color:#eaf2fb!important;border-color:#496077!important}

/* Motive */
html[data-theme="dark"] :is(.motiveWrap,.fleetShell,.motiveShell){background:#131e29!important;border-color:#3b4e62!important}
html[data-theme="dark"] :is(.fleetTabs,.motiveTabs,.motiveTop,.fleetTop){background:#1c2835!important;border-color:#415469!important}
html[data-theme="dark"] :is(.fleetStat,.motiveStat,.fleetStats>*,.motiveStats>*){background:linear-gradient(145deg,#263442,#202b37)!important;color:#f2f6fb!important;border-color:#45596e!important}
html[data-theme="dark"] :is(.fleetStat,.motiveStat,.fleetStats>*,.motiveStats>*) :is(span,p,small,b,strong){color:inherit!important}

/* Locations, contacts and brokers */
html[data-theme="dark"] :is(.locationCard,.placeCard,.companyCard,.contactCompany,.brokerCompany,.contactGroup,.brokerGroup){background:#1b2734!important;color:#eaf1f8!important;border-color:#41556a!important}
html[data-theme="dark"] :is(.locationCard,.placeCard,.companyCard,.contactCompany,.brokerCompany,.contactGroup,.brokerGroup) :is(h2,h3,h4,b,strong,p,span,div,td){color:#eaf1f8!important}
html[data-theme="dark"] :is(.locationCard,.placeCard,.companyCard,.contactCompany,.brokerCompany,.contactGroup,.brokerGroup) :is(.muted,small,.subtitle,.meta){color:#aebccc!important}
html[data-theme="dark"] :is(.contactTable,.brokerTable,.companyTable) thead,
html[data-theme="dark"] :is(.contactTable,.brokerTable,.companyTable) th{background:#2a3a4a!important;color:#f5f8fc!important}
html[data-theme="dark"] :is(.contactTable,.brokerTable,.companyTable) tbody tr,
html[data-theme="dark"] :is(.contactTable,.brokerTable,.companyTable) td{background:#1c2936!important;color:#e6edf5!important;border-color:#40546a!important}
html[data-theme="dark"] :is(.contactTable,.brokerTable,.companyTable) tbody tr:nth-child(even) td{background:#202f3d!important}
html[data-theme="dark"] :is(.dropText,.puText,.locationNotes,.appointmentInfo,.locationBody,.copyBlock,pre){background:#182430!important;color:#e8eef5!important;border-color:#3f5368!important}

/* Dispatch maker: every editor field must be dark */
html[data-theme="dark"] .rbAutoShell,
html[data-theme="dark"] .rbPasteCard,
html[data-theme="dark"] .rbTruckList,
html[data-theme="dark"] .rbPreviewCard,
html[data-theme="dark"] .emailBuilderShell,
html[data-theme="dark"] .emailFormPanel,
html[data-theme="dark"] .emailOutputPanel{background:#182430!important;color:#eaf1f8!important;border-color:#40546a!important}
html[data-theme="dark"] .dispatchmaker textarea,
html[data-theme="dark"] body[class*="dispatchmaker"] textarea,
html[data-theme="dark"] :is(.rbPasteBox,.smallTextArea,.massDispatchBlock textarea,.emailBuilderShell textarea,.emailFormPanel textarea,.emailOutputPanel textarea,.rbDispatchPreview){background:#101a24!important;color:#edf4fb!important;border-color:#4b6178!important;caret-color:#fff!important}
html[data-theme="dark"] :is(.rbPasteBox,.smallTextArea,.massDispatchBlock textarea,.emailBuilderShell textarea,.emailFormPanel textarea,.emailOutputPanel textarea)::placeholder{color:#8495a7!important}
html[data-theme="dark"] :is(.rbTruckItem,.rbPill,.rbSubjectCopyLine input,.localOptionsGrid input){background:#1d2a37!important;color:#eef4fa!important;border-color:#455b70!important}

/* PDF and image editor chrome dark; documents/canvases stay white */
html[data-theme="dark"] :is(.pdfBabyWrap,.pdfBabyHero,.pdfPanel,.pdfPanel:first-child,.pdfPanel:first-child h3,.pdfUploadBox,.pdfSummary,.pdfSplitPill,.pdfStatus,.pdfModalBox,.pdfModalTop,.pdfSideTools,.pdfSideTools:before,.pdfCoverAutofill,.pdfZoomRow,.pdfParsBox,.pdfParsTop,.pdfParsCard){background:#1b222b!important;color:#e9eff6!important;border-color:#3b4653!important;box-shadow:none!important}
html[data-theme="dark"] :is(.pdfPanel:first-child .pdfHint,.pdfTiny,.pdfLibs,.pdfMiniLabel,.rangeRow,.checkRow,.objectTip){color:#aeb9c6!important}
html[data-theme="dark"] :is(.pdfSmallBtn,.pdfDangerBtn){background:#263340!important;color:#eef3f8!important;border-color:#4b5d70!important}
html[data-theme="dark"] :is(.pdfSmallBtn,.pdfDangerBtn):hover{background:#304153!important;color:#fff!important;border-color:#66819d!important}
html[data-theme="dark"] :is(.pdfSideTools textarea,.pdfSideTools input,.pdfSideTools select){background:#111b25!important;color:#edf3f9!important;border-color:#4b5f74!important}
html[data-theme="dark"] :is(.pdfWork>main,.pdfPages,.pdfBigViewer,.imageCanvasBox,.imageCardPreview){background-color:#11171e!important;background-image:linear-gradient(45deg,#171f28 25%,transparent 25%),linear-gradient(-45deg,#171f28 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#171f28 75%),linear-gradient(-45deg,transparent 75%,#171f28 75%)!important;background-size:20px 20px!important;background-position:0 0,0 10px,10px -10px,-10px 0!important}
html[data-theme="dark"] .pdfEmpty{background:#e9eef4!important;color:#253243!important;border-color:#9caaba!important}
html[data-theme="dark"] :is(.pdfPage,.pdfPageCard,.pdfThumbStage,.pdfBigStage,.imageCanvas,canvas){--document-bg:#fff}

/* Buttons that became too dim */
html[data-theme="dark"] :is(button,.btn,a.btn,.button):not(:disabled):not(.danger):not(.logoutBtn){color:#f4f8fc!important}
html[data-theme="dark"] :is(.secondary,.btnSecondary,.ghostBtn,.outlineBtn){background:#273646!important;color:#f3f7fb!important;border-color:#526b83!important}

/* 2026-07-12 final targeted dark-mode cleanup */
html[data-theme="dark"] .dispatchControls,
html[data-theme="dark"] .dispatchStats > div,
html[data-theme="dark"] .dispatchCalendarDay > header,
html[data-theme="dark"] .dispatchAttention,
html[data-theme="dark"] .dispatchCalendarScroll{
  background:#1b2734!important;
  color:#eef4fa!important;
  border-color:#42576c!important;
}
html[data-theme="dark"] .dispatchStats > div{background:linear-gradient(145deg,#202d3a,#192430)!important}
html[data-theme="dark"] .dispatchStats > div :is(span,strong,small){color:#eaf1f8!important}
html[data-theme="dark"] .dispatchAttention{background:#332d1f!important;color:#ffe6a3!important;border-color:#7b6531!important}
html[data-theme="dark"] .dispatchCalendarDay > header{background:#263545!important}
html[data-theme="dark"] .dispatchViewTabs,
html[data-theme="dark"] .dispatchDateNav{background:transparent!important}

html[data-theme="dark"] .motiveCard,
html[data-theme="dark"] .motiveTabs,
html[data-theme="dark"] .motiveSearch,
html[data-theme="dark"] .motiveStats,
html[data-theme="dark"] .cacheNote{
  background:#182430!important;
  color:#eaf1f8!important;
  border-color:#40546a!important;
}
html[data-theme="dark"] .motiveStat{background:linear-gradient(145deg,#253341,#1d2935)!important;border-color:#465b70!important}
html[data-theme="dark"] .motiveTable th{background:#2a3948!important;color:#edf4fb!important}
html[data-theme="dark"] .motiveTable td{background:#1a2632!important;color:#dce6f0!important}
html[data-theme="dark"] .motiveTable tbody tr:nth-child(even) td{background:#1f2c39!important}

html[data-theme="dark"] .directoryListCard,
html[data-theme="dark"] .place,
html[data-theme="dark"] .placeTop,
html[data-theme="dark"] .infoPanel,
html[data-theme="dark"] .info,
html[data-theme="dark"] .copybox{
  background:#1b2734!important;
  color:#eaf1f8!important;
  border-color:#42576c!important;
}
html[data-theme="dark"] .place .name{color:#f3f7fb!important}
html[data-theme="dark"] .place .meta{color:#aebccc!important}
html[data-theme="dark"] .copybox{background:#15212d!important;color:#e8eef5!important}

html[data-theme="dark"] .contactSheetCard,
html[data-theme="dark"] .companyBlock,
html[data-theme="dark"] .companyHead,
html[data-theme="dark"] .sheetScroll{
  background:#1b2734!important;
  color:#eaf1f8!important;
  border-color:#42576c!important;
}
html[data-theme="dark"] .companyHead{background:#243444!important}
html[data-theme="dark"] .companyTitle{color:#f3f7fb!important}
html[data-theme="dark"] .companyMeta{color:#aebccc!important;opacity:1!important}
html[data-theme="dark"] .contactSheet th{background:#2b3b4b!important;color:#f3f7fb!important;border-color:#4a6075!important}
html[data-theme="dark"] .contactSheet tbody tr:nth-child(odd),
html[data-theme="dark"] .contactSheet tbody tr:nth-child(odd) td{background:#1b2734!important;color:#e5edf5!important;border-color:#40546a!important}
html[data-theme="dark"] .contactSheet tbody tr:nth-child(even),
html[data-theme="dark"] .contactSheet tbody tr:nth-child(even) td{background:#202f3d!important;color:#e5edf5!important;border-color:#40546a!important}
html[data-theme="dark"] .contactNoMatchesRow{background:#202f3d!important;color:#eef4fa!important}

html[data-theme="dark"] .pdfEmpty{
  background:#1b2734!important;
  color:#d9e4ef!important;
  border-color:#536a80!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .pdfEmpty a,
html[data-theme="dark"] .pdfEmpty button{color:#8ec4fa!important}
html[data-theme="dark"] .pdfUploadBox,
html[data-theme="dark"] .pdfPanel:first-child h3,
html[data-theme="dark"] .pdfStatus,
html[data-theme="dark"] .pdfSummary{
  background:#1b2734!important;
  color:#e9eff6!important;
  border-color:#40546a!important;
}

/* 2026-07-12 final screenshot-specific dark-mode corrections */
html[data-theme="dark"] .dispatchCalendarDay > header,
html[data-theme="dark"] .dispatchCalendarDay.isToday > header,
html[data-theme="dark"] .dispatchDayListPanel .dispatchCalendarDay > header {
  background:#243445!important;
  color:#eaf2fb!important;
  border-color:#4b6279!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .dispatchCalendarDay > header a,
html[data-theme="dark"] .dispatchCalendarDay > header span {
  color:#9bcaff!important;
  background:#1a2734!important;
  border-color:#40566d!important;
}
html[data-theme="dark"] .dispatchViewTabs a.active,
html[data-theme="dark"] .dispatchViewSwitch a.active,
html[data-theme="dark"] .dispatchControls a.active {
  background:#327fcf!important;
  color:#fff!important;
  border-color:#6aacee!important;
}

/* Motive truck-number chips were still inheriting the light pill style. */
html[data-theme="dark"] .truckBadge,
html[data-theme="dark"] .truckCell .truckBadge {
  background:linear-gradient(180deg,#24415f,#1c334b)!important;
  color:#9ed0ff!important;
  border:1px solid #4778a8!important;
  box-shadow:inset 0 1px rgba(255,255,255,.05),0 1px 3px rgba(0,0,0,.25)!important;
}

/* PDF editor: PARS picker chrome and inventory area. Sticker artwork remains white. */
html[data-theme="dark"] .pdfParsModal { background:rgba(0,0,0,.82)!important; }
html[data-theme="dark"] .pdfParsBox {
  background:#15212d!important;
  color:#e9f1f8!important;
  border-color:#4b6076!important;
}
html[data-theme="dark"] .pdfParsTop,
html[data-theme="dark"] .pdfParsBox > .pdfParsTabs,
html[data-theme="dark"] #parsInventoryPanel > .pdfParsTabs {
  background:#1c2a38!important;
  color:#eef5fb!important;
  border-color:#465c72!important;
}
html[data-theme="dark"] .pdfParsGrid,
html[data-theme="dark"] #parsGrid,
html[data-theme="dark"] #parsManagerPanel {
  background-color:#101820!important;
  background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.36) 1px,transparent 1px)!important;
  background-size:20px 20px!important;
  color:#e7eef6!important;
}
html[data-theme="dark"] .pdfParsManagerStat,
html[data-theme="dark"] .pdfParsManagerUpload,
html[data-theme="dark"] .pdfParsBatchRow {
  background:#1b2835!important;
  color:#dce7f1!important;
  border-color:#43586d!important;
}
html[data-theme="dark"] .pdfParsCard,
html[data-theme="dark"] .pdfParsCard.used {
  background:linear-gradient(#24415f,#1d3650)!important;
  color:#f2f7fb!important;
  border-color:#4778a8!important;
}
html[data-theme="dark"] .pdfParsCard small,
html[data-theme="dark"] .pdfParsModeNote { color:#a9c3dc!important; }
html[data-theme="dark"] .pdfParsCard img { background:#fff!important; }

/* PDF/image editor property sidebar: remove remaining white detail/section cards. */
html[data-theme="dark"] .pdfSideTools,
html[data-theme="dark"] .pdfSideTools details,
html[data-theme="dark"] .pdfSideTools details > div {
  background:#18232e!important;
  color:#eaf1f8!important;
  border-color:#42576c!important;
}
html[data-theme="dark"] .pdfSideTools details {
  border:1px solid #42576c!important;
  border-radius:10px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .pdfSideTools details > summary {
  background:#243444!important;
  color:#f4f8fc!important;
  border-color:#42576c!important;
}
html[data-theme="dark"] .pdfSideTools details[open] > summary {
  background:#2a3c4e!important;
}
html[data-theme="dark"] .pdfSideTools .pdfHint,
html[data-theme="dark"] .pdfSideTools .hint,
html[data-theme="dark"] .pdfSideTools .help,
html[data-theme="dark"] .pdfSideTools .helpBox,
html[data-theme="dark"] .pdfSideTools .toolHelp,
html[data-theme="dark"] .pdfSideTools .infoBox {
  background:#202e3c!important;
  color:#afbdcc!important;
  border-color:#4a6075!important;
}
html[data-theme="dark"] .pdfSideTools input[type="range"] { background:transparent!important; }
html[data-theme="dark"] .pdfSideTools input[type="color"] { background:#101820!important; }

/* Empty editor cards themselves dark; actual document/image canvases remain untouched. */
html[data-theme="dark"] .pdfPages > .pdfEmpty,
html[data-theme="dark"] #pages > .pdfEmpty,
html[data-theme="dark"] #emptyBox.pdfEmpty {
  background:#1b2835!important;
  color:#dce7f1!important;
  border-color:#50667c!important;
}

/* 2026-07-12 final targeted cleanup: dispatch navigation/listing + editor properties spacing */
html[data-theme="dark"] .dispatchPage .dispatchNavButton,
html[data-theme="dark"] .dispatchPage .dispatchTodayButton {
  background:#243445!important;
  color:#dcecff!important;
  border:1px solid #4a647e!important;
  box-shadow:inset 0 1px rgba(255,255,255,.04),0 2px 5px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] .dispatchPage .dispatchNavButton:hover,
html[data-theme="dark"] .dispatchPage .dispatchTodayButton:hover {
  background:#2e4660!important;
  color:#fff!important;
  border-color:#6b98c5!important;
}
html[data-theme="dark"] .dispatchPage .dispatchCalendarPanel,
html[data-theme="dark"] .dispatchPage .dispatchCalendarScroll,
html[data-theme="dark"] .dispatchPage .dispatchCalendarGrid,
html[data-theme="dark"] .dispatchPage .dispatchCalendarDay,
html[data-theme="dark"] .dispatchPage .dispatchCalendarDay .calendarMoves,
html[data-theme="dark"] .dispatchPage .dispatchDayListPanel {
  background:#111c27!important;
  border-color:#3f556b!important;
}
html[data-theme="dark"] .dispatchPage .dispatchCalendarDay > header {
  background:#1d2b39!important;
  border-color:#40566c!important;
}
html[data-theme="dark"] .dispatchPage .dispatchCalendarDay > header a,
html[data-theme="dark"] .dispatchPage .dispatchCalendarDay > header span {
  background:#24384b!important;
  color:#9dceff!important;
  border-color:#496985!important;
}
html[data-theme="dark"] .dispatchPage .calendarDispatchRow,
html[data-theme="dark"] .dispatchPage .calendarRowGrid,
html[data-theme="dark"] .dispatchPage .calendarRowCell {
  background:#182532!important;
  border-color:#40566c!important;
}
html[data-theme="dark"] .dispatchPage .calendarDispatchRow + .calendarDispatchRow {
  border-top-color:#40566c!important;
}

/* Both editors: keep the PROPERTIES strip dark and visually separate from tools. */
html[data-theme="dark"] #pdfEditModal .pdfSideTools:before,
html[data-theme="dark"] #imageEditModal .pdfSideTools:before,
html[data-theme="dark"] .pdfModal .pdfSideTools:before {
  background:#202f3e!important;
  color:#eef5fb!important;
  border-bottom:1px solid #4a6075!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  padding:10px 14px!important;
  margin:0 -14px 10px!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.11em!important;
}

/* Image editor: stop accordion editing groups from being cramped together. */
html[data-theme="dark"] #imageEditModal .pdfSideTools {
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  padding:0 14px 16px!important;
  background:#18232e!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools > .pdfBigBtn,
html[data-theme="dark"] #imageEditModal .pdfSideTools > .pdfSmallBtn,
html[data-theme="dark"] #imageEditModal .pdfSideTools > .pdfImageInput,
html[data-theme="dark"] #imageEditModal .pdfSideTools > .pdfToolRow,
html[data-theme="dark"] #imageEditModal .pdfSideTools > details {
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools details {
  border-radius:9px!important;
  overflow:hidden!important;
  background:#1b2835!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools details > summary {
  min-height:42px!important;
  padding:11px 13px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  line-height:1.2!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools details > div {
  display:grid!important;
  gap:10px!important;
  padding:12px 13px 14px!important;
  background:#182532!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools .pdfToolRow,
html[data-theme="dark"] #imageEditModal .pdfSideTools .pdfToolRow3 {
  gap:8px!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools textarea {
  min-height:96px!important;
}
html[data-theme="dark"] #imageEditModal .pdfSideTools button {
  min-height:38px!important;
}

/* Image Editor: dark textareas in dark mode */
html[data-theme="dark"] #imageEditModal textarea,
html[data-theme="dark"] #imageEditModal .pdfSideTools textarea,
html[data-theme="dark"] .imageEditorPage textarea {
  background:#101a24!important;
  color:#f1f6fb!important;
  border:1px solid #4a6075!important;
  caret-color:#ffffff!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] #imageEditModal textarea::placeholder,
html[data-theme="dark"] #imageEditModal .pdfSideTools textarea::placeholder,
html[data-theme="dark"] .imageEditorPage textarea::placeholder {
  color:#8fa3b7!important;
  opacity:1!important;
}
html[data-theme="dark"] #imageEditModal textarea:focus,
html[data-theme="dark"] #imageEditModal .pdfSideTools textarea:focus,
html[data-theme="dark"] .imageEditorPage textarea:focus {
  background:#132231!important;
  color:#ffffff!important;
  border-color:#5fa8ef!important;
  box-shadow:0 0 0 3px rgba(47,143,232,.2)!important;
}
