:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e8ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --blue: #2858e8;
  --blue-dark: #1d45c3;
  --green: #138a5b;
  --amber: #c77b10;
  --red: #c43c45;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 420px); padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 16px 50px rgba(16,24,40,.1); }
.auth-card .brand__mark { margin-bottom: 20px; }
.auth-card label { display: block; margin: 24px 0 12px; }
.auth-card .button { width: 100%; }
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.new-acceptance-action { width: 100%; margin: 0 0 30px; display: flex; justify-content: center; gap: 10px; }
#newAcceptanceButton { display: block; width: fit-content; min-width: 240px; margin: 0; }
.acceptance-list { display: grid; gap: 12px; }
.acceptance-card { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; }
.acceptance-card:hover { border-color: #bdc9eb; background: #fafbff; }
.acceptance-card strong { display: block; font-size: 17px; }
.acceptance-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.acceptance-card__difference { flex: none; font-weight: 750; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.saved-summary { justify-content: flex-start; }
.documents-section { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.documents-section > div:first-child p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.documents-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.document-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.document-card > strong, .document-card > span { display: block; }
.document-card > span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.document-card > div { display: flex; gap: 8px; margin-top: 13px; }
.document-card .button { min-height: 40px; }

.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: 1120px; height: 68px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 750; font-size: 18px; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: white; }
.demo-badge { padding: 6px 10px; border-radius: 20px; background: #eef2ff; color: var(--blue); font-size: 13px; font-weight: 650; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.button--compact { min-height: 38px; padding: 0 14px; font-size: 13px; }

.page { max-width: 1120px; margin: auto; padding: 28px 24px 48px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-size: 14px; }
.heading__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.035em; }
.subtitle { margin: 9px 0 0; color: var(--muted); }
.progress-card { min-width: 230px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(16, 24, 40, .04); }
.progress-card > span { color: var(--muted); font-size: 13px; }
.progress-card strong { float: right; font-size: 14px; }
.progress-track { clear: both; height: 7px; margin-top: 11px; overflow: hidden; border-radius: 6px; background: #edf0f5; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .25s ease; }
.mode-selection { width: min(100%, 820px); margin: 28px auto 0; text-align: center; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; text-align: left; }
.mode-option { min-height: 170px; padding: 25px; border: 2px solid var(--line); border-radius: 18px; background: white; color: var(--ink); box-shadow: 0 4px 18px rgba(16,24,40,.05); }
.mode-option:hover, .mode-option:focus-visible { border-color: var(--blue); background: #f7f9ff; outline: none; }
.mode-option strong, .mode-option span { display: block; }
.mode-option strong { font-size: 20px; }
.mode-option span { margin-top: 10px; color: var(--muted); line-height: 1.5; }
.camera-panel { margin-top: 24px; padding: 20px; border: 1px solid #dce5ff; border-radius: 18px; background: #f7f9ff; }
.camera-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.camera-panel__heading p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.camera-preview { position: relative; min-height: 220px; margin-top: 15px; overflow: hidden; border-radius: 14px; background: #172033; display: grid; place-items: center; }
.camera-preview video { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.camera-preview p { position: absolute; inset: auto 12px 12px; margin: 0; padding: 9px 12px; border-radius: 9px; background: rgba(15,23,42,.82); color: white; text-align: center; }
.camera-invoice-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; padding: 14px 16px; border: 1px solid #bdc9eb; border-radius: 12px; background: white; }
.camera-invoice-action p { margin: 0; color: #344054; font-weight: 650; }
.camera-invoice-action .button { flex: none; }

.receive-card { margin-top: 32px; padding: 24px; background: #f0f4ff; border: 1px solid #dce5ff; border-radius: 18px; }
#acceptanceView .receive-card { position: sticky; z-index: 4; top: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .1); }
.receive-card__intro { display: flex; gap: 13px; align-items: flex-start; }
.step { flex: none; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--blue); color: white; font-weight: 750; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.receive-card__intro p, .section-title p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.receive-form { display: grid; grid-template-columns: minmax(240px, 1fr) 150px auto; gap: 12px; align-items: end; margin-top: 22px; }
.receive-form__actions { display: flex; gap: 8px; }
.product-search { position: relative; }
.product-search__results { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 12px 30px rgba(16,24,40,.14); }
.product-search__option { display: block; width: 100%; padding: 11px 13px; border: 0; border-top: 1px solid var(--line); background: white; color: var(--ink); text-align: left; }
.product-search__option:first-child { border-top: 0; }
.product-search__option:hover, .product-search__option:focus { background: #f3f6ff; outline: 0; }
.product-search__option strong, .product-search__option span { display: block; }
.product-search__option span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.product-search__empty { padding: 13px; color: var(--muted); font-size: 13px; }
label > span { display: block; margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 650; }
input, select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #cfd6e3; border-radius: 10px; background: white; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40, 88, 232, .12); }
.quantity-control { display: grid; grid-template-columns: 1fr 30px; }
.quantity-control input { border-radius: 10px 0 0 10px; }
.quantity-control__steps { display: grid; grid-template-rows: 1fr 1fr; }
.quantity-control__steps button { padding: 0; border: 1px solid #cfd6e3; border-left: 0; background: #f8f9fb; color: var(--muted); font-size: 9px; line-height: 1; }
.quantity-control__steps button:first-child { border-radius: 0 10px 0 0; border-bottom: 0; }
.quantity-control__steps button:last-child { border-radius: 0 0 10px 0; }
.quantity-control__steps button:hover { background: #eef2ff; color: var(--blue); }
.button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; font-weight: 700; }
.button--primary { background: var(--blue); color: white; }
.button--primary:hover { background: var(--blue-dark); }
.button--secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button--danger { background: var(--red); color: white; }
.button--danger:hover { background: #a92f38; }
.button--danger-outline { border: 1px solid #efb4b8; background: white; color: var(--red); }
.button--danger-outline:hover:not(:disabled) { background: #fff0f1; }
.button--finish { background: #172033; color: white; }
.hint { margin: 12px 0 0 42px; color: var(--muted); font-size: 13px; }

.items-section { margin-top: 34px; }
.section-title { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 14px; }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; gap: 6px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c8ced9; }
.dot--done { background: var(--green); }
.dot--progress { background: var(--amber); }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 2px 10px rgba(16, 24, 40, .035); }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; background: #fafbfc; color: var(--muted); font-size: 12px; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
td { padding: 17px 18px; border-top: 1px solid var(--line); font-size: 14px; }
#itemsBody tr, #discrepanciesBody tr { cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
#itemsBody tr:hover, #discrepanciesBody tr:hover { background: #f7f9ff; }
#itemsBody tr.row--selected, #discrepanciesBody tr.row--selected { background: #eef2ff; box-shadow: inset 3px 0 var(--blue); }
#itemsBody tr:focus-visible, #discrepanciesBody tr:focus-visible { outline: 3px solid rgba(40, 88, 232, .25); outline-offset: -3px; }
.product-name { display: block; font-weight: 700; }
.product-code { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.product-code--column { margin-top: 0; color: var(--ink); font-size: 14px; }
.count { font-variant-numeric: tabular-nums; font-weight: 650; }
.status { display: inline-flex; gap: 7px; align-items: center; padding: 5px 9px; border-radius: 16px; background: #f1f3f6; color: #667085; font-size: 12px; font-weight: 650; }
.status--done { background: #eaf8f2; color: var(--green); }
.status--progress { background: #fff5e5; color: var(--amber); }
.status--over { background: #fff0f1; color: var(--red); }
.status--shortage { background: #fff0f1; color: var(--red); }

.summary { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-top: 22px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.summary__stats { display: flex; gap: clamp(28px, 6vw, 75px); }
.summary__stats div { display: flex; flex-direction: column; gap: 5px; }
.summary__stats span { color: var(--muted); font-size: 12px; }
.summary__stats strong { font-size: 20px; }
.summary-result--ok { color: var(--green); }
.summary-result--alert { color: var(--red); }
.discrepancies { margin-top: 34px; }
.discrepancies[hidden] { display: none; }
.discrepancy { font-variant-numeric: tabular-nums; font-weight: 750; }
.discrepancy--negative { color: var(--red); }
.discrepancy--positive { color: var(--amber); }
.mobile-discrepancy-status { display: none; }
.saved-discrepancies-table tbody tr { cursor: pointer; }
.empty-state { margin: 0; padding: 24px; border: 1px dashed #b8dcca; border-radius: 14px; background: #f3fbf7; color: var(--green); text-align: center; }

.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.modal__dialog { position: relative; width: min(100%, 430px); padding: 28px; border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(16, 24, 40, .25); text-align: center; }
.modal__dialog--wide { width: min(100%, 900px); max-height: calc(100vh - 40px); overflow: auto; text-align: left; }
.modal__icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%; background: #eef2ff; color: var(--blue); font-size: 22px; font-weight: 800; }
.modal__icon--finish { background: #eaf8f2; color: var(--green); }
.modal__icon--danger { background: #fff0f1; color: var(--red); }
.modal__dialog p { margin: 10px 0 24px; color: var(--muted); line-height: 1.5; }
.modal__field { display: block; margin: 20px 0; text-align: left; }
.adjust-actions { display: grid; gap: 9px; margin: 20px 0 0; padding: 0; border: 0; text-align: left; }
.adjust-actions legend { margin-bottom: 8px; color: #344054; font-size: 13px; font-weight: 650; }
.radio-option { display: flex; gap: 9px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.radio-option:has(input:checked) { border-color: var(--blue); background: #f3f6ff; }
.radio-option input { flex: none; width: 17px; height: 17px; margin: 0; padding: 0; box-shadow: none; }
.radio-option span { margin: 0; color: var(--ink); font-size: 14px; }
.form-error { margin: -8px 0 18px !important; color: var(--red) !important; font-size: 14px; text-align: left; }
.modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal__actions--right { display: flex; justify-content: flex-end; margin-top: 22px; }
.upload-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.upload-heading p { margin: 6px 0 0; color: var(--muted); }
.upload-heading .eyebrow { margin: 0 0 5px; color: var(--blue); }
.icon-button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f3f6; color: var(--muted); font-size: 25px; line-height: 1; }
.drop-zone { display: flex; min-height: 190px; margin-top: 22px; padding: 24px; border: 2px dashed #bdc9eb; border-radius: 15px; background: #f7f9ff; align-items: center; justify-content: center; flex-direction: column; text-align: center; cursor: pointer; transition: .15s ease; }
.drop-zone[hidden] { display: none; }
.drop-zone:hover, .drop-zone--active { border-color: var(--blue); background: #f0f4ff; }
.drop-zone__icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 12px; border-radius: 12px; background: #e8edff; color: var(--blue); font-size: 25px; font-weight: 700; }
.drop-zone strong { font-size: 16px; }
.drop-zone > span:last-of-type { margin-top: 5px; color: var(--muted); font-size: 13px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-error { margin: 14px 0 0 !important; padding: 12px 14px; border-radius: 10px; background: #fff0f1; color: var(--red) !important; font-size: 14px; }
.preview { margin-top: 22px; }
.preview__heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.preview h3 { margin: 0; font-size: 17px; }
.preview__heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--blue); font-weight: 650; }
.preview-table-wrap { max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.preview-table th { position: sticky; z-index: 1; top: 0; }
.preview-table td { padding: 12px 14px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: calc(100% - 48px); padding: 13px 18px; border-radius: 10px; background: #172033; color: white; box-shadow: 0 10px 30px rgba(16,24,40,.22); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.toast--visible { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .topbar__inner { height: auto; min-height: 60px; padding: 10px 16px; flex-direction: column; align-items: stretch; gap: 8px; }
  .topbar .brand { width: 100%; font-size: 16px; }
  .topbar .brand__mark { width: 30px; height: 30px; border-radius: 9px; }
  .topbar__actions { width: 100%; justify-content: flex-end; gap: 8px; }
  .topbar__actions .button { min-height: 42px; padding: 0 13px; }
  #openUploadButton { flex: 1; }
  .demo-badge { display: none; }
  .home-heading { display: block; }
  .new-acceptance-action { flex-direction: column; align-items: center; }
  #newAcceptanceButton, #resumeAcceptanceButton { width: min(100%, 320px); }
  .mode-selection { margin-top: 10px; text-align: left; }
  .mode-options { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .mode-option { min-height: 0; padding: 19px; }
  .mode-option strong { font-size: 17px; }
  .camera-panel { margin-top: 16px; padding: 14px; }
  .camera-panel__heading { display: block; }
  .camera-panel__heading .button { width: 100%; margin-top: 13px; }
  .camera-preview { min-height: 180px; }
  .camera-invoice-action { display: block; padding: 12px; }
  .camera-invoice-action .button { width: 100%; margin-top: 10px; }
  .documents-section { padding: 14px; }
  .documents-grid { grid-template-columns: 1fr; gap: 10px; }
  .document-card { padding: 13px; }
  .document-card > div { display: grid; grid-template-columns: 1fr 1fr; }
  .document-card .button { min-height: 44px; }
  .page { padding: 20px 16px 32px; }
  .heading__row { display: block; }
  .progress-card { margin-top: 20px; min-width: 0; }
  .receive-card { margin-top: 18px; padding: 10px; border-radius: 14px; }
  #acceptanceView .receive-card { top: 6px; }
  .receive-card__intro { min-height: 36px; padding-right: 200px; align-items: center; }
  .receive-card__intro .step, .receive-card__intro p { display: none; }
  .receive-card__intro h2 { font-size: 16px; }
  .receive-form { grid-template-columns: minmax(90px, 120px) minmax(0, 1fr); gap: 7px; margin-top: 6px; }
  .receive-form > label:first-child { grid-column: 1 / -1; }
  .receive-form > label > span { display: none; }
  .receive-form input { height: 42px; }
  .receive-form .button { min-height: 42px; padding: 0 12px; }
  .receive-form__actions { display: contents; }
  .receive-form__actions .button--primary { grid-column: 2; grid-row: 2; }
  #adjustItemButton { position: absolute; top: 10px; right: 10px; min-height: 34px; padding: 0 9px; font-size: 12px; }
  #pauseAcceptanceButton { position: absolute; top: 10px; right: 121px; min-height: 34px; padding: 0 10px; font-size: 12px; }
  .receive-card .hint { display: none; }
  .section-title { align-items: flex-start; }
  .legend { display: none; }
  .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  table, tbody { display: block; }
  thead { display: none; }
  tr { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
  td { padding: 0; border: 0; }
  td:first-child { display: none; }
  td:nth-child(2) { grid-column: 1 / -1; }
  td:nth-child(3)::before, td:nth-child(4)::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
  td:nth-child(3)::before { content: "Ожидается"; }
  td:nth-child(4)::before { content: "Принято"; }
  td:last-child { grid-column: 1 / -1; }
  .summary { display: block; padding: 18px 16px; }
  .summary__stats { justify-content: space-between; gap: 8px; }
  .summary__stats strong { font-size: 17px; }
  .summary .button { width: 100%; margin-top: 20px; }
  .toast { right: 16px; bottom: 16px; max-width: calc(100% - 32px); }
  .modal__dialog--wide { padding: 20px 16px; }
  .drop-zone { min-height: 160px; }
  .preview-table-wrap { max-height: min(52vh, 420px); overflow-x: hidden; overflow-y: auto; border: 0; }
  .preview-table { display: block; min-width: 0; }
  .preview-table tbody { display: block; }
  .preview-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 10px; padding: 12px; cursor: pointer; }
  .preview-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .preview-table .preview-position { display: block; grid-column: 1; grid-row: 1; align-self: center; color: var(--muted); font-size: 12px; font-weight: 750; }
  .preview-table .preview-position::before { content: "№ "; }
  .preview-table .preview-name { display: block; grid-column: 2; grid-row: 1; }
  .preview-table .preview-product-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
  .preview-table .preview-code, .preview-table .preview-expected { grid-row: 2; color: var(--muted); font-size: 12px; font-weight: 600; }
  .preview-table .preview-code { display: block; grid-column: 1; }
  .preview-table .preview-expected { display: block; grid-column: 2; }
  .preview-table .preview-code::before { content: "Код: "; }
  .preview-table .preview-expected::before { content: "По накладной: "; display: inline; }
  .preview-table tr.row--expanded .preview-name { grid-column: 1 / -1; grid-row: 1; }
  .preview-table tr.row--expanded .preview-position { grid-row: 2; }
  .preview-table tr.row--expanded .preview-code, .preview-table tr.row--expanded .preview-expected { grid-row: 3; }
  .preview-table tr.row--expanded .preview-product-name { overflow: visible; white-space: normal; }
  .modal__actions--right { position: sticky; z-index: 2; bottom: -20px; display: grid; grid-template-columns: 1fr 1fr; padding: 10px 0 0; background: white; }
  .modal__actions--right .button { min-height: 44px; padding: 0 10px; }
  .discrepancies .section-title { align-items: center; gap: 10px; }
  #adjustDiscrepancyButton { flex: none; min-height: 40px; padding: 0 12px; font-size: 13px; }
  .discrepancy-table-wrap { overflow: visible; }
  .discrepancy-table { display: block; min-width: 0; }
  .discrepancy-table tbody { display: block; }
  .discrepancy-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px; }
  .discrepancy-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .discrepancy-table .discrepancy-position { display: block; grid-column: 1; grid-row: 1; align-self: center; color: var(--muted); font-size: 12px; font-weight: 750; }
  .discrepancy-table .discrepancy-position::before { content: "№ "; }
  .discrepancy-table .discrepancy-name { display: block; grid-column: 2; grid-row: 1; }
  .discrepancy-table .product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .discrepancy-table .discrepancy-status { display: block; grid-column: 3; grid-row: 1; align-self: center; }
  .discrepancy-table .desktop-discrepancy-value { display: none; }
  .discrepancy-table .mobile-discrepancy-status { display: inline-flex; padding: 4px 7px; white-space: nowrap; }
  .discrepancy-table .discrepancy-code, .discrepancy-table .discrepancy-expected, .discrepancy-table .discrepancy-accepted { grid-row: 2; color: var(--muted); font-size: 12px; font-weight: 600; }
  .discrepancy-table .discrepancy-code { grid-column: 1; }
  .discrepancy-table .discrepancy-expected { grid-column: 2; }
  .discrepancy-table .discrepancy-accepted { grid-column: 3; }
  .discrepancy-table .discrepancy-code::before { content: "Код: "; }
  .discrepancy-table .discrepancy-expected::before { content: "Накл.: "; display: inline; }
  .discrepancy-table .discrepancy-accepted::before { content: "Факт: "; display: inline; }
  .discrepancy-table tr.row--expanded .discrepancy-name { grid-column: 1 / -1; grid-row: 1; }
  .discrepancy-table tr.row--expanded .discrepancy-position { grid-row: 2; }
  .discrepancy-table tr.row--expanded .discrepancy-status { grid-row: 2; }
  .discrepancy-table tr.row--expanded .discrepancy-code, .discrepancy-table tr.row--expanded .discrepancy-expected, .discrepancy-table tr.row--expanded .discrepancy-accepted { grid-row: 3; }
  .discrepancy-table tr.row--expanded .product-name { overflow: visible; white-space: normal; }
  .saved-discrepancies-table { display: block; min-width: 0; }
  .saved-discrepancies-table tbody { display: block; }
  .saved-discrepancies-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px; }
  .saved-discrepancies-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .saved-discrepancies-table .saved-discrepancy-position { display: block; grid-column: 1; grid-row: 1; align-self: center; color: var(--muted); font-size: 12px; font-weight: 750; }
  .saved-discrepancies-table .saved-discrepancy-position::before { content: "№ "; }
  .saved-discrepancies-table .saved-discrepancy-name { display: block; grid-column: 2; grid-row: 1; }
  .saved-discrepancies-table .product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .saved-discrepancies-table .saved-discrepancy-status { display: block; grid-column: 3; grid-row: 1; align-self: center; }
  .saved-discrepancies-table .status { padding: 4px 7px; white-space: nowrap; }
  .saved-discrepancies-table .saved-discrepancy-code, .saved-discrepancies-table .saved-discrepancy-expected, .saved-discrepancies-table .saved-discrepancy-accepted { grid-row: 2; color: var(--muted); font-size: 12px; font-weight: 600; }
  .saved-discrepancies-table .saved-discrepancy-code { grid-column: 1; }
  .saved-discrepancies-table .saved-discrepancy-expected { grid-column: 2; }
  .saved-discrepancies-table .saved-discrepancy-accepted { grid-column: 3; }
  .saved-discrepancies-table .saved-discrepancy-code::before { content: "Код: "; }
  .saved-discrepancies-table .saved-discrepancy-expected::before { content: "Накл.: "; display: inline; }
  .saved-discrepancies-table .saved-discrepancy-accepted::before { content: "Факт: "; display: inline; }
  .saved-discrepancies-table .saved-discrepancy-difference { display: none; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-name { grid-column: 1 / -1; grid-row: 1; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-position { grid-row: 2; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-status { grid-row: 2; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-code, .saved-discrepancies-table tr.row--expanded .saved-discrepancy-expected, .saved-discrepancies-table tr.row--expanded .saved-discrepancy-accepted { grid-row: 3; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-difference { display: block; grid-column: 1 / -1; grid-row: 4; }
  .saved-discrepancies-table tr.row--expanded .saved-discrepancy-difference::before { content: "Отклонение: "; color: var(--muted); font-weight: 600; }
  .saved-discrepancies-table tr.row--expanded .product-name { overflow: visible; white-space: normal; }
  .items-table-wrap { overflow: visible; }
  .items-table { display: block; min-width: 0; }
  .items-table tbody { display: block; }
  .items-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px 10px; padding: 12px; }
  .items-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .items-table .item-position { display: block; grid-column: 1; grid-row: 1; align-self: center; color: var(--muted); font-size: 12px; font-weight: 750; }
  .items-table .item-position::before { content: "№ "; }
  .items-table .item-name { grid-column: 2; grid-row: 1; }
  .items-table .product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .items-table .item-status { display: block; grid-column: 3; grid-row: 1; align-self: center; }
  .items-table .status { padding: 4px 7px; white-space: nowrap; }
  .items-table .item-code, .items-table .item-expected, .items-table .item-accepted { grid-row: 2; color: var(--muted); font-size: 12px; font-weight: 600; }
  .items-table .item-code { grid-column: 1 / 2; }
  .items-table .item-expected { grid-column: 2; }
  .items-table .item-accepted { grid-column: 3; }
  .items-table .item-code::before { content: "Код: "; }
  .items-table .item-expected::before { content: "Ожид.: "; display: inline; }
  .items-table .item-accepted::before { content: "Принято: "; display: inline; }
  .items-table .product-code--column { display: inline; color: inherit; font-size: inherit; }
  .items-table tr.row--expanded .item-name { grid-column: 1 / -1; grid-row: 1; padding-right: 2px; }
  .items-table tr.row--expanded .item-position { grid-row: 2; }
  .items-table tr.row--expanded .item-status { grid-row: 2; }
  .items-table tr.row--expanded .item-code, .items-table tr.row--expanded .item-expected, .items-table tr.row--expanded .item-accepted { grid-row: 3; }
  .items-table tr.row--expanded .product-name { overflow: visible; white-space: normal; }
}
