/* A material row opens compact, separate receipt batches. */
.inventory-panel{--inventory-line:#e0e8ec;border-color:var(--inventory-line);border-radius:12px}
.inventory-panel .inventory-toolbar{padding:13px 18px;background:#fff}
.inventory-panel .inventory-filters{width:100%;justify-content:space-between;gap:12px}
.inventory-panel .inventory-filters>input,.inventory-panel .inventory-filters>.search-combobox{width:300px;max-width:100%}
.inventory-history-tools{display:flex;align-items:center;gap:16px}
.inventory-panel .inventory-table>thead>tr>th{font-size:12px;font-weight:500;background:#f1f5f7;color:#708690;padding:12px 18px;border-color:var(--inventory-line)}
.inventory-panel .inventory-row>td{height:55px;padding:10px 18px;border-color:var(--inventory-line);transition:background-color 180ms}
.inventory-panel .inventory-row>td:nth-child(1){background:#f6f9fb}
.inventory-panel .inventory-row>td:nth-child(2){background:#fff}
.inventory-panel .inventory-row>td:nth-child(3){background:#f4f9f8}
.inventory-panel .inventory-row>td:nth-child(4){background:#fafcfd}
.inventory-panel .inventory-row>td:nth-child(5){background:#f7f9fb}
.inventory-panel .inventory-row:hover>td{background:#edf4f5;box-shadow:none}
.inventory-panel .inventory-row.is-expanded>td{background:#e9f1f4;border-bottom:1px solid #cbdce3}
.inventory-panel .inventory-row.is-expanded>td:first-child{box-shadow:inset 3px 0 #527a89}
.inventory-panel .inventory-row .grade-value{font-size:14px;color:#3d5968;font-weight:600}
.inventory-panel .inventory-row .spec-value{font-size:16px;font-weight:600;letter-spacing:.1px;color:#294c58}
.inventory-panel .inventory-row .stock-quantity{font-size:18px;font-weight:600;color:#294e5b;letter-spacing:.2px}
.inventory-panel .inventory-row .batch-value{font-size:14px;font-weight:500}
.inventory-panel .inventory-row .date-value{font-size:13px;color:#68818c;font-variant-numeric:tabular-nums}
.inventory-panel .expand-chevron{font-size:19px;width:22px;color:#839ca7}
.inventory-panel .batch-drawer{padding:16px;background:#f0f4f6;border-bottom:1px solid #d2dfe5}
.inventory-panel .batch-card{margin:0 0 12px;border:1px solid #dce6ea;border-radius:9px;box-shadow:0 2px 4px #29495403;scroll-margin-top:18px}
.inventory-panel .batch-card:last-child{margin-bottom:0}
.active-batches+.batch-archive{margin-top:12px}
.historical-batch-doc{max-width:145px;font-size:10px;color:#93a3ab;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.history-review-stats{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.history-review-stats>span{padding:10px 14px;border:1px solid #e0e8eb;background:#f6f9fa;border-radius:7px;color:#7a919d;font-size:12px}
.history-review-stats b{margin-left:10px;color:#355b69;font-weight:600}
.history-review-scroll{max-height:58vh;overflow:auto;border:1px solid #e2e9ed;border-radius:7px}
.history-review-scroll h3{padding:12px 16px;margin:0;font-size:14px}
.history-review-table{min-width:650px;table-layout:fixed}
.history-review-table th,.history-review-table td{white-space:normal;font-size:12px;padding:11px 14px;line-height:1.6;vertical-align:top}
.history-review-table th:nth-child(1){width:22%}.history-review-table th:nth-child(2){width:20%}.history-review-table th:nth-child(3){width:15%}.history-review-table th:nth-child(4){width:43%}
.history-review-table td:last-child{color:#8c805f;background:#fcfaf5}
.history-review-table .batch-doc{display:block}
.inventory-panel .batch-archive{padding:0;border:1px solid #dce5e9;border-radius:8px;background:#f8fafb;overflow:hidden}
.batch-archive>summary{display:flex;align-items:center;gap:9px;padding:11px 15px;color:#7c929d;font-size:12px;list-style:none;cursor:pointer}
.batch-archive>summary::-webkit-details-marker{display:none}
.batch-archive>summary:hover{background:#edf3f5}
.batch-archive>summary:focus-visible{outline:2px solid #7e9eac;outline-offset:-2px}
.batch-archive>summary>strong{font-weight:500;color:#5d7a87}
.archive-chevron{display:inline-block;width:11px;font-size:19px;line-height:1;transition:transform 240ms cubic-bezier(.22,.75,.25,1)}
.batch-archive>summary[aria-expanded=true] .archive-chevron{transform:rotate(90deg)}
.archive-count{font-size:11px;color:#8d9fa7}
.archive-toggle-hint{margin-left:auto;font-size:11px;color:#95a6ad}
.archive-toggle-hint:after{content:'展开'}
.batch-archive>summary[aria-expanded=true] .archive-toggle-hint:after{content:'收起'}
.batch-archive-content{padding:0 12px 12px}
.batch-archive-content:empty{padding:0}
.archive-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:11px 1px 1px;border-top:1px solid #e0e8ec;color:#8a9da6;font-size:11px;font-variant-numeric:tabular-nums}
.archive-pagination>span{margin-right:auto}
.archive-pagination button{padding:4px 9px;border:1px solid #dce6eb;border-radius:5px;color:#637f8d;font-size:11px;font-weight:400;background:#fff}
.archive-pagination button:hover{background:#edf4f6}
.archive-pagination button:disabled{cursor:default;opacity:.4}
.archive-pagination small{font-size:10px}
.batch-archive .batch-index{color:#a1b0b7;background:#f9fafb;min-width:30px;width:auto;padding:0 5px}
@media(prefers-reduced-motion:reduce){.archive-chevron{transition:none}}
@media print{.archive-pagination{display:none}.inventory-panel .batch-archive{border-color:#e0e6e9}.batch-archive>summary{padding:7px 10px}}
.inventory-panel .batch-card-heading{display:grid;grid-template-columns:minmax(200px,1.5fr) minmax(120px,1fr) minmax(120px,1fr) auto;align-items:center;gap:16px;padding:15px 18px;background:#fff}
.batch-identity{display:flex;align-items:center;gap:12px;min-width:0}
.batch-index{display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:34px;border:1px solid #e1e9ed;border-radius:6px;background:#f6f9fa;color:#8a9ea8;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.batch-label,.batch-stat>span{display:block;font-size:11px;font-weight:400;color:#81959f;line-height:1.5}
.inventory-panel .batch-card-heading h4{margin:3px 0 0;font-size:15px;line-height:1.5;color:#365563;font-weight:500;font-variant-numeric:tabular-nums}
.batch-stat{min-width:0;padding-left:18px;border-left:1px solid #e8eef1}
.batch-stat>span>small{margin-left:4px;font-size:10px;color:#a0aeb5}
.batch-stat>strong{display:block;font-size:18px;font-weight:550;color:#355765;line-height:1.5;letter-spacing:.1px;font-variant-numeric:tabular-nums}
.batch-remaining>strong{font-weight:650;color:#28525c}
.inventory-panel .batch-adjust{border:1px solid #dce6ea;background:#fff;padding:6px 11px;color:#647f8b;font-size:12px;font-weight:500;border-radius:6px;white-space:nowrap}
.inventory-panel .batch-adjust:hover{background:#edf4f6;border-color:#b8ccd5;color:#315b6b}
.inventory-panel .batch-outbound-table{min-width:580px;table-layout:fixed;font-size:13px;color:#496570}
.inventory-panel .batch-outbound-table th,.inventory-panel .batch-outbound-table td{padding:9px 16px;border:0;border-top:1px solid #e4ecef;border-right:1px solid #e8eef1;vertical-align:middle;white-space:normal;line-height:1.5}
.inventory-panel .batch-outbound-table th{font-size:11px;font-weight:400;color:#81949e;background:#f8fafb;text-align:left}
.inventory-panel .batch-outbound-table th:first-child{width:22%}
.inventory-panel .batch-outbound-table th:nth-child(2){width:21%;text-align:center}
.inventory-panel .batch-outbound-table th:nth-child(3){width:20%;text-align:center}
.inventory-panel .batch-outbound-table th:last-child{width:37%;border-right:0;text-align:left}
.inventory-panel .batch-outbound-table td:last-child{border-right:0}
.inventory-panel .batch-outbound-table .batch-deduction{background:#f0f8f3;font-size:15px}
.inventory-panel .batch-outbound-table .batch-balance{background:#fafcfd;color:#486775;font-weight:500}
.inventory-panel .batch-outbound-table .batch-total{background:#f8fbf9;font-size:13px}
.inventory-panel .batch-total .stock-change{font-weight:400;color:#648a77}
.inventory-panel .batch-split-table th:first-child{width:17%}
.inventory-panel .batch-split-table th:nth-child(2){width:18%;background:#f0f7f3;color:#5f8371}
.inventory-panel .batch-split-table th:nth-child(3){width:18%;background:#f7faf8}
.inventory-panel .batch-split-table th:nth-child(4){width:17%;text-align:center}
.inventory-panel .batch-split-table th:last-child{width:30%}
.inventory-panel .archive-outbound-table th:first-child{width:23%}
.inventory-panel .archive-outbound-table th:nth-child(2){width:25%}
.inventory-panel .archive-outbound-table th:last-child{width:52%;text-align:left}
.inventory-panel .archive-outbound-table.batch-split-table th:first-child{width:20%}
.inventory-panel .archive-outbound-table.batch-split-table th:nth-child(2),.inventory-panel .archive-outbound-table.batch-split-table th:nth-child(3){width:20%}
.inventory-panel .archive-outbound-table.batch-split-table th:last-child{width:40%;text-align:left}
.batch-recorded>strong{color:#347b59}
.inventory-panel .batch-outbound-table .date-value{font-size:12px;font-variant-numeric:tabular-nums}
.inventory-panel .batch-outbound-table .head-unit{font-size:10px}
.batch-note{overflow-wrap:anywhere;font-size:12px;color:#80939b}
.batch-note>span{display:block;margin-bottom:2px}
.batch-doc{border:0;border-radius:3px;background:transparent;padding:1px 0;color:#628594;font-size:11px;font-weight:400;text-align:left;font-variant-numeric:tabular-nums}
.batch-doc:hover{color:#2d606f;background:transparent;text-decoration:underline}
.batch-doc>span{margin-left:4px;color:#91a8b1}
.batch-row-links{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px}
.batch-locate{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border:1px solid #d6e3e7;border-radius:5px;background:#f5f9fa;color:#527685;font-size:11px;font-weight:500;white-space:nowrap}
.batch-locate:hover{background:#e7f1f4;border-color:#a8c3cf;color:#2e5c70}
.batch-locate:focus-visible{outline:2px solid #729cab;outline-offset:2px}
.batch-settled-label{display:inline-block;margin-left:7px;border-radius:3px;padding:1px 5px;background:#f0f4f5;color:#8a9ba3;font-size:10px;font-weight:400;vertical-align:1px}
.inventory-panel .batch-return-focus{border-color:#aac4d0;box-shadow:0 0 0 2px #dcebf1;outline:none}
@media print{.batch-locate{display:none}}
.batch-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px;border-top:1px solid #e8eef1;background:#fcfdfd;font-size:10px;color:#91a0a8}
.batch-card-footer b{font-weight:500;color:#6e8893;margin-left:6px;font-variant-numeric:tabular-nums}
.batch-card-footer small{font-size:10px;margin-left:6px;color:#acb8be}
.batch-empty{font-size:11px;color:#9aabb2}
.batch-unallocated{font-size:12px;font-weight:400;color:#9b8864}
.batch-estimate{display:block;font-size:9px;color:#8a9ba3;font-weight:400}
.batch-provisional{display:block;font-size:10px;color:#a18555;font-weight:400}
.batch-check{background:transparent;border:0;border-radius:3px;padding:0;font-size:10px;font-weight:400;color:#a68e63}
.batch-check:hover{background:transparent;color:#80632c;text-decoration:underline}
.batch-check.archive-source{color:#6d8895}
.batch-check.archive-source:hover{color:#315b6b}
.batch-history-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;color:#527583;font-size:15px;margin-bottom:18px}
.batch-history-heading strong{font-weight:500}
.batch-history-table td{font-size:14px;white-space:normal}
.batch-history-table td:first-child{width:40%;color:#81959e;background:#f7f9fa}
.batch-history-note{font-size:14px;line-height:1.9;color:#8b724d;background:#fcf9f1;border:1px solid #ece3d2;border-radius:7px;padding:13px 16px;overflow-wrap:anywhere}
.batch-adjustments{border-top:1px solid #e3ebee;background:#fafbfc}
.batch-adjustment{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;padding:9px 18px;font-size:11px;color:#879aa4;border-top:1px solid #e8eef1}
.batch-adjustment:first-child{border-top:0}
.batch-adjustment time{color:#67818e;font-variant-numeric:tabular-nums}
.batch-adjustment>.batch-adjust-reason{flex:1;min-width:100px;overflow-wrap:anywhere}
.batch-adjustment b{font-weight:500;color:#587580}
.inventory-panel .batch-adjustment>.link{padding:1px 2px;font-size:11px;font-weight:400}
.inventory-panel .table-summary{padding:12px 18px;background:#fbfcfd;border-top:1px solid #dce6eb;font-size:12px;color:#82959d}
.inventory-panel .table-summary strong{font-size:16px;font-weight:600;color:#365b69}
@media(max-width:1100px){.inventory-panel .batch-card-heading{grid-template-columns:minmax(155px,1.4fr) minmax(95px,1fr) minmax(95px,1fr) auto;gap:10px;padding:13px 14px}.batch-identity{gap:8px}.batch-stat{padding-left:12px}.batch-index{width:25px;height:31px}.inventory-panel .batch-card-heading h4{font-size:13px}.batch-stat>strong{font-size:17px}.inventory-panel .inventory-row>td,.inventory-panel .inventory-table>thead>tr>th{padding-left:12px;padding-right:12px}}
@media(max-width:700px){.inventory-panel .inventory-toolbar{padding:10px 12px}.inventory-panel .inventory-filters{gap:8px}.inventory-panel .inventory-filters>input,.inventory-panel .inventory-filters>.search-combobox{width:220px}.inventory-panel .inventory-table{min-width:570px}.inventory-panel .batch-drawer{padding:10px}.inventory-panel .batch-card-heading{gap:10px;padding:12px}.batch-stat{padding-left:10px}.inventory-panel .batch-outbound-table{min-width:540px}.inventory-panel .batch-outbound-table th,.inventory-panel .batch-outbound-table td{padding:8px 11px}.batch-card-footer{padding:8px 12px}.inventory-panel .inventory-row>td{height:51px}}
@media(prefers-reduced-motion:reduce){.inventory-panel .inventory-row>td{transition:none}}
@media print{.inventory-panel .inventory-table{min-width:0}.inventory-panel .batch-outbound-table{min-width:0}.inventory-panel .batch-outbound-table th:last-child{display:table-cell}.inventory-panel .batch-drawer{padding:8px;background:#fff}.inventory-panel .batch-card-heading{padding:10px;grid-template-columns:1.5fr 1fr 1fr}.inventory-panel .batch-adjust,.batch-adjustment>.link{display:none}.inventory-panel .batch-card{box-shadow:none}.inventory-panel .batch-outbound-table th,.inventory-panel .batch-outbound-table td{padding:6px 10px}.inventory-panel .batch-card-footer{padding:6px 10px}}
