/* Receiving document intake */
.receiving-workspace-header,
.receiving-workspace-footer,
.receiving-po-picker,
.receiving-scan-entry,
.receiving-mode-switch {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.price-list-upload-workspace .receiving-document-source-bar {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.price-list-upload-workspace .receiving-upload-grid {
  padding: 12px;
  box-shadow: none;
}

.receiving-selection-prompt {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border, #ccd9e6);
  background: var(--surface-subtle, #eef4fa);
  color: var(--text-muted, #49637e);
}

.receiving-workspace-header {
  align-items: center;
}

.receiving-po-picker {
  align-items: end;
  margin-bottom: 12px;
}

.receiving-po-picker label {
  flex: 1 1 340px;
  margin: 0;
}

.receiving-manual-table td:first-child {
  min-width: 260px;
}

.receiving-manual-table td:first-child .muted {
  display: block;
  margin-top: 3px;
}

.receiving-manual-table input {
  width: 108px;
}

.receiving-workspace-footer {
  align-items: center;
  margin-top: 14px;
}

.receiving-scan-workspace {
  max-width: 980px;
}

.receiving-scan-entry {
  display: grid;
  grid-template-columns: 150px minmax(260px, 1fr) 180px;
  align-items: end;
}

.receiving-scan-entry label,
.receiving-po-picker label {
  display: grid;
  gap: 5px;
}

.receiving-scan-field input {
  border-width: 2px;
}

.receiving-scan-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface-subtle, #eef4fa);
  color: var(--text-muted, #49637e);
}

@media (max-width: 760px) {
  .receiving-scan-entry {
    grid-template-columns: 1fr;
  }
}

.receiving-navigator {
  margin-bottom: 14px;
}

.receiving-record-workspace {
  display: grid;
  gap: var(--space-3);
}

.receiving-workspace-page-header {
  margin: 0;
}

.receiving-workspace-page-header h2 {
  margin: 0;
}

.receiving-workspace-page-header p {
  margin: var(--space-1) 0 0;
}

.receiving-document-launcher,
.receiving-navigator,
.receiving-workspace,
.receiving-sessions-panel,
.receiving-exceptions-panel {
  margin: 0;
}

.receiving-navigator-header {
  align-items: center;
}

.receiving-navigator-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.receiving-navigator-tools input {
  width: min(320px, 36vw);
  min-height: 34px;
}

.receiving-navigator-list {
  display: grid;
  gap: 7px;
  max-height: 308px;
  overflow: auto;
}

.receiving-po-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.receiving-po-card.selected {
  border-color: var(--accent);
  background: #f3f8fd;
  box-shadow: inset 3px 0 0 var(--accent);
}

.receiving-po-card-main,
.receiving-po-card-metrics {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receiving-po-card-main strong {
  color: var(--accent-dark);
}

.receiving-po-card-main span,
.receiving-po-card-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receiving-po-card-main small {
  color: var(--muted);
}

.receiving-po-card-metrics {
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.receiving-po-card-metrics b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.receiving-po-card-actions {
  flex-wrap: nowrap;
}

.receiving-navigator-empty {
  padding: 20px 12px;
  color: var(--muted);
  text-align: center;
}

.receiving-document-modal {
  width: min(1500px, 97vw);
  height: min(920px, 94vh);
  max-height: 94vh;
}

.receiving-document-modal-body {
  display: flex;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.receiving-document-upload-form,
.receiving-review-shell,
.receiving-posted-summary {
  width: 100%;
}

.receiving-document-upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.price-list-purpose-note {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #96c9bc;
  border-left: 5px solid var(--accent);
  border-radius: 7px;
  background: #eaf8f3;
}

.price-list-purpose-note > div {
  display: grid;
  gap: 2px;
}

.price-list-purpose-note strong {
  font-size: 18px;
}

.price-list-purpose-note p {
  margin: 0;
  color: #29434d;
  line-height: 1.45;
}

.receiving-document-source-bar,
.receiving-review-summary,
.receiving-document-meta,
.receiving-review-toolbar,
.receiving-review-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.receiving-document-source-bar {
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #f2f7f8;
}

.receiving-document-source-bar > div {
  display: grid;
  gap: 2px;
}

.receiving-document-source-bar .status,
.receiving-review-summary .status {
  width: auto;
  min-width: 88px;
  padding: 6px 9px;
  text-align: center;
}

.receiving-draft-list {
  display: grid;
  gap: 6px;
  max-height: 178px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.receiving-draft-list-heading,
.receiving-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 84px;
  align-items: center;
  gap: 12px;
}

.receiving-draft-list-heading {
  padding: 0 8px 5px;
  color: var(--muted);
  font-size: 12px;
}

.receiving-draft-list-heading > div,
.receiving-draft-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.receiving-draft-row {
  width: 100%;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafb;
  color: var(--ink);
  text-align: left;
}

.receiving-draft-row:hover,
.receiving-draft-row:focus-visible {
  border-color: var(--accent);
  background: #f1f6fc;
}

.receiving-draft-row strong,
.receiving-draft-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receiving-draft-row small {
  color: var(--muted);
}

.receiving-draft-row .receiving-draft-resume {
  display: block;
  color: var(--accent-dark);
  font-weight: 850;
  text-align: right;
}

.price-list-document-list {
  max-height: 222px;
}

.receiving-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.receiving-upload-grid label,
.receiving-document-meta label,
.receiving-cell-stack label,
.receiving-cell-grid label,
.receiving-inline-check {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.receiving-upload-grid .span-all,
.receiving-cell-grid .span-all {
  grid-column: 1 / -1;
}

.receiving-upload-grid input,
.receiving-upload-grid select,
.receiving-document-meta input,
.receiving-document-meta select,
.receiving-review-table input,
.receiving-review-table select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 6px 8px;
  font: inherit;
  font-weight: 700;
}

.receiving-upload-grid input[type="file"] {
  padding: 7px;
}

.receiving-upload-actions {
  margin-top: auto;
}

.receiving-document-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  min-height: 360px;
  padding: 32px;
  text-align: center;
}

.receiving-document-loading strong {
  font-size: 22px;
}

.receiving-document-loading span {
  max-width: 620px;
  color: var(--muted);
}

.receiving-document-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #d7e3e7;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: receiving-spin 850ms linear infinite;
}

.price-list-analysis-progress {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 14px 18px;
  width: min(820px, calc(100% - 40px));
  min-height: 420px;
  margin: auto;
  padding: 34px;
}

.price-list-progress-copy {
  display: grid;
  gap: 4px;
}

.price-list-progress-copy strong {
  font-size: 22px;
}

.price-list-progress-copy > span:last-child {
  color: var(--muted);
  line-height: 1.4;
}

.price-list-progress-track {
  grid-column: 1 / -1;
  height: 18px;
  overflow: hidden;
  border: 1px solid #8aa7b1;
  border-radius: 5px;
  background: #dce7ea;
}

.price-list-progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 500ms ease;
}

.price-list-progress-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.price-list-progress-status strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.price-list-progress-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.price-list-progress-steps li {
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f2f6f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.price-list-progress-steps li.active {
  border-color: var(--accent);
  background: #edf4fc;
  color: var(--accent-dark);
}

.price-list-progress-steps li.complete {
  border-color: #9cbcaf;
  background: #f0f8f5;
  color: #315c50;
}

.price-list-analysis-progress > p {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  text-align: center;
}

@keyframes receiving-spin {
  to { transform: rotate(360deg); }
}

.receiving-review-shell {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

.receiving-review-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(6, minmax(96px, 0.72fr));
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f4f8fd;
}

.receiving-review-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.receiving-review-summary span,
.receiving-review-summary.compact span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.receiving-review-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.receiving-quality-banner,
.receiving-quality-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #c28b1e;
  background: #fff6dc;
}

.receiving-quality-banner {
  margin: 14px 14px 0;
  padding: 10px 12px;
  border: 1px solid #dcc17e;
  border-left-width: 4px;
  border-radius: 6px;
}

.receiving-quality-banner.bad,
.receiving-quality-item.bad {
  border-left-color: #a42531;
  background: #fff0f1;
}

.receiving-quality-banner.good,
.receiving-quality-item.good {
  border-left-color: var(--accent);
  background: #edf4fd;
}

.receiving-quality-list {
  display: grid;
  max-height: 116px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}

.receiving-quality-item {
  padding: 7px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.receiving-quality-item:last-child {
  border-bottom: 0;
}

.receiving-document-meta {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) repeat(3, minmax(130px, 0.7fr)) auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.price-list-document-meta {
  grid-template-columns: minmax(260px, 1.1fr) minmax(210px, 0.7fr) minmax(290px, 1fr);
}

.price-list-cost-lock {
  display: grid;
  align-self: stretch;
  gap: 2px;
  min-width: 240px;
  padding: 8px 12px;
  border: 1px solid #b7cbd2;
  border-radius: 6px;
  background: #f2f6f7;
}

.price-list-cost-lock span,
.price-list-cost-lock small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.price-list-cost-lock strong {
  color: #1e4651;
}

.price-list-cost-lock.success {
  width: min(440px, 100%);
  border-color: #85c8b6;
  background: #e8f7f2;
}

.receiving-inline-check,
.receiving-create-bill,
.receiving-approval-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.receiving-inline-check input,
.receiving-create-bill input,
.receiving-approval-check input,
.receiving-review-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.receiving-review-toolbar {
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.receiving-review-toolbar .inline-actions {
  flex-wrap: wrap;
}

.receiving-lines-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.receiving-review-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.vendor-price-list-table {
  min-width: 1380px;
  table-layout: fixed;
}

.vendor-price-list-table th:nth-child(1) { width: 92px; }
.vendor-price-list-table th:nth-child(2) { width: 132px; }
.vendor-price-list-table th:nth-child(3) { width: 250px; }
.vendor-price-list-table th:nth-child(4) { width: 150px; }
.vendor-price-list-table th:nth-child(5) { width: 58px; }
.vendor-price-list-table th:nth-child(6) { width: 58px; }
.vendor-price-list-table th:nth-child(7) { width: 130px; }
.vendor-price-list-table th:nth-child(8) { width: 138px; }
.vendor-price-list-table th:nth-child(9) { width: 138px; }
.vendor-price-list-table th:nth-child(10) { width: 220px; }

.vendor-price-list-table th:nth-child(10),
.vendor-price-list-table td:nth-child(10) {
  position: sticky;
  right: 0;
  z-index: 2;
  border-left: 2px solid #8fbfb1;
  box-shadow: -8px 0 14px rgba(24, 48, 57, 0.08);
}

.vendor-price-list-table th:nth-child(10) {
  z-index: 4;
  background: #dcefe9;
}

.vendor-price-list-table td:nth-child(10) {
  background: #edf9f5;
}

.vendor-price-list-table .price-list-compact-row td {
  height: 72px;
  padding: 8px 10px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-row-status {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding: 5px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-upc,
.price-list-vendor-code,
.price-list-uom,
.price-list-number,
.price-list-money {
  font-variant-numeric: tabular-nums;
}

.price-list-description {
  white-space: normal !important;
}

.price-list-description strong,
.price-list-description small,
.price-list-upc strong,
.price-list-upc small,
.price-list-money strong,
.price-list-money small,
.price-list-retail span,
.price-list-retail strong,
.price-list-retail small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-list-description strong {
  font-weight: 850;
  white-space: nowrap;
}

.price-list-description small,
.price-list-upc small,
.price-list-money small,
.price-list-retail small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.price-list-vendor-code {
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-list-vendor-code > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-list-vendor-code .price-list-code-link,
.price-list-vendor-code .price-list-code-state {
  flex: 0 0 auto;
}

.price-list-code-link,
.price-list-code-state {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #c28a19;
  border-radius: 5px;
  background: #fff5d9;
  color: #694300;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  vertical-align: middle;
}

.price-list-code-link.selected,
.price-list-code-state.good {
  border-color: #20856f;
  background: #dcf4ec;
  color: #075f53;
}

.price-list-code-state.warn {
  border-color: #b9343b;
  background: #fff0f1;
  color: #8d2028;
}

.price-list-number,
.price-list-uom,
.price-list-money {
  text-align: right !important;
}

.price-list-new-cost {
  color: #075f53;
  background: #effaf7;
}

.price-list-compact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 4px;
}

.price-list-compact-actions button {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 10px;
  white-space: nowrap;
}

.price-list-decision-button {
  min-width: 0;
}

.price-list-review-button {
  grid-column: 1 / -1;
  min-width: 0;
}

.price-list-retail {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.price-list-retail span {
  color: var(--muted);
  text-decoration: line-through;
}

.price-list-retail strong {
  color: #075f53;
  font-size: 13px;
}

.vendor-price-list-table .price-list-line-ignored td {
  background: #f2f4f5;
  color: var(--muted);
}

.vendor-price-list-table .price-list-line-ignored td:first-child {
  background: #e9edef;
}

.vendor-price-list-table .price-list-detail-row td {
  position: static;
  padding: 10px 14px;
  border-left: 4px solid #d99a21;
  background: #fff9e9;
  box-shadow: none;
}

.price-list-detail-panel {
  display: grid;
  grid-template-columns: 145px 155px minmax(230px, 1fr) 105px 85px 145px 145px 145px minmax(220px, 1fr);
  align-items: end;
  gap: 10px;
}

.price-list-detail-panel > label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.price-list-detail-panel input,
.price-list-detail-panel select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.price-list-match-explanation {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 5px 8px;
  color: var(--muted);
}

.price-list-match-explanation strong,
.price-list-match-explanation small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-ignore-check {
  align-self: end;
}

.receiving-review-table th,
.receiving-review-table td {
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.receiving-review-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e9f0f3;
  color: #21333d;
  font-size: 11px;
  text-transform: uppercase;
}

.receiving-review-table th:first-child,
.receiving-review-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f8fafb;
}

.receiving-review-table th:first-child {
  z-index: 3;
  background: #e9f0f3;
}

.receiving-review-table .receiving-line-cost-warning td {
  background: #fff9e8;
}

.receiving-review-table .receiving-line-unmatched td {
  background: #fff1f2;
}

.receiving-review-table .receiving-line-cost-warning td:first-child {
  background: #fff4d3;
}

.receiving-review-table .receiving-line-unmatched td:first-child {
  background: #ffe3e5;
}

.receiving-cell-stack,
.receiving-cell-grid {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.receiving-cell-stack .receiving-match-name,
.receiving-cost-compare span,
.receiving-calculated span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.receiving-cost-compare {
  display: grid;
  gap: 3px;
  white-space: nowrap;
}

.receiving-cell-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 6px;
}

.receiving-cell-grid.three {
  grid-template-columns: repeat(3, minmax(62px, 1fr));
}

.receiving-calculated {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f7f8;
}

.receiving-calculated strong {
  font-variant-numeric: tabular-nums;
}

.receiving-approval-check.required {
  border-color: #c28b1e;
  background: #fff0c6;
  color: #67490d;
}

.receiving-line-issues {
  display: grid;
  gap: 3px;
  padding: 6px;
  border-left: 3px solid #c28b1e;
  background: #fff7df;
  color: #664d17;
  font-size: 11px;
  font-weight: 750;
}

.receiving-line-number {
  min-width: 58px;
  text-align: center !important;
}

.receiving-line-number strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.receiving-review-table .icon-text-button {
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #d6a1a5;
  background: #fff;
  color: #8f1f29;
  font-size: 11px;
}

.receiving-review-table .status {
  display: block;
  width: 100%;
  padding: 6px;
  text-align: center;
  white-space: normal;
}

.vendor-price-list-table .price-list-row-status {
  display: inline-flex;
  width: auto;
  white-space: nowrap;
}

.receiving-review-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 -6px 18px rgba(17, 34, 44, 0.08);
}

.receiving-post-button {
  min-width: 170px;
  min-height: 46px;
  font-size: 16px;
}

.receiving-posted-summary {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 420px;
  padding: 28px;
  text-align: center;
  background: var(--surface);
}

.receiving-posted-summary h3 {
  margin: 0;
  font-size: 24px;
}

.receiving-posted-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e7f0fc;
  color: var(--accent-dark);
  font-size: 22px;
  font-weight: 900;
}

.receiving-review-summary.compact {
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 7px;
}

@media (max-width: 1100px) {
  .receiving-upload-grid,
  .receiving-document-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receiving-review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-list-purpose-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .receiving-document-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .receiving-upload-grid,
  .receiving-document-meta,
  .receiving-review-summary,
  .receiving-review-summary.compact {
    grid-template-columns: 1fr;
  }

  .receiving-draft-list-heading,
  .receiving-draft-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .receiving-draft-list-heading > div,
  .receiving-draft-row > span:first-child {
    grid-column: 1;
  }

  .receiving-draft-row > span:nth-child(2) {
    grid-column: 1;
  }

  .receiving-draft-row .receiving-draft-resume {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .receiving-review-footer {
    align-items: stretch;
  }

  .price-list-analysis-progress {
    grid-template-columns: 48px minmax(0, 1fr);
    width: 100%;
    padding: 22px;
  }

  .price-list-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Receiving pricing policy settings */
.receiving-pricing-settings-panel {
  max-width: 1320px;
}

.receiving-pricing-settings-body {
  display: grid;
  gap: 14px;
}

.receiving-policy-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #a9c8c2;
  border-radius: 7px;
  background: #edf8f5;
}

.receiving-policy-intro > div {
  display: grid;
  gap: 3px;
}

.receiving-policy-intro > div:last-child {
  min-width: 280px;
  padding-left: 18px;
  border-left: 1px solid #a9c8c2;
}

.receiving-policy-intro span,
.receiving-policy-effective span,
.receiving-item-policy-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.receiving-policy-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.receiving-policy-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #f8fafb;
}

.receiving-policy-section .section-title-row {
  align-items: start;
}

.receiving-policy-section h4,
.receiving-policy-section p {
  margin: 0;
}

.receiving-policy-section p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.receiving-policy-form label,
.receiving-item-policy-search label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.receiving-policy-form input,
.receiving-policy-form select,
.receiving-item-policy-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.receiving-policy-effective {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: #e9f5f2;
}

.receiving-item-policy-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.receiving-item-policy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.receiving-item-policy-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.receiving-item-policy-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receiving-policy-inherit {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
}

.receiving-policy-inherit input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.receiving-policy-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 210px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .receiving-policy-columns,
  .receiving-policy-intro {
    grid-template-columns: 1fr;
  }

  .receiving-policy-intro > div:last-child {
    min-width: 0;
    padding: 10px 0 0;
    border-top: 1px solid #a9c8c2;
    border-left: 0;
  }
}

/* Corporate Minimal vendor price-list review workspace */
#vendorPriceListModal {
  --accent: #2468b5;
  --accent-dark: #174f91;
  --price-list-blue: var(--accent);
  --price-list-blue-soft: #edf4fc;
  --price-list-border: #d7dfe8;
  --price-list-border-soft: #e5eaf0;
}

#vendorPriceListModal .receiving-document-modal {
  width: min(1680px, 98vw);
  height: min(980px, 96vh);
  max-height: 96vh;
  border-radius: 7px;
}

#vendorPriceListModal .modal-header {
  min-height: 52px;
  padding: 7px 14px;
  border-bottom-color: var(--price-list-border);
}

#vendorPriceListModal .modal-header .eyebrow {
  margin-bottom: 1px;
  color: #667588;
  font-size: 10px;
}

#vendorPriceListModal .modal-header h2 {
  font-size: 19px;
}

