.receive-head,.receive-counts,.receive-import{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}.receive-head{justify-content:space-between}.receive-head h2{overflow-wrap:anywhere}.receive-import{margin:1rem 0}.receive-import input{max-width:100%}.receive-counts{margin:1rem 0}.receive-counts span{border-radius:8px;padding:.45rem .7rem;background:var(--tint,#f0f2ef)}.receive-scroll{overflow:auto}.receive-table{width:100%;border-collapse:collapse;text-align:left}.receive-table th,.receive-table td{padding:.5rem;text-align:left;border:1px solid #d0d8d3}.receive-table th{background:#edf3ee}.receive-table th button{padding:.3rem .5rem}.receive-table .dept,.receive-table .product{background:var(--tint,transparent)}.receive-table .product{min-width:12rem;white-space:normal}.receive-table input[type=checkbox]{width:1.25rem;height:1.25rem}.receive-table input[type=text]{width:10.5rem}.receive-table .marked{background:#ffe2e2;color:#9a1820}.receipt-list a{color:#195e44;font-weight:bold;overflow-wrap:anywhere}.receive-table th select{display:block;margin-top:.35rem}.receive-note{color:#4d6156}.receive-table td.num{font-variant-numeric:tabular-nums}

.receive-import{display:grid;grid-template-columns:minmax(0,auto) auto;justify-content:start;align-items:stretch;gap:5px 8px}
.receive-import label{grid-column:1/-1;margin:0}
.receive-import input,.receive-import button{box-sizing:border-box;height:44px;min-width:0;margin:0;align-self:stretch}
.receive-import input{width:100%}


.receive-table th.receipt-qty{width:1%;white-space:nowrap}
.receive-table button.receipt-copy{position:relative;display:inline-block;vertical-align:middle;width:30px;height:28px;min-height:28px;padding:0;margin-inline-start:.6em;border:0;background:transparent;color:#285943;cursor:pointer}
.receipt-copy::before,.receipt-copy::after{content:"";position:absolute;width:11px;height:14px;border:1.6px solid currentColor;border-radius:3px}
.receipt-copy::before{left:5px;top:3px;background:#baddbf;transform:rotate(-8deg)}
.receipt-copy::after{left:10px;top:7px;background:#fffdf2}
.receipt-copy.copied::before{display:none}
.receipt-copy.copied::after{content:"✓";inset:0;width:auto;height:auto;border:0;background:transparent;color:#176c49;font:bold 20px/28px system-ui}

.barcode-controls{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.receive-table .barcode-controls input[type=text]{box-sizing:content-box;width:15ch;min-width:0;padding-inline:.4em;margin:0;font-variant-numeric:tabular-nums}
.receive-table .barcode-controls button{flex:none;margin:0}

.receipt-list .receive-table :is(th,td):not(:nth-child(2)){width:1%;white-space:nowrap}

.receipt-tabs{display:flex;gap:.4rem;margin:1rem 0}
.receipt-tabs [aria-pressed=true]{background:#195e44;color:white}
.receipt-list input:disabled{opacity:.65;filter:grayscale(1)}

.receipt-tools{display:inline-flex;align-items:center;gap:.35rem}
.receive-table .receipt-match{background:transparent;border:0;min-height:26px;padding:0 .25rem;line-height:1;font-size:18px}
.receive-table .receipt-match,.receipt-actual{color:#ac1929}
.receipt-actual{display:block}
.receipt-tip{position:fixed;inset:auto;margin:0;background:#24382f;color:white;padding:.4rem .65rem;border:0;border-radius:6px;max-width:min(28rem,88vw);max-height:min(20rem,calc(100vh - 12px));overflow:auto;overflow-wrap:anywhere}
.receipt-tip dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .8rem;margin:.4rem 0 0}
.receipt-tip dd{margin:0;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.receipt-tip.product-stock-tip{background:rgb(224 242 230 / 92%);color:#284c3f;box-shadow:0 2px 6px #30524726;pointer-events:none}
.product-stock-tip dl{margin:0}
.receipt-editor label{display:grid;gap:.4rem;margin-bottom:.8rem}
.receipt-split-editor textarea{box-sizing:border-box;width:100%;resize:vertical;font:inherit}
.receipt-split-editor .receipt-whole-defect{display:flex;align-items:center}
.receipt-split-editor [role=alert]:empty{display:none}
.receive-table tfoot input{width:100%;box-sizing:border-box;min-width:5ch}
.receive-counts span[title]{white-space:nowrap}

.receive-table .receipt-line{width:1%;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;color:#56655b}
.receive-table td.num{padding:0;cursor:pointer}
.receive-table .receipt-value{display:block;width:100%;padding:.5rem;text-align:left;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.receive-table :is(.receipt-print,.receipt-pen){display:inline-grid;place-items:center;width:30px;height:28px;min-height:28px;padding:0;border:0;background:transparent;color:#315440}
.receive-table td.print-needed,.receive-table td.print-needed input{background:#ffd1d1}
.receive-table td.print-needed .receipt-print{color:#a11625;background:#ffb3b3}
.receive-table .receipt-print-heading{padding:0}
.receive-table .receipt-print-heading button{width:auto;padding:.3rem .5rem;white-space:nowrap}
.receive-counts button[data-filter]{padding:.45rem .7rem;background:#eef1ee;color:#24382f;border:1px solid #c9d2cc}
.receive-counts button[aria-pressed=true]{background:#dcebe1;border-color:#4c7359}

.receive-body .receive-table thead th{text-align:center}
.receive-body .receive-table thead select{margin-inline:auto}
.receipt-title,.receive-head .receipt-tools{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.receipt-title h2{margin:0}.receipt-title time{color:#506358;font-size:.9rem}
.receipt-claim:not([hidden]){display:inline-flex;align-items:center;gap:.4rem;border:1px solid #c9d2cc;border-radius:8px;padding:.4rem .65rem;margin:0;cursor:pointer;white-space:nowrap}
.receipt-claim input{width:1rem;height:1rem;margin:0}
.receipt-claim:has(input:disabled){opacity:.6;cursor:default}
.receive-table td.manual-needed,.receive-table td.manual-needed input{background:#d9eaff}
.receive-table td.manual-needed .receipt-pen{color:#154981;background:#b9d6fa}

.receive-counts .dept-total{display:block;line-height:1.25;font-variant-numeric:tabular-nums}
.dept-total strong{display:block;margin-top:.22rem;font-size:.9em}
.dept-total small{font-size:.9em}

.receipt-symbol { display:inline-block; font:700 1.12rem/1 system-ui; }
.receive-counts .receipt-symbol { padding:0; background:none; border-radius:0; }
.receipt-symbol[data-kind=accepted] { color:#217142; }
.receipt-symbol[data-kind=pending] { color:#af2438; }
.receipt-symbol[data-kind="Брак"] { color:#985500; background:#fff0ad; border-radius:4px; padding:.12em; }
.receive-counts .receipt-symbol[data-kind="Брак"] { color:#985500; background:#fff0ad; padding:.12em; }
.receipt-list .receive-table thead th:has(.receipt-symbol) { text-align:center; }
.receive-import label small { font-weight:400; color:#4d6156; }

/* Receipt readability; status colors and print marks remain visible. */
.receive-table tbody tr:nth-child(even){background:#f1f3f1}
.receive-table tbody:not(.receipt-invoice-rows) tr:hover>td,.receive-table tbody:not(.receipt-invoice-rows) tr:focus-within>td{box-shadow:inset 0 0 0 9999px rgba(25,94,68,.075)}
.receive-counts{gap:.45rem}
.receive-counts button.dept-total{background:var(--tint);padding:.35rem .5rem;text-align:left}
.receive-counts button.dept-total[aria-pressed=true]{outline:2px solid #195e44;outline-offset:1px}
.receive-counts .dept-label{display:inline;padding:0;margin-right:.3em;background:none;font-size:.67em;border-radius:0}
.receive-counts button[data-filter]:focus-visible{outline:2px solid #195e44;outline-offset:2px}
.receive-counts button[data-filter="Брак"]{background:#f4dada}
.receive-counts button[data-filter="Инвент"]{background:#e6dcf4}
.receipt-symbol[data-kind="Инвент"]{color:#63498a}

/* Content-sized receipt summary: five statuses, then four departments. */
.receive-counts{display:grid;justify-items:start;gap:6px;margin:10px 0;width:100%;max-width:100%}
.receipt-primary,.receipt-departments{display:flex;flex-wrap:wrap;gap:6px;min-width:0;max-width:100%;align-items:stretch}
.receive-counts button[data-filter]{box-sizing:border-box;flex:0 0 auto;width:auto;margin:0;min-width:0;border-radius:7px;font-size:13px;line-height:1.2}
.receive-counts button[data-filter]:hover{box-shadow:0 2px 5px #173f3b18}
.receipt-primary button{display:flex;align-items:center;gap:3px;min-height:32px;text-align:left;padding:4px 6px!important;white-space:nowrap}
.receive-counts .receipt-symbol{display:inline-flex;align-items:center;justify-content:center;padding:0!important;background:none!important;border-radius:0;flex:none}
.receipt-symbol svg{display:block;width:20px;height:20px}
.receive-counts .receipt-stat-label{padding:0;background:none;border-radius:0;font-size:12px;white-space:nowrap}
.receipt-primary b{margin:0;font-size:14px;font-variant-numeric:tabular-nums;line-height:1.15}
.receive-counts button.dept-total{min-height:0;padding:5px 7px;line-height:1.2;text-align:left}
.receive-counts .dept-label{display:block;font-size:12px;margin:0 0 2px;padding:0;white-space:nowrap}
.receive-counts .dept-total strong{display:block;margin-top:2px;font-size:13px;overflow-wrap:anywhere}
.receive-counts button[aria-pressed=true]{outline:2px solid #195e44;outline-offset:1px}

.receipt-invoice-rows tr.receipt-selected>td{box-shadow:inset 0 0 0 9999px rgba(47,56,61,.18)}
.receipt-invoice-rows tr.receipt-selected>td:first-child{border-left:3px solid #596269}
.barcode-controls [data-remove-line]{color:#a53131}
