:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e6eee7;
  background: #111813;
  --green: #82c991;
  --green-dark: #a9dcb2;
  --muted: #a3b0a5;
  --line: #303c32;
  --white: #1b241d;
}

:root[data-theme="dark"] body { background: #111813; color: #e6eee7; }
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .topbar-session,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] dialog {
  background: #1b241d;
  border-color: #303c32;
  color: #e6eee7;
}
:root[data-theme="dark"] .sidebar { border-right-color: #303c32; }
:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .nav-link.active,
:root[data-theme="dark"] .current-user-pill,
:root[data-theme="dark"] .site-number,
:root[data-theme="dark"] .article-number,
:root[data-theme="dark"] .avv-code,
:root[data-theme="dark"] .safe-pill,
:root[data-theme="dark"] .status-complete {
  background: #263c2b;
  color: #a9dcb2;
}
:root[data-theme="dark"] .nav-link { color: #b7c3b9; }
:root[data-theme="dark"] .nav-link:hover { background: #202c22; color: #e6eee7; }
:root[data-theme="dark"] .brand-copy small,
:root[data-theme="dark"] .sidebar-bottom,
:root[data-theme="dark"] .breadcrumb span,
:root[data-theme="dark"] .topbar-date,
:root[data-theme="dark"] .list-footer,
:root[data-theme="dark"] .page-footer,
:root[data-theme="dark"] .empty-row td,
:root[data-theme="dark"] .empty-state strong,
:root[data-theme="dark"] .dialog-header p,
:root[data-theme="dark"] .field,
:root[data-theme="dark"] .weight-entry > label,
:root[data-theme="dark"] .ticket-detail-field > span,
:root[data-theme="dark"] .weight-detail-card > span,
:root[data-theme="dark"] .net-weight > span,
:root[data-theme="dark"] .weight-detail-card > small,
:root[data-theme="dark"] .weight-entry > p,
:root[data-theme="dark"] .stats-completeness ul,
:root[data-theme="dark"] .price-table td:first-child small,
:root[data-theme="dark"] .invoice-date-filter,
:root[data-theme="dark"] .invoice-form-heading small,
:root[data-theme="dark"] .invoice-origin,
:root[data-theme="dark"] .invoice-totals,
:root[data-theme="dark"] .invoice-address,
:root[data-theme="dark"] .invoice-line-summary,
:root[data-theme="dark"] .avv-import-body,
:root[data-theme="dark"] .avv-import-preview,
:root[data-theme="dark"] .customer-site-containers > strong {
  color: #a3b0a5;
}
:root[data-theme="dark"] .avatar,
:root[data-theme="dark"] .avatar.alt-1,
:root[data-theme="dark"] .avatar.alt-2,
:root[data-theme="dark"] .avatar.alt-3 {
  background: #263c2b;
  color: #c8e5ce;
}
:root[data-theme="dark"] .search-box kbd,
:root[data-theme="dark"] .vehicle-plate,
:root[data-theme="dark"] .show-completed-toggle {
  background: #253128;
  border-color: #3a4a3d;
  color: #d6e2d8;
}
:root[data-theme="dark"] .customer-site-containers,
:root[data-theme="dark"] .customer-site-container,
:root[data-theme="dark"] .avv-import-body,
:root[data-theme="dark"] .price-inherited,
:root[data-theme="dark"] .price-fixed-unit {
  color: #d8e2da;
}
:root[data-theme="dark"] .ticket-detail-field > strong,
:root[data-theme="dark"] .weight-detail-card > strong,
:root[data-theme="dark"] .net-weight > strong,
:root[data-theme="dark"] .invoice-totals strong,
:root[data-theme="dark"] .history-title,
:root[data-theme="dark"] .history-row,
:root[data-theme="dark"] .price-table td:first-child strong,
:root[data-theme="dark"] .invoice-form-heading,
:root[data-theme="dark"] .empty-state strong {
  color: #e6eee7;
}
:root[data-theme="dark"] .show-completed-toggle:hover { background: #304333; }
:root[data-theme="dark"] .show-completed-toggle input { background: #536257; }
:root[data-theme="dark"] .show-completed-toggle input:checked { background: #34764a; }
:root[data-theme="dark"] .show-completed-toggle input::before { background: #e6eee7; }
:root[data-theme="dark"] .net-weight > strong,
:root[data-theme="dark"] .invoice-totals span:last-of-type,
:root[data-theme="dark"] .invoice-totals strong:last-child { color: #a9dcb2; }
:root[data-theme="dark"] #customer-rows .customer-name,
:root[data-theme="dark"] #customer-rows .address-primary,
:root[data-theme="dark"] #customer-rows .address-secondary,
:root[data-theme="dark"] #customer-rows .contact-link,
:root[data-theme="dark"] #customer-rows .note-text {
  color: #e6eee7;
}
:root[data-theme="dark"] #customer-rows .customer-id { color: #b7c3b9; }
:root[data-theme="dark"] #customer-rows .contact-empty { color: #a3b0a5; }
:root[data-theme="dark"] .nav-group + .nav-group,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .dialog-actions,
:root[data-theme="dark"] .list-footer,
:root[data-theme="dark"] .detail-site-row,
:root[data-theme="dark"] .history-row,
:root[data-theme="dark"] .customer-site-containers {
  border-color: #303c32;
}
:root[data-theme="dark"] .nav-label,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] th,
:root[data-theme="dark"] .page-footer,
:root[data-theme="dark"] .field small,
:root[data-theme="dark"] .detail-site-copy small,
:root[data-theme="dark"] .detail-empty,
:root[data-theme="dark"] .invoice-origin,
:root[data-theme="dark"] .stat-label,
:root[data-theme="dark"] .stat-foot,
:root[data-theme="dark"] .subtitle,
:root[data-theme="dark"] .panel-heading p,
:root[data-theme="dark"] .auth-card > p {
  color: #a3b0a5;
}
:root[data-theme="dark"] td,
:root[data-theme="dark"] .detail-site-copy strong,
:root[data-theme="dark"] .history-title,
:root[data-theme="dark"] .price-table td:first-child strong,
:root[data-theme="dark"] .invoice-form-heading,
:root[data-theme="dark"] .invoice-address,
:root[data-theme="dark"] .invoice-line-summary,
:root[data-theme="dark"] .price-inherited,
:root[data-theme="dark"] .price-fixed-unit,
:root[data-theme="dark"] .customer-site-containers {
  color: #d8e2da;
}
:root[data-theme="dark"] thead,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .status-filter,
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .price-table [data-price-unit],
:root[data-theme="dark"] .weight-input-wrap,
:root[data-theme="dark"] .weight-detail-card,
:root[data-theme="dark"] .invoice-totals,
:root[data-theme="dark"] .avv-import-body code,
:root[data-theme="dark"] .avv-import-preview {
  background: #151d17;
  color: #dce6de;
  border-color: #354238;
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #9eaca1; }
:root[data-theme="dark"] table tr { border-color: #303c32; }
:root[data-theme="dark"] .dialog-header,
:root[data-theme="dark"] .invoice-form-heading,
:root[data-theme="dark"] .history-row,
:root[data-theme="dark"] .ticket-detail-field { border-color: #303c32; }
:root[data-theme="dark"] .button-secondary,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .button-weigh,
:root[data-theme="dark"] .button-pdf {
  background: #253128;
  border-color: #3a4a3d;
  color: #d6e2d8;
}
:root[data-theme="dark"] .button-primary { background: #34764a; color: #fff; box-shadow: 0 2px 5px #0005; }
:root[data-theme="dark"] .button-primary:hover { background: #438858; }
:root[data-theme="dark"] .button-secondary:hover,
:root[data-theme="dark"] .icon-button:hover,
:root[data-theme="dark"] .button-weigh:hover,
:root[data-theme="dark"] .button-pdf:hover { background: #304333; }
:root[data-theme="dark"] .auth-gate { background: #090e0be8; }
:root[data-theme="dark"] .auth-brand small,
:root[data-theme="dark"] .topbar-session { color: #aab7ac; }
:root[data-theme="dark"] .auth-error { background: #3b2321; color: #ffc0b8; }
:root[data-theme="dark"] dialog::backdrop { background: #050906bd; }
:root[data-theme="dark"] .status-awaiting-first,
:root[data-theme="dark"] .hazard-pill { background: #3c3020; color: #efc875; }
:root[data-theme="dark"] .status-awaiting-second { background: #223244; color: #b8d4f1; }
:root[data-theme="dark"] .button-pdf { background: #223244; color: #b8d4f1; }
:root[data-theme="dark"] .status-inactive { background: #303833; color: #bbc5bd; }
:root[data-theme="dark"] .order-weighing-notice { background: #352c1b; border-color: #5b4a28; color: #e8d49e; }
:root[data-theme="dark"] .net-weight { background: #263c2b; }
:root[data-theme="dark"] .invoice-totals span:last-of-type,
:root[data-theme="dark"] .invoice-totals strong:last-child { border-color: #3b4a3e; color: #a9dcb2; }
:root[data-theme="dark"] .ticket-number-button,
:root[data-theme="dark"] .order-weighing-notice a { color: #a9dcb2; }
:root[data-theme="dark"] ::selection { background: #35553b; color: #fff; }
:root[data-theme="dark"] .update-check-result{background:#1a2a1e;border-color:#344b38;color:#bac9bb}:root[data-theme="dark"] .update-check-result strong,:root[data-theme="dark"] .update-check-result a,:root[data-theme="dark"] .update-history-panel a{color:#a9dcb2}
