.sales-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--next-line);
}

.sales-mode-tabs button {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--next-muted);
  font-size: 14px;
  font-weight: 600;
}

.sales-mode-tabs [aria-selected="true"] {
  border-bottom-color: #15803d;
  color: #166534;
}

.ofd-reconciliation,
.ofd-day-modal {
  --ofd-line: #dce2e5;
  --ofd-muted: #59666d;
  --ofd-ink: #1f292e;
  color: var(--ofd-ink);
  font-size: 14px;
  letter-spacing: 0;
}

.ofd-reconciliation { min-width: 0; background: #fff; padding: 0 20px 20px; }
.ofd-reconciliation [hidden], .ofd-day-modal [hidden], #salesSection > [hidden] { display: none !important; }
.ofd-reconciliation *, .ofd-day-modal * { min-width: 0; box-sizing: border-box; }
.ofd-reconciliation h2 { margin: 0; font-size: 18px; font-weight: 650; }
.ofd-reconciliation h3, .ofd-day-modal h3 { margin: 0; font-size: 14px; font-weight: 650; }
.ofd-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.ofd-heading h2 { flex: 1 1 240px; }
.ofd-heading .ofd-command, .ofd-day-toolbar .ofd-command { max-width: 100%; white-space: normal; }
.ofd-corrections { margin: 12px 0; padding: 12px 0; border-block: 1px solid var(--ofd-line); }
.ofd-corrections p { margin: 8px 0; }
.ofd-filters { display: grid; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ofd-line); }
.ofd-period-caption { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; }
.ofd-source-caption { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 2px; margin-top: 10px; font-size: 12px; color: var(--ofd-muted); }
.ofd-mapping-warning { margin: 4px 0; color: #872832; font-size: 12px; }
.ofd-source-details { padding: 5px 0 9px; border-bottom: 1px solid var(--ofd-line); }
.ofd-source-details > summary { width: fit-content; padding: 4px 0; cursor: pointer; font-size: 12px; color: var(--ofd-muted); }
.ofd-source-details[open] > summary { margin-bottom: 8px; }
.ofd-period-controls { display: grid; grid-template-columns: minmax(120px, .8fr) 100px minmax(230px, 1.5fr); gap: 12px; }
.ofd-filter-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ofd-field { display: grid; align-content: start; gap: 5px; }
.ofd-field label { color: var(--ofd-muted); font-size: 12px; }
.ofd-field input, .ofd-field select {
  width: 100%; height: 40px; padding: 7px 10px; border: 1px solid #b9c4ca;
  border-radius: 4px; background: #fff; color: var(--ofd-ink); font-size: 14px;
}
.ofd-field select { padding-right: 22px; }
.ofd-month-picker { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; }
.ofd-period-navigation-label { display: grid; place-items: center; min-height: 40px; padding: 4px; text-align: center; font-size: 13px; overflow-wrap: anywhere; }
.ofd-date-controls { display: grid; grid-template-columns: 150px 150px max-content; align-items: end; gap: 12px; }
.ofd-icon-button {
  display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0;
  border: 1px solid #b9c4ca; border-radius: 4px; background: #fff; color: #34454f; font-size: 22px; line-height: 1;
}
.ofd-command { min-height: 40px; padding: 7px 16px; border: 1px solid #166534; border-radius: 4px; background: #166534; color: #fff; font-size: 14px; }
.ofd-icon-button:hover:not(:disabled), .ofd-segment button:hover:not(:disabled) { background: #f0f4f5; }
.ofd-reconciliation button:disabled, .ofd-day-modal button:disabled { opacity: .45; cursor: default; }
.ofd-reconciliation :focus-visible, .ofd-day-modal :focus-visible, .sales-mode-tabs :focus-visible { outline: 2px solid #087e8b; outline-offset: 2px; }
.ofd-form-error { margin: 0; color: #a12a35; }
.ofd-dataset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 10px 0; }
.ofd-dataset dt { color: var(--ofd-muted); font-size: 12px; font-weight: 400; }
.ofd-dataset dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.ofd-dataset small, .ofd-data-table small, .ofd-receipt-details small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--ofd-muted); }
.ofd-dataset > div:nth-child(4) { grid-column: 1 / -1; }
.ofd-dataset > div:nth-child(4) dd { font-family: monospace; font-size: 12px; }
.ofd-problem-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 12px; }
.ofd-problem-controls .ofd-field { flex: 0 1 280px; }
.ofd-check { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; cursor: pointer; }
.ofd-check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: #166534; }
.ofd-day-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--ofd-line); }
.ofd-day-navigation { display: flex; align-items: center; gap: 6px; }
.ofd-day-navigation > span { min-width: 65px; text-align: center; font-size: 12px; color: var(--ofd-muted); font-variant-numeric: tabular-nums; }
.ofd-day-toolbar .ofd-segment button { min-height: 42px; }
.ofd-technical-details { margin-top: 16px; border-top: 1px solid var(--ofd-line); }
.ofd-technical-details > summary, .ofd-format-help > summary { padding: 14px 0; min-height: 44px; }
.ofd-technical-details h3 { margin-top: 14px; }
.ofd-format-help p { max-width: 70ch; font-size: 13px; color: var(--ofd-muted); }
.ofd-day-metrics [data-different="true"] td[data-source="delta"] { color: #a12a35; }
.ofd-matched { margin: 12px 0; color: #166534; }
.ofd-product-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.ofd-product-table th, .ofd-product-table td { padding: 12px 8px; border-bottom: 1px solid var(--ofd-line); text-align: right; overflow-wrap: anywhere; font-size: 13px; }
.ofd-product-table th:first-child { width: 44%; text-align: left; }
.ofd-product-table thead th { font-size: 12px; color: var(--ofd-muted); font-weight: 400; }
.ofd-issue-overview { display: flex; flex-wrap: wrap; gap: 5px 20px; padding-top: 12px; color: var(--ofd-muted); font-size: 12px; }
.ofd-issue-overview strong { flex-basis: 100%; color: var(--ofd-ink); font-size: 14px; }
.ofd-totals-details { margin-top: 16px; border-top: 1px solid var(--ofd-line); }
.ofd-totals-details > summary { padding: 12px 0; cursor: pointer; font-size: 13px; font-weight: 600; }
.ofd-status { margin: 12px 0; padding: 10px 12px; border-left: 3px solid #72848e; background: #f2f5f6; overflow-wrap: anywhere; }
.ofd-status[data-kind="error"] { border-color: #b33641; background: #fff2f3; }
.ofd-summaries { display: flex; flex-direction: column; gap: 20px; }
.ofd-summaries [data-ofd="knownSection"] { order: 2; border-top: 1px solid var(--ofd-line); padding-top: 16px; }
.ofd-coverage-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ofd-line); align-items: center; }
.ofd-coverage-group small { display: block; margin-top: 4px; color: var(--ofd-muted); font-size: 12px; font-weight: 400; }
.ofd-coverage-group strong, .ofd-coverage-group span { overflow-wrap: anywhere; }
.ofd-balance-formula { margin: 12px 0; }
.ofd-balance-formula > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 8px 0; border-bottom: 1px solid var(--ofd-line); }
.ofd-balance-formula dt { font-weight: 400; }
.ofd-balance-formula dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ofd-unpaired-note { border-left: 3px solid #b45309; padding-left: 8px; }
.ofd-product-open, .ofd-product-back { display: inline-block; padding: 8px 0; min-height: 40px; border: 0; background: transparent; color: #075b69; text-align: left; font: inherit; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ofd-product-back { margin-bottom: 10px; }
.ofd-product-comparison small { display: block; margin-top: 6px; color: var(--ofd-muted); font-size: 12px; font-weight: 400; }
.ofd-product-comparison th:first-child { width: 35%; }
.ofd-product-comparison td strong { color: #9c2934; }
.ofd-mobile-unit { display: none; }
.ofd-data-table tr[data-selected-product="true"] { background: #e9f5ef; outline: 1px solid #368360; outline-offset: -1px; }
@media (max-width: 767px) {
  .ofd-coverage-group { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ofd-coverage-group button { justify-self: start; }
  .ofd-day-modal .ofd-receipt-items, .ofd-receipt-items tbody { display: block; min-width: 0; }
  .ofd-receipt-items thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ofd-receipt-items tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 8px; border-bottom: 1px solid var(--ofd-line); }
  .ofd-receipt-items td:first-child { grid-column: 1 / -1; font-weight: 650; }
  .ofd-receipt-items tbody td { padding: 0; border: 0; }
  .ofd-receipt-items .ofd-number { text-align: left; white-space: normal; }
  .ofd-receipt-items td[data-label]::before { content: attr(data-label); display: block; color: var(--ofd-muted); font-size: 11px; margin-bottom: 4px; }
  .ofd-receipt-items .ofd-desktop-unit { display: none; }
  .ofd-receipt-items .ofd-mobile-unit { display: inline; }
}
.ofd-summary { min-width: 0; padding-top: 12px; container-type: inline-size; }
.ofd-summary h3 { margin-bottom: 6px; }
.ofd-summary-note { margin: 6px 0 0; color: var(--ofd-muted); font-size: 12px; }
.ofd-metrics { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ofd-metrics th, .ofd-metrics td { padding: 7px 6px; border-bottom: 1px solid #edf0f1; text-align: right; }
.ofd-metrics th { color: var(--ofd-muted); font-size: 12px; font-weight: 500; }
.ofd-metrics th:first-child { text-align: left; padding-left: 0; }
.ofd-metrics td { font-weight: 600; }
.ofd-metric-value { display: block; white-space: nowrap; overflow-wrap: normal; }
.ofd-metric-source { display: none; }
.ofd-metrics small { display: block; margin-top: 3px; color: var(--ofd-muted); font-size: 11px; font-weight: 400; }
.ofd-grid-section { padding-top: 16px; }
.ofd-grid-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ofd-grid-heading p { margin: 4px 0 0; color: var(--ofd-muted); font-size: 12px; }
.ofd-grid-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.ofd-segment { display: inline-flex; border: 1px solid #b9c4ca; border-radius: 4px; overflow: hidden; }
.ofd-segment button { min-height: 38px; padding: 6px 12px; border: 0; background: #fff; color: #45545d; font-size: 13px; }
.ofd-segment [aria-pressed="true"] { background: #eaf3ed; color: #166534; box-shadow: inset 0 -2px #15803d; }
.ofd-column-paging { display: flex; align-items: center; gap: 8px; }
.ofd-column-paging span { font-size: 12px; }
.ofd-matrix-scroll { max-width: 100%; max-height: 620px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--ofd-line); scrollbar-gutter: stable; }
.ofd-matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.ofd-matrix th, .ofd-matrix td { padding: 0; border-right: 1px solid #e7ecef; border-bottom: 1px solid #e7ecef; background: #fff; vertical-align: top; }
.ofd-matrix thead th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 10px 8px; background: #f4f6f7; text-align: center; font-size: 12px; font-weight: 600; }
.ofd-matrix th:first-child { position: sticky; left: 0; z-index: 1; width: 180px; min-width: 180px; max-width: 180px; padding: 12px; text-align: left; overflow-wrap: anywhere; }
.ofd-matrix thead th:first-child { z-index: 3; }
.ofd-matrix tbody th { font-size: 13px; font-weight: 600; }
.ofd-store-name, .ofd-provisional { display: block; }
.ofd-provisional { margin-top: 5px; color: var(--ofd-muted); font-size: 10px; font-weight: 400; line-height: 1.3; }
.ofd-cell { display: grid; align-content: center; gap: 3px; width: 126px; min-height: 68px; padding: 8px 6px; border: 0; background: transparent; color: var(--ofd-ink); text-align: right; }
.ofd-cell strong, .ofd-cell small { overflow-wrap: anywhere; white-space: normal; }
.ofd-cell:hover { background: #edf4f5; }
.ofd-cell strong { font-size: 13px; font-weight: 600; color: var(--ofd-ink); }
.ofd-cell small { font-size: 11px; color: var(--ofd-muted); }
.ofd-cell[data-status="difference"] { box-shadow: inset 3px 0 #b33641; background: #fff7f7; }
.ofd-cell [data-different="true"] { color: #a12a35; }
.ofd-cell[data-status="unknown"] { box-shadow: inset 3px 0 #82929c; color: #59666d; }
.ofd-cell[data-status="matched"] { color: #166534; }
.ofd-issues { max-width: 100%; }
.ofd-issues-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ofd-issues-table th, .ofd-issues-table td { padding: 10px 8px; border-bottom: 1px solid var(--ofd-line); text-align: right; vertical-align: top; overflow-wrap: anywhere; }
.ofd-issues-table thead th { background: #f4f6f7; color: var(--ofd-muted); font-size: 12px; font-weight: 500; }
.ofd-issues-table th:first-child { width: 22%; text-align: left; }
.ofd-issues-table th:last-child, .ofd-issues-table td:last-child { width: 18%; text-align: left; }
.ofd-issues-table th:nth-child(5) { width: 9%; }
.ofd-issues-table td { font-size: 13px; }
.ofd-issues-table small { display: block; margin-top: 4px; color: var(--ofd-muted); font-size: 11px; font-weight: 400; }
.ofd-issues-table [data-different="true"] { color: #a12a35; }
.ofd-attention { display: block; font-size: 12px; margin-bottom: 5px; color: #59666d; }
.ofd-attention[data-level="error"] { color: #a12a35; }
.ofd-attention[data-level="warning"] { color: #8b5612; }
.ofd-attention[data-level="waiting"] { color: #176d80; }
.ofd-attention[data-level="ok"] { color: #166534; }
.ofd-attention > span { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border: 1px solid currentColor; border-radius: 50%; }
.ofd-cell[data-attention="warning"] { box-shadow: inset 3px 0 #a66412; background: #fffbf1; }
.ofd-cell[data-attention="waiting"] { box-shadow: inset 3px 0 #176d80; }
.ofd-issue-open { display: grid; gap: 4px; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; color: #166534; font-size: 13px; }
.ofd-issue-open:hover { text-decoration: underline; }
.ofd-issue-open span { color: var(--ofd-muted); font-size: 12px; }
.ofd-issue-open strong { font-weight: 600; }
.ofd-revision { margin: 10px 0; padding: 10px 12px; border-left: 3px solid #087e8b; background: #f0f7f8; font-size: 13px; overflow-wrap: anywhere; }
.ofd-revision p { margin: 5px 0 0; }
.ofd-revision[data-revision-status="not_returned"], .ofd-revision[data-revision-status="not_reloaded"] { border-color: #b33641; background: #fff2f3; }
.ofd-revision-table { table-layout: fixed; }
.ofd-empty { padding: 24px 12px; color: var(--ofd-muted); font-size: 14px; }
.ofd-day-modal .modal-content { border-radius: 6px; }
.ofd-day-modal .modal-header { align-items: flex-start; gap: 12px; }
.ofd-day-modal .modal-header p { margin: 5px 0 0; color: var(--ofd-muted); font-size: 12px; overflow-wrap: anywhere; }
.ofd-day-modal .modal-body { padding: 0 20px 20px; }
.ofd-day-section { padding: 12px 0; border-bottom: 1px solid var(--ofd-line); container-type: inline-size; }
.ofd-day-section h3 { margin-bottom: 12px; }
.ofd-day-section:last-child { border-bottom: 0; }
.ofd-day-section h4 { margin: 14px 0 8px; font-size: 13px; font-weight: 600; }
.ofd-day-conclusion { margin: 6px 0 12px; font-size: 14px; }
.ofd-day-conclusion p { margin: 6px 0 0; }
.ofd-adjacent-days { margin-bottom: 12px; }
.ofd-adjacent-days [data-current="true"] { background: #f4f6f7; }
.ofd-day-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.ofd-day-facts dt { font-size: 12px; font-weight: 400; color: var(--ofd-muted); overflow-wrap: anywhere; }
.ofd-day-facts dd { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.ofd-day-facts small { display: block; font-size: 11px; color: var(--ofd-muted); }
.ofd-reasons { margin: 10px 0; padding-left: 20px; font-size: 12px; overflow-wrap: anywhere; }
.ofd-alert { margin: 12px 0; padding: 10px 12px; border-left: 3px solid #b33641; background: #fff2f3; color: #872832; overflow-wrap: anywhere; }
.ofd-alert p { margin: 6px 0 0; }
.ofd-evidence > summary { padding: 8px 0; font-size: 12px; cursor: pointer; }
.ofd-table-scroll { max-width: 100%; overflow: auto; }
.ofd-data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ofd-data-table th, .ofd-data-table td { padding: 9px 8px; border-bottom: 1px solid var(--ofd-line); text-align: left; vertical-align: top; }
.ofd-data-table th { font-size: 12px; font-weight: 500; color: var(--ofd-muted); }
.ofd-data-table td { font-size: 13px; overflow-wrap: anywhere; }
.ofd-data-table .ofd-number { text-align: right; white-space: nowrap; }
.ofd-receipt-paging { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; font-size: 12px; }
.ofd-receipt-paging > div { display: flex; gap: 8px; }
.ofd-receipt-filters { display: grid; grid-template-columns: minmax(100px, 1fr) repeat(2, minmax(80px, .7fr)) minmax(130px, 1fr) minmax(125px, 1fr) auto; align-items: end; gap: 8px; margin: 12px 0; }
.ofd-receipt-filter-actions { display: flex; align-items: center; gap: 6px; }
.ofd-receipt-filters .ofd-form-error { grid-column: 1 / -1; }
.ofd-receipt-details { padding: 10px 0; }
.ofd-receipt-details > summary { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(80px, auto); align-items: center; gap: 8px; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.ofd-receipt-details > summary::before { content: '+'; font-size: 20px; }
.ofd-receipt-details[open] > summary::before { content: '\2212'; }
.ofd-receipt-details > summary strong { text-align: right; }
.ofd-receipt-details + .ofd-receipt-details { border-top: 1px solid var(--ofd-line); }
.ofd-raw-data { max-height: 240px; overflow: auto; padding: 12px; background: #f4f6f7; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (min-width: 1100px) {
  .ofd-filters { grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); column-gap: 24px; }
  .ofd-date-controls, .ofd-form-error { grid-column: 1 / -1; }
  .ofd-summaries[data-paired="false"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@container (max-width: 600px) {
  .ofd-adjacent-days .ofd-data-table, .ofd-adjacent-days tbody { display: block; min-width: 0; }
  .ofd-adjacent-days thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ofd-adjacent-days tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 6px; border-bottom: 1px solid var(--ofd-line); }
  .ofd-adjacent-days tbody th { grid-column: 1 / -1; padding: 0; border: 0; }
  .ofd-adjacent-days tbody th small { display: inline; margin-left: 8px; }
  .ofd-adjacent-days tbody td { padding: 0; border: 0; font-size: 12px; }
  .ofd-adjacent-days td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--ofd-muted); font-size: 11px; }
  .ofd-metrics, .ofd-metrics tbody { display: block; }
  .ofd-metrics thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ofd-metrics tbody tr { display: flex; flex-wrap: wrap; gap: 3px 10px; padding: 6px 0; border-bottom: 1px solid #edf0f1; }
  .ofd-metrics tbody th { flex: 0 0 100%; width: 100%; padding: 0; border: 0; font-size: 12px; }
  .ofd-metrics tbody td { flex: 1 1 0; min-width: max-content; padding: 0; border: 0; text-align: left; font-size: 12px; }
  .ofd-metrics .ofd-metric-source { display: block; color: var(--ofd-muted); font-size: 10px; font-weight: 400; }
  .ofd-metrics small { font-size: 10px; margin-top: 1px; }
}

@media (min-width: 601px) and (max-width: 1199px) {
  .ofd-receipt-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .ofd-issues-table, .ofd-issues-table tbody { display: block; }
  .ofd-issues-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ofd-issues-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ofd-line); }
  .ofd-issues-table tbody th:first-child { grid-column: 1 / -1; width: auto; padding: 0; border: 0; }
  .ofd-issues-table tbody td { width: auto; padding: 0; border: 0; text-align: left; font-size: 12px; }
  .ofd-issues-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--ofd-muted); font-size: 10px; }
  .ofd-issues-table td:nth-child(5) { grid-column: 1; }
  .ofd-issues-table td:last-child { grid-column: 2 / -1; width: auto; }
  .ofd-issue-open { gap: 3px; }
}

@media (max-width: 600px) {
  .sales-mode-tabs { margin-bottom: 12px; }
  .sales-mode-tabs button { flex: 1 1 0; padding: 8px 6px; font-size: 13px; }
  .ofd-reconciliation { padding: 0 10px 14px; }
  .ofd-reconciliation h2 { font-size: 16px; }
  .ofd-period-controls { grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; }
  .ofd-month-field { grid-column: 1 / -1; }
  .ofd-filter-controls { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ofd-date-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ofd-date-controls .ofd-command { grid-column: 1 / -1; }
  .ofd-dataset { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ofd-dataset > div { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 8px; }
  .ofd-dataset dd { margin: 0; font-size: 12px; }
  .ofd-grid-heading { align-items: flex-start; }
  .ofd-grid-actions { width: 100%; justify-content: space-between; }
  .ofd-matrix th:first-child { width: 110px; min-width: 110px; max-width: 110px; padding: 10px 6px; font-size: 12px; }
  .ofd-cell { width: 122px; }
  .ofd-day-modal .modal-title { font-size: 17px; overflow-wrap: anywhere; }
  .ofd-day-modal .modal-body { padding: 0 12px 12px; }
  .ofd-day-modal .modal-header { padding: 14px 12px; }
  .ofd-day-toolbar { padding: 8px 12px; gap: 6px; }
  .ofd-day-toolbar .ofd-segment { display: flex; width: 100%; }
  .ofd-day-toolbar .ofd-segment button { flex: 1; padding: 6px; font-size: 13px; }
  .ofd-day-navigation { margin-left: auto; }
  .ofd-product-table, .ofd-product-table tbody { display: block; }
  .ofd-product-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ofd-product-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--ofd-line); }
  .ofd-product-table tbody th:first-child { grid-column: 1 / -1; width: auto; }
  .ofd-product-table tbody th, .ofd-product-table tbody td { padding: 0; border: 0; text-align: left; }
  .ofd-product-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--ofd-muted); margin-bottom: 4px; }
  .ofd-day-modal .modal-content { border-radius: 0; }
  .ofd-day-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ofd-receipt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ofd-receipt-filters > .ofd-field:first-child, .ofd-receipt-filter-actions { grid-column: 1 / -1; }
  .ofd-receipt-filter-actions .ofd-command { flex: 1; }
  .ofd-receipt-details > summary { grid-template-columns: 14px minmax(0, 1fr) minmax(70px, auto); }
  .ofd-data-table { min-width: 440px; }
}

@media (max-width: 360px) {
  .ofd-metrics tbody td[data-source="delta"] { flex: 0 0 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
}
.ofd-product-mapping { margin: 16px 0; border-block: 1px solid #dbe2e8; padding: 14px 0; }
.ofd-product-mapping > summary { cursor: pointer; font-weight: 700; overflow-wrap: anywhere; }
.ofd-product-mapping summary [data-mapping-count] { display: inline-block; margin-inline-start: 12px; color: #166534; font-size: 14px; }
.ofd-product-mapping summary [data-problem="true"] { color: #9a3412; }
.ofd-mapping-content { padding-top: 16px; }
.ofd-mapping-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; max-width: 900px; }
.ofd-mapping-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(180px, .8fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid #dbe2e8; }
.ofd-mapping-row > div { min-width: 0; overflow-wrap: anywhere; }
.ofd-mapping-row small { display: block; color: #596573; margin-top: 5px; font-size: 14px; }
.ofd-mapping-badge { display: block; color: #9a3412; font-size: 14px; margin-bottom: 8px; }
.ofd-mapping-row[data-mapping-status="confirmed"] .ofd-mapping-badge { color: #166534; }
.ofd-mapping-editor { grid-column: 1 / -1; padding: 16px; border-left: 3px solid #16803c; background: #f2f8f5; }
.ofd-mapping-editor .ofd-field { max-width: 760px; }
.ofd-mapping-editor input { margin-bottom: 8px; }
.ofd-product-mapping input, .ofd-product-mapping select { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; min-height: 44px; }
.ofd-product-mapping button { min-height: 44px; white-space: normal; }
.ofd-mapping-editor p { margin-block: 12px; }
.ofd-mapping-unit-confirm { display: flex; gap: 10px; align-items: center; max-width: 760px; margin-block: 12px; padding: 12px; background: #fff9e9; }
.ofd-product-mapping .ofd-mapping-unit-confirm input { width: 22px; min-height: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
@media (max-width: 767px) {
  .ofd-mapping-toolbar { grid-template-columns: minmax(0, 1fr); }
  .ofd-mapping-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ofd-mapping-editor { padding: 12px; }
  .ofd-product-mapping summary [data-mapping-count] { display: block; margin: 6px 0 0; }
}
