/* Optional Deus Ex-inspired palette. All rules scoped; no workflow changes. */
html[data-theme="deus-ex"] {
  color-scheme:dark;
  --app-bg:#0b0d0d; --app-text:#f1eee4;
  --app-panel:#171918; --app-panel2:#20221f; --app-input:#101210;
  --app-border:#62583d; --app-muted:#c4bead; --app-accent:#efbe55;
  --wave-image:url('/static/deus-ex-shards.svg?v=20261029d');
  --wave-glow:rgba(199,145,35,.10);
  accent-color:#efbe55;
}
html[data-theme="deus-ex"] body.prodops-wave-preview {
  background-position:center top,center top!important;
  background-size:cover,100% 750px!important;
  background-attachment:fixed!important;
}
html[data-theme="deus-ex"] body .topbar {
  border-bottom:1px solid #b18b3a;
  box-shadow:0 3px 22px #0009;
}
html[data-theme="deus-ex"] .topbar .brand {
  color:#f3c65d;letter-spacing:.12em;text-transform:uppercase;
}
html[data-theme="deus-ex"] :is(.card,.home-section,.home-module-card,.task,.workflow-summary-card) {
  background-color:var(--app-panel);color:var(--app-text);border-color:var(--app-border);border-radius:3px;
}
html[data-theme="deus-ex"] :is(.home-section,.home-module-card) {
  --home-accent:#e4b44f;
  background-image:linear-gradient(135deg,rgba(211,168,72,.08),transparent 45%);
}
html[data-theme="deus-ex"] :is(.home-section-head,.home-module-title,.home-module-open) {color:#f0c969}
html[data-theme="deus-ex"] :is(.home-hero,.workflow-page-header,.workflow-ui-header) {
  border-left:3px solid #e4b44f;border-radius:3px;
}
html[data-theme="deus-ex"] :is(h1,h2,h3) {letter-spacing:.025em}
html[data-theme="deus-ex"] :is(input,select,textarea,.account-menu summary,.account-popover,.main-nav) {
  background-color:var(--app-input);border-color:var(--app-border);color:var(--app-text);border-radius:3px;
}
html[data-theme="deus-ex"] :is(a,input,select,textarea,button):focus-visible {
  outline:2px solid #ffe299;outline-offset:3px;
}
/* Override the shared select rule's fixed blue !important palette. */
html[data-theme="deus-ex"] select {
  background:var(--app-input)!important;
  color:var(--app-text)!important;
  border:1px solid #8c743d!important;
  box-shadow:inset 0 1px 2px #0004!important;
}
html[data-theme="deus-ex"] select:hover {border-color:#efbe55!important}
html[data-theme="deus-ex"] select:focus,
html[data-theme="deus-ex"] select:focus-visible {
  border-color:#efbe55!important;
  outline:2px solid #ffe299!important;
  outline-offset:2px;
  box-shadow:0 0 0 1px #efbe5533!important;
}
html[data-theme="deus-ex"] select :is(option,optgroup) {
  background:var(--app-input)!important;color:var(--app-text)!important;
}
/* Browser-rendered native picker allows theme colors instead of the OS gray
   highlight. Keep normal select semantics and native fallback in older browsers. */
@supports (appearance:base-select) {
  html[data-theme="deus-ex"] select:not([multiple]):not([size]),
  html[data-theme="deus-ex"] select:not([multiple]):not([size])::picker(select) {
    appearance:base-select;
  }
  html[data-theme="deus-ex"] select::picker(select) {
    background:var(--app-input);color:var(--app-text);
    border:1px solid #8c743d;border-radius:3px;
    box-shadow:0 8px 24px #0008;
    max-height:min(380px,60vh);overflow:auto;
  }
  html[data-theme="deus-ex"] select option {padding:6px 10px}
}
html[data-theme="deus-ex"] select option:is(:checked,:hover,:focus) {
  background:#efbe55!important;color:#15140e!important;
}
html[data-theme="deus-ex"] select option:disabled {
  background:var(--app-input)!important;color:var(--app-muted)!important;
}
html[data-theme="deus-ex"] a:not([data-po-button]):hover {
  background-color:#302a1c;color:#ffe299;outline-color:#d9ac4c;
}
/* Keep semantic red/green/amber tones; neutral navigation becomes gold. */
html[data-theme="deus-ex"] body [data-po-button] {
  border-radius:3px!important;
  background:linear-gradient(115deg,#2c2c24,#161914)!important;
  border-color:#746440!important;
  color:#f5efdc!important;
  box-shadow:inset 0 1px #e6bf5a18,0 3px 8px #0005!important;
}
html[data-theme="deus-ex"] body :is([data-po-tone="blue"],[data-po-tone="neutral"]) {--po-tone:#efbe55}
html[data-theme="deus-ex"] body [data-po-icon]::before {border-radius:2px;box-shadow:none}
html[data-theme="deus-ex"] body [data-po-button]:focus-visible {outline-color:#ffe299!important}
html[data-theme="deus-ex"] body [data-po-button]:is([aria-pressed="true"],.is-selected,.selected) {
  border-color:#62e6ae!important;background:#173d36!important;
}
@media(max-width:640px) {
  html[data-theme="deus-ex"] body.prodops-wave-preview {background-position:60% top,center top!important;background-attachment:scroll!important}
}
@media print {
  html[data-theme="deus-ex"] body.prodops-wave-preview {background-image:none!important}
}

/* Section audit: shared category identity is gold, not semantic status colors. */
html[data-theme="deus-ex"] :is(.nav-group,.page-category,[class*="ux-tone-"],.ux-section,.ux-subsection,[class*="workflow-ui-"],.home-section) {
  --nav-accent:#efbe55;--page-category-accent:#efbe55;--ux-accent:#efbe55;
  --ux-accent-soft:#efbe551a;--workflow-accent:#efbe55;--home-accent:#efbe55;
}
html[data-theme="deus-ex"] :is(.rfi-admin-panel,.rfi-workflow-status,.rfi-gc-status,.rfi-official-choice,.rfi-linked-intakes,.rfi-selected-file,.rfi-chat-message:not(.houser),.rfi-email-row,.ops-queue,.ops-job,.ops-count,.contacts-stat,.archive-row,.archive-count,.archive-chip) {
  background:var(--app-panel)!important;border-color:var(--app-border)!important;color:var(--app-text)!important;
}
html[data-theme="deus-ex"] .rfi-admin-panel {border-left:3px solid #efbe55!important}
html[data-theme="deus-ex"] :is(.rfi-admin-button.primary,.secondary-workflow-link,.workflow-tab.is-active,.nav-btn.active,.mode-btn.active,.photo-thumb .main-photo-btn,.delivery-category-choice[aria-pressed="true"],.archive-count.active) {
  background:#efbe55!important;border-color:#efbe55!important;color:#15140e!important;box-shadow:none!important;
}
html[data-theme="deus-ex"] .rfi-admin-button.primary :is(strong,span) {color:#15140e!important}
html[data-theme="deus-ex"] :is(.rfi-action-group.respond,.rfi-action-group.official) {--rfi-action-accent:#efbe55}
html[data-theme="deus-ex"] :is(.rfi-action-group.respond,.rfi-action-group.official) .rfi-action-label {
  background:#efbe55!important;color:#15140e!important;
}
html[data-theme="deus-ex"] :is(.workflow-feedback,.workflow-ui-feedback):not(.is-error,.is-success) {
  border-color:#8c743d;background:#efbe5514;
}
html[data-theme="deus-ex"] :is(.compact-board .project-group,.compact-board .project-group>summary,.labor-budget-plan-details,.labor-budget-plan-summary,.labor-budget-plan-summary-metrics>span,.help-user,.dr-header) {
  border-color:#8c743d;background-color:var(--app-panel);
}
html[data-theme="deus-ex"] :is(.jt-category,.archive-section>summary,.contacts-role-group>summary,.contacts-role-label span,.contacts-company-mark,.contact-phone-group legend,.text-link,.sort-indicator,.action-tile.info strong) {color:#efbe55!important}
html[data-theme="deus-ex"] :is(.contacts-tool-card>summary,.archive-section>summary,.labor-budget-plan-summary)::after {color:#efbe55}
html[data-theme="deus-ex"] .contact-avatar {background:#efbe55;color:#15140e}
html[data-theme="deus-ex"] .jt-entry::before {background:#efbe55}
html[data-theme="deus-ex"] :is(.assembly-select-row.is-selected,.bulk-select-row.is-selected,.import-review-row.is-selected) {background:#efbe551c!important;border-color:#efbe55!important}
html[data-theme="deus-ex"] :is(.assembly-select-button.is-selected,.bulk-select-button.is-selected,.import-review-row.is-selected .import-review-select-button) {background:#efbe55!important;border-color:#efbe55!important;color:#15140e!important}
html[data-theme="deus-ex"] :is(.sd-selected,[data-tool][aria-pressed="true"]) {border-color:#efbe55!important;outline-color:#efbe55!important}
html[data-theme="deus-ex"] .sd-workspace .sd-review-item[aria-current="true"] {background:#efbe551c;border-color:#efbe55;box-shadow:inset 4px 0 #efbe55;outline-color:#efbe55}
html[data-theme="deus-ex"] :is(.sd-review-item:hover,.sd-note-selection,.sd-note-selected,.sd-marker-selected,.photo-thumb.is-main,.delivery-photo-jump[aria-current="true"]) {border-color:#efbe55!important;outline-color:#efbe55!important}
html[data-theme="deus-ex"] :is(#sd-viewer,#sd-review-canvas,#sd-cover,.scanner-view,.camera-body,.photo-dialog-body,.toast) {background:var(--app-input);color:var(--app-text)}
html[data-theme="deus-ex"] :is(.workflow-summary-card:hover,.action-tile:hover,.category-strip-row:hover,.ops-queue:hover,.ops-count:hover) {border-color:#efbe55!important}
html[data-theme="deus-ex"] :is(.action-tile,.assembly-drawing-button,.inventory-navigation a):focus-visible {outline-color:#ffe299!important}
/* Inventory has its own shell and variable names. */
html[data-theme="deus-ex"] {
  --bg:var(--app-bg);--surface:var(--app-panel);--surface-2:var(--app-panel2);
  --ink:var(--app-text);--muted:var(--app-muted);--line:var(--app-border);
  --input:var(--app-input);--blue:#efbe55;--steel:#62583d;
}
html[data-theme="deus-ex"] .app .topbar {border-color:#8c743d;border-left-color:#efbe55;background:var(--app-panel)}
html[data-theme="deus-ex"] .brand-mark {background:#efbe55;color:#15140e}
html[data-theme="deus-ex"] .camera-status {color:var(--app-text)}
html[data-theme="deus-ex"] :is(input,textarea)::placeholder {color:var(--app-muted)}

html[data-theme="deus-ex"] body [data-po-button]:is([data-po-tone="blue"],[data-po-tone="purple"]):not([aria-pressed="true"],.is-selected,.selected) {
  --po-tone:#efbe55;background:#efbe55!important;border-color:#efbe55!important;color:#15140e!important;
}
html[data-theme="deus-ex"] :is(.sd-notice,.fd-tile,.search-assistant,.search-suggestion) {
  background:var(--app-panel)!important;border-color:var(--app-border)!important;color:var(--app-text)!important;
}
html[data-theme="deus-ex"] .fd-open {color:#efbe55}
html[data-theme="deus-ex"] .co-summary-card {border-left-color:#efbe55!important}
html[data-theme="deus-ex"] :is(.sd-match-table th,.sd-match-table td,.sd-issue,.equipment-row) {border-color:var(--app-border)}
html[data-theme="deus-ex"] .sd-match-table th {background:var(--app-panel)}
html[data-theme="deus-ex"] .inventory-notes summary {color:#efbe55}

html[data-theme="deus-ex"] :is(.contacts-tool-card,.contact-phone-group,.production-filter-panel,.budget-area,.bulk-select-toolbar,.assembly-bulk-toolbar,.quick-jump-link,.jt-category) {
  background:var(--app-panel2)!important;border-color:var(--app-border)!important;color:var(--app-text);
}
html[data-theme="deus-ex"] :is(.completion-pill,.status-chip.info) {background:#efbe551a;border-color:#8c743d;color:#efbe55}
html[data-theme="deus-ex"] :is(.budget-section-header,.production-finish-legend) {border-color:#8c743d}
html[data-theme="deus-ex"] :is(.jh-timeline-track,.jh-timeline-endpoint) {background:#efbe55!important;border-color:#8c743d!important;box-shadow:none!important}

html[data-theme="deus-ex"] .badge:not([style]):not([class*="status"]):not(.danger,.success,.warning) {background:var(--app-panel2);color:var(--app-text);border-color:var(--app-border)}
html[data-theme="deus-ex"] :is(.kpi-open,.kpi-today,.kpi-waiting) {background:var(--app-panel2);border-color:#8c743d;color:var(--app-text)}
html[data-theme="deus-ex"] .kpi-label {color:var(--app-muted)}
html[data-theme="deus-ex"] .bar-track {background:var(--app-input);border-color:var(--app-border)}
html[data-theme="deus-ex"] .status-chip:not(.info,.good,.ok,.warn,.danger,.error,.success) {background:var(--app-panel2);border-color:var(--app-border);color:var(--app-text)}
html[data-theme="deus-ex"] .workflow-ui-flow li span {color:#15140e}

html[data-theme="deus-ex"] .kpi {border-color:#8c743d}
html[data-theme="deus-ex"] body.fabricator-shell {background-color:var(--app-bg)!important;background-image:var(--wave-image)!important;background-size:cover!important;background-attachment:fixed!important}
@media print {html[data-theme="deus-ex"] body.fabricator-shell {background-image:none!important}}
/* Icon-only Help control is intentionally skipped by the button decorator. */
html[data-theme="deus-ex"] .ai-help-close {
  background:#efbe55!important;color:#15140e!important;
  border:1px solid #efbe55!important;box-shadow:none!important;
}
html[data-theme="deus-ex"] .ai-help-close:hover {background:#ffda80!important;border-color:#ffda80!important}
html[data-theme="deus-ex"] .ai-help-close:focus-visible {outline:2px solid #ffe299!important;outline-offset:3px}
html[data-theme="deus-ex"] #tab-budget .budget-section-header {
  background:#efbe55!important;color:#15140e!important;
  border-color:#efbe55!important;box-shadow:none!important;
}
html[data-theme="deus-ex"] #tab-budget .budget-section-header:hover {
  background:#ffda80!important;filter:none;
}
html[data-theme="deus-ex"] #tab-budget .budget-section-header:focus-visible {
  outline:2px solid #ffe299;outline-offset:3px;
}

html[data-theme="deus-ex"] .report-menu > summary {background:#efbe55!important;color:#15140e!important;border-color:#efbe55!important;box-shadow:none!important}

.inventory-theme-picker{display:grid;gap:4px;font-size:12px;min-width:150px;max-width:100%}
html[data-theme="deus-ex"] body.inventory-theme-shell{background:#0b0d0d var(--wave-image) center/cover fixed!important}
html[data-theme="deus-ex"] body.inventory-theme-shell .app{background:transparent}
@media print{html[data-theme="deus-ex"] body.inventory-theme-shell{background-image:none!important}}
html[data-theme="deus-ex"] body.inventory-theme-shell .panel{min-width:0;max-width:100%}
