/* Legenda WB · application appearance. Themes only set visual properties;
   chart coordinates, table dimensions and responsive breakpoints belong to the modules. */
:root[data-theme] {
  color-scheme: light;
  --bg: #f2f4f3;
  --surface: #ffffff;
  --surface-soft: #f2f5f4;
  --ui-raised: #ffffff;
  --ui-field: #ffffff;
  --ui-inset: #e9eeed;
  --ui-hover: #eef4f2;
  --line: #d9e0df;
  --line-strong: #bac7c7;
  --text: #19292e;
  --muted: #53676c;
  --muted-2: #5e7075;
  --ui-accent: #146b5f;
  --ui-on-accent: #ffffff;
  --ui-accent-hover: #0b574d;
  --ui-accent-soft: #e0f1eb;
  --ui-accent-line: #a3c8ba;
  --green: var(--ui-accent);
  --green-dark: var(--ui-accent-hover);
  --accent: var(--ui-accent);
  --blue: #315f9f;
  --blue-soft: #e7effa;
  --amber: #8b5c13;
  --amber-soft: #faf2df;
  --red: #a43b3d;
  --red-soft: #fbebea;
  --purple: #735591;
  --ui-success: #176a49;
  --ui-chart-orders: #3964ae;
  --ui-chart-buyouts: #09796b;
  --ui-grid: #dce4e3;
  --ui-order-text: #2c508e;
  --ui-buyout-text: #166756;
  --ui-accent-stripe: #649b90;
  --ui-focus: #237d79;
  --ui-neutral-ink: #35484e;
  --ui-scroll: #b3c2c3;
  --ui-on-solid: #ffffff;
  --radius: 10px;
  --shadow: 0 10px 32px rgb(25 44 47 / .10), 0 2px 5px rgb(25 44 47 / .05);
}
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11161c;
    --surface: #191f26;
    --surface-soft: #202830;
    --ui-raised: #252e37;
    --ui-field: #141b22;
    --ui-inset: #10171e;
    --ui-hover: #25323a;
    --line: #303a43;
    --line-strong: #45535e;
    --text: #edf2f4;
    --muted: #afbdc5;
    --muted-2: #98a9b5;
    --ui-accent: #97d9cd;
    --ui-on-accent: #102a28;
    --ui-accent-hover: #b6e6dc;
    --ui-accent-soft: #213b38;
    --ui-accent-line: #41655e;
    --blue: #9cbffa;
    --blue-soft: #26374c;
    --amber: #e8c083;
    --amber-soft: #332d23;
    --red: #f3a2a1;
    --red-soft: #3d292e;
    --purple: #c6abea;
    --ui-success: #8cd1ad;
    --ui-chart-orders: #82aefa;
    --ui-chart-buyouts: #83d7c3;
    --ui-grid: #333f48;
    --ui-order-text: #adcafb;
    --ui-buyout-text: #a8e2d2;
    --ui-accent-stripe: #69a698;
    --ui-focus: #a1def3;
    --ui-neutral-ink: #cfdae0;
    --ui-scroll: #465560;
    --ui-on-solid: #142028;
    --shadow: 0 12px 32px rgb(2 6 10 / .36), 0 2px 5px rgb(2 6 10 / .22);
  }
}
/* Semantic drawing colors are shared with both advertising canvases. */
:root[data-theme] {
  --plot-surface: var(--surface);
  --plot-muted: var(--muted);
  --plot-text: var(--text);
  --plot-grid: var(--ui-grid);
  --plot-boundary: #6a7881;
  --plot-target: #8e4980;
  --plot-previous: #697c8b;
  --plot-Z1: #ae414b;
  --plot-Z2: #946413;
  --plot-Z3: #09786d;
  --plot-Z4: #3a66a9;
  --plot-unknown: #6e7980;
}
@media screen {
  :root[data-theme="dark"] {
    --plot-boundary: #728592;
    --plot-target: #e6a8cf;
    --plot-previous: #96a8ba;
    --plot-Z1: #ec939a;
    --plot-Z2: #e4bc79;
    --plot-Z3: #80cdbb;
    --plot-Z4: #89aeea;
    --plot-unknown: #97a7b2;
    --ui-success-soft: #20382e;
    --ui-purple-soft: #302b3c;
    --ui-red-line: #684249;
    --ui-amber-line: #66563d;
    --ui-success-line: #3c6050;
    --ui-blue-line: #405975;
    --ui-purple-line: #5a4c69;
    --ui-red-fill: #733d46;
    --ui-amber-fill: #66502c;
    --ui-success-fill: #2d5945;
    --ui-accent-fill: #2b5b54;
    --ui-blue-fill: #304f70;
    --ui-purple-fill: #4e4060;
  }
}
.oa-target-key { border-color: var(--plot-target); }
/* Existing screen-specific styles with fixed colors, in production cascade order. */
@media screen {
:where(html[data-theme="dark"]) {
/* styles */
.communications-marketplace-switch { color: var(--text); background: var(--ui-inset); }
.communications-marketplace-switch > span { color: var(--muted-2); }
.communications-marketplace-switch button { color: var(--muted-2); }
.communications-marketplace-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgb(3 7 11 / 0.40); }
.communications-training-banner { color: var(--ui-success); background: var(--ui-success-soft); border-color: var(--ui-success-line); }
.communications-training-dot { box-shadow: 0 0 0 4px rgb(3 7 11 / 0.23); }
.nav-count { color: var(--text); }
.communications-tabs button span, .communications-filter span { color: var(--muted); background: var(--surface-soft); }
.communications-scope { background: var(--surface-soft); }
.communications-scope button.active { background: var(--surface); box-shadow: 0 1px 3px rgb(3 7 11 / 0.20); }
.communications-filter.active { color: var(--ui-success); background: var(--ui-success-soft); border-color: var(--ui-success); }
.communications-row:hover, .communications-row.active { background: var(--surface-soft); }
.communications-kind { color: var(--muted); background: var(--surface-soft); }
.communications-kind.kind-review { color: var(--amber); background: var(--amber-soft); }
.communications-kind.kind-question { color: var(--blue); background: var(--surface-soft); }
.communications-kind.kind-chat { color: var(--ui-success); background: var(--ui-success-soft); }
.communications-stars, .communications-rating span { color: var(--amber); }
.communications-conversation > div { background: var(--surface); }
.communications-conversation > div.seller { background: var(--ui-success-soft); }
.communications-load-more { color: var(--ui-success); background: var(--ui-success-soft); border-color: var(--ui-success-line); }
.communications-empty-icon { color: var(--ui-success); background: var(--ui-success-soft); }
.communications-answer-source { color: var(--ui-neutral-ink); background: var(--surface-soft); border-color: var(--ui-success-line); }
.communications-answer-source a { color: var(--ui-success); }
.communications-training-card { color: var(--ui-success); background: var(--ui-success-soft); border-color: var(--ui-success-line); }
.stock-sync-mode-banner { border-color: var(--ui-blue-line); border-left-color: var(--blue); background: var(--surface-soft); }
.stock-sync-mode-banner.write-enabled { border-color: var(--ui-amber-line); border-left-color: var(--amber); background: var(--amber-soft); }
.stock-sync-warehouse-row.linked { background: var(--surface-soft); }
.stock-sync-warehouse-head { background: var(--surface-soft); }
.stock-sync-primary-choice { color: var(--muted); }
.stock-sync-primary-choice input { accent-color: var(--blue); }
.stock-sync-plan-table .negative { color: var(--red); }
.stock-sync-plan-table .positive { color: var(--ui-accent); }
.stock-sync-journal-row.error span { color: var(--red); }
.stock-sync-journal-row.warning span { color: var(--amber); }
.stock-sync-execution.verified { color: var(--ui-success); background: var(--surface-soft); }
.stock-sync-execution.failed, .stock-sync-execution.partial_failed, .stock-sync-execution.verification_failed { color: var(--red); background: var(--surface-soft); }
.profitability-marketplace-switch { color: var(--text); background: var(--ui-inset); }
.profitability-marketplace-switch > span { color: var(--muted-2); }
.profitability-marketplace-switch button { color: var(--muted-2); }
.profitability-marketplace-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 4px rgb(3 7 11 / 0.40); }
.profitability-view-tabs { background: var(--surface-soft); }
.profitability-view-tab.active { box-shadow: 0 1px 3px rgb(3 7 11 / 0.20); }
.profitability-daily-validity.valid { color: var(--ui-success); border-color: var(--ui-success-line); background: var(--ui-success-soft); }
.profitability-daily-validity.provisional { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.profitability-daily-validity.invalid { color: var(--red); border-color: var(--ui-red-line); background: var(--red-soft); }
.profitability-daily-source-group.required { border-left-color: var(--amber); }
.profitability-daily-source-group.optional { background: var(--surface-soft); }
.profitability-daily-source.ok { color: var(--ui-success); border-color: var(--ui-success-line); background: var(--ui-success-soft); }
.profitability-daily-source.partial { color: var(--amber); border-color: var(--ui-amber-line); background: var(--amber-soft); }
.profitability-daily-source.missing { color: var(--red); border-color: var(--ui-red-line); background: var(--surface-soft); }
.profitability-daily-selector { background: var(--surface); }
.profitability-daily-list-label { background: var(--surface); }
.profitability-daily-product-option { border-bottom-color: var(--line); }
.profitability-daily-product-option:hover, .profitability-daily-product-option.selected { background: var(--surface-soft); }
.profitability-daily-check { color: var(--text); background: var(--surface); }
.profitability-daily-product-option.selected .profitability-daily-check { border-color: var(--ui-accent); background: var(--ui-accent-fill); }
.profitability-daily-glue-product-icon { background: var(--surface); }
.profitability-daily-chart-grid { stroke: var(--text); }
.profitability-daily-pivot th, .profitability-daily-pivot td { border-right-color: var(--line); border-bottom-color: var(--line); }
.profitability-daily-pivot thead th { background: var(--surface-soft); }
.profitability-daily-pivot thead th small { color: var(--amber); }
.profitability-daily-pivot thead th small.missing { color: var(--red); }
.profitability-daily-pivot .profitability-daily-metric-column { box-shadow: 6px 0 10px rgb(3 7 11 / 0.08); }
.profitability-daily-pivot thead .profitability-daily-metric-column { background: var(--surface-soft); }
.profitability-daily-pivot .profitability-daily-group-row th, .profitability-daily-pivot .profitability-daily-group-row td { background: var(--surface-soft); }
.profitability-daily-group-row button { color: var(--ui-accent); }
.profitability-daily-group-row button span { color: var(--text); background: var(--ui-accent-fill); }
.profitability-daily-pivot td.daily-percent-heat-low { background: var(--amber-soft); }
.profitability-daily-pivot td.daily-percent-heat-low-mid { background: var(--amber-soft); }
.profitability-daily-pivot td.daily-percent-heat-mid { background: var(--amber-soft); }
.profitability-daily-pivot td.daily-percent-heat-high { background: var(--ui-success-soft); }
.profitability-daily-pivot td.daily-percent-heat-best { background: var(--ui-success-soft); }
.profitability-daily-pivot td.daily-percent-trend-good { color: var(--ui-success); }
.profitability-daily-pivot td.daily-percent-trend-bad { color: var(--red); }
.nav-button { color: var(--ui-neutral-ink); }
.logout-button { color: var(--red); background: var(--surface-soft); border-color: var(--ui-red-line); }
.logout-button:hover { background: var(--red-soft); }
.icon-link { border-color: var(--ui-blue-line); }
.codex-connect-link { color: var(--ui-neutral-ink); background: var(--surface-soft); border-color: var(--line-strong); }
.login-page { background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-soft) 100%); }
.avatar { background: var(--surface-soft); color: var(--ui-neutral-ink); }
.page-loading-first-warning { color: var(--amber); background: var(--amber-soft); border-color: var(--amber); }
.page-loading-spinner { border-color: var(--line); }
.page-loading-skeleton span, .session-loading-lines span { background: var(--surface-soft); }
.page-loading-visual.is-refresh { box-shadow: 0 8px 24px rgb(3 7 11 / 0.23); }
.notice { color: var(--amber); }
.title-block .error-text { color: var(--amber); }
.btn { background: var(--surface-soft); }
.btn.primary { color: var(--ui-on-solid); }
.btn.danger-lite { border-color: var(--ui-red-line); }
.btn.blue { color: var(--ui-on-solid); }
.btn.warning { color: var(--ui-on-solid); }
.btn.danger { border-color: var(--ui-red-line); }
.input:focus, .select:focus { box-shadow: 0 0 0 3px rgb(3 7 11 / 0.20); }
.table th { background: var(--surface); }
.table td, .table th { border-right-color: var(--line); }
.table td { border-bottom-color: var(--line); }
.table tr:hover td { background: var(--surface); }
.test-link { color: var(--blue); }
.ads-campaign-table thead th { background: var(--surface); }
.ads-stock-cell { background: var(--surface-soft); }
.ads-stock-cell.stock-ok { border-color: var(--ui-success-line); background: var(--surface-soft); color: var(--ui-success); }
.ads-stock-cell.stock-empty { border-color: var(--ui-red-line); background: var(--surface-soft); color: var(--red); }
.ads-campaign-thumb { background: var(--surface); }
.ads-campaign-thumb > img { background: var(--surface); }
.ads-campaign-extra { background: var(--ui-raised); color: var(--text); box-shadow: 0 2px 6px rgb(3 7 11 / 0.26); }
.table-link { color: var(--blue); }
.selected-row { background: var(--surface-soft); }
.muted-row { background: var(--surface-soft); }
.ads-product-stock-list { background: var(--surface); }
.ads-product-stock-card.stock-ok { border-color: var(--ui-success-line); }
.ads-product-stock-card.stock-empty { border-color: var(--ui-red-line); background: var(--surface); }
.ads-product-stock-main > img, .ads-product-stock-main > .pack-visual { background: var(--surface); }
.ads-keyword-head { background: var(--surface-soft); }
.ads-key-tab { color: var(--muted); background: var(--surface-soft); }
.ads-key-tab.active { color: var(--text); background: var(--ui-amber-fill); }
.ads-mode-pill, .ads-campaign-pill { color: var(--muted); }
.ads-period-presets { background: var(--surface); }
.ads-period-chip { color: var(--muted); }
.ads-period-chip.active { color: var(--text); background: var(--ui-amber-fill); }
.switch-dot { background: var(--ui-success); }
.switch-dot::after { background: var(--muted-2); }
.ads-keyword-subbar { background: var(--surface); }
.ads-keyword-bulkbar { background: var(--surface); }
.ads-keyword-bulkbar.active { background: var(--surface-soft); }
.ads-strategy-pool-card { background: var(--surface); }
.ads-strategy-pool-card.active { border-color: var(--ui-blue-line); background: var(--surface-soft); }
.ads-strategy-next { border-color: var(--ui-blue-line); background: var(--surface-soft); }
.ads-strategy-next.ready { border-color: var(--ui-success-line); background: var(--surface-soft); }
.ads-strategy-table th, .ads-strategy-key-table th { background: var(--surface); }
.ads-strategy-key-head { background: var(--surface); }
.ads-strategy-plan-summary.over-budget > div:last-child, .ads-strategy-plan-summary.over-budget > div:nth-child(4) { border-color: var(--amber); background: var(--amber-soft); }
.ads-strategy-launch { background: var(--surface); }
.ads-strategy-launch.running { border-color: var(--ui-success-line); background: var(--surface-soft); }
.ads-strategy-run-journal span { color: var(--muted); }
.ads-strategy-position-head { background: var(--surface); }
.ads-strategy-position-table th:first-child, .ads-strategy-position-table td:first-child { background: var(--surface); }
.ads-strategy-position-table th { background: var(--surface); }
.ads-strategy-position-table th:first-child { background: var(--surface); }
.ads-strategy-history-head { background: var(--surface); }
.ads-strategy-role-item { background: var(--surface); }
.ads-keyword-table thead th { background: var(--surface-soft); color: var(--muted); }
.ads-keyword-table thead tr.filter-row th { background: var(--surface); }
.sort-head .sort-arrow { color: var(--muted); }
.column-filter { border-color: var(--line); background: var(--surface); }
.fake-checkbox, .keyword-checkbox { border-color: var(--line-strong); background: var(--surface); }
.keyword-checkbox.checked::after { color: var(--text); }
.keyword-checkbox.partial { background: var(--blue-soft); }
.keyword-name-cell .chevron { color: var(--ui-neutral-ink); }
.bid-pill { background: var(--surface); color: var(--text); }
.bid-input { background: var(--surface); color: var(--text); }
.bid-input:focus { outline-color: color-mix(in srgb,var(--blue) 24%,transparent); border-color: var(--blue); }
.bid-input.default-bid { background: var(--surface-soft); }
.bid-input.default-bid:focus { background: var(--surface); color: var(--text); }
.bid-input:disabled { background: var(--surface-soft); }
.live-position-cell strong { color: var(--blue); }
.frequency-cell strong { color: var(--blue); }
.active-key-row { background: var(--surface); }
.excluded-key-row, .disabled-key-row { background: var(--red-soft); }
.keyword-selected-row { background: var(--surface-soft); }
.excluded-key-row.keyword-selected-row { background: var(--red-soft); }
.ads-total-row { background: var(--surface); }
.source-pill.ready { border-color: var(--ui-success-line); background: var(--ui-success-soft); color: var(--ui-success); }
.source-pill.failed { border-color: var(--ui-red-line); }
.warning-message { color: var(--amber); }
.profitability-placeholder { background: var(--surface-soft); }
.source-pill.source-pending { background: var(--surface-soft); }
.profitability-table-placeholder span { background: var(--surface-soft); }
.profitability-metric-help { border-color: var(--line-strong); color: var(--blue); }
.profitability-metric-help:hover, .profitability-metric-help:focus-visible { color: var(--ui-accent); border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.profitability-metric-help:focus-visible { outline-color: var(--ui-accent); }
.profitability-metric-tooltip { border-color: var(--line); color: var(--muted); background: var(--surface); box-shadow: 0 8px 28px rgb(3 7 11 / 0.26); }
.profitability-metric-tooltip strong { color: var(--ui-neutral-ink); }
.economics-controls { background: var(--surface); }
.readiness-meter { background: var(--surface-soft); }
.readiness-meter span { background: var(--blue-soft); }
.repricer-worker-status { background: var(--surface-soft); }
.repricer-worker-status.is-ok { border-color: var(--ui-success-line); background: var(--ui-success-soft); }
.repricer-worker-status.is-error { border-color: var(--ui-red-line); background: var(--red-soft); }
.repricer-worker-status.is-ok strong { color: var(--ui-success); }
.repricer-worker-status.is-error strong { color: var(--red); }
.repricer-selected-product { background: var(--surface); }
.order-source-breakdown { color: var(--muted); }
.buyout-forecast-badge.decline { color: var(--red); border-color: var(--ui-red-line); background: var(--red-soft); }
.buyout-forecast-badge.improvement { color: var(--ui-success); border-color: var(--ui-success-line); background: var(--surface-soft); }
.logistics-expectation.higher { color: var(--red); }
.logistics-expectation.lower { color: var(--ui-success); }
.profitability-table thead th { background: var(--surface); }
.profitability-table .profitability-sticky-article { box-shadow: 8px 0 10px -10px rgb(3 7 11 / 0.58); }
.profitability-table thead .profitability-sticky-product, .profitability-table thead .profitability-sticky-article { background: var(--surface); }
.profitability-table tbody tr:hover > .profitability-sticky-product, .profitability-table tbody tr:hover > .profitability-sticky-article { background: var(--surface); }
.profitability-table tbody .selected-profit-row > .profitability-sticky-product, .profitability-table tbody .selected-profit-row > .profitability-sticky-article { background: var(--surface-soft); }
.selected-profit-row { background: var(--surface-soft); }
.profitability-table tbody tr.profit-row-missing-cost > td { background: var(--surface-soft); }
.profitability-table tbody tr.profit-row-missing-cost:hover > td { background: var(--red-soft); }
.profitability-cost-missing-note { border-color: var(--ui-red-line); color: var(--red); background: color-mix(in srgb,var(--surface) 72%,transparent); }
.profitability-calculator-cost-warning { border-color: var(--ui-red-line); color: var(--red); background: var(--surface-soft); }
.profitability-calculator-cost-warning.manual { border-color: var(--ui-amber-line); color: var(--amber); background: var(--amber-soft); }
.profitability-calculator-view-switch { background: var(--surface-soft); }
.profitability-calculator-view-switch button.active { box-shadow: 0 1px 4px rgb(3 7 11 / 0.23); }
.profitability-calculator-help { color: var(--amber); background: var(--amber-soft); }
.profitability-calculator-help-toggle { color: var(--amber); }
.profitability-calculator-help-toggle:focus-visible { outline-color: var(--amber); }
.profitability-calculator-help-steps h3 { color: var(--amber); }
.scenario-target-price-reset { border-color: var(--ui-red-line); color: var(--red); background: var(--surface-soft); }
.scenario-target-price-reset:hover { border-color: var(--red); background: var(--red-soft); }
.profitability-price-select span { border-color: var(--line-strong); background: var(--surface); box-shadow: 0 1px 2px rgb(3 7 11 / 0.13); }
.profitability-price-select input:checked + span::after { color: var(--text); }
.profitability-price-select input:indeterminate + span::after { color: var(--text); }
.profitability-scenario-manual-price { background: var(--amber-soft); }
.profitability-scenario-manual-price .scenario-target-price-value { border-color: var(--amber); background: var(--surface); }
.profitability-table.profitability-main-table th, .profitability-table.profitability-main-table td, .profitability-table.profitability-scenario-table th, .profitability-table.profitability-scenario-table td { border-right-color: var(--line); border-bottom-color: var(--line); }
.profitability-table.profitability-main-table thead th, .profitability-table.profitability-scenario-table thead th { color: var(--muted); background: var(--surface-soft); }
.profitability-heat-legend { color: var(--muted); }
.profitability-heat-legend > span { border-color: color-mix(in srgb,var(--line-strong) 12%,transparent); }
.profitability-heat-legend > span.positive { background: var(--ui-success-soft); }
.profitability-heat-legend > span.negative { background: var(--red-soft); }
.profitability-heat-legend strong { color: var(--ui-neutral-ink); }
.profitability-table td.profitability-heat-cell { color: var(--text); }
.profitability-table td.profitability-heat-positive { box-shadow: inset 3px 0 0 rgb(3 7 11 / 0.58); }
.profitability-table td.profitability-heat-negative { box-shadow: inset 3px 0 0 rgb(3 7 11 / 0.58); }
.profitability-table td.profitability-heat-neutral { background-color: var(--surface-soft); box-shadow: inset 3px 0 0 rgb(3 7 11 / 0.58); }
.profitability-table td.profitability-heat-cell .cell-source { color: var(--muted); }
.calculator-picker-filter-error { color: var(--red); }
.calculator-product-option:hover, .calculator-product-option.selected { background: var(--surface-soft); }
.calculator-auto-grid { background: var(--surface); }
.calculator-spp-grid { background: var(--surface-soft); }
.calculator-auto-grid > .calculator-widget-is-loading, .calculator-spp-grid > .calculator-widget-is-loading { background: var(--surface-soft); }
.calculator-status.error { color: var(--red); background: var(--surface); }
.calculator-storage-override input[aria-invalid="true"] { border-color: var(--red); }
.calculator-fbs-warehouse-message { color: var(--amber) !important; }
.calculator-result-panel { background: var(--surface-soft); }
.calculator-price-apply-readonly { border-color: var(--ui-amber-line); background: var(--amber-soft); }
.price-apply-table th { background: var(--surface); }
.price-apply-table .price-apply-blocked td { background: var(--surface-soft); }
.price-apply-status { color: var(--amber); background: var(--amber-soft); }
.price-apply-status.submitted { color: var(--ui-success); background: var(--ui-success-soft); }
.price-apply-confirmation { border-color: var(--ui-red-line); color: var(--red); background: var(--surface-soft); }
.calculator-model-comparison { background: var(--surface); }
.calculator-comparison-table th { background: var(--surface-soft); }
.calculator-comparison-profit td { background: var(--surface-soft); }
.cost-upload-panel { background: var(--surface); }
.price-test-box { background: var(--surface); }
.price-scenario-table tr.current { background: var(--surface-soft); }
.profit-positive { color: var(--ui-success); }
.redistribution-login-card { border-color: var(--amber); background: var(--amber-soft); }
.redistribution-picker-placeholder { background: var(--surface); }
.redistribution-result { background: var(--surface); }
.redistribution-journal-tab.active { background: var(--ui-amber-fill); }
.redistribution-debug-line { color: var(--amber) !important; }
.products-section-tabs { background: var(--surface-soft); }
.products-section-tab.active { box-shadow: 0 1px 3px rgb(3 7 11 / 0.20); }
.price-index-ozon-widget { border-color: var(--ui-blue-line); border-left-color: var(--blue); background: var(--surface); }
.price-index-ozon-widget-head { border-bottom-color: var(--line); }
.price-index-ozon-band { border-right-color: var(--line); }
.price-index-ozon-band span { color: var(--ui-neutral-ink); }
.price-index-ozon-band.super { background: var(--surface-soft); color: var(--ui-success); }
.price-index-ozon-band.favorable { background: var(--surface-soft); color: var(--ui-success); }
.price-index-ozon-band.moderate { background: var(--amber-soft); color: var(--amber); }
.price-index-ozon-band.unfavorable { background: var(--surface-soft); color: var(--red); }
.price-index-job { border-color: var(--ui-blue-line); background: var(--surface-soft); }
.price-index-job.success { border-color: var(--line-strong); background: var(--surface-soft); }
.price-index-job.error { border-color: var(--ui-red-line); background: var(--surface-soft); }
.read-only-badge { border-color: var(--ui-blue-line); color: var(--blue); background: var(--surface-soft); }
.price-index-table thead th { background: var(--surface); }
.price-index-photo { background: var(--surface); }
.price-index-match.matched { color: var(--ui-success); }
.price-index-match.conflict { color: var(--red); }
.price-index-pi { color: var(--muted); }
.price-index-pi.super { color: var(--ui-success); }
.price-index-pi.favorable { color: var(--ui-success); }
.price-index-pi.moderate { color: var(--amber); }
.price-index-pi.unfavorable { color: var(--red); }
.price-index-margin.positive { color: var(--ui-success); }
.price-index-margin.negative { color: var(--red); }
.products-glue-job-status.active { color: var(--blue); background: var(--surface-soft); }
.products-glue-job-status.success { color: var(--ui-success); background: var(--ui-success-soft); }
.products-glue-job-status.warning { color: var(--amber); background: var(--amber-soft); }
.products-glue-job-status.error { color: var(--red); background: var(--red-soft); }
.products-glue-verification { color: var(--ui-accent); background: var(--surface-soft); }
.products-glue-verification.mismatch, .products-glue-verification.error { color: var(--amber); background: var(--amber-soft); }
.products-glue-log.warning span { color: var(--amber); }
.products-table tr.selected-row td { background: var(--surface-soft); }
.product-campaign-status { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.product-campaign-status.none { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.product-campaign-status.stopped { border-color: var(--ui-amber-line); background: var(--amber-soft); color: var(--amber); }
.product-campaign-status.running { border-color: var(--ui-success-line); background: var(--surface-soft); color: var(--ui-success); }
.product-campaign-status.unknown { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.product-stock-cell.stock-ok strong { color: var(--ui-success); }
.product-stock-cell.stock-empty strong { color: var(--red); }
.product-stock-cell.stock-unknown strong { color: var(--muted); }
.api-settings-nav a:hover, .api-settings-nav a:focus-visible { color: var(--blue); }
.wb-api-panel { border-left-color: var(--red); background: var(--surface); }
.ozon-api-panel { border-left-color: var(--blue); background: var(--surface-soft); }
.ozon-api-panel .api-status { border-color: var(--ui-blue-line); background: var(--surface-soft); }
.ozon-api-panel .api-status.ready { border-color: var(--line-strong); background: var(--surface-soft); }
.marketplace-credential-input { border-color: var(--ui-blue-line); background: var(--surface); }
.api-status.ready { border-color: var(--ui-success-line); background: var(--ui-success-soft); }
.shop-marketplace-option.active { border-color: var(--ui-blue-line); }
.modal-backdrop { background: rgb(3 8 13 / 0.50); }
.codex-security-note { color: var(--ui-neutral-ink); background: var(--surface-soft); border-left-color: var(--line-strong); }
.codex-config { background: var(--surface-soft); }
.helper-install-step-number { color: var(--ui-on-solid); }
.report-comparison-selector.open > .report-comparison-period { box-shadow: 0 0 0 2px rgb(3 7 11 / 0.20); }
.report-comparison-options button { border-bottom-color: var(--line); }
.tax-fixed-rates > div { background: var(--surface); }
.settings-card.highlight { border-color: var(--ui-success); background: var(--ui-success-soft); box-shadow: 0 0 0 4px rgb(3 7 11 / 0.30); }
.worker-pill strong { color: var(--muted); }
.worker-pill.ok { border-color: var(--ui-success-line); background: var(--ui-success-soft); color: var(--ui-success); }
.worker-pill.ok strong { color: var(--ui-success); }
.worker-pill.bad { border-color: var(--ui-red-line); background: var(--red-soft); color: var(--red); }
.process-table th { background: color-mix(in srgb,var(--surface-soft) 78%,transparent); }
.process-table .route-cell { color: var(--ui-neutral-ink); }
.process-job-row.failed { border-color: var(--ui-red-line); background: var(--surface); }
.process-job-row.running, .process-job-row.pending { border-color: var(--ui-blue-line); background: var(--surface-soft); }
.warning-text { color: var(--amber); }
.role-preset-card:has(input:checked) { background: var(--ui-success-soft); }
.user-card.editing { border-color: var(--ui-success-line); background: var(--surface-soft); }
.write-guard { background: var(--amber-soft); }
.write-guard.enabled { border-color: var(--ui-red-line); }
.success-text { color: var(--ui-success); }
.token-input:focus { box-shadow: 0 0 0 3px rgb(3 7 11 / 0.20); }
.form-message.success { color: var(--ui-success); background: var(--ui-success-soft); }
.form-message.warning { color: var(--amber); background: var(--amber-soft); border-color: var(--amber); }
.probe-box { color: var(--blue); border-color: var(--ui-blue-line); }
.confidence-explain { border-color: var(--ui-blue-line); background: var(--surface); }
.formula-line { color: var(--blue); }
.rounds-table tr.round-isolated td { background: var(--amber-soft); }
.rounds-table tr.round-isolated:hover td { background: var(--amber-soft); }
.probe-card.ready { border-color: var(--ui-success-line); background: var(--surface-soft); }
.probe-card.failed { border-color: var(--ui-red-line); }
.probe-row { background: color-mix(in srgb,var(--surface) 75%,transparent); }
.probe-error { background: color-mix(in srgb,var(--surface) 72%,transparent); }
.report-period-trigger.open { box-shadow: 0 0 0 3px rgb(3 7 11 / 0.20); }
.report-period-menu { box-shadow: 0 18px 44px rgb(3 7 11 / 0.26); }
.report-source-pill.control { background: var(--surface-soft); }
.report-tabs button.active { box-shadow: 0 4px 12px rgb(3 7 11 / 0.13); }
.report-head-actions .btn.ghost.active { border-color: var(--ui-blue-line); }
.report-items-mode button.active { box-shadow: 0 4px 12px rgb(3 7 11 / 0.13); }
.report-expense-breakdown-item.negative em { color: var(--ui-success); }
.report-items-wrap::-webkit-scrollbar-track { background: var(--muted-2); }
.report-items-wrap::-webkit-scrollbar-thumb { border-color: var(--line); background: var(--ui-raised); }
.report-items-table thead th { background: var(--surface); }
.report-items-table tbody td:hover { background: var(--surface-soft); box-shadow: inset 0 0 0 1px rgb(3 7 11 / 0.58); }
.report-items-table thead .report-item-sticky { background: var(--surface); }
.report-items-table tbody tr:hover .report-item-sticky { background: var(--surface); }
.report-items-table .report-item-sticky-article { box-shadow: 8px 0 10px -10px rgb(3 7 11 / 0.58); }
.report-comparison-change.good, .report-comparison-summary-item .good { color: var(--ui-accent); }
.report-comparison-insight { background: var(--surface-soft); border-color: var(--ui-accent-line); }
.report-comparison-insight.warning { border-color: var(--ui-amber-line); }
.reports-table tr.selected td { background: var(--surface-soft); }
.thumb { background: var(--surface); }
.thumb img, .summary-thumb img, .photo-frame img, .mini-photo img, .current-photo img, .winner-photo img { background: var(--surface); }
.pack-visual { background: linear-gradient(130deg, color-mix(in srgb,var(--surface) 72%,transparent), color-mix(in srgb,var(--surface) 0%,transparent) 38%),
    linear-gradient(180deg, var(--ui-accent-soft) 0%, var(--surface) 48%, var(--ui-accent-fill) 100%); }
.pack-visual.alt { background: linear-gradient(135deg, color-mix(in srgb,var(--surface) 80%,transparent), color-mix(in srgb,var(--surface) 0%,transparent) 35%),
    linear-gradient(180deg, var(--amber-soft) 0%, var(--surface) 50%, var(--red-soft) 100%); }
.pack-visual.third { background: linear-gradient(140deg, color-mix(in srgb,var(--surface) 78%,transparent), color-mix(in srgb,var(--surface) 0%,transparent) 38%),
    linear-gradient(180deg, var(--ui-success-soft) 0%, var(--surface) 52%, var(--ui-success-fill) 100%); }
.pack-visual::before { background: var(--muted-2); border-color: color-mix(in srgb,var(--line-strong) 18%,transparent); box-shadow: 0 4px 8px rgb(3 7 11 / 0.20); }
.pack-visual::after { background: var(--ui-accent); }
.pack-visual.alt::after { background: var(--red); }
.pack-visual.third::after { background: var(--ui-accent); }
.pack-title { background: color-mix(in srgb,var(--surface) 84%,transparent); color: var(--blue); }
.pack-visual.alt .pack-title { color: var(--red); }
.pack-visual.third .pack-title { color: var(--ui-success); }
.status.done { background: var(--ui-success-soft); color: var(--ui-success); }
.status.running { color: var(--blue); }
.status.draft { background: var(--surface-soft); color: var(--muted); }
.status.archived { background: var(--surface-soft); color: var(--muted); }
.status.paused { color: var(--amber); }
.progress { background: var(--surface); }
.progress-fill { background: var(--blue); }
.progress span { color: var(--muted); }
.ab-icon span { border-right-color: var(--ui-success-line); }
.step:not(:last-child)::after { background: var(--muted-2); }
.step-num { background: var(--surface-soft); color: var(--muted); }
.step.active .step-num { background: var(--ui-raised); color: var(--text); }
.step.done .step-num { color: var(--ui-on-solid); }
.switch { color: var(--ui-neutral-ink); }
.switch-ui { background: var(--surface-soft); }
.switch-ui::after { background: var(--blue); }
.switch input:checked + .switch-ui { background: var(--blue-soft); }
.switch input:checked + .switch-ui::after { background: var(--blue); }
.radio-chip { color: var(--ui-neutral-ink); }
.warning-box { color: var(--amber); }
.play-mark { color: var(--ui-on-solid); }
.ai-content-panel { background: var(--surface); }
.ai-content-presets > div { background: var(--surface); }
.textarea:focus { box-shadow: 0 0 0 3px rgb(3 7 11 / 0.20); }
.photo-frame { background: var(--surface); }
.photo-frame.has-image { background: var(--surface); }
.upload-frame:hover { box-shadow: 0 0 0 3px rgb(3 7 11 / 0.17); }
.photo-frame video { background: var(--ui-inset); }
.video-preview { background: linear-gradient(135deg, var(--ui-inset), var(--ui-raised)); color: var(--text); }
.video-preview span { background: color-mix(in srgb,var(--ui-inset) 74%,transparent); }
.empty-image { border-color: var(--line-strong); color: var(--muted); }
.upload-zone { background: var(--surface); }
.range-head { color: var(--ui-neutral-ink); }
.range-scale span:nth-child(1) { background: var(--red-soft); }
.range-scale span:nth-child(2) { background: var(--ui-amber-fill); }
.range-scale span:nth-child(3) { background: var(--ui-success-fill); }
.range-scale span:nth-child(4) { background: var(--ui-success-fill); }
.mini-photo { background: var(--surface); }
.current-photo { background: var(--surface); }
.campaign-control-panel { background: var(--surface); }
.funds-line { color: var(--blue); }
.top-up-box { border-color: var(--ui-amber-line); }
.continue-box { border-color: var(--ui-amber-line); }
.winner-photo { background: var(--surface); }
@media (max-width: 1160px) {
.price-index-ozon-band:nth-child(-n + 2) { border-bottom-color: var(--line); }
}
@media (max-width: 760px) {
.price-index-ozon-band, .price-index-ozon-band:nth-child(2) { border-bottom-color: var(--line); }
}
.credential-strip { border-bottom-color: var(--line); color: var(--muted); }
.credential-item.valid { color: var(--ui-success); }
.credential-item.expiring { color: var(--amber); }
.credential-item.critical, .credential-item.expired { color: var(--red); }
.credential-item.unknown, .credential-item.missing, .credential-pending { color: var(--muted); }
/* user-activity */
.activity-page { background: var(--surface); color: var(--text); }
.activity-page a { color: var(--ui-accent); }
.activity-header { border-bottom-color: var(--line); }
.activity-header>a:first-child { color: var(--text); }
.activity-title p { color: var(--muted); }
.activity-section-title span { color: var(--muted); }
.activity-filters label { color: var(--muted); }
.activity-page input,.activity-page select { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.activity-page button { border-color: var(--line-strong); background: var(--surface-soft); color: var(--ui-accent); }
.activity-page button:hover { background: var(--surface-soft); }
.activity-page :focus-visible { outline-color: var(--ui-accent); }
.activity-method { color: var(--muted); }
.activity-table-wrap { border-top-color: var(--line); border-bottom-color: var(--line); }
.activity-page th,.activity-page td { border-bottom-color: var(--line); }
.activity-page th { background: var(--surface-soft); color: var(--muted); }
.activity-page td small { color: var(--muted); }
.activity-page .activity-disabled { color: var(--red); }
.activity-page .activity-empty { color: var(--muted); }
.activity-page .activity-error { color: var(--red); background: var(--surface-soft); border-left-color: var(--red); }
.activity-page .activity-muted { color: var(--muted); }
.activity-page footer { border-top-color: var(--line); }
/* price-index-control */
.pi-control { border-top-color: var(--line); border-bottom-color: var(--line); }
.pi-control progress { accent-color: var(--ui-accent); }
.pi-control .muted { color: var(--muted); }
/* spp-tracking */
.spp-tracking { background: var(--surface); }
.spp-marketplace { color: var(--blue); }
.spp-status { background: var(--surface-soft); }
.spp-status strong { color: var(--text); }
.spp-segments button { color: var(--muted); }
.spp-segments button[aria-pressed=true],.spp-segments button[aria-selected=true] { background: var(--surface-soft); border-color: var(--ui-blue-line); color: var(--blue); }
.spp-table th { background: var(--surface-soft); }
.spp-table tbody tr:nth-child(even) { background: var(--surface); }
.spp-article { color: var(--blue); }
.spp-copy { color: var(--muted); }
.spp-copy:hover,.spp-copy:focus-visible { color: var(--blue); border-color: var(--ui-blue-line); background: var(--surface-soft); }
.spp-copy.is-copied { background: var(--surface-soft); }
.spp-name { color: var(--ui-neutral-ink); }
.spp-warning { color: var(--amber); }
.spp-chart polyline,.spp-spark polyline { stroke: var(--ui-accent); }
.spp-chart circle,.spp-spark circle { fill: var(--ui-accent); }
.spp-gridline { stroke: var(--text); }
.spp-cabinet-values strong { color: var(--text); }
.spp-axis-label { fill: var(--muted); }
.spp-cursor { stroke: var(--muted); }
.spp-hit:focus-visible { outline-color: var(--ui-accent); }
.spp-chart-tooltip { background: var(--surface); border-color: var(--line-strong); box-shadow: 0 3px 10px rgb(3 7 11 / 0.13); }
.spp-chart-empty { background: var(--surface); }
.spp-data-warning { border-bottom-color: var(--ui-amber-line); background: var(--amber-soft); color: var(--amber); }
.spp-table-metrics th:first-child,.spp-table-metrics td:first-child { background: var(--surface); box-shadow: 1px 0 rgb(3 7 11 / 0.58); }
.spp-table-metrics th:first-child { background: var(--surface-soft); }
.spp-filter-toggle { border-color: var(--line); background: var(--surface); color: var(--muted); }
.spp-filter-toggle:hover,.spp-filter-toggle[aria-expanded=true] { border-color: var(--blue); color: var(--blue); background: var(--surface-soft); }
.spp-filter-toggle.is-active { background: var(--blue-soft); color: var(--blue); border-color: var(--ui-blue-line); }
.spp-active-columns { color: var(--blue); background: var(--surface-soft); }
.spp-column-menu { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: 0 6px 24px rgb(3 7 11 / 0.27); }
.spp-column-menu-head button { background: var(--surface-soft); color: var(--muted); }
.spp-column-menu legend { color: var(--muted); }
.spp-column-menu .input:disabled { background: var(--surface-soft); color: var(--muted); }
.spp-column-menu .field>span { color: var(--muted); }
.spp-column-menu :focus-visible { outline-color: var(--blue); }
.spp-metric-link { color: var(--blue); }
.spp-tracking button:focus-visible,.spp-tracking input:focus-visible,.spp-tracking select:focus-visible { outline-color: var(--blue); }
.spp-campaign-expenses b { color: var(--ui-neutral-ink); }
.spp-chart-ranges strong { color: var(--text); }
.spp-metric-picker summary { color: var(--blue); }
.spp-cabinet>summary b { color: var(--text); }
.spp-thumb { border-color: var(--line); background: var(--surface-soft); }
.spp-thumb img { background: var(--surface); }
.spp-campaign-preview>span { color: var(--muted); }
.spp-campaign-scroll:focus-visible { outline-color: var(--blue); }
.spp-campaign-state,.spp-campaign-max { color: var(--amber); }
.spp-campaign-state.is-active,.spp-campaign-max { color: var(--ui-success); }
.spp-campaign-state.is-inactive { color: var(--muted); }
.spp-campaign-list>li.spp-campaign-highest { border-left-color: var(--ui-success); background: var(--surface-soft); }
.spp-campaign-list>li.spp-campaign-top-search { border-left-color: var(--blue); background: var(--surface-soft); }
.spp-campaign-type { color: var(--muted); background: var(--surface-soft); }
.spp-campaign-type.is-search { color: var(--blue); background: var(--surface-soft); }
.spp-campaign-type.is-search_recommendations { color: var(--ui-success); background: var(--ui-success-soft); }
.spp-campaign-type.is-other { color: var(--amber); background: var(--amber-soft); }
.spp-campaign-type.is-cpo { color: var(--purple); background: var(--surface-soft); }
.spp-modal-backdrop { background: rgb(3 8 13 / 0.50); }
.spp-cpc-dialog { background: var(--surface); border-color: var(--line-strong); box-shadow: 0 12px 40px rgb(3 7 11 / 0.25); color: var(--text); }
.spp-cpc-dialog .spp-cpc-title { color: var(--muted); }
.spp-cpc-dialog small { color: var(--muted); }
.spp-cpc-stepper { border-color: var(--line-strong); background: var(--surface); }
.spp-cpc-stepper:focus-within { border-color: var(--blue); outline-color: var(--blue); }
.spp-cpc-stepper.is-error { border-color: var(--red); }
.spp-cpc-stepper input { color: var(--ui-neutral-ink); }
.spp-cpc-step-buttons button { background: var(--surface-soft); color: var(--blue); }
.spp-cpc-step-buttons button:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue); }
.spp-info-bar { background: var(--muted-2); }
/* repricer-price-audit */
.repricer-audit { border-top-color: var(--line); border-bottom-color: var(--line); background: var(--surface); }
.repricer-audit-meta { color: var(--muted); }
.repricer-audit-table small { color: var(--muted); }
.repricer-audit-status { color: var(--muted); }
.repricer-audit-status.is-verified { color: var(--ui-success); }
.repricer-audit-status.is-mismatch { color: var(--red); }
.repricer-audit-status.is-stale { color: var(--amber); }
/* ozon-glue */
.ozon-glue-plan { border-top-color: var(--line); }
.ozon-glue progress { accent-color: var(--blue); }
/* ozon-advertising-composition */
.oa-group-composition h3 { color: var(--ui-neutral-ink); }
.oa-group-composition h3 small { color: var(--muted); }
.oa-composition-context { color: var(--muted); }
.oa-group-composition th, .oa-group-composition td { border-bottom-color: var(--line); }
.oa-group-composition thead th { background: var(--surface-soft); }
.oa-group-composition tfoot th, .oa-group-composition tfoot td { background: var(--surface-soft); }
@media (max-width: 1200px) {
.oa-point-summary:has(.oa-group-composition) { border-top-color: var(--line); }
}
/* ozon-advertising */
.oa-period label, .oa-chart-options label, .oa-filters label { color: var(--muted); }
.oa-period [aria-pressed="true"] { background: var(--ui-accent-soft); border-color: var(--ui-accent); color: var(--ui-accent); }
.oa-kpis { border-top-color: var(--line); border-bottom-color: var(--line); }
.oa-kpis > div { border-right-color: var(--line); }
.oa-kpis .oa-metric-label, .oa-detail-metrics .oa-metric-label { color: var(--muted); }
.oa-source-line { color: var(--muted); }
.oa-warnings { border-left-color: var(--amber); background: var(--amber-soft); }
.oa-loading { color: var(--muted); }
.oa-chart-tabs { border-bottom-color: var(--line); }
.oa-chart-tabs button { color: var(--muted); }
.oa-chart-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--ui-accent); }
.oa-segment { border-color: var(--line); }
.oa-segment button { background: var(--surface); color: var(--muted); }
.oa-segment button[aria-pressed="true"] { background: var(--ui-accent-soft); color: var(--ui-accent); }
.oa-chart-host { border-color: var(--line); }
.oa-tooltip { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: 0 2px 8px rgb(3 7 11 / 0.11); }
.oa-tooltip-name { color: var(--muted); }
.oa-point-summary { border-left-color: var(--line); }
.oa-point-summary > span { color: var(--muted); }
.oa-composition h3, .oa-campaign-details h3 { color: var(--ui-neutral-ink); }
.oa-composition h3 small { color: var(--muted); }
.oa-composition th, .oa-composition td { border-bottom-color: var(--line); }
.oa-composition thead th { background: var(--surface-soft); }
.oa-campaign-details li { border-bottom-color: var(--line); }
.oa-campaign-details small { color: var(--muted); }
.oa-campaign-details small.oa-campaign-running { color: var(--ui-accent); }
.oa-chart-legend { color: var(--muted); }
.oa-table small { color: var(--muted); }
.oa-table th { background: var(--surface-soft); }
.oa-zone.Z1 { color: var(--red); }
.oa-zone.Z2 { color: var(--amber); }
.oa-zone.Z3 { color: var(--ui-accent); }
.oa-zone.Z4 { color: var(--blue); }
.oa-zone.unknown { color: var(--muted); }
.oa-table-section h2 small { color: var(--muted); }
.oa-warning { color: var(--amber); }
.oa-performance-status { color: var(--red); }
.oa-performance-alert { border-top-color: var(--red); border-bottom-color: var(--ui-red-line); color: var(--red); }
.oa-performance-alert p { color: var(--red); }
.oa-performance-alert .btn { color: var(--red); border-color: var(--ui-red-line); }
.oa-comparison-controls [role="status"] { color: var(--muted); }
.oa-advanced > summary { color: var(--ui-neutral-ink); }
.oa-advanced fieldset { border-color: var(--line); }
.oa-advanced legend { color: var(--muted); }
.oa-comparison-caption { color: var(--muted); }
.oa-comparison-caption strong { color: var(--ui-neutral-ink); }
.oa-comparison-note { color: var(--muted); }
.oa-change-up { color: var(--ui-accent); }
.oa-change-down { color: var(--red); }
.oa-change-neutral, .oa-change-unknown { color: var(--muted); }
.oa-expense-table small.oa-change-absolute, .oa-table small.oa-change-absolute, .oa-change-absolute { color: var(--muted); }
.oa-recommendation-detail { border-top-color: var(--line); }
.oa-target-key { border-bottom-color: var(--red); }
.oa-zone-card { border-color: var(--line); background: var(--surface); color: var(--text); }
.oa-zone-card.Z1 { --zone-color: var(--red); }
.oa-zone-card.Z2 { --zone-color: var(--amber); }
.oa-zone-card.Z3 { --zone-color: var(--ui-accent); }
.oa-zone-card.Z4 { --zone-color: var(--blue); }
.oa-zone-card:focus-visible, .oa-zone-unknown:focus-visible { outline-color: var(--blue); }
.oa-zone-values > span > span { color: var(--muted); }
.oa-zone-unknown { border-bottom-color: var(--line); color: var(--muted); }
.oa-zone-unknown[aria-pressed="true"] { color: var(--blue); }
.oa-expense-section h2 small { color: var(--muted); }
.oa-expense-table th { background: var(--surface-soft); }
.oa-expense-table small { color: var(--muted); }
.oa-expense-footer { color: var(--muted); }
.oa-point-summary .oa-detail-metrics > div { border-bottom-color: var(--line); }
@media (max-width: 760px) {
.oa-point-summary { border-top-color: var(--line); }
}
/* home-dashboard */
.home-demo-banner { border-color: var(--ui-amber-line); background: var(--amber-soft); color: var(--amber); }
.home-switch button[aria-pressed="true"] { color: var(--text); background: var(--ui-raised); }
.home-chart-series-0 { stroke: var(--blue); }
.home-chart-series-1 { stroke: var(--blue); }
.home-chart-legend i { background: var(--ui-blue-fill); }
.home-chart-legend span+span i { background: var(--blue-soft); }
.home-warning { color: var(--amber); }
.home-positive { color: var(--ui-success); }
.home-chart-tooltip { box-shadow: 0 6px 24px rgb(3 7 11 / 0.23); }
.home-chart-tip-swatch-0 { background: var(--blue); }
.home-chart-tip-swatch-1 { background: var(--blue); }
.home-chart-tip-freshness.home-warning { color: var(--amber); }
/* settings-workspace */
.settings-workspace { color: var(--text); background: var(--surface); }
.settings-sidebar > button, .settings-sidebar > a { color: var(--muted); }
.settings-sidebar > [aria-current="page"] { background: var(--surface-soft); color: var(--red); }
.settings-sidebar > button:hover, .settings-sidebar > a:hover { background: var(--surface-soft); color: var(--text); }
.settings-sidebar > [aria-current="page"]:hover { background: var(--surface-soft); color: var(--red); }
.settings-workspace .btn.primary { color: var(--text); }
.settings-workspace .btn.primary:hover { background: var(--ui-red-fill); border-color: var(--red); }
.settings-workspace .btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ui-neutral-ink); }
.settings-workspace .btn.ghost:hover { background: var(--surface-soft); }
.settings-workspace .btn.blue { background: var(--surface-soft); border-color: var(--line); color: var(--ui-accent); }
.settings-workspace .input, .settings-workspace .token-input { border-color: var(--line-strong); }
.settings-actions summary { border-color: var(--line); }
.settings-actions > div { background: var(--surface); box-shadow: 0 5px 18px rgb(3 7 11 / 0.12); }
.settings-actions button { color: var(--ui-neutral-ink); }
.settings-actions button:hover { background: var(--surface-soft); }
.settings-status { color: var(--muted); }
.settings-status::before { background: var(--muted-2); }
.settings-status.ok { color: var(--ui-accent); }
.settings-status.ok::before { background: var(--ui-accent); }
.settings-status.off { color: var(--red); }
.settings-status.off::before { background: var(--red); }
.settings-back { color: var(--muted); }
.settings-market-tabs { background: var(--surface-soft); }
.settings-market-tabs button { color: var(--muted); }
.settings-market-tabs button.selected { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(3 7 11 / 0.12); }
.settings-disclosure > summary { color: var(--ui-accent); }
.settings-workspace :focus-visible { outline-color: var(--ui-accent); }
/* codex-write-admin */
&:has(link[href*="codex-write-admin.css"]) {
header { border-bottom-color: var(--line); }
a { color: var(--ui-accent); }
small { color: var(--muted); }
input:not([type=checkbox]), select, textarea { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
input[type=checkbox] { accent-color: var(--ui-accent); }
button { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
button:hover { background: var(--surface-soft); }
#save { background: var(--ui-accent-fill); border-color: var(--ui-accent); color: var(--text); }
#save:hover { background: var(--ui-accent-fill); }
:focus-visible { outline-color: var(--ui-accent); }
fieldset:disabled input, fieldset:disabled textarea { color: var(--muted); background: var(--surface-soft); }
.access-status { color: var(--ui-accent); }
#disable { color: var(--red); border-color: var(--red); }
#disable:hover { background: var(--surface-soft); }
.error { color: var(--red); }
.warning { color: var(--amber); border-left-color: var(--amber); }
.shop { border-top-color: var(--line); }
.action { border-top-color: var(--line); }
footer { border-top-color: var(--line); }
.audit { border-top-color: var(--line); }
.table-scroll { border-bottom-color: var(--line); }
th { background: var(--surface-soft); }
td, th { border-bottom-color: var(--line); }
}
}
}
/* Navigation and account controls */
:root[data-theme] body { background: var(--bg); color: var(--text); }
:root[data-theme] .topbar { background: var(--surface); border-bottom-color: var(--line); }
:root[data-theme] .top-actions { gap: 7px; }
:root[data-theme] .nav { gap: 3px; }
:root[data-theme] .nav-button {
  position: relative;
  min-height: 39px;
  margin-bottom: -1px;
  padding: 8px 12px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 530;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 5px 5px 0 0;
  background: transparent;
}
:root[data-theme] .nav-button:hover { color: var(--text); background: var(--surface-soft); }
:root[data-theme] .nav-button.active { color: var(--ui-accent); background: transparent; border-bottom-color: var(--ui-accent); }
:root[data-theme] .nav-count { min-width: 18px; height: 18px; background: var(--ui-accent-soft); color: var(--ui-accent); font-size: 10px; }
:root[data-theme] .top-actions :is(.icon-link,.account-pill,.logout-button,.shop-select) {
  min-height: 35px;
  color: var(--ui-neutral-ink);
  background: var(--surface);
  border-color: var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 540;
}
:root[data-theme] .top-actions .shop-select { background: var(--surface-soft); }
:root[data-theme] .top-actions .logout-button { color: var(--muted); }
:root[data-theme] .top-actions .logout-button:hover { color: var(--red); background: var(--red-soft); }
:root[data-theme] .top-actions :is(.icon-link,.account-pill):hover { background: var(--surface-soft); border-color: var(--line-strong); }
:root[data-theme] .avatar { color: var(--ui-accent); background: var(--ui-accent-soft); }
:root[data-theme] .credential-strip { color: var(--muted); border-color: var(--line); font-size: 12px; }
:root[data-theme] .credential-item.valid { color: var(--ui-success); }
:root[data-theme] .credential-item.expiring { color: var(--amber); }
:root[data-theme] .credential-item:is(.critical,.expired) { color: var(--red); }
:root[data-theme] .credential-item:is(.unknown,.missing), :root[data-theme] .credential-pending { color: var(--muted); }
:root[data-theme] .credential-strip .link-button { color: var(--muted); font-size: 12px; }
:root[data-theme] .credential-strip .link-button:hover { color: var(--ui-accent); }
.theme-login-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.theme-picker {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: none;
  width: 36px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ui-neutral-ink);
}
.theme-picker:hover { color: var(--ui-accent); border-color: var(--line-strong); background: var(--surface-soft); }
.theme-picker-icon { width: 17px; height: 17px; pointer-events: none; }
.theme-picker select { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.theme-picker select option { color: var(--text); background: var(--surface); }
.theme-picker:focus-within { outline: 2px solid var(--ui-focus); outline-offset: 3px; }
/* Type, forms, dialogs and tables */
:root[data-theme] :is(.title-block h1,.home-dashboard h1,.settings-title h1,.login-card h1,.activity-title h1) {
  color: var(--text); font-weight: 650; letter-spacing: -.035em; line-height: 1.14;
}
:root[data-theme] :is(.module-head h2,.title-block h2,.home-dashboard h2,.settings-heading h2,.activity-section-title h2) {
  color: var(--text); font-weight: 620; letter-spacing: -.024em;
}
:root[data-theme] :is(.metric-value,.home-metric-value,.home-chart-totals strong,.oa-kpis strong) {
  font-variant-numeric: tabular-nums; font-weight: 590; letter-spacing: -.045em;
}
:root[data-theme] :is(.btn,.icon-btn) { color: var(--ui-neutral-ink); background: var(--surface-soft); border-color: var(--line); border-radius: 7px; font-weight: 545; }
:root[data-theme] .btn.ghost { color: var(--ui-neutral-ink); background: var(--surface); border-color: var(--line-strong); }
:root[data-theme] :is(.btn,.icon-btn):not(:disabled):hover { background: var(--ui-hover); border-color: var(--line-strong); }
:root[data-theme] .btn.primary, :root[data-theme] .settings-workspace .btn.primary { background: var(--ui-accent); color: var(--ui-on-accent); border-color: transparent; }
:root[data-theme] .btn.primary:not(:disabled):hover { background: var(--ui-accent-hover); color: var(--ui-on-accent); }
:root[data-theme] .btn.blue { color: var(--blue); background: var(--blue-soft); border-color: color-mix(in srgb,var(--blue) 30%,var(--line)); }
:root[data-theme] .btn.warning { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb,var(--amber) 36%,var(--line)); }
:root[data-theme] .btn:is(.danger,.danger-lite) { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb,var(--red) 35%,var(--line)); }
:root[data-theme] :is(.input,.select,.token-input,.home-select-label select) { color: var(--text); background-color: var(--ui-field); border-color: var(--line-strong); border-radius: 7px; }
:root[data-theme] :is(input,textarea)::placeholder { color: var(--muted-2); opacity: 1; }
:root[data-theme] :is(.input,.select,.token-input):focus { border-color: var(--ui-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-accent) 18%,transparent); }
:root[data-theme] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
:root[data-theme] :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color: var(--ui-accent); }
:root[data-theme] :is(.metric,.surface,.home-panel,.home-metric) { border-color: var(--line); }
:root[data-theme] .login-page { background: var(--bg); }
:root[data-theme] .login-card { border-radius: 15px; border-color: var(--line); box-shadow: var(--shadow); }
:root[data-theme] .table { font-variant-numeric: tabular-nums; }
:root[data-theme] .table th { background-color: var(--surface-soft); color: var(--muted); }
:root[data-theme] :where(.table td,.table th) { border-color: var(--line); }
:where(:root[data-theme]) .table tr:hover:where(:not(.selected-row,.selected-profit-row,.profit-row-missing-cost)) td:where(:not(.profitability-heat-cell)) { background-color: var(--ui-hover); }
:root[data-theme] :where(.table-wrap,[class$='-scroll'],[class$='-table-wrap']) { scrollbar-color: var(--ui-scroll) transparent; }
:root[data-theme] :is(.home-switch,.profitability-view-tabs,.communications-scope,.settings-market-tabs) {
  background: var(--ui-inset); border-radius: 8px;
}
:root[data-theme] :is(.home-switch button[aria-pressed=true],.profitability-view-tab.active,.communications-scope button.active,.settings-market-tabs button.selected) {
  background: var(--ui-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgb(10 20 25 / .08);
}
:root[data-theme] :is(.profitability-marketplace-switch,.communications-marketplace-switch) { background: var(--surface-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme] :is(.profitability-marketplace-switch,.communications-marketplace-switch) :is(button,span) { color: var(--muted); }
:root[data-theme] :is(.profitability-marketplace-switch,.communications-marketplace-switch) button.active {
  color: var(--ui-on-accent); background: var(--ui-accent); box-shadow: none;
}
:root[data-theme] .tab.active::after { background: var(--ui-accent); height: 2px; }
:root[data-theme] .settings-workspace { --settings-accent: var(--ui-accent); --settings-border: var(--line); --settings-muted: var(--muted); color: var(--text); background: var(--surface); }
:root[data-theme] .settings-sidebar > [aria-current=page] { background: var(--ui-accent-soft); color: var(--ui-accent); }
:root[data-theme] .spp-tracking { --spp-line: var(--line); --spp-muted: var(--muted); --spp-green: var(--ui-success); --spp-red: var(--red); }
/* The two chart series keep the same identities in every theme, unit and tooltip. */
:root[data-theme] .home-dashboard { gap: clamp(15px,1.3vw,23px); }
:root[data-theme] .home-heading { align-items: center; }
:root[data-theme] .home-dashboard h1 { font-size: clamp(26px,2.4vw,38px); }
:root[data-theme] .home-dashboard h2 { font-size: clamp(17px,1.4vw,22px); }
:root[data-theme] .home-panel { padding: clamp(16px,1.7vw,29px); border-radius: 13px; }
:root[data-theme] .home-panel-heading { margin-bottom: 17px; }
:root[data-theme] .home-demo-banner { padding: 9px 14px; color: var(--amber); border-color: color-mix(in srgb,var(--amber) 26%,var(--line)); background: var(--amber-soft); border-radius: 7px; font-size: 12px; line-height: 1.45; }
:root[data-theme] .home-calculation-status { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
:root[data-theme] .home-chart-grid { stroke: var(--ui-grid); }
:root[data-theme] .home-chart-series-0 { stroke: var(--ui-chart-orders); }
:root[data-theme] .home-chart-series-1 { stroke: var(--ui-chart-buyouts); }
:root[data-theme] .home-chart-point { fill: var(--surface); }
:root[data-theme] :is(.home-chart-legend i,.home-chart-tip-swatch-0) { background: var(--ui-chart-orders); }
:root[data-theme] :is(.home-chart-legend span+span i,.home-chart-tip-swatch-1) { background: var(--ui-chart-buyouts); opacity: 1; }
:root[data-theme] .home-chart-legend { color: var(--ui-neutral-ink); font-size: 12px; }
:root[data-theme] .home-chart-totals strong { font-size: clamp(24px,2.1vw,35px); }
:root[data-theme] .home-chart-totals > div:first-child strong { color: var(--ui-order-text); }
:root[data-theme] .home-chart-totals > div:nth-child(2) strong { color: var(--ui-buyout-text); }
:root[data-theme] .home-metric { padding: clamp(13px,1.3vw,21px); border-radius: 10px; }
:root[data-theme] .home-chart-tooltip { background: var(--ui-raised); box-shadow: var(--shadow); }
:root[data-theme] :is(.home-warning,.home-chart-tip-freshness.home-warning) { color: var(--amber); }
:root[data-theme] .home-positive { color: var(--ui-success); }
:root[data-theme] .home-summary-comparison small { color: var(--muted); }
:root[data-theme] .home-chart-totals, :root[data-theme] .home-chart-totals > div+div { border-color: var(--line); }
@media(min-width: 800px) {
  :root[data-theme] .topbar { padding-inline: clamp(20px,2.15vw,42px); }
  :root[data-theme] .page { padding-inline: clamp(20px,2.15vw,42px); }
  :root[data-theme] .home-heading { padding-block: 4px; }
}
@media(max-width: 640px) {
  :root[data-theme] .nav { gap: 2px; }
  :root[data-theme] .nav-button { padding-inline: 8px; min-height: 36px; }
  :root[data-theme] .home-panel { padding: 15px; }
  :root[data-theme] .theme-picker { width: 36px; }
}
@media(forced-colors: active) {
  :root[data-theme] .nav-button.active { border-bottom-color: Highlight; }
  :root[data-theme] :is(.home-chart-series-0,.home-chart-series-1) { stroke: CanvasText; }
  :root[data-theme] .home-chart-line.home-chart-series-1 { stroke-dasharray: 6 3; }
  .theme-picker { border-color: ButtonText; }
}

/* Scrollers own their wide content; long product names stay inside their fields. */
:root[data-theme] .home-dashboard { grid-template-columns: minmax(0,1fr); }
:root[data-theme] :where(.home-panel,.home-chart,.home-chart-plot,.dashboard-grid > .surface,.repricer-form,.repricer-form .field,.repricer-form .select,.repricer-form .form-grid) { min-width: 0; }
:root[data-theme] .repricer-form .select { text-overflow: ellipsis; }
@media (min-width: 761px) {
  :root[data-theme] .repricer-form .form-grid:not(.two,.three) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1160px) {
  :root[data-theme] .dashboard-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  :root[data-theme] .dashboard-grid .filters { grid-template-columns: minmax(0,1fr); }
  :root[data-theme] .home-chart-totals > div { min-width: 0; }
  :root[data-theme] .home-chart-totals strong { overflow-wrap: anywhere; }
}
@media screen {
  :root[data-theme="dark"] .profitability-table td.profitability-heat-positive {
    box-shadow: inset 3px 0 var(--ui-success);
    background-color: rgb(57 143 104 / var(--profitability-heat-alpha));
  }
  :root[data-theme="dark"] .profitability-table td.profitability-heat-negative {
    box-shadow: inset 3px 0 var(--red);
    background-color: rgb(172 83 86 / var(--profitability-heat-alpha));
  }
  :root[data-theme="dark"] .profitability-table td.profitability-heat-neutral { box-shadow: inset 3px 0 var(--line-strong); }
  :root[data-theme="dark"] .profitability-table tbody tr.profit-row-missing-cost > td { background: var(--red-soft); }
  :root[data-theme="dark"] .settings-workspace .btn.primary:hover { background: var(--ui-accent-hover); border-color: transparent; }
}
/* Match the original wordmark's alpha without altering the portrait or the WB lettering. */
.brand-art {
  display: block;
  position: relative;
  width: fit-content;
  max-width: 100%;
}
html[data-theme="dark"] .brand-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #edf2f4;
  -webkit-mask: url("./brand/legenda-wb-logo.png?v=20260727-brand-alpha-v1") center / 100% 100% no-repeat;
  mask: url("./brand/legenda-wb-logo.png?v=20260727-brand-alpha-v1") center / 100% 100% no-repeat;
  clip-path: inset(41% 24% 32% 39%);
}
html[data-theme] details.home-chart-method {
  display: block;
  margin: 0 0 10px;
}
.home-chart-method summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.home-chart-method summary:hover { color: var(--text); }
.home-chart-method[open] > .home-small { margin: 5px 0 0; max-width: 78ch; }
.check-pill[hidden] { display: none; }
@media print {
  .brand-art::after { display: none; }
}

:root[data-theme] .login-page { grid-template-columns: minmax(0,1fr); }
:root[data-theme] .login-card { min-width: 0; }
:root[data-theme] .theme-login-heading .login-brand { flex: 1 1 0; min-width: 0; }
:root[data-theme] .login-brand .brand-art { width: min(300px,100%); }
:root[data-theme] .login-brand .brand-image { width: 100%; }

/* Put the two period totals where they can also serve as the chart key. */
:root[data-theme] .home-series-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 1px 0 12px;
  border: 0;
}
:root[data-theme] .home-series-totals > div {
  align-content: start;
  gap: 3px;
}
:root[data-theme] .home-series-totals > div + div {
  padding: 0;
  border: 0;
}
.home-series-totals span::before {
  display: inline-block;
  width: 16px;
  height: 3px;
  margin: 0 7px 3px 0;
  border-radius: 2px;
  background: var(--ui-chart-orders);
  content: "";
}
.home-series-totals > div + div span::before { background: var(--ui-chart-buyouts); }
:root[data-theme] .home-chart-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
:root[data-theme] .home-chart-footer .home-chart-method { margin: 0; }
:root[data-theme] .home-chart-footer [data-home-open-profitability] {
  padding: 4px 0;
  min-height: 30px;
  color: var(--ui-accent);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 580;
}
:root[data-theme] .home-chart-footer [data-home-open-profitability]:hover { text-decoration: underline; }
:root[data-theme] .home-demo-banner {
  justify-self: start;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
}
.home-demo-banner::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  vertical-align: 2px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--amber);
}
@media (max-width: 640px) {
  :root[data-theme] .home-series-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    align-items: end;
    gap: 10px;
  }
  :root[data-theme] .home-series-totals > div { display: flex; flex-direction: column; height: 100%; }
  .home-series-totals > div > strong { margin-top: auto; }
  :root[data-theme] .home-series-totals span { font-size: 12px; }
  :root[data-theme] .home-series-totals strong { font-size: clamp(18px,5.1vw,25px); }
  :root[data-theme] .home-chart-footer { gap: 3px 18px; }
  .home-chart-footer summary { min-height: 32px; display: list-item; align-content: center; }
}

