.erp-commercial .stock-posting-dialog{width:min(1380px,calc(100vw - 32px));max-height:92dvh;border:1px solid #dfe8f3;border-radius:18px;padding:28px;box-shadow:0 24px 90px #122b4b35;color:#2b4564}.stock-posting-dialog::backdrop{background:#142a4780;backdrop-filter:blur(3px)}.stock-posting-dialog .sales-top h2{margin:0 0 6px;font-size:23px}.stock-posting-dialog [data-document]{margin:0;color:#7c8da5;font-size:13px}.stock-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:22px 0}.stock-metrics>div{padding:17px 20px;background:#f3f7fc;border:1px solid #e1eaf6;border-radius:12px}.stock-metrics span{display:block;color:#7489a4;font-size:12px;margin-bottom:10px}.stock-metrics strong{color:#294f79;font-size:22px;font-variant-numeric:tabular-nums}.stock-metrics small{font-size:12px;font-weight:400}.stock-posting-dialog fieldset{border:1px solid #e2eaf4;border-radius:12px;padding:20px;background:#fbfcfe;min-width:0}.stock-posting-dialog .sales-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.stock-posting-dialog label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#6b819d}.stock-posting-dialog input,.stock-posting-dialog select,.stock-posting-dialog textarea{min-width:0;width:100%}.stock-product-field{grid-column:span 2}.stock-posting-dialog .operation-note{grid-column:1/-1}.stock-posting-dialog [data-balance]{font-size:12px;color:#527297}.stock-posting-dialog .stock-note{color:#74869c;font-size:12px;line-height:1.8}.stock-section-heading{display:flex;align-items:center;justify-content:space-between;margin-top:24px}.stock-section-heading h3{margin:8px 0}.stock-section-heading span{font-size:12px;color:#8a9bb0}.stock-posting-dialog table{width:100%;border-collapse:collapse;white-space:nowrap}.stock-posting-dialog th{background:#f0f5fc;color:#6b83a2;font-weight:600;text-align:left}.stock-posting-dialog td,.stock-posting-dialog th{padding:13px 12px;border-bottom:1px solid #e8eef6;font-size:13px}.stock-posting-dialog tbody tr:hover{background:#f5f9ff}.stock-posting-dialog td:nth-child(n+5):nth-child(-n+8){text-align:right;font-variant-numeric:tabular-nums}.stock-posting-dialog .stock-actions{display:flex;gap:6px;flex-wrap:wrap}.stock-posting-dialog [data-error]{color:#b24d5b;min-height:18px}.stock-posting-dialog .stock-empty{padding:18px;text-align:center;color:#8b9bb0}.stock-posting-dialog .sales-table{border:1px solid #e3ebf5;border-radius:11px;overflow:auto}.stock-posting-dialog [data-issues]{margin-top:24px}.stock-posting-dialog button{border:1px solid #dce6f2;border-radius:7px;padding:7px 12px;background:#fff;color:#527298;cursor:pointer;transition:background .15s,border-color .15s}.stock-posting-dialog button:hover{background:#edf4ff;border-color:#bdd1ed;color:#527298}.stock-posting-dialog button.primary,.stock-posting-dialog button.primary:hover{color:#fff;background:#2869ce;border-color:#2869ce}.stock-posting-dialog button.primary:hover{background:#205dbb}.stock-posting-dialog button.sales-delete,.stock-posting-dialog button.sales-delete:hover{color:#b25e69}.stock-posting-dialog button.sales-delete:hover{background:#fff0f3}.stock-posting-dialog button:focus-visible{outline:3px solid #aac8f3;outline-offset:2px}.stock-posting-dialog button:disabled{opacity:.5;cursor:default}@media(max-width:700px){.stock-posting-dialog .sales-fields{grid-template-columns:1fr}.stock-posting-dialog .stock-product-field{grid-column:auto}.erp-commercial .stock-posting-dialog{padding:16px}.stock-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.stock-posting-dialog [data-issues]:empty,.stock-posting-dialog [data-error]:empty{display:none}.stock-posting-dialog{font-family:"Microsoft YaHei",system-ui,sans-serif}

.stock-product-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px}.stock-product-heading button{font-size:12px;white-space:nowrap;}