.vendor-price-list-review-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  color: #172536;
  background: #f5f7fa;
}

.vendor-price-list-review-shell .primary {
  border-color: var(--price-list-blue);
  background: var(--price-list-blue);
  color: #fff;
}

.vendor-price-list-review-shell .primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.price-list-document-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(230px, 1fr) 170px 138px;
  align-items: end;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--price-list-border);
  background: #fff;
}

.price-list-document-strip label,
.price-list-document-identity,
.price-list-document-status {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: #69788b;
  font-size: 10px;
  font-weight: 750;
}

.price-list-document-identity strong {
  overflow: hidden;
  color: #172536;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-document-strip input,
.price-list-document-strip select {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid #bfcbd8;
  border-radius: 5px;
  background: #fff;
  color: #172536;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.price-list-document-status .status {
  justify-self: start;
  width: auto;
  min-width: 0;
  padding: 3px 7px;
  font-size: 10px;
}

.price-list-summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.38fr);
  align-items: stretch;
  border-bottom: 1px solid var(--price-list-border);
  background: #fff;
}

.price-list-operational-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(94px, 1fr));
  min-width: 0;
  padding: 6px 0;
}

.price-list-operational-summary > div {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid var(--price-list-border-soft);
}

.price-list-operational-summary span {
  overflow: hidden;
  color: #6a7888;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.price-list-operational-summary strong {
  color: #172536;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.price-list-operational-summary .warn strong {
  color: #9a6200;
}