@media (min-width: 1161px) {
  :root[data-theme] .products-stats { grid-template-columns: repeat(7,minmax(0,1fr)); }
}
@media (min-width: 761px) and (max-width: 1160px) {
  :root[data-theme] .products-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  :root[data-theme] .products-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media screen {
  :root[data-theme=dark] .spp-info-bar { background: var(--surface-soft); }
  :root[data-theme=dark] .report-items-wrap::-webkit-scrollbar-track { background: var(--ui-inset); }
}

@media (max-width: 760px) {
  :root[data-theme] .topbar { grid-template-columns: minmax(0,1fr); padding: 8px 10px 0; gap: 7px; }
  :root[data-theme] .topbar .brand-image { width: 138px; }
  :root[data-theme] .topbar .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-color: var(--ui-scroll) transparent;
    scrollbar-width: thin;
    padding: 2px 0 0;
  }
  :root[data-theme] .topbar .nav-button { flex: 0 0 auto; min-height: 42px; margin: 0; }
  :root[data-theme] .topbar .nav-button:focus-visible { outline-offset: -3px; }
}

@media (max-width: 640px) {
  :root[data-theme] .home-controls { gap: 7px; }
  :root[data-theme] .home-controls select { padding-inline: 7px; }
  :root[data-theme] .home-controls > .btn {
    min-height: 37px;
    margin-left: 0;
    padding-inline: 10px;
    font-size: 13px;
  }
  :root[data-theme] .home-panel:has(.home-series-totals) > .home-panel-heading {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: start;
    gap: 10px;
  }
}


