/* Shared presentation layer, loaded after each workspace's existing CSS.
   Marketplace identity colours and the underlying layout remain independent. */
:root {
  color-scheme: light;
  --theme-canvas: #fcfbf7;
  --theme-panel: #f8f7f1;
  --theme-raised: #fffefb;
  --theme-control: #f3f0e7;
  --theme-hover: #ede9de;
  --theme-header: #f3f0e7;
  --theme-line: #e4e0d3;
  --theme-grid: #d4ceba;
  --theme-text: #17231f;
  --theme-muted: #6e685d;
  --theme-subtle: #857e71;
  --theme-pink: #f472b6;
  --theme-pink-soft: #fbd3e5;
  --theme-pink-ink: #84264f;
  --theme-mint: #34d399;
  --theme-mint-soft: #e3f5eb;
  --theme-mint-mid: #a4e5cd;
  --theme-mint-ink: #135843;
  --theme-mint-border: #a4d7c1;
  --theme-primary: #135843;
  --theme-primary-hover: #0e4735;
  --theme-primary-ink: #ffffff;
  --theme-info: #315b7c;
  --theme-info-soft: #eaf0f3;
  --theme-info-border: #cddbe0;
  --theme-warning: #8c5819;
  --theme-warning-soft: #fff3df;
  --theme-warning-border: #e8cda1;
  --theme-danger: #9c342b;
  --theme-danger-soft: #fdece9;
  --theme-danger-border: #e9bcb5;
  --theme-danger-solid: #a93027;
  --theme-danger-solid-hover: #8d251e;
  --theme-danger-solid-ink: #ffffff;
  --theme-focus: #0f5b43;
  --theme-focus-soft: #1358431c;
  --theme-shadow: 0 8px 28px #30281708;
  --theme-overlay-shadow: 0 16px 42px #30281724;
  --theme-backdrop: #17231f80;
  --theme-nav: #f3f0e7;
  --theme-nav-active: #d5efdf;
  --theme-toast: #172b25;
  --theme-toast-ink: #ffffff;
  --theme-stock-cell: #a4e5cd;
  --theme-fbw-stock-cell: #caefdf;
  --theme-empty-cell: #f7f4ee;
  --ink: var(--theme-text);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --canvas: var(--theme-canvas);
  --panel: var(--theme-panel);
  --line: var(--theme-line);
  --green: var(--theme-mint-ink);
  --green-dark: var(--theme-primary-hover);
  --green-soft: var(--theme-mint-soft);
  --amber: var(--theme-warning);
  --amber-soft: var(--theme-warning-soft);
  --red: var(--theme-danger);
  --red-soft: var(--theme-danger-soft);
  --blue: var(--theme-info);
  --shadow: var(--theme-shadow);
  background: var(--theme-canvas);
  color: var(--theme-text);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --theme-canvas: #0a0e1f;
  --theme-panel: #101427;
  --theme-raised: #151c30;
  --theme-control: #181f33;
  --theme-hover: #232b46;
  --theme-header: #151b2e;
  --theme-line: #232b46;
  --theme-grid: #303b59;
  --theme-text: #e6eaf5;
  --theme-muted: #a6b0c8;
  --theme-subtle: #8e9ab5;
  --theme-pink-soft: #391538;
  --theme-pink-ink: #f9a8d4;
  --theme-mint-soft: #092b2b;
  --theme-mint-mid: #074b40;
  --theme-mint-ink: #6ee7b7;
  --theme-mint-border: #256b58;
  --theme-primary: #34d399;
  --theme-primary-hover: #6ee7b7;
  --theme-primary-ink: #07291f;
  --theme-info: #bdd0f7;
  --theme-info-soft: #1a263d;
  --theme-info-border: #354864;
  --theme-warning: #f8cc78;
  --theme-warning-soft: #392a16;
  --theme-warning-border: #655032;
  --theme-danger: #fda4af;
  --theme-danger-soft: #3b1d2a;
  --theme-danger-border: #704051;
  --theme-danger-solid: #8b293a;
  --theme-danger-solid-hover: #a43748;
  --theme-danger-solid-ink: #fff1f2;
  --theme-focus: #6ee7b7;
  --theme-focus-soft: #34d39925;
  --theme-shadow: 0 8px 28px #0000001a;
  --theme-overlay-shadow: 0 18px 48px #00000073;
  --theme-backdrop: #030713bb;
  --theme-nav: #0d1223;
  --theme-nav-active: #232b46;
  --theme-toast: #e6eaf5;
  --theme-toast-ink: #101427;
  --theme-stock-cell: #074b40;
  --theme-fbw-stock-cell: #083132;
  --theme-empty-cell: #12192b;
}

