/* Scoped dark overrides — light CSS hardcodes ink/bg on .ship-page / .aset-root. */

html[data-theme="dark"] .workspace-main:has(.ship-page),
html[data-theme="dark"] .workspace-main:has(.aset-root) {
  background: #171b16;
}

/* —— Shipping —— */
html[data-theme="dark"] .ship-page {
  color: #f2f5e9;
  background: transparent;
  --muted: #a8b19f;
  --line: #374031;
  --purple: #39314c;
  --lime: #d0fb43;
}
html[data-theme="dark"] .ship-page .page-heading h1,
html[data-theme="dark"] .ship-page h2,
html[data-theme="dark"] .ship-page h3,
html[data-theme="dark"] .ship-page b,
html[data-theme="dark"] .ship-page strong,
html[data-theme="dark"] .ship-page td,
html[data-theme="dark"] .ship-page th,
html[data-theme="dark"] .ship-page .stat-number,
html[data-theme="dark"] .ship-page .stat-number strong,
html[data-theme="dark"] .ship-page .printer-title,
html[data-theme="dark"] .ship-page .rule b,
html[data-theme="dark"] .ship-page .card-heading,
html[data-theme="dark"] .ship-page .table-heading h2 {
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .page-heading p,
html[data-theme="dark"] .ship-page small,
html[data-theme="dark"] .ship-page td small,
html[data-theme="dark"] .ship-page .stat-meta,
html[data-theme="dark"] .ship-page .rule p,
html[data-theme="dark"] .ship-page .tracking,
html[data-theme="dark"] .ship-page .field span,
html[data-theme="dark"] .ship-page .small {
  color: #a8b19f;
}
html[data-theme="dark"] .ship-page .card,
html[data-theme="dark"] .ship-page .stat,
html[data-theme="dark"] .ship-page .orders-card,
html[data-theme="dark"] .ship-page .printers-card,
html[data-theme="dark"] .ship-page .rules-card,
html[data-theme="dark"] .ship-page .activity-card {
  background: #22291f;
  border-color: #374031;
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .auto-banner {
  border: 1px solid #374031;
  background: linear-gradient(100deg, #2c3427, #2a3828);
  color: #e8f5d4;
}
html[data-theme="dark"] .ship-page .auto-banner b {
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .auto-banner span:not(.check-circle) {
  color: #c5d4b0;
}
html[data-theme="dark"] .ship-page .check-circle {
  border-color: #3d5a32;
  background: #25cc06;
  color: #fff;
}
html[data-theme="dark"] .ship-page .auto-banner .button.outline,
html[data-theme="dark"] .ship-page .button.outline {
  background: #171b16;
  border-color: #374031;
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .button.lime {
  background: #d0fb43;
  border-color: #d0fb43;
  color: #141a08;
}
html[data-theme="dark"] .ship-page input,
html[data-theme="dark"] .ship-page select,
html[data-theme="dark"] .ship-page .search,
html[data-theme="dark"] .ship-page .filters select,
html[data-theme="dark"] .ship-page #printer-select,
html[data-theme="dark"] .ship-page .field select,
html[data-theme="dark"] .ship-page .field input {
  background: #171b16 !important;
  color: #f2f5e9 !important;
  border-color: #374031 !important;
}
html[data-theme="dark"] .ship-page select option {
  background: #30363f;
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .tabs button {
  color: #a8b19f;
}
html[data-theme="dark"] .ship-page .tabs button.active {
  color: #f2f5e9;
  border-color: #d0fb43;
}
html[data-theme="dark"] .ship-page .tabs button span {
  background: #171b16;
  color: #eef0e8;
}
html[data-theme="dark"] .ship-page table.orders,
html[data-theme="dark"] .ship-page .table-scroll {
  background: transparent;
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page tbody tr:hover {
  background: #343b45;
}
html[data-theme="dark"] .ship-page .item-cell,
html[data-theme="dark"] .ship-page .item-cell div {
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .item-image {
  background: #3a424e;
  color: #d5dbe6;
}
html[data-theme="dark"] .ship-page .status.printed {
  background: #423551;
  color: #d8bfff;
}
html[data-theme="dark"] .ship-page .status.ready,
html[data-theme="dark"] .ship-page .status.online {
  background: #263f2a;
  color: #aee98e;
}
html[data-theme="dark"] .ship-page .status.pending {
  background: #4b3c21;
  color: #fbd288;
}
html[data-theme="dark"] .ship-page .row-action {
  border: 1px solid #374031;
  background: #171b16;
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .printer-row,
html[data-theme="dark"] .ship-page .rule,
html[data-theme="dark"] .ship-page .activity {
  color: #f2f5e9;
}
html[data-theme="dark"] .ship-page .printer-thumb {
  background: linear-gradient(135deg, #3a424e, #171b16);
}
html[data-theme="dark"] .ship-page .switch {
  background: #374031;
}
html[data-theme="dark"] .ship-page .switch.on {
  background: #d0fb43 !important;
}
html[data-theme="dark"] .ship-page .switch span {
  background: #f5f7fc;
}
html[data-theme="dark"] .ship-page .disc {
  background: #3a424e;
  color: #edf0f7;
}

/* —— Automation settings —— */
html[data-theme="dark"] .aset-root {
  --ink: #f2f5e9;
  --muted: #a8b19f;
  --line: #374031;
  --bg: transparent;
  --lime: #d0fb43;
  --purple: #b89af5;
  color: var(--ink);
  background: transparent;
}
html[data-theme="dark"] .aset-root .heading h1,
html[data-theme="dark"] .aset-root .card-heading h2,
html[data-theme="dark"] .aset-root .card-heading b,
html[data-theme="dark"] .aset-root b {
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .heading p,
html[data-theme="dark"] .aset-root .card-heading p,
html[data-theme="dark"] .aset-root .field small,
html[data-theme="dark"] .aset-root .unit,
html[data-theme="dark"] .aset-root .note {
  color: var(--muted);
}
html[data-theme="dark"] .aset-root .field label,
html[data-theme="dark"] .aset-root .textarea label,
html[data-theme="dark"] .aset-root .chips label,
html[data-theme="dark"] .aset-root .steps label,
html[data-theme="dark"] .aset-root .rule-body label,
html[data-theme="dark"] .aset-root label {
  color: #d5dbe6 !important;
}
html[data-theme="dark"] .aset-root .card {
  border: 1px solid #374031;
  background: #22291f;
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .control input:not([type="checkbox"]):not([type="range"]),
html[data-theme="dark"] .aset-root .control select,
html[data-theme="dark"] .aset-root textarea,
html[data-theme="dark"] .aset-root dialog input,
html[data-theme="dark"] .aset-root input:not([type="checkbox"]):not([type="range"]),
html[data-theme="dark"] .aset-root select {
  border: 1px solid #374031 !important;
  background: #171b16 !important;
  color: #f2f5e9 !important;
}
html[data-theme="dark"] .aset-root select option {
  background: #30363f;
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .button {
  border: 1px solid #374031;
  background: #171b16;
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .button.back {
  color: #a8b19f;
}
html[data-theme="dark"] .aset-root .button.purple {
  background: #403450;
  color: #dbc6ff;
  border-color: transparent;
}
html[data-theme="dark"] .aset-root .button.lime,
html[data-theme="dark"] .aset-root .lime {
  background: #d0fb43 !important;
  border-color: #d0fb43 !important;
  color: #141a08 !important;
}
html[data-theme="dark"] .aset-root .chips button {
  border: 1px solid #374031;
  background: #171b16;
  color: #d5dbe6;
}
html[data-theme="dark"] .aset-root .chips button.active,
html[data-theme="dark"] .aset-root .chips button[aria-pressed="true"] {
  background: #d0fb43;
  color: #141a08;
  border-color: #d0fb43;
}
html[data-theme="dark"] .aset-root .switch {
  background: #374031;
}
html[data-theme="dark"] .aset-root input:checked + .switch,
html[data-theme="dark"] .aset-root .switch.on {
  background: #d0fb43 !important;
}
html[data-theme="dark"] .aset-root .switch:after,
html[data-theme="dark"] .aset-root .switch span {
  background: #fff;
}
html[data-theme="dark"] .aset-root .mini-icon,
html[data-theme="dark"] .aset-root .hero-icon {
  background: #d6baff !important;
  color: #2a1c43 !important;
}
html[data-theme="dark"] .aset-root #auto-savebar,
html[data-theme="dark"] .aset-root #savebar,
html[data-theme="dark"] #auto-savebar {
  background: #22291fef !important;
  border-color: #434958 !important;
  color: #a8b19f;
}
html[data-theme="dark"] #auto-savebar > span,
html[data-theme="dark"] .aset-root #auto-savebar > span {
  color: #a8b19f;
}
html[data-theme="dark"] .aset-root .page-tools select {
  background: #22291f;
  color: #f2f5e9;
  border-color: #374031;
}
html[data-theme="dark"] .aset-root .dselect-btn,
html[data-theme="dark"] .ship-page .dselect-btn {
  background: #171b16 !important;
  border-color: #374031 !important;
  color: #f2f5e9 !important;
}
html[data-theme="dark"] .aset-root .dselect-menu,
html[data-theme="dark"] .ship-page .dselect-menu {
  background: #22291f !important;
  border-color: #374031 !important;
}
html[data-theme="dark"] .aset-root .dselect-option,
html[data-theme="dark"] .ship-page .dselect-option {
  color: #f2f5e9 !important;
}
html[data-theme="dark"] .aset-root .dselect-option:hover,
html[data-theme="dark"] .ship-page .dselect-option:hover {
  background: #39314c !important;
}
html[data-theme="dark"] .aset-root .dselect-option.is-selected,
html[data-theme="dark"] .ship-page .dselect-option.is-selected {
  background: #2c3427 !important;
}
html[data-theme="dark"] .aset-root .timeline div,
html[data-theme="dark"] .aset-root .steps label {
  background: #171b16;
  color: #eef0e8;
  border: 1px solid #374031;
}
html[data-theme="dark"] .aset-root .rule-card,
html[data-theme="dark"] .aset-root .qa-card,
html[data-theme="dark"] .aset-root [data-rule],
html[data-theme="dark"] .aset-root .expand-row {
  background: #171b16;
  border-color: #374031;
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .suggestions button,
html[data-theme="dark"] .aset-root .suggest-chip {
  background: #22291f !important;
  border-color: #374031 !important;
  color: #f2f5e9 !important;
}
html[data-theme="dark"] .aset-root .rule-head b,
html[data-theme="dark"] .aset-root .rule-body label {
  color: #f2f5e9;
}
html[data-theme="dark"] .aset-root .rule-body input,
html[data-theme="dark"] .aset-root .rule-body textarea {
  background: #1c222b;
  border-color: #374031;
  color: #f2f5e9;
}
