: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; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
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 .eyebrow { margin-bottom: 10px; }
.auth-card label { display: block; margin: 24px 0 12px; }
.auth-card .button { width: 100%; }
.auth-card .auth-remember { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 18px 0; padding: 6px 0; cursor: pointer; }
.auth-card .auth-remember input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--primary); }
.auth-card .auth-remember span { min-width: 0; }
.auth-card .auth-remember strong, .auth-card .auth-remember small { display: block; }
.auth-card .auth-remember small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.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-filters { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.acceptance-filters__label { flex: 0 0 auto; white-space: nowrap; }
.acceptance-filters__quick { display: flex; gap: 8px; }
.acceptance-filter-button { min-height: 40px; padding: 8px 12px; border: 1px solid #cdd8ff; border-radius: 9px; background: white; color: var(--ink); font-weight: 650; }
.acceptance-filter-button:hover, .acceptance-filter-button:focus-visible, .acceptance-filter-button--selected { border-color: #9eb2f4; background: #f3f6ff; color: #263b8f; outline: 0; }
.employee-filter { position: relative; }
.employee-filter__trigger { max-width: min(340px, calc(100vw - 188px)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-filter__popover { position: absolute; z-index: 21; top: calc(100% + 6px); left: 0; width: min(360px, calc(100vw - 32px)); max-height: min(420px, calc(100dvh - 160px)); padding: 10px; overflow: auto; border: 1px solid #d9e0ef; border-radius: 12px; background: white; box-shadow: 0 16px 38px rgba(16,24,40,.18); }
.employee-filter__popover input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.employee-filter__reset { min-height: 36px; margin: 4px 0; }
.employee-filter__list { display: grid; gap: 3px; max-height: 280px; overflow-y: auto; }
.employee-filter__option { width: 100%; min-height: 42px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.employee-filter__option:hover, .employee-filter__option:focus-visible, .employee-filter__option--active { background: #f3f6ff; outline: 0; }
.employee-filter__empty { margin: 8px 0 2px; color: var(--muted); font-size: 13px; }
.acceptance-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.acceptance-card__open { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.acceptance-card__main { flex: 1 1 auto; min-width: 0; }
.acceptance-card__open:hover, .acceptance-card__open:focus-visible { background: #fafbff; outline: 0; }
.acceptance-card:has(.acceptance-card__open:hover), .acceptance-card:has(.acceptance-card__open:focus-visible) { border-color: #bdc9eb; }
.acceptance-card--draft { border-color: #f2c94c; background: #fff9e8; }
.acceptance-card strong { display: block; overflow-wrap: anywhere; font-size: 17px; }
.acceptance-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.acceptance-card__attributions { display: grid; gap: 2px; margin-top: 8px; }
.acceptance-card__attributions .acceptance-card__attribution { margin: 0; }
.acceptance-card__attribution b { color: #475467; font-weight: 650; }
.acceptance-card__attribution-link { margin: 0; padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.acceptance-card__attribution-link:focus-visible { outline: 2px solid rgba(40,88,232,.45); outline-offset: 2px; border-radius: 2px; }
.acceptance-card__difference { flex: none; font-weight: 750; }
.acceptance-card__delete { flex: none; width: 36px; height: 36px; border: 1px solid #f0c7c7; border-radius: 50%; background: white; color: var(--red); font-size: 22px; line-height: 1; }
.acceptance-card__delete:hover { background: #fff0f1; }
.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); }
.directory-settings { margin: 18px auto 0; padding: 18px; border: 1px solid #c9ddcf; border-radius: 16px; background: #f7fcf8; }
.directory-settings h2 { margin: 4px 0 0; font-size: 19px; }
.directory-settings .subtitle { margin: 5px 0 0; }
.directory-settings__actions { display: flex; gap: 10px; margin-top: 14px; }
.directory-settings__actions .button { min-width: 0; flex: 1 1 0; }
.profile-management { margin: 18px auto 0; padding: 18px; border: 1px solid #d9e0ef; border-radius: 16px; background: #f7f9ff; }
.profile-management__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-management h2 { margin: 4px 0 0; font-size: 19px; }
.profile-management .subtitle { max-width: 720px; margin: 5px 0 0; }
.profile-management__heading .button { flex: none; min-width: 190px; }
.profile-list-section { margin-top: 22px; }
.profile-list-section h3 { margin: 0 0 10px; font-size: 16px; }
.profile-list { display: grid; gap: 10px; }
.profile-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.profile-card__identity { min-width: 0; }
.profile-card__identity strong, .profile-card__identity span { display: block; overflow-wrap: anywhere; }
.profile-card__identity strong { font-size: 16px; }
.profile-card__identity span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.profile-card__state { display: inline-flex; width: fit-content; margin-top: 7px; padding: 4px 8px; border-radius: 999px; background: #fff5e5; color: #9a6500; font-size: 12px; font-weight: 700; }
.profile-card--disabled { border-color: #e6d3d5; background: #fcfafb; }
.profile-card--disabled .profile-card__state { background: #fff0f1; color: var(--red); }
.profile-card__actions { display: flex; align-self: stretch; align-items: center; justify-content: flex-end; }
.profile-action-trigger { display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0 0 7px; overflow: hidden; border: 1px solid #cdd8ff; border-radius: 10px; background: #fff; color: var(--blue); font-size: 24px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.profile-action-trigger:hover { border-color: #9eb2f4; background: #f3f6ff; }
.profile-action-trigger:focus-visible { outline: 3px solid rgba(40,88,232,.36); outline-offset: 2px; }
.profile-actions-menu { position: fixed; z-index: 40; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 6px; overflow-y: auto; border: 1px solid #d9e0ef; border-radius: 12px; background: #fff; box-shadow: 0 16px 38px rgba(16,24,40,.18); }
.profile-action-surface { display: grid; gap: 2px; margin-top: 18px; }
.profile-actions-menu .profile-action-surface { margin: 0; }
.profile-action-surface__action { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 650; line-height: 1.25; text-align: left; }
.profile-action-surface__action:hover, .profile-action-surface__action:focus-visible { background: #f3f6ff; outline: 0; }
.profile-action-surface__action--danger { color: var(--red); }
.profile-action-surface__action--danger:hover, .profile-action-surface__action--danger:focus-visible { background: #fff0f1; }
.profile-action-surface__separator { height: 1px; margin: 5px 4px; background: var(--line); }
.profile-actions-sheet { z-index: 30; align-items: end; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.profile-actions-sheet .modal__dialog { width: min(100%, 520px); max-height: min(78dvh, 640px); padding: 20px; overflow-y: auto; text-align: left; border-radius: 18px; }
.profile-actions-sheet .upload-heading { gap: 12px; }
.profile-actions-sheet .upload-heading h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.profile-editor-modal .modal__dialog, .temporary-password-modal .modal__dialog { width: min(100%, 520px); padding: 24px; text-align: left; }
.profile-editor-modal .upload-heading, .temporary-password-modal .upload-heading { gap: 12px; }
.profile-editor-modal .upload-heading h2, .temporary-password-modal .upload-heading h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.profile-editor-modal .modal__field { display: block; margin: 16px 0; }
.profile-editor-modal input[readonly] { background: #f7f8fa; color: #667085; cursor: default; }
.profile-editor-modal .modal__actions--right, .temporary-password-modal .modal__actions--right { display: flex; flex-wrap: wrap; justify-content: stretch; gap: 10px; margin-top: 18px; }
.profile-editor-modal .modal__actions--right .button, .temporary-password-modal .modal__actions--right .button { flex: 1 1 180px; min-height: 44px; }
.temporary-password-value { margin: 18px 0 10px; padding: 13px; overflow-wrap: anywhere; border: 1px solid #cdd8ff; border-radius: 10px; background: #f3f6ff; color: #263b8f; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 750; letter-spacing: .04em; }
.temporary-password-copy-status { min-height: 20px; margin: 9px 0 0; color: var(--green); font-size: 13px; font-weight: 650; }
.temporary-password-warning { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #ead9a2; border-radius: 10px; background: #fffaf0; color: #725d24; font-size: 13px; line-height: 1.4; }
.directory-upload-button { display: inline-flex; align-items: center; justify-content: center; }
.directory-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.directory-upload-button[aria-disabled="true"] { pointer-events: none; opacity: .55; }
.catalog-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 20px 0; }
.catalog-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.catalog-summary dt { color: var(--muted); }
.catalog-summary dd { margin: 0; font-weight: 750; text-align: right; }
.catalog-import-target { display: grid; gap: 10px; margin-top: 18px; }
.catalog-import-target .modal__field { margin: 4px 0 10px; }
.catalog-import-target .radio-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.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-width: 0; min-height: 42px; flex: 1 1 0; color: #fff; }
.document-card .button--export-excel { background: #16803c; }
.document-card .button--export-excel:hover { background: #106b31; }
.document-card .button--export-excel:active { background: #0b5727; }
.document-card .button--export-pdf { background: #a92f38; }
.document-card .button--export-pdf:hover { background: #8d252e; }
.document-card .button--export-pdf:active { background: #741d25; }
.document-card .button:focus-visible { outline: 3px solid #9ec5ff; outline-offset: 2px; }

.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: 1120px; min-height: 68px; margin: auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar__identity { display: grid; gap: 2px; min-width: 0; }
.brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; font-weight: 750; font-size: 18px; }
.topbar__user { min-width: 0; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; overflow-wrap: break-word; word-break: normal; }
.topbar__user-label { font-weight: 600; }
.topbar__user strong { color: var(--ink); }
.topbar__actions { display: flex; flex: 0 0 auto; 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) auto 150px auto; grid-template-rows: auto 46px auto auto; column-gap: 12px; row-gap: 0; align-items: start; margin-top: 22px; }
.receive-form > label { display: contents; }
.receive-product-field > span { grid-column: 1; grid-row: 1; }
.receive-product-field > .product-search { grid-column: 1; grid-row: 2; }
.receive-product-field > .voice-search-tools { grid-column: 2; grid-row: 2; }
.receive-product-field > .voice-search-status { grid-column: 1; grid-row: 4; }
.receive-quantity-field > span { grid-column: 3; grid-row: 1; }
.receive-quantity-field > .quantity-control { grid-column: 3; grid-row: 2; }
.physical-scanner-indicator { grid-column: 2; grid-row: 3; min-width: 0; align-self: start; }
.receive-form__actions { grid-column: 4; grid-row: 2; display: flex; gap: 8px; align-self: start; }
.product-search { position: relative; }
.product-search:has(.product-search__mic:not([hidden])) input { padding-right: 56px; }
.product-search__mic { position: absolute; z-index: 2; top: 50%; right: 3px; display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: #f4f6ff; color: var(--blue); transform: translateY(-50%); transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.product-search__mic svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.product-search__mic:hover, .product-search__mic:focus-visible { background: #e8edff; border-color: currentColor; outline: 2px solid transparent; }
.product-search__mic--listening { background: #fff0f1; color: var(--red); border-color: currentColor; animation: voice-pulse .9s ease-in-out infinite alternate; }
@keyframes voice-pulse { from { box-shadow: 0 0 0 2px rgb(196 40 57 / 18%); } to { box-shadow: 0 0 0 6px rgb(196 40 57 / 8%); } }
@media (prefers-reduced-motion: reduce) { .product-search__mic--listening { animation: none; box-shadow: 0 0 0 3px rgb(196 40 57 / 18%); } .physical-scanner-toggle { transition: none; } }
.voice-search-tools { display: flex; align-items: stretch; min-width: 0; }
.barcode-scan-button { display: none; }
.physical-scanner-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 46px; min-height: 46px; padding: 0 12px; border: 1px solid #bdc9eb; border-radius: 10px; background: #f7f9ff; color: #2446a8; font-weight: 700; white-space: nowrap; transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.physical-scanner-toggle__mobile-label { display: none; }
.physical-scanner-toggle svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.physical-scanner-toggle:hover:not(:disabled) { border-color: #5d7ee8; background: #eef2ff; color: #2446a8; }
.physical-scanner-toggle:focus-visible { outline: 3px solid rgb(36 70 168 / 35%); outline-offset: 2px; }
.physical-scanner-toggle--active { border-color: #5d7ee8; background: #eaf8f2; color: #087a55; box-shadow: 0 0 0 3px rgb(8 122 85 / 12%); }
.physical-scanner-toggle:disabled { cursor: not-allowed; opacity: .55; }
.physical-scanner-indicator__state { display: inline-flex; align-items: center; gap: 4px; color: #087a55; font-size: 13px; font-weight: 750; line-height: 1.25; }
.physical-scanner-help-button { display: grid; place-items: center; width: 20px; min-width: 20px; height: 20px; min-height: 20px; padding: 0; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 800; line-height: 1; }
.physical-scanner-help-button:hover, .physical-scanner-help-button:focus-visible { background: #eaf8f2; box-shadow: 0 0 0 3px rgb(8 122 85 / 14%); outline: 0; }
.physical-scanner-indicator__processing { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.25; }
.voice-search-status { margin: 7px 0 0 !important; color: var(--muted) !important; font-size: 12px; line-height: 1.35; }
.voice-search-status--error { color: var(--red) !important; }
.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--danger-outline:focus-visible { border-color: #d74752; box-shadow: 0 0 0 3px rgb(196 40 57 / 18%); outline: 0; }
.button--danger-outline:active:not(:disabled) { background: #ffe2e4; }
.button--danger-outline:disabled { border-color: #e6d3d5; background: #faf7f7; color: #a78a8d; cursor: not-allowed; opacity: .72; }
.button--finish { background: var(--blue); color: white; }
.button--finish:hover:not(:disabled) { background: var(--blue-dark); }
.button--finish:focus-visible { outline: 3px solid #9ec5ff; outline-offset: 2px; box-shadow: 0 0 0 3px rgb(40 88 232 / 18%); }
.button--finish:active:not(:disabled) { background: #1641b8; }
.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; }
.items-navigation { position: fixed; z-index: 7; top: 50%; right: max(12px, calc((100vw - 1120px) / 2 - 60px)); display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; padding: 5px; border: 1px solid rgb(255 255 255 / 65%); border-radius: 14px; background: rgb(255 255 255 / 62%); box-shadow: 0 8px 24px rgb(16 24 40 / 13%); backdrop-filter: blur(10px); transform: translateY(-50%); }
.items-navigation[hidden], body:has(.modal:not([hidden])) .items-navigation { display: none !important; }
.items-navigation__button { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid rgb(152 162 179 / 45%); border-radius: 10px; background: rgb(255 255 255 / 35%); color: rgb(71 84 103 / 72%); transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.items-navigation__button:hover:not(:disabled), .items-navigation__button:focus-visible:not(:disabled) { border-color: rgb(40 88 232 / 65%); background: rgb(243 246 255 / 88%); color: var(--blue); box-shadow: 0 3px 10px rgb(40 88 232 / 14%); outline: 0; }
.items-navigation__button:active:not(:disabled) { background: rgb(231 237 255 / 96%); }
.items-navigation__button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.items-navigation__button:disabled { opacity: .38; }
.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 { scroll-margin-top: var(--invoice-item-scroll-offset, 12px); }
#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.row--last-accepted { background: #edf9f1; box-shadow: inset 3px 0 #16834a, inset 0 0 0 1px rgb(22 131 74 / 38%); }
#itemsBody tr.row--last-accepted:hover { background: #e4f5ea; }
#itemsBody tr.row--selected.row--last-accepted { background: #e9f2ff; box-shadow: inset 3px 0 var(--blue), inset 0 0 0 2px rgb(22 131 74 / 52%); }
#itemsBody tr.row--search-target { animation: item-search-target 1.4s ease-out; }
@keyframes item-search-target { 0%, 100% { background: white; } 22%, 68% { background: #fff5d6; box-shadow: inset 3px 0 #e7a400; } }
@media (prefers-reduced-motion: reduce) { #itemsBody tr.row--search-target { animation: none; background: #fff5d6; box-shadow: inset 3px 0 #e7a400; } }
#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__actions { display: flex; flex: 0 1 auto; justify-content: flex-end; gap: 10px; min-width: 0; }
.summary__actions:has(#returnToReceivingButton:not([hidden])) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; flex: 0 1 430px; gap: 10px; min-width: 0; }
.summary__actions:has(#returnToReceivingButton:not([hidden])) .button { width: 100%; min-width: 0; min-height: 66px; margin: 0; white-space: normal; }
.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; }
.review-return-modal .modal__dialog { max-height: calc(100dvh - 40px); overflow-y: auto; text-align: left; }
.review-return-modal__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-return-modal__heading h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.review-return-modal__heading .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.catalog-import-progress[hidden] { display: none; }
.catalog-import-progress { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .52); backdrop-filter: blur(2px); }
.catalog-import-progress__card { display: grid; justify-items: center; gap: 14px; width: min(100%, 360px); padding: 25px 24px; border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(16, 24, 40, .28); text-align: center; }
.catalog-import-progress__spinner { width: 34px; height: 34px; border: 4px solid #dce5ff; border-top-color: var(--blue); border-radius: 50%; animation: catalog-import-spin .8s linear infinite; }
.catalog-import-progress p { margin: 0; color: #172033; font-weight: 750; line-height: 1.4; }
@keyframes catalog-import-spin { to { transform: rotate(360deg); } }
.barcode-scan-modal__dialog { width: min(100%, 470px); text-align: left; }
.barcode-scan-view { position: relative; display: grid; place-items: center; min-height: 230px; overflow: hidden; border-radius: 14px; background: #101828; }
.barcode-scan-view video { display: block; width: 100%; max-height: min(58vh, 460px); object-fit: cover; }
.barcode-scan-frame { position: absolute; width: min(76%, 310px); aspect-ratio: 1.9; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 999px rgb(0 0 0 / 24%); pointer-events: none; }
.barcode-scan-frame::before, .barcode-scan-frame::after { position: absolute; width: 26px; height: 26px; content: ""; border-color: #9ff5bf; }
.barcode-scan-frame::before { top: -3px; left: -3px; border-top: 4px solid; border-left: 4px solid; border-radius: 8px 0 0; }
.barcode-scan-frame::after { right: -3px; bottom: -3px; border-right: 4px solid; border-bottom: 4px solid; border-radius: 0 0 8px; }
.barcode-scan-status { margin: 13px 0 0 !important; color: var(--muted) !important; font-size: 13px; }
.barcode-match-product { margin: 18px 0; padding: 14px; border: 1px solid #c9ddcf; border-radius: 12px; background: #f7fcf8; text-align: left; }
.barcode-match-product strong, .barcode-match-product span { display: block; }
.barcode-match-product span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.barcode-match-modal__dialog { text-align: left; }
.barcode-match-modal__dialog .upload-heading p { max-width: 34em; }
.barcode-match-modal__dialog .icon-button { width: 44px; min-width: 44px; height: 44px; }
.barcode-match-product__name { color: var(--ink); font-size: 16px; line-height: 1.35; }
.barcode-match-product__article { margin-top: 7px !important; font-size: 13px !important; }
.barcode-match-product__article-label { color: var(--muted); font-weight: 400; }
.barcode-match-product__article-value { color: var(--ink); font-weight: 750; }
.barcode-match-product__package { margin-top: 7px !important; padding-top: 7px; border-top: 1px solid #dceade; font-size: 12px !important; }
.barcode-match-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; align-items: stretch; gap: 8px; }
.barcode-match-actions .button { width: 100%; min-width: 0; min-height: 44px; }
.barcode-match-actions__confirm, .barcode-match-actions__next { white-space: nowrap; }
.barcode-match-actions__cancel { order: 3; }
.physical-scanner-help-modal__dialog { width: min(100%, 440px); padding: 24px; text-align: left; }
.physical-scanner-help-modal__dialog .upload-heading { gap: 12px; }
.physical-scanner-help-modal__dialog .upload-heading h2 { font-size: 20px; line-height: 1.2; }
.physical-scanner-help-modal__dialog .upload-heading p { margin: 5px 0 0; font-size: 13px; line-height: 1.35; }
.physical-scanner-help-modal__dialog .icon-button { width: 44px; min-width: 44px; height: 44px; }
.physical-scanner-help-modal__dialog ul { display: grid; gap: 9px; margin: 18px 0 0; padding-left: 20px; color: #475467; font-size: 13px; line-height: 1.4; }
.physical-scanner-help-modal__dialog li::marker { color: #087a55; }
.barcode-match-candidates { display: grid; gap: 8px; margin: 18px 0; text-align: left; }
.barcode-match-candidates > p { margin: 0 0 2px; font-size: 13px; }
.barcode-match-candidate { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-align: left; }
.barcode-match-candidate:hover, .barcode-match-candidate:focus-visible { border-color: var(--blue); background: #f3f6ff; outline: 0; }
.barcode-match-candidate strong, .barcode-match-candidate span { display: block; }
.barcode-match-candidate span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.barcode-binding-modal__dialog { width: min(100%, 500px); text-align: left; }
.barcode-binding-code { margin: 14px 0 !important; padding: 10px 12px; border: 1px solid #d9e0ef; border-radius: 10px; background: #f7f9ff; color: #344054 !important; font-size: 13px; }
.barcode-binding-code strong { color: var(--ink); overflow-wrap: anywhere; }
.barcode-binding-create { max-width: 100%; margin: -8px 0 4px; color: var(--blue); font-size: 13px; font-weight: 700; line-height: 1.35; text-align: left; text-decoration: underline; white-space: normal; }
.barcode-binding-search .product-search__mic { display: grid; }
.barcode-binding-actions { grid-template-columns: 1fr 1fr; }
.barcode-binding-actions #saveBarcodeBindingButton { grid-column: 1 / -1; }
.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); }
.upload-heading__actions { display: flex; align-items: flex-start; gap: 8px; }
.icon-button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f3f6; color: var(--muted); font-size: 25px; line-height: 1; }
.catalog-delete-modal .modal__dialog { width: min(100%, 480px); padding: 24px; text-align: left; }
.catalog-delete-modal .upload-heading { gap: 12px; }
.catalog-delete-modal .upload-heading h2 { margin: 0; font-size: 23px; line-height: 1.2; }
.catalog-delete-modal #catalogDeleteDescription { margin: 8px 0 16px; padding: 8px 10px; border: 1px solid #ead9a2; border-radius: 9px; background: #fffaf0; color: #725d24; font-size: 13px; line-height: 1.35; }
.catalog-delete-modal .field { display: block; margin: 12px 0 0; text-align: left; }
.catalog-delete-modal .field > span { margin-bottom: 6px; }
.catalog-delete-modal .modal__actions--right { display: flex; flex-wrap: wrap; justify-content: stretch; gap: 10px; margin-top: 20px; }
.catalog-delete-modal .modal__actions--right .button { flex: 1 1 180px; min-width: 180px; white-space: nowrap; }
.catalog-delete-modal #confirmCatalogDeleteButton { order: 1; }
.catalog-delete-modal .modal__actions--right [data-close-catalog-delete] { order: 2; }
.catalog-clear-modal .modal__dialog, .catalog-import-modal .modal__dialog, .catalog-export-modal .modal__dialog { width: min(100%, 560px); padding: 24px; text-align: left; }
.catalog-clear-modal .upload-heading, .catalog-import-modal .upload-heading, .catalog-export-modal .upload-heading { gap: 12px; }
.catalog-clear-modal .upload-heading h2, .catalog-import-modal .upload-heading h2, .catalog-export-modal .upload-heading h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.catalog-clear-modal #catalogClearDescription, .catalog-import-modal #catalogImportDescription, .catalog-export-modal #catalogExportDescription { margin: 8px 0 16px; padding: 8px 10px; border: 1px solid #d9e0ef; border-radius: 9px; background: #f7f9ff; color: #475467; font-size: 13px; line-height: 1.35; }
.catalog-clear-modal .field, .catalog-export-modal .field { display: block; margin: 12px 0 0; text-align: left; }
.catalog-clear-modal .field > span { margin-bottom: 6px; }
.catalog-import-modal .catalog-import-target { gap: 10px; margin-top: 14px; min-width: 0; }
.catalog-import-modal .radio-option { min-width: 0; padding: 10px 12px; align-items: flex-start; text-align: left; }
.catalog-import-modal .radio-option span { min-width: 0; }
.catalog-import-modal .modal__field { display: grid; gap: 6px; min-width: 0; margin: 2px 0 4px; color: #344054; font-size: 13px; font-weight: 650; text-align: left; }
.catalog-import-modal .modal__field input, .catalog-import-modal .modal__field select { min-width: 0; }
.catalog-import-modal .catalog-summary { margin: 16px 0; text-align: left; }
.catalog-import-modal .catalog-summary__primary { padding: 11px 12px; border: 1px solid #cdd8ff; border-radius: 10px; background: #f3f6ff; }
.catalog-import-modal .catalog-summary__primary dt { color: #263b8f; font-weight: 700; }
.catalog-import-modal .catalog-summary__primary dd { color: #263b8f; }
.catalog-import-modal .catalog-import-safety-note { margin: 10px 0 4px; color: var(--muted); font-size: 13px; line-height: 1.4; text-align: left; }
.catalog-import-modal .catalog-import-reasons-toggle { display: inline-flex; min-width: 44px; min-height: 44px; margin: 2px 0 0; padding: 8px 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 13px; font-weight: 650; text-align: left; text-decoration: underline; cursor: pointer; }
.catalog-import-modal .catalog-import-reasons-toggle:focus-visible { outline: 3px solid rgba(55, 84, 190, .35); outline-offset: 2px; border-radius: 4px; }
.catalog-import-modal .catalog-import-reasons { display: grid; gap: 6px; max-height: min(28vh, 180px); margin: 4px 0 0; padding: 9px 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; background: #fafbfe; color: #475467; font-size: 13px; text-align: left; }
.catalog-import-modal .catalog-import-reasons div { display: flex; min-width: 0; justify-content: space-between; gap: 12px; }
.catalog-import-modal .catalog-import-reasons span { min-width: 0; overflow-wrap: anywhere; }
.catalog-import-modal .catalog-import-reasons strong { flex: none; color: var(--ink); }
.catalog-import-modal .catalog-import-file-control { display: grid; min-width: 0; flex: 1 1 180px; gap: 4px; }
.catalog-import-modal .catalog-import-file-control .button { width: 100%; }
.catalog-import-modal .catalog-import-file-hint { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; text-align: left; }
.catalog-import-modal .modal__actions--right, .catalog-clear-modal .modal__actions--right, .catalog-export-modal .modal__actions--right { display: flex; flex-wrap: wrap; justify-content: stretch; gap: 10px; margin-top: 18px; }
.catalog-import-modal .modal__actions--right .button, .catalog-clear-modal .modal__actions--right .button, .catalog-export-modal .modal__actions--right .button { flex: 1 1 180px; min-width: 180px; white-space: nowrap; }
.catalog-import-modal .modal__actions--right [data-close-catalog-import], .catalog-clear-modal .modal__actions--right [data-close-catalog-clear], .catalog-export-modal .modal__actions--right [data-close-catalog-export] { order: 3; }
.catalog-import-modal .catalog-import-actions { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 7px; }
.catalog-import-modal .catalog-import-buttons { display: flex; min-width: 0; align-items: stretch; gap: 10px; }
.catalog-import-modal .catalog-import-buttons .button { flex: 1 1 0; min-width: 0; min-height: 46px; white-space: nowrap; }
.catalog-import-modal .catalog-import-file-hint { display: block; width: 100%; min-width: 0; overflow-wrap: normal; text-wrap: pretty; }
.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; }
.invoice-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.invoice-source-grid--excel-only { grid-template-columns: minmax(0, 1fr); }
.invoice-source-grid .drop-zone { width: 100%; margin-top: 22px; box-sizing: border-box; }
.upload-source-reset { margin-top: 18px; text-align: center; }
.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__identity { display: grid; width: 100%; min-width: 0; gap: 2px; }
  .topbar .brand { width: 100%; font-size: 16px; }
  .topbar__user { width: 100%; font-size: 13px; }
  .topbar__actions { width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
  .topbar__actions .button { min-height: 42px; padding: 0 12px; white-space: nowrap; }
  #openUploadButton { flex: 1 0 100%; }
  #openAccountButton, #logoutButton { flex: 0 0 auto; }
  .home-heading { display: block; }
  .acceptance-filters { align-items: stretch; flex-wrap: wrap; }
  .acceptance-filters__label { align-self: center; }
  .acceptance-filters__quick { flex: 1 1 auto; }
  .acceptance-filter-button { flex: 1 1 0; min-height: 44px; }
  .employee-filter { flex: 1 1 100%; }
  .employee-filter__trigger { width: 100%; max-width: none; }
  .employee-filter__popover { position: fixed; z-index: 50; top: auto; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); width: auto; max-height: min(72dvh, 520px); padding: 12px; }
  .employee-filter__list { max-height: min(44dvh, 310px); }
  .employee-filter__option { min-height: 44px; }
  .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; }
  .directory-settings { margin-top: 16px; padding: 14px; }
  .directory-settings__actions { display: grid; grid-template-columns: 1fr; }
  .directory-settings__actions .button { width: 100%; min-height: 44px; }
  .profile-management { margin-top: 16px; padding: 14px; }
  .profile-management__heading { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .profile-management__heading .button { width: 100%; min-width: 0; min-height: 44px; }
  .profile-card { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 13px; }
  .profile-card__actions { display: flex; align-items: center; }
  .profile-actions-menu { display: none !important; }
  .profile-actions-sheet .modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 16px 16px 12px 12px; }
  .profile-actions-sheet .profile-action-surface { gap: 6px; margin-top: 16px; }
  .profile-actions-sheet .profile-action-surface__action { min-height: 48px; padding: 12px; }
  .profile-editor-modal, .temporary-password-modal { align-items: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .profile-editor-modal .modal__dialog, .temporary-password-modal .modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .profile-editor-modal .icon-button, .temporary-password-modal .icon-button { width: 42px; min-width: 42px; height: 42px; font-size: 23px; }
  .profile-editor-modal .modal__actions--right, .temporary-password-modal .modal__actions--right { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .profile-editor-modal .modal__actions--right .button, .temporary-password-modal .modal__actions--right .button { width: 100%; min-width: 0; min-height: 44px; }
  .temporary-password-value { font-size: 16px; }
  .catalog-summary { grid-template-columns: 1fr; }
  .catalog-import-progress__card { width: min(100%, 340px); padding: 22px 18px; }
  .documents-grid { grid-template-columns: 1fr; gap: 10px; }
  .document-card { padding: 13px; }
  .document-card > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-card .button { width: 100%; 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: 32px; padding-right: 0; align-items: center; }
  .receive-card__intro .step, .receive-card__intro p { display: none; }
  .receive-card__intro h2 { overflow: hidden; font-size: 0; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .receive-card__intro h2::after { content: "Добавить товар"; font-size: 16px; }
  .receive-form { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto auto auto; gap: 8px; margin-top: 8px; }
  .receive-product-field > span, .receive-quantity-field > span { display: none; }
  .receive-product-field > .product-search { grid-column: 1; grid-row: 1; min-width: 0; }
  .receive-product-field > .product-search input { padding-right: 54px; padding-left: 8px; font-size: 12px; }
  .receive-product-field > .voice-search-tools { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; min-width: 0; width: 100%; }
  .receive-product-field > .voice-search-status { grid-column: 1; grid-row: 5; }
  .receive-quantity-field > .quantity-control { grid-column: 1; grid-row: 4; }
  .physical-scanner-indicator { grid-column: 1; grid-row: 3; min-width: 0; }
  .receive-form input { height: 42px; }
  .receive-form .button { min-height: 42px; padding: 0 12px; }
  .voice-search-tools { display: flex; margin: 0; }
  .barcode-scan-button, .physical-scanner-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 0; height: 48px; min-height: 48px; padding: 0 10px; border: 1px solid #bdc9eb; border-radius: 10px; }
  .barcode-scan-button { background: #f7f9ff; color: #2446a8; }
  .barcode-scan-button svg, .physical-scanner-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .barcode-scan-button__label, .physical-scanner-toggle__mobile-label { display: inline; font-size: 12px; font-weight: 700; white-space: nowrap; }
  .physical-scanner-toggle__label { display: none; }
  .physical-scanner-toggle[aria-pressed="true"], .physical-scanner-toggle--active { border-color: #5d7ee8; background: #eaf8f2; color: #087a55; box-shadow: 0 0 0 3px rgb(8 122 85 / 12%); }
  .physical-scanner-indicator__state { font-size: 13px; }
  .physical-scanner-help-button { width: 20px; min-width: 20px; height: 20px; min-height: 20px; }
  .barcode-scan-modal { place-items: stretch; height: 100dvh; min-height: 100svh; padding: 0; overflow: hidden; }
  .barcode-scan-modal__dialog { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; width: 100%; height: 100dvh; min-height: 100svh; max-height: none; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); border-radius: 0; overflow: hidden; }
  .barcode-scan-modal .upload-heading { align-items: center; gap: 8px; min-height: 48px; }
  .barcode-scan-modal .upload-heading h2 { font-size: 18px; }
  .barcode-scan-modal .upload-heading p { max-width: 240px; margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .barcode-scan-modal .icon-button { width: 48px; min-width: 48px; height: 48px; padding: 0; font-size: 30px; }
  .barcode-scan-view { min-height: 0; height: 100%; border-radius: 12px; }
  .barcode-scan-view video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .barcode-scan-frame { width: min(84vw, 360px); max-width: calc(100% - 28px); }
  .barcode-scan-status { min-height: 20px; margin: 0 !important; overflow: hidden; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .barcode-binding-modal { align-items: end; padding: 0; }
  .barcode-binding-modal__dialog { width: 100%; max-height: min(90dvh, 760px); padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0; overflow-y: auto; }
  .barcode-binding-modal .upload-heading { gap: 10px; }
  .barcode-binding-modal .upload-heading h2 { font-size: 18px; }
  .barcode-binding-modal .upload-heading p { margin: 4px 0 0; font-size: 13px; line-height: 1.35; }
  .barcode-binding-modal .modal__field { margin: 14px 0; }
  .barcode-binding-modal input, .barcode-binding-modal select { min-width: 0; }
  .barcode-binding-actions .button { min-width: 0; min-height: 44px; padding: 0 8px; font-size: 12px; }
  .barcode-match-modal { align-items: end; padding: 0; }
  .barcode-match-modal__dialog { display: flex; flex-direction: column; width: 100%; max-height: min(100dvh, 760px); margin: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0; overflow: hidden; }
  .barcode-match-modal__heading { align-items: flex-start; gap: 10px; }
  .barcode-match-modal__heading .eyebrow { margin-bottom: 3px; font-size: 11px; }
  .barcode-match-modal__heading h2 { font-size: 18px; line-height: 1.2; }
  .barcode-match-modal__heading p { margin: 4px 0 0; font-size: 13px; line-height: 1.3; }
  .barcode-match-modal__heading .icon-button { flex: 0 0 44px; }
  .barcode-match-modal .barcode-match-product { margin: 12px 0; padding: 11px 12px; }
  .barcode-match-modal .barcode-match-product__name { display: -webkit-box; overflow: hidden; font-size: 15px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .barcode-match-modal .barcode-match-product__article, .barcode-match-modal .barcode-match-product__package { font-size: 12px !important; }
  .barcode-match-modal .barcode-match-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 4px; }
  .barcode-match-modal .barcode-match-actions .button { width: 100%; min-height: 46px; }
  .barcode-match-modal .barcode-match-actions__confirm { order: 1; }
  .barcode-match-modal .barcode-match-actions__next { order: 2; }
  .barcode-match-modal .barcode-match-actions__cancel { order: 3; min-height: 40px !important; border: 0; background: transparent; color: var(--muted); }
  .physical-scanner-help-modal { padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .physical-scanner-help-modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px; overflow-y: auto; }
  .physical-scanner-help-modal__dialog ul { margin-top: 14px; }
  .receive-form__actions { grid-column: 1 / -1; grid-row: 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .receive-form__actions .button { min-width: 0; padding: 0 8px; font-size: 12px; }
  .receive-card .hint { display: block; margin: 8px 0 0; font-size: 11px; line-height: 1.35; }
  .section-title { align-items: flex-start; }
  .items-navigation { top: 50%; right: calc(8px + env(safe-area-inset-right, 0px)); max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); transition: opacity .2s ease, transform .2s ease; }
  .items-navigation--mobile-hidden { pointer-events: none; opacity: 0; transform: translate3d(8px, -50%, 0); }
  .items-navigation--mobile-hidden:focus-within { pointer-events: auto; opacity: 1; transform: translate3d(0, -50%, 0); }
  .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__actions { margin-top: 20px; }
  .summary__actions:has(#returnToReceivingButton:not([hidden])) { grid-template-columns: minmax(0, 1fr); width: 100%; flex: none; gap: 8px; }
  .review-return-modal { align-items: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .review-return-modal .modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px; }
  .review-return-modal__heading h2 { font-size: 20px; }
  .review-return-modal .modal__actions { grid-template-columns: 1fr; }
  .review-return-modal .modal__actions .button { min-height: 44px; }
  .toast { right: 16px; bottom: 16px; max-width: calc(100% - 32px); }
  .catalog-delete-modal { align-items: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)); }
  .catalog-delete-modal .modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .catalog-delete-modal .upload-heading { gap: 8px; }
  .catalog-delete-modal .upload-heading h2 { font-size: 20px; }
  .catalog-delete-modal .icon-button { width: 42px; min-width: 42px; height: 42px; font-size: 23px; }
  .catalog-delete-modal #catalogDeleteDescription { margin: 7px 0 14px; padding: 7px 9px; }
  .catalog-delete-modal .field { margin-top: 10px; }
  .catalog-delete-modal .modal__actions--right { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .catalog-delete-modal .modal__actions--right .button { width: 100%; min-width: 0; min-height: 44px; }
  .catalog-delete-modal #confirmCatalogDeleteButton { order: 1; }
  .catalog-delete-modal .modal__actions--right [data-close-catalog-delete] { order: 2; }
  .catalog-clear-modal, .catalog-import-modal, .catalog-export-modal { align-items: center; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)); }
  .catalog-clear-modal .modal__dialog, .catalog-import-modal .modal__dialog, .catalog-export-modal .modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .catalog-clear-modal .upload-heading, .catalog-import-modal .upload-heading, .catalog-export-modal .upload-heading { gap: 8px; }
  .catalog-clear-modal .upload-heading h2, .catalog-import-modal .upload-heading h2, .catalog-export-modal .upload-heading h2 { font-size: 20px; }
  .catalog-clear-modal .icon-button, .catalog-import-modal .icon-button, .catalog-export-modal .icon-button { width: 42px; min-width: 42px; height: 42px; font-size: 23px; }
  .catalog-clear-modal #catalogClearDescription, .catalog-import-modal #catalogImportDescription, .catalog-export-modal #catalogExportDescription { margin: 6px 0 12px; padding: 7px 9px; }
  .catalog-import-modal .catalog-import-target { margin-top: 10px; }
  .catalog-import-modal .catalog-import-buttons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .catalog-import-modal .catalog-import-buttons .button { width: 100%; min-width: 0; min-height: 44px; }
  .catalog-import-modal .catalog-import-file-hint { width: 100%; min-width: 0; overflow-wrap: normal; text-wrap: pretty; }
  .catalog-import-modal .catalog-import-reasons { max-height: min(24dvh, 180px); }
  .catalog-clear-modal .field, .catalog-export-modal .field { margin-top: 10px; }
  .catalog-import-modal .modal__actions--right, .catalog-clear-modal .modal__actions--right, .catalog-export-modal .modal__actions--right { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .catalog-import-modal .modal__actions--right .button, .catalog-clear-modal .modal__actions--right .button, .catalog-export-modal .modal__actions--right .button { width: 100%; min-width: 0; min-height: 44px; }
  .catalog-import-modal .modal__actions--right [data-close-catalog-import], .catalog-clear-modal .modal__actions--right [data-close-catalog-clear], .catalog-export-modal .modal__actions--right [data-close-catalog-export] { order: 3; }
  .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; }
  .invoice-source-grid { grid-template-columns: 1fr; gap: 0; }
  .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; }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .items-navigation { transition: none; }
}

@media (min-width: 721px) {
  .product-search__option--keyboard-active, .product-search__option--keyboard-active:hover, .product-search__option--keyboard-active:focus { background: #e8edff; box-shadow: inset 3px 0 0 var(--blue); outline: 0; }
  #confirmModal .modal__actions .confirm-modal__action--keyboard-selected { outline: 3px solid rgb(47 91 234 / 45%); outline-offset: 2px; box-shadow: 0 0 0 4px rgb(47 91 234 / 14%); }
  .barcode-match-modal__dialog { width: min(100%, 580px); }
  .barcode-match-modal__heading { position: relative; padding-right: 56px; }
  .barcode-match-modal__heading .icon-button { position: absolute; top: 0; right: 0; width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .barcode-match-modal .barcode-match-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
  .barcode-match-modal .barcode-match-actions .button { grid-column: 1; width: 100%; min-width: 0; }
  #barcodeScanModal { display: none !important; }
}

/* Keep the enabled scanner's semantic green palette through pointer and keyboard interaction. */
.physical-scanner-toggle--active,
.physical-scanner-toggle--active:hover,
.physical-scanner-toggle--active:focus,
.physical-scanner-toggle--active:focus-visible,
.physical-scanner-toggle--active:active,
.physical-scanner-toggle[aria-pressed="true"],
.physical-scanner-toggle[aria-pressed="true"]:hover,
.physical-scanner-toggle[aria-pressed="true"]:focus,
.physical-scanner-toggle[aria-pressed="true"]:focus-visible,
.physical-scanner-toggle[aria-pressed="true"]:active { border-color: #5d7ee8; background: #eaf8f2; color: #087a55; box-shadow: 0 0 0 3px rgb(8 122 85 / 12%); }

.draft-lease-notice { margin-top: 16px; padding: 14px 16px; border: 1px solid #d6a84a; border-radius: 12px; background: #fff8e6; color: #5b4318; }
.draft-lease-notice p { margin: 0 0 12px; }
.draft-lease-notice .button { min-height: 44px; }
.collaboration-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.collaboration-count { margin: -4px 0 12px; font-weight: 700; }
.collaboration-requests { display: grid; gap: 10px; margin-top: 14px; }
.collaboration-request { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 12px; border-top: 1px solid #e6d7b2; }
.collaboration-request__text { flex: 1 1 220px; }
.collaboration-request__actions { display: flex; gap: 8px; }