body { background: var(--theme-canvas); color: var(--theme-text); }
::selection { background: var(--theme-mint-mid); color: var(--theme-text); }
input, select, textarea { accent-color: var(--theme-focus); }
input::placeholder, textarea::placeholder { color: var(--theme-subtle); opacity: 1; }

/* A shared, compact control: no dependence on a particular workspace. */
[data-theme-toggle] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--theme-grid);
  border-radius: 10px;
  background: var(--theme-control);
  color: var(--theme-text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}
[data-theme-toggle]:hover:not(:disabled) { background: var(--theme-hover); border-color: var(--theme-focus); }
[data-theme-toggle][hidden] { display: none; }
[data-theme-icon] { display: inline-grid; place-items: center; width: 18px; height: 20px; font-size: 18px; line-height: 1; }
.top-actions { row-gap: 8px; }
.theme-top-actions { flex-wrap: wrap; justify-content: flex-end; }
.login-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.login-card-head .brand-mark { margin: 0; flex-shrink: 0; }
.login-theme-slot { display: flex; justify-content: flex-end; }
.login-theme-slot [data-theme-toggle] { font-size: 11px; }

/* Navigation remains a sidebar in FBS and a pinned horizontal strip in FBO. */
.sidebar, .fbo-shell .sidebar { background: var(--theme-nav); color: var(--theme-text); border-color: var(--theme-line); }
.brand-mark, .fbo-shell .brand-mark { background: var(--theme-mint); color: #0b3429; box-shadow: none; }
.brand small, .sidebar-foot small, .fbo-shell .brand small, .fbo-shell .sidebar-foot small { color: var(--theme-muted); }
.nav-item, .fbo-shell .nav-item { color: var(--theme-muted); }
.nav-item.active, .fbo-shell .nav-item.active { background: var(--theme-nav-active); color: var(--theme-text); }
.nav-item:hover:not(:disabled), .fbo-shell .nav-item:hover { background: var(--theme-hover); color: var(--theme-text); }
.nav-item em { color: var(--theme-mint-ink); }
.sidebar-foot, .fbo-shell .fbo-topnav .sidebar-foot { border-color: var(--theme-line); }
.control-switch, .control-switch-mobile { background: var(--theme-control); border-color: var(--theme-grid); color: var(--theme-text); }
.control-switch:hover, .control-switch-mobile:hover { background: var(--theme-hover); }
.logout-button { background: var(--theme-control); color: var(--theme-text); }
.fbo-shell .fbo-topnav { box-shadow: 0 3px 14px #0000000d; border-bottom: 1px solid var(--theme-line); }
/* The top-layer popover can extend below the horizontally scrollable nav. */
.fbo-stock-list {
  position: fixed;
  inset: auto;
  top: var(--fbo-stocks-top, 100px);
  left: clamp(12px, var(--fbo-stocks-left, 24px), max(12px, calc(100vw - 212px)));
  width: min(200px, calc(100vw - 24px));
  margin: 0;
  padding: 5px;
  border: 1px solid var(--theme-grid);
  border-radius: 11px;
  background: var(--theme-raised);
  color: var(--theme-text);
  box-shadow: var(--theme-overlay-shadow);
}
.fbo-stock-list .nav-item { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.fbo-shell:has(.fbo-stock-list:popover-open) .fbo-stock-trigger { background: var(--theme-hover); color: var(--theme-text); }
@supports not selector(:popover-open) { .fbo-stock-list { display: none; } }
.mobile-nav { background: var(--theme-panel); border-color: var(--theme-line); box-shadow: var(--theme-shadow); }
.mobile-nav button { color: var(--theme-muted); }
.mobile-nav button.active, .mobile-nav .mobile-nav-item.active { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }

/* Neutral surfaces: specific lists intentionally exclude provider logos and
   danger/warning fills rather than replacing every white background. */
.panel, .summary-card, .market-connection, .login-card,
.price-monitor-item, .production-day-card, .production-order-history-item, .production-dashboard-item,
.import-log-entry, .user-row, .price-history-scroll {
  background: var(--theme-panel);
  border-color: var(--theme-line);
  color: var(--theme-text);
}
.panel, .summary-card, .market-connection { box-shadow: var(--theme-shadow); }
.table-toolbar, .production-details-row td, .import-preview,
.price-import-metrics span, .price-import-pair.heading,
.import-summary div, .import-log-metrics span, .same-key-row,
.file-field input, .secret-field button { background: var(--theme-control); border-color: var(--theme-line); }
.price-competitor-row, .import-log-metrics, .import-log-details,
.import-issue-row, .import-clear-list div, .order-row, .sync-item,
.stock-row, .movement-row, .user-row, .product-thumb { border-color: var(--theme-line); }
.import-log-metrics { background: var(--theme-line); }
.import-log-details .import-issue-list, .import-issue-block,
.import-channel-block, .import-clear-block { background: var(--theme-panel); }
.import-log-details .import-issue-list { border-color: var(--theme-line); }
.import-log-entry.has-issues, .import-issue-block { border-color: var(--theme-danger-border); }
.import-channel-block { border-color: var(--theme-mint-border); }
.import-clear-block { border-color: var(--theme-warning-border); }
.pill.neutral, .key-status, .connection-state,
.icon-button, .product-thumb, .own-warehouse-no-photo { background: var(--theme-control); color: var(--theme-muted); }
.fbo-section-note, .notice p, .price-own-card small, .intro,
.eyebrow, .security-note { color: var(--theme-muted); }
.sync-explanation, .bulk-safety-hint { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }

/* Tables and their sticky cells must have an opaque theme surface. */
th, .own-warehouse-table thead th, .price-history-table thead th,
.price-history-table th:first-child { background: var(--theme-header); color: var(--theme-muted); border-color: var(--theme-line); }
td, .price-history-table td, .price-history-table th { border-color: var(--theme-line); }
.price-history-table tbody th, .price-history-table td { background: var(--theme-panel); }
.own-warehouse-table tbody th, .own-warehouse-copy { color: var(--theme-text); }
.price-history-table .own-price-row th { background: var(--theme-mint-soft); box-shadow: inset 3px 0 var(--theme-mint); }
.price-history-table .own-price-row td { background: var(--theme-panel); }
.price-history-table .own-price-row td.has-price strong { color: var(--theme-mint-ink); }
.price-history-table .competitor-price-row:hover th,
.price-history-table .competitor-price-row:hover td { background: var(--theme-hover); }
.price-history-table thead th.today { background: var(--theme-mint-soft); box-shadow: inset 0 -3px var(--theme-mint); }
.price-history-table thead th.weekend,
.price-history-table thead th.weekend strong, .price-history-table thead th.weekend small { color: var(--theme-danger); }
.price-history-table thead th small, .price-history-table .empty-price span { color: var(--theme-subtle); }
.price-history-table .has-price strong { color: var(--theme-text); }
.price-difference.lower { color: var(--theme-danger); }
.price-difference.higher { color: var(--theme-mint-ink); }
.production-row td:nth-child(2) { background: linear-gradient(90deg, var(--row-fill), var(--theme-panel)); }
.production-details-row td { background: var(--theme-control); }
.production-shortage { background: var(--theme-danger-soft); color: var(--theme-danger); }

/* Forms, buttons and independent-warehouse metadata. */
select, input, textarea, .location-picker select,
.fulfillment-control-filter input, .fulfillment-control-filter select,
.analytics-filter input, .production-filter select,
.production-target-form input, .production-orders-page-controls input,
.product-search-bar input, .safety-stock-input {
  background-color: var(--theme-control);
  color: var(--theme-text);
  border-color: var(--theme-grid);
}
.button.secondary, .sync-actions button, .production-action,
.user-row-actions button, .import-mode label, .own-warehouse-tags-edit,
.dynamics-edit-tags, .product-actions button, .order-actions .advance-button,
.advance-button { background: var(--theme-raised); border-color: var(--theme-grid); color: var(--theme-text); }
.button.secondary:hover:not(:disabled), .sync-actions button:hover:not(:disabled),
.production-action:hover:not(:disabled), .user-row-actions button:hover:not(:disabled),
.own-warehouse-tags-edit:hover, .dynamics-edit-tags:hover,
.product-actions button:hover:not(:disabled), .advance-button:hover:not(:disabled) { background: var(--theme-hover); }
.sync-actions button:hover:not(:disabled) { border-color: var(--theme-danger-border); color: var(--theme-danger); }
.button.primary, .production-action.primary, .submit { background: var(--theme-primary); color: var(--theme-primary-ink); border-color: var(--theme-primary); box-shadow: none; }
.button.primary:hover:not(:disabled), .production-action.primary:hover:not(:disabled), .submit:hover:not(:disabled) { background: var(--theme-primary-hover); border-color: var(--theme-primary-hover); }
.own-warehouse-tag-chip, .dynamics-tag { background: var(--theme-control); color: var(--theme-text); }
.own-warehouse-copy:hover, .own-warehouse-offer small,
.password-field button { color: var(--theme-mint-ink); }
.own-warehouse-copy span { color: var(--theme-muted); }
/* Keep marketplace labels readable on the existing own-warehouse table. */
.own-warehouse-id b { color: var(--theme-muted); }
.own-warehouse-market-link { color: #fff; }
.own-warehouse-market-link.wb { background: #7d2be6; }
.own-warehouse-market-link.ozon { background: #005bff; }
.price-own-search-results, .dynamics-article-options {
  background: var(--theme-raised);
  border-color: var(--theme-grid);
  box-shadow: var(--theme-overlay-shadow);
}
.price-own-search-results button, .dynamics-article-option,
.dynamics-article-option strong { color: var(--theme-text); }
.price-own-search-results button:hover, .price-own-search-results button:focus-visible,
.dynamics-article-option:hover, .dynamics-article-option:focus,
.dynamics-article-option.is-active, .dynamics-article-option[aria-selected="true"] { background: var(--theme-hover); }
.price-own-search-results button:first-child span:first-child strong { color: var(--theme-mint-ink); }
.price-monitor-item:hover { border-color: var(--theme-mint-border); }
.price-monitor-item.active { border-color: var(--theme-mint-border); background: var(--theme-mint-soft); box-shadow: inset 3px 0 var(--theme-mint); }
.price-own-card { background: var(--theme-mint-soft); border: 1px solid var(--theme-mint-border); color: var(--theme-text); }
.price-own-card a { color: var(--theme-mint-ink); }
.price-chart-grid { stroke: var(--theme-grid); }
.price-chart-axis { fill: var(--theme-muted); }
.price-history-scroll { scrollbar-color: var(--theme-grid) var(--theme-control); }

/* Semantics: pink is an order accent, mint is positive; errors stay red and
   pending/destructive confirmation states stay amber or red. */
.connection-orders { background: var(--theme-pink-soft); color: var(--theme-pink-ink); }
.summary-card.success .value, .sync-check { color: var(--theme-mint-ink); }
.summary-card.warning .value { color: var(--theme-warning); }
.summary-card.danger .value { color: var(--theme-danger); }
.market-logo.wb, .market-logo.ozon, .fulfillment-market-card .market-logo { color: #fff; }
.fulfillment-total-card { background: var(--theme-mint-soft); border-color: var(--theme-mint-border); }
.fulfillment-total-card .value, .fulfillment-market-card > div:last-child strong { color: var(--theme-mint-ink); }
.notice, .fbo-mode-label, .dynamics-readonly { background: var(--theme-info-soft); border-color: var(--theme-info-border); }
.notice-icon, .fbo-mode-label, .dynamics-readonly { color: var(--theme-info); }
.notice-icon { background: var(--theme-control); }
.fulfillment-control-notice, .analytics-notice { background: var(--theme-mint-soft); border-color: var(--theme-mint-border); }
.market-connection[data-status="ok"] .connection-state { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }
.market-connection[data-status="ok"]::after, .market-connection[data-status="ok"] .connection-dot { background: var(--theme-mint); }
.market-connection[data-status="syncing"] .connection-state { background: var(--theme-warning-soft); color: var(--theme-warning); }
.market-connection[data-status="error"] .connection-state { background: var(--theme-danger-soft); color: var(--theme-danger); }
.market-connection[data-status="disabled"] .connection-state { background: var(--theme-control); color: var(--theme-muted); }
.market-toggle, .danger-button, .button.danger-outline,
.product-actions button.delete, .production-action.danger, .user-row-actions button.danger {
  background: var(--theme-danger-soft); border-color: var(--theme-danger-border); color: var(--theme-danger);
}
.market-toggle[data-action="enable"] { background: var(--theme-mint-soft); border-color: var(--theme-mint-border); color: var(--theme-mint-ink); }
.button.danger-primary, .danger-dialog-icon { background: var(--theme-danger-solid); color: var(--theme-danger-solid-ink); border-color: var(--theme-danger-solid); }
.button.danger-primary:hover:not(:disabled) { background: var(--theme-danger-solid-hover); }
.danger-dialog, .import-log-entry.has-issues { border-color: var(--theme-danger-border); }
.danger-dialog-message, .error, .snapshot-alert { background: var(--theme-danger-soft); color: var(--theme-danger); border-color: var(--theme-danger-border); }
.danger-dialog .eyebrow, .danger-dialog h2, .production-overdue,
.own-warehouse-message.is-error, .own-warehouse-error, .import-errors,
.dynamics-tags-error, .dynamics-message.is-error { color: var(--theme-danger); }
.own-warehouse-import-warning, .production-action.receipt { background: var(--theme-warning-soft); color: var(--theme-warning); border-color: var(--theme-warning-border); }
.production-receipt-arrived { color: var(--theme-warning); }
.production-receipt-details span { background: var(--theme-raised); }
.production-state-pill.green { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }
.production-state-pill.yellow { background: var(--theme-warning-soft); color: var(--theme-warning); }
.production-state-pill.red-soon { background: var(--theme-danger-soft); color: var(--theme-danger); }
.demand-confidence { background: var(--theme-control); color: var(--theme-muted); }
.demand-confidence.low, .demand-confidence.none { background: var(--theme-warning-soft); color: var(--theme-warning); }
.demand-warning { color: var(--theme-warning); }
.snapshot-day { background: var(--theme-control); border-color: var(--theme-line); color: var(--theme-muted); }
.snapshot-weekday { color: var(--theme-muted); }
.snapshot-day.green, .snapshot-legend .green { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }
.snapshot-day.yellow, .snapshot-legend .yellow { background: var(--theme-warning-soft); color: var(--theme-warning); }
.snapshot-day.red, .snapshot-legend .red { background: var(--theme-danger-soft); color: var(--theme-danger); }
.snapshot-day.pending { background: var(--theme-info-soft); color: var(--theme-info); }
.snapshot-day[aria-pressed="true"] { outline-color: var(--theme-focus); }
.movement-symbol.neutral { background: var(--theme-info-soft); color: var(--theme-info); }
.toast { background: var(--theme-toast); color: var(--theme-toast-ink); }
.toast.error { background: var(--theme-danger-solid); color: var(--theme-danger-solid-ink); }

/* Override Dynamics' local palette without changing its data or bar semantics. */
.dynamics-panel {
  --panel: var(--theme-canvas);
  --line: var(--theme-line);
  --dynamics-surface: var(--theme-panel);
  --dynamics-header: var(--theme-header);
  --dynamics-grid: var(--theme-grid);
  --dynamics-empty-cell: var(--theme-empty-cell);
  --dynamics-muted: var(--theme-muted);
  --dynamics-pink: var(--theme-pink);
  --dynamics-pink-soft: var(--theme-pink-soft);
  --dynamics-pink-ink: var(--theme-pink-ink);
  --dynamics-mint: var(--theme-mint);
  --dynamics-mint-soft: var(--theme-mint-soft);
  --dynamics-stock-mint: var(--theme-stock-cell);
  --dynamics-stock-ink: var(--theme-mint-ink);
  --dynamics-fbs-ink: var(--theme-mint-ink);
  background: var(--theme-canvas);
}
.dynamics-filters label, .dynamics-cell-legend small, .dynamics-method,
.dynamics-market-caption, .dynamics-chart-panel h3 small, .dynamics-demand span,
.dynamics-product-main small, .dynamics-article-option small, .dynamics-article-empty,
.dynamics-history-note, .dynamics-message, .dynamics-total small,
.dynamics-legend, .dynamics-scroll-note, .dynamics-copy span,
.dynamics-cell-legend i { color: var(--theme-muted); }
.dynamics-product-main strong, .dynamics-copy { color: var(--theme-text); }
.dynamics-demand b { color: var(--theme-text); }
.dynamics-filters input, .dynamics-filters select, .dynamics-article-input,
.dynamics-article-toggle { background: var(--theme-control); color: var(--theme-text); border-color: var(--theme-grid); }
.dynamics-table-search .dynamics-article-input input { background: transparent; color: var(--theme-text); }
.dynamics-article-toggle:hover, .dynamics-article-toggle[aria-expanded="true"] { background: var(--theme-hover); color: var(--theme-text); }
.dynamics-filters .dynamics-rolling.is-active { background: var(--theme-mint-soft); border-color: var(--theme-mint-border); color: var(--theme-mint-ink); }
#wb-dynamics-filter button[type="submit"], #wb-dynamics-tags-cancel {
  background: var(--theme-raised);
  border-color: var(--theme-grid);
  color: var(--theme-text);
}
#wb-dynamics-filter button[type="submit"]:hover:not(:disabled), #wb-dynamics-tags-cancel:hover:not(:disabled) {
  background: var(--theme-hover);
}
.dynamics-tags-error { color: var(--theme-danger); }
.dynamics-article-option[aria-selected="true"] { box-shadow: inset 3px 0 var(--theme-mint); }
.dynamics-table .dynamics-today { background-color: var(--theme-control); }
.dynamics-product-main img, .dynamics-no-photo { background: var(--theme-panel); border-color: var(--theme-line); }
.dynamics-local-stock { background: var(--theme-mint-soft); border-color: var(--theme-mint-border); }
.dynamics-local-stock b, .dynamics-product-main .dynamics-local-stock small { color: var(--theme-mint-ink); }
.dynamics-value.fbw-stock { background: var(--theme-fbw-stock-cell); color: var(--theme-mint-ink); }
.dynamics-value.fbs-stock { background: var(--theme-mint-soft); color: var(--theme-mint-ink); }
.dynamics-value.orders-total { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-pink-ink) 24%, transparent); }
.dynamics-value.stock-total { box-shadow: inset 0 0 0 1px var(--theme-mint-border); }
.dynamics-total-line, .dynamics-total-point { stroke: var(--theme-text); }
.dynamics-total-point { fill: var(--theme-panel); }
.total-dot::before { background: var(--theme-text); }

/* Modal content never falls back to the browser's mismatched canvas colour. */
dialog { background: var(--theme-panel); color: var(--theme-text); box-shadow: var(--theme-overlay-shadow); }
dialog::backdrop { background: var(--theme-backdrop); }
.login-page { background: var(--theme-canvas); }
.login-card { border-color: var(--theme-line); box-shadow: var(--theme-overlay-shadow); }
.login-card input { background: var(--theme-control); color: var(--theme-text); border-color: var(--theme-grid); }
.security-note { border-color: var(--theme-line); }

:where(button, a, input, select, textarea):focus-visible,
[data-theme-toggle]:focus-visible, .own-warehouse-copy:focus-visible,
.own-warehouse-market-link:focus-visible, .own-warehouse-tags-edit:focus-visible,
.dynamics-copy:focus-visible, .dynamics-article-toggle:focus-visible,
.price-own-search-results button:focus-visible {
  outline: 2px solid var(--theme-focus);
  outline-offset: 2px;
}
.login-card input:focus, .dynamics-article-input:focus-within {
  border-color: var(--theme-focus);
  box-shadow: 0 0 0 3px var(--theme-focus-soft);
}
[data-theme-toggle]:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1050px) {
  .top-actions { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .top-actions, .theme-top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; width: 100%; min-width: 0; }
  .top-actions .location-picker { flex: 1 1 140px; margin: 0; }
  .top-actions .last-update { flex: 0 1 auto; text-align: left; font-size: 10px; }
  .top-actions [data-theme-toggle] { margin-left: auto; }
  [data-theme-toggle] { min-height: 36px; font-size: 11px; padding: 7px 9px; }
  .theme-top-actions .fbo-mode-label { max-width: 100%; font-size: 11px; }
}
@media (max-width: 440px) {
  .login-card-head { gap: 8px; }
  .login-theme-slot [data-theme-toggle] { padding: 7px 8px; font-size: 10px; }
  .top-actions .last-update { flex-basis: 100%; }
  .fbo-shell .theme-top-actions { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-theme-toggle] { transition: none; }
}
@media print {
  [data-theme-toggle] { display: none; }
  body.printing-production-day .production-day-card.print-target,
  body.printing-production-day .production-day-card.print-target th,
  body.printing-production-day .production-day-card.print-target td,
  body.printing-production-day .production-day-card.print-target .production-day-head {
    --ink: #000;
    --muted: #444;
    background: #fff;
    color: #000;
  }
}