.price-list-operational-summary .good strong {
  color: #18745f;
}

.price-list-protected-notice {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  padding: 6px 10px;
  border-left: 3px solid #7792ad;
  background: #f7f9fb;
}

.price-list-protected-notice span {
  color: #637285;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.price-list-protected-notice strong {
  color: #34485d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.price-list-quality-list {
  flex: 0 0 auto;
  max-height: 58px;
  border-bottom-color: var(--price-list-border);
}

.price-list-quality-list .receiving-quality-item {
  min-height: 28px;
  padding: 4px 12px;
  border-left-width: 3px;
  background: #fff;
  font-size: 10px;
}

.price-list-grid-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 5px 12px;
  border-bottom: 1px solid var(--price-list-border);
  background: #fff;
}

.price-list-toolbar-primary,
.price-list-grid-controls,
.price-list-page-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.price-list-toolbar-primary .muted {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-recheck-button {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
}

.price-list-grid-controls > label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #68778a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-list-grid-controls input,
.price-list-grid-controls select {
  min-width: 0;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid #bcc8d5;
  border-radius: 5px;
  background: #fff;
  color: #1b2a3a;
  font-size: 11px;
  font-weight: 650;
}

.price-list-grid-controls select {
  width: 120px;
}

.price-list-grid-controls > label:last-of-type select {
  width: 62px;
}

.price-list-search-field input {
  width: 250px;
}

.price-list-page-controls {
  gap: 4px;
}

.price-list-page-controls button {
  width: 30px;
  min-height: 30px;
  padding: 2px;
  border-radius: 5px;
  font-size: 17px;
}

.price-list-page-controls span {
  min-width: 74px;
  color: #58687a;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
}

.vendor-price-list-review-shell .price-list-grid-scroll {
  flex: 1 1 260px;
  min-height: 170px;
  border-bottom: 1px solid var(--price-list-border);
  background: #fff;
}

.vendor-price-list-review-shell .vendor-price-list-table {
  width: 100%;
  min-width: 1400px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}

.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(1) { width: 84px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(2) { width: 124px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(3) { width: 226px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(4) { width: 142px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(5) { width: 54px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(6) { width: 58px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(7) { width: 54px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(8) { width: 128px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(9) { width: 132px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(10) { width: 120px; }
.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(11) { width: 214px; }

.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(10),
.vendor-price-list-review-shell .vendor-price-list-table td:nth-child(10) {
  position: static;
  right: auto;
  z-index: auto;
  border-left: 0;
  background: inherit;
  box-shadow: none;
}

.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(11),
.vendor-price-list-review-shell .vendor-price-list-table td:nth-child(11) {
  position: sticky;
  right: 0;
  z-index: 2;
  border-left: 1px solid #cbd5df;
  background: #fff;
  box-shadow: none;
}

.vendor-price-list-review-shell .vendor-price-list-table th:nth-child(11) {
  z-index: 4;
  background: #f1f4f7;
}

.vendor-price-list-review-shell .receiving-review-table th,
.vendor-price-list-review-shell .receiving-review-table td {
  padding: 4px 7px;
  border-right: 1px solid var(--price-list-border-soft);
  border-bottom: 1px solid var(--price-list-border-soft);
  vertical-align: middle;
}

.vendor-price-list-review-shell .receiving-review-table th {
  height: 31px;
  background: #f1f4f7;
  color: #536274;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.025em;
}

.vendor-price-list-review-shell .receiving-review-table th:first-child {
  background: #f1f4f7;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-compact-row td {
  height: 44px;
  padding: 4px 7px;
  background: #fff;
  line-height: 1.15;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-compact-row:hover td {
  background: #f8fafc;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-compact-row.selected td {
  background: #f3f7fc;
  box-shadow: inset 0 1px 0 #b7d0ed, inset 0 -1px 0 #b7d0ed;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-compact-row td:first-child {
  background: #fff;
  box-shadow: inset 3px 0 0 #8a97a5;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-matched td:first-child {
  box-shadow: inset 3px 0 0 #2b9a70;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-review td:first-child {
  box-shadow: inset 3px 0 0 #d89a22;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-error td:first-child {
  box-shadow: inset 3px 0 0 #c7474f;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-ignored td,
.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-ignored td:first-child {
  background: #fff;
  color: #7b8794;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-line-ignored td:first-child {
  box-shadow: inset 3px 0 0 #9aa5b0;
}

.vendor-price-list-review-shell .vendor-price-list-table .price-list-compact-row.selected td:first-child {
  background: #f3f7fc;
  box-shadow: inset 3px 0 0 var(--price-list-blue), inset 0 1px 0 #b7d0ed, inset 0 -1px 0 #b7d0ed;
}

.vendor-price-list-review-shell .price-list-row-status {
  max-width: 100%;
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
}

.vendor-price-list-review-shell .price-list-description strong,
.vendor-price-list-review-shell .price-list-upc strong,
.vendor-price-list-review-shell .price-list-money strong {
  font-size: 11px;
}

.vendor-price-list-review-shell .price-list-description small,
.vendor-price-list-review-shell .price-list-upc small,
.vendor-price-list-review-shell .price-list-money small,
.vendor-price-list-review-shell .price-list-retail small {
  margin-top: 1px;
  font-size: 9px;
}

.vendor-price-list-review-shell .price-list-vendor-code {
  gap: 3px;
}

.vendor-price-list-review-shell .price-list-code-link,
.vendor-price-list-review-shell .price-list-code-state {
  min-height: 21px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
}

.vendor-price-list-review-shell .price-list-code-link.selected {
  border-color: #77a7dd;
  background: var(--price-list-blue-soft);
  color: #1559a8;
}

.vendor-price-list-review-shell .price-list-code-state.good {
  border-color: #7bbba4;
  background: #edf8f3;
  color: #17684f;
}

.vendor-price-list-review-shell .price-list-code-state.warn {
  border-color: #d5ab55;
  background: #fff8e8;
  color: #7b5408;
}

.vendor-price-list-review-shell .price-list-new-cost {
  background: transparent;
  color: #1559a8;
}

.vendor-price-list-review-shell .price-list-retail strong {
  color: #1559a8;
  font-size: 11px;
}

.vendor-price-list-review-shell .price-list-compact-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.vendor-price-list-review-shell .price-list-compact-actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 25px;
  padding: 3px 4px;
  border-radius: 4px;
  font-size: 9px;
}

.vendor-price-list-review-shell .price-list-review-button {
  grid-column: auto;
}

.vendor-price-list-review-shell .price-list-compact-actions .primary {
  border-color: #78a8dd;
  background: var(--price-list-blue-soft);
  color: #1559a8;
}

.vendor-price-list-review-shell .price-list-compact-actions .primary:hover {
  border-color: #5c94d2;
  background: #dfeefa;
}

.price-list-selected-line {
  flex: 0 0 auto;
  min-height: 82px;
  padding: 6px 10px 7px;
  border-bottom: 1px solid var(--price-list-border);
  border-left: 3px solid var(--price-list-blue);
  background: #fff;
}

.price-list-selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.price-list-selected-heading > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.price-list-selected-heading span:first-child {
  color: #5e6e81;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.price-list-selected-heading strong {
  overflow: hidden;
  color: #172536;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-selected-heading > .status {
  flex: 0 0 auto;
  width: auto;
  padding: 2px 6px;
  font-size: 9px;
}

.price-list-selected-line .price-list-detail-panel {
  display: grid;
  grid-template-columns: 130px 145px minmax(185px, 1fr) 92px 72px 130px 132px 126px minmax(190px, 1fr);
  align-items: end;
  gap: 6px;
}

.price-list-selected-line .price-list-detail-panel > label {
  gap: 2px;
  font-size: 9px;
  font-weight: 800;
}

.price-list-selected-line .price-list-detail-panel input,
.price-list-selected-line .price-list-detail-panel select {
  min-height: 29px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
}

.price-list-selected-line .receiving-approval-check {
  min-height: 29px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
}

.price-list-selected-line .receiving-approval-check input {
  width: 16px;
  height: 16px;
}

.price-list-selected-line .price-list-match-explanation {
  gap: 1px;
  min-height: 29px;
  padding: 2px 5px;
  font-size: 9px;
}

.price-list-selected-line .price-list-match-explanation strong,
.price-list-selected-line .price-list-match-explanation small {
  font-size: 9px;
}

.price-list-selected-empty {
  display: grid;
  min-height: 66px;
  place-items: center;
  color: #687789;
  font-size: 11px;
}

.price-list-review-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 5px 12px;
  border-top: 0;
  border-bottom: 0;
  background: #fff;
  box-shadow: none;
}

.price-list-review-footer > .inline-actions {
  justify-self: end;
}

.price-list-review-footer button {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
}

.price-list-remaining-count {
  color: #5e6e80;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 1450px) {
  .price-list-document-strip {
    grid-template-columns: minmax(230px, 1.2fr) minmax(200px, 1fr) 155px 124px;
  }

  .price-list-summary-band {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .price-list-operational-summary > div {
    padding-inline: 7px;
  }

  .price-list-grid-toolbar {
    grid-template-columns: minmax(225px, 0.8fr) minmax(0, auto);
  }

  .price-list-toolbar-primary .muted {
    max-width: 235px;
  }

  .price-list-search-field input {
    width: 205px;
  }

  .price-list-selected-line .price-list-detail-panel {
    grid-template-columns: 115px 130px minmax(165px, 1fr) 82px 64px 112px 118px 112px minmax(160px, 1fr);
  }
}

@media (max-height: 820px) {
  #vendorPriceListModal .receiving-document-modal {
    height: 97vh;
    max-height: 97vh;
  }

  .price-list-document-strip {
    padding-block: 5px;
  }

  .price-list-operational-summary {
    padding-block: 4px;
  }

  .price-list-grid-toolbar {
    min-height: 39px;
    padding-block: 4px;
  }

  .price-list-selected-line {
    min-height: 76px;
    padding-block: 4px 5px;
  }

  .price-list-review-footer {
    min-height: 40px;
    padding-block: 4px;
  }
}