/* Keep financial figures in reach on handheld screens. */
@media (min-width: 360px) and (max-width: 640px) {
  :root[data-theme] .home-controls {
    display: grid;
    grid-template-columns: minmax(0,1.08fr) minmax(0,.90fr) minmax(0,1.22fr);
    align-items: end;
  }
  :root[data-theme] .home-controls > .btn {
    width: 100%;
    margin: 0;
    min-height: 37px;
    padding: 5px 6px;
    font-size: 13px;
    line-height: 1.15;
  }
  :root[data-theme] .home-controls select { min-width: 0; width: 100%; padding-right: 17px; }
  
}
:root[data-theme] .home-chart-plot:has([data-home-chart-hit="14"]) .home-chart-point:not(.home-chart-point-partial,.home-chart-point-population) {
  r: 2px;
  stroke-width: 1.5px;
}
@media (pointer: coarse) and (max-width: 640px) {
  :root[data-theme] .home-controls > .btn { min-height: 44px; }
}

:root[data-theme] .products-table tr.selected-row td { background-color: var(--ui-accent-soft); }
:root[data-theme] .products-table tr.selected-row td:first-child { box-shadow: inset 2px 0 var(--ui-accent); }
@media print {
  html[data-theme="dark"] .brand-art::after { display: none; }
}
:root[data-theme] :is(.oa-kpis .oa-metric-label,.oa-detail-metrics .oa-metric-label,.oa-source-line) {
  color: var(--muted);
}

/* Popovers with report metadata or product search keep their existing controls. */
:root[data-theme] :is(.report-period-menu button.active,.report-comparison-options button[aria-selected="true"],.calculator-product-option.selected,.profitability-daily-product-option.selected) {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}
:root[data-theme] .report-period-menu button.active { box-shadow: none; }
:root[data-theme] :is(.report-period-menu,.report-comparison-options,.account-dropdown) {
  border-radius: 9px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
