:root { color-scheme: light; }
@media(max-width:767px){.stock-dock .dock-links:has(>[data-tab=sales]){width:min(100%,350px)}.stock-dock .dock-links:has(>[data-tab=sales]):has(>[data-tab=uploads]){width:min(100%,425px)}.stock-dock [data-tab=categories]{letter-spacing:-.025em}}
.theme-picker { margin: 2px 4px 4px; padding: 4px 6px 8px; border: 0; border-bottom: 1px solid var(--jf-line); }
.theme-picker legend { padding: 5px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.theme-options { display: flex; gap: 4px; }
.theme-options label {
  display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px;
  margin: 0; min-height: 44px; border: 1px solid var(--jf-line); border-radius: 9px; cursor: pointer;
}
.theme-options input { appearance: auto; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--blue); }
.theme-options label:has(:checked) { background: var(--jf-mist); color: var(--blue); border-color: var(--blue); }
html[data-theme="dark"] {
  color-scheme: dark;
  --jf-paper: #0d1422; --jf-surface: #172234; --jf-raised: #223247;
  --jf-mist: #20344c; --jf-ink: #f0f5fb; --muted: #b6c5d7; --blue: #7bc3ff;
  --jf-line: #3d5067; --border: var(--jf-line);
  background: var(--jf-paper); color: var(--jf-ink);
}
html[data-theme="dark"] :is(.panel,.sheet,.variants,.review-summary,.inventory-empty,.grid-style,
  .shop-balances section,.balance-table,.balance-table tbody th,.stock-deck,.stock-deck .style-card,
  .category-directory .category-row,.dock-pop,.stock-dock .dock-pop a,.stock-dock .dock-pop button,
  .search-line,.inventory-search .refine > summary,.inventory-screen .refine .filter-fields,
  .inventory-search .filter-fields select,.gradient-controls button,.fallback-controls a) {
  background-color: var(--jf-surface);
}
html[data-theme="dark"] :is(input:not([type="radio"]):not([type="checkbox"]),select) {
  color: var(--jf-ink); border-color: var(--jf-line); background-color: var(--jf-surface);
}
html[data-theme="dark"] input::placeholder { color: var(--muted); opacity: 1; }
html[data-theme="dark"] :is(.theme-options label:has(:checked),.category-directory .category-row[aria-current],
  .inventory-search .refine[open] > summary,.active-refinements span,.review-filter [aria-current],
  .stock-dock .dock-pop :is(a,button):hover) { color: var(--blue); background-color: var(--jf-mist); }
html[data-theme="dark"] :is(.layout-options,.gradient-controls,th,.grid-visual:not(.grid-visual-empty),
  .detail-product-photo,.variant-product-photo) { background-color: var(--jf-raised); }
html[data-theme="dark"] :is(.report-heading .context,.report-time,.view-toolbar > span,.layout-options button,
  .grid-balances dt,.gradient-balances dt,.gradient-footer,.inventory-empty p,.photo-size-note,
  .branches a,.card-sizes,.card-sizes span) { color: var(--muted); }
html[data-theme="dark"] :is(.report-time time,.dates b,.summary b,.card-foot strong) { color: var(--jf-ink); }
html[data-theme="dark"] :is(td,.balance-table tbody th,.stock-deck .style-card,
  .grid-balances > div + div,.gradient-balances > div + div,.gradient-footer) { border-color: var(--jf-line); }
html[data-theme="dark"] .layout-options button[aria-pressed="true"],
html[data-theme="dark"][data-stock-preview="grid"] .stock-fallback [data-preview-layout="grid"],
html[data-theme="dark"][data-stock-preview="cards"] .stock-fallback [data-preview-layout="cards"],
html[data-theme="dark"] .inventory-results .pager [aria-current="page"] { background: #334a63; color: white; }
html[data-theme="dark"] :is(.primary,.refine summary b) { background-color: #095baa; color: white; }
html[data-theme="dark"] .primary:hover { background-color: #104e88; }
html[data-theme="dark"] .stock-dock .dock-links { outline: 1px solid var(--jf-line); }
html[data-theme="dark"] .notice { background: #19382d; color: #c3efd5; }
html[data-theme="dark"] .error { background: #492728; color: #ffd5d0; }
html[data-theme="dark"] .flag { color: #ffce85; }
html[data-theme="dark"] #photo-viewer button { background: var(--jf-raised); color: var(--jf-ink); }