.stock-posting-dialog [hidden]{display:none!important}
.stock-receipt-group{padding:18px;background:#fff;border:1px solid #dfe8f4;border-radius:12px;margin-bottom:20px}.stock-receipt-group h3{margin:0 0 14px;font-size:16px;color:#294f79}.stock-receipt-caption{font-size:13px;font-weight:600;color:#527298;margin:20px 0 10px}.stock-receipt-total{text-align:right;font-size:17px;font-weight:700;color:#294f79;padding:14px;background:#edf5ff;border-radius:10px}.stock-posting-dialog .stock-receipt-inputs table{min-width:960px;table-layout:fixed}.stock-receipt-inputs th:nth-child(1){width:150px}.stock-receipt-inputs th:nth-child(2){width:32%}.stock-receipt-inputs th:nth-child(3){width:55px}.stock-posting-dialog .stock-receipt-inputs td{vertical-align:top;text-align:left}.stock-receipt-inputs input,.stock-receipt-inputs select{box-sizing:border-box;font:inherit;padding:9px 8px;border:1px solid #dce6f2;border-radius:7px;background:#fff;color:#365777}.stock-receipt-inputs input:focus-visible,.stock-receipt-inputs select:focus-visible{outline:3px solid #aac8f3;outline-offset:1px}.stock-receipt-product{display:flex;flex-direction:column;gap:8px;white-space:normal}.stock-receipt-product>span:first-child{font-size:12px;color:#7187a3;line-height:1.6}.stock-receipt-product small{color:#6382a3;font-size:12px;line-height:1.6}.stock-receipt-product-actions:empty{display:none}.stock-receipt-complete{opacity:.6}.stock-contract-balance td{font-variant-numeric:tabular-nums}@media(max-width:700px){.stock-receipt-group{padding:10px}.stock-receipt-total{font-size:15px}}

.stock-posting-dialog [data-receipt-tables]{grid-column:1/-1;min-width:0}.stock-contract-balance tfoot td{background:#f1f6fd;font-weight:600;color:#365f8c}.stock-contract-balance tfoot td:first-child{text-align:right}

/* 2026-10-25 polish, matching the inventory home page: explained summary cards, sectioned form, centered figures. */
.erp-commercial .stock-posting-dialog{padding:26px 30px;border-radius:16px}
.erp-commercial .stock-posting-dialog .sales-top{padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid #e6edf5}
.erp-commercial .stock-posting-dialog .sales-top h2{font-size:22px;color:#1d3657;letter-spacing:.4px}
.erp-commercial .stock-posting-dialog [data-document]{margin-top:4px;color:#6f8299}
.stock-posting-dialog .stock-metrics{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:20px 0 22px}
.stock-posting-dialog .stock-metrics>div{position:relative;display:flex;flex-direction:column;gap:6px;padding:14px 18px 14px 20px;background:#fff;border:1px solid #e1e8f1;border-left:4px solid #2a62ad;border-radius:10px;box-shadow:0 1px 3px #1f37560a}
.stock-posting-dialog .stock-metrics span{margin:0;font-size:12px;font-weight:600;color:#5d7290}
.stock-posting-dialog .stock-metrics strong{font-size:22px;line-height:1.3;color:#1f3a5c}
.stock-posting-dialog .stock-metrics small{color:#7d8ea5;margin-left:2px}
/* Entry form */
.erp-commercial .stock-posting-dialog fieldset{position:relative;padding:22px;background:#f8fafd;border:1px solid #e1e8f1;border-radius:12px}
.erp-commercial .stock-posting-dialog .sales-fields{gap:16px 18px}
.erp-commercial .stock-posting-dialog label{font-size:12px;font-weight:500;color:#5d7290}
.erp-commercial .stock-posting-dialog .sales-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;padding-top:16px;border-top:1px solid #e3eaf3}
.erp-commercial .stock-posting-dialog .sales-actions button{min-height:38px;padding:7px 18px;font-weight:600}
.erp-commercial .stock-posting-dialog button.primary{background:#2463c7;border-color:#2463c7;box-shadow:0 1px 2px #2463c733,0 3px 8px #2463c71f}
.erp-commercial .stock-posting-dialog button.primary:hover{background:#1d55ae;border-color:#1d55ae;color:#fff}
.erp-commercial .stock-posting-dialog .shipment-photo-section{margin-top:16px;padding:14px 16px;background:#fff;border:1px dashed #d5e1f0;border-radius:10px}
.erp-commercial .stock-posting-dialog .shipment-photo-section h3{margin:0 0 10px;font-size:14px;color:#2f4f73}
/* Contract groups and entry tables */
.erp-commercial .stock-posting-dialog .stock-receipt-group{padding:18px 20px;border-color:#dfe7f2;box-shadow:0 1px 3px #1f37560a}
.erp-commercial .stock-posting-dialog .stock-receipt-group h3{position:relative;padding-left:12px;font-size:15px;color:#1f3a5c}
.erp-commercial .stock-posting-dialog .stock-receipt-group h3::before{content:"";position:absolute;left:0;top:3px;bottom:3px;width:4px;border-radius:2px;background:#2a62ad}
.erp-commercial .stock-posting-dialog .stock-receipt-caption{position:relative;padding-left:12px;font-size:14px;color:#1f3a5c}
.erp-commercial .stock-posting-dialog .stock-receipt-caption::before{content:"";position:absolute;left:0;top:3px;bottom:3px;width:4px;border-radius:2px;background:#3a7f71}
.erp-commercial .stock-posting-dialog .sales-table{border-color:#e1e8f1;border-radius:10px}
.erp-commercial .stock-posting-dialog table th{background:#edf3fc;color:#3f6591;font-size:12px;font-weight:600;padding:11px 12px;border-bottom:1px solid #dbe4ef}
.erp-commercial .stock-posting-dialog table td{color:#2f4a6b;padding:12px;border-bottom:1px solid #e9eef5}
.erp-commercial .stock-posting-dialog .stock-contract-balance :is(th,td):nth-child(n+4){text-align:center;font-variant-numeric:tabular-nums}
.erp-commercial .stock-posting-dialog .stock-contract-balance tfoot td{background:#eef4fd;color:#1f5aa8;font-weight:700}
.erp-commercial .stock-posting-dialog .stock-contract-balance tfoot td:first-child{text-align:right}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs th{background:#eef7f3;color:#3b7366}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs :is(input,select){border-color:#d4deea;color:#2d4767}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs :is(input,select):focus{border-color:#5b8fdb;box-shadow:0 0 0 3px #2463c71a;outline:none}
.erp-commercial .stock-posting-dialog .stock-receipt-product>span:first-child{color:#5d7290;font-weight:500}
.erp-commercial .stock-posting-dialog .stock-receipt-product small{color:#7d8ea5}
/* Records list */
.erp-commercial .stock-posting-dialog .stock-section-heading{margin-top:26px;margin-bottom:10px}
.erp-commercial .stock-posting-dialog .stock-section-heading h3{position:relative;padding-left:12px;font-size:16px;color:#1f3a5c}
.erp-commercial .stock-posting-dialog .stock-section-heading h3::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:4px;border-radius:2px;background:#2a62ad}
.erp-commercial .stock-posting-dialog [data-records] td:nth-child(n+5):nth-child(-n+8),.erp-commercial .stock-posting-dialog [data-records] th:nth-child(n+5):nth-child(-n+8){text-align:center}
.erp-commercial .stock-posting-dialog tbody tr:hover td{background:#f4f8fe}
.erp-commercial .stock-posting-dialog .sales-tools{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
@media(max-width:700px){.erp-commercial .stock-posting-dialog{padding:16px}.stock-posting-dialog .stock-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-commercial .stock-posting-dialog fieldset{padding:14px}.erp-commercial .stock-posting-dialog .sales-actions{justify-content:stretch}.erp-commercial .stock-posting-dialog .sales-actions button{flex:1}}
/* 2026-10-25 receipt entry: one box less, product picker and "new product" on one line, cells centred on the input row. */
.erp-commercial .stock-posting-dialog section[data-receipt-tables]{margin:0 0 16px;padding:0;background:none;border:0;box-shadow:none;border-radius:0}
.erp-commercial .stock-posting-dialog .stock-receipt-group{margin-bottom:14px;padding:16px 18px;border-radius:12px}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs td{vertical-align:middle}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs td[data-unit]{text-align:center;color:#2f4a6b;font-weight:600}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs th:nth-child(3){text-align:center}
.erp-commercial .stock-posting-dialog .stock-receipt-product{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px}
.erp-commercial .stock-posting-dialog .stock-receipt-product>span:first-child{grid-column:1/-1;font-size:12px;color:#5d7290}
.erp-commercial .stock-posting-dialog .stock-receipt-product>select{grid-column:1}
.erp-commercial .stock-posting-dialog .stock-receipt-product-actions{grid-column:2;display:flex}
.erp-commercial .stock-posting-dialog .stock-receipt-product-actions button{min-height:38px;padding:6px 12px;font-size:12px;white-space:nowrap;background:#f3faf7;border-color:#cfe5dc;color:#2f6b5d}
.erp-commercial .stock-posting-dialog .stock-receipt-product-actions button:hover{background:#e4f3ec;border-color:#9fcdb9;color:#2f6b5d}
.erp-commercial .stock-posting-dialog .stock-receipt-product small{grid-column:1/-1;justify-self:start;padding:2px 9px;border-radius:10px;background:#fff7e8;color:#8a5a12;font-size:11.5px}
.erp-commercial .stock-posting-dialog .stock-receipt-inputs input[data-field=amount]{font-weight:700;color:#1f3a5c;background:#f5f9ff}
.erp-commercial .stock-posting-dialog .stock-receipt-total{display:flex;justify-content:flex-end;align-items:baseline;gap:8px;padding:14px 20px;background:#e6eefb;border:1px solid #cfdcf0;border-left:5px solid #2a62ad;border-radius:10px;font-size:15px;color:#2a4a70}
.erp-commercial .stock-posting-dialog .stock-return-inputs :is(th,td):nth-child(n+2){text-align:center;font-variant-numeric:tabular-nums}
.erp-commercial .stock-posting-dialog .stock-return-inputs th{background:#fdf3ec;color:#8a4b22}
.erp-commercial .stock-posting-dialog .stock-return-inputs td.stock-return-left{color:#b4531f;font-weight:700}
.erp-commercial .stock-posting-dialog .stock-return-group h3::before{background:#c2622d}
.erp-commercial .stock-posting-dialog .stock-receipt-group .stock-empty{margin:0;padding:14px;border:1px dashed #d7e1ee;border-radius:10px;background:#f8fafd;color:#6d7f97;text-align:center}

/* 投产入库：库存产品选择按钮，外观和输入框同高 */
.stock-posting-dialog .stock-product-field.is-picking{grid-column:auto}.stock-product-field.is-picking .stock-product-heading{min-height:0}.stock-posting-dialog .stock-pick-button{width:100%;min-height:38px;padding:7px 12px;border-color:#bdd1ed;border-radius:8px;background:#f5f9ff;color:#2869ce;font-size:14px;font-weight:600;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stock-posting-dialog .stock-pick-button.is-picked{background:#fff;color:#2b4564}.stock-posting-dialog .stock-pick-button:disabled{opacity:.7}
