/* 入库统计 / 调货管理 */
.ib-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:7px 9px!important;border:1px solid #d7e8e5;border-radius:9px;background:#fff;margin:8px 0!important}
.ib-toolbar>button,.ib-toolbar .material-filter{height:32px;padding:0 11px;font-size:13px;white-space:nowrap}
.ib-toolbar .cost-search{flex:1;min-width:160px;height:32px}
.ib-stats{margin-left:auto;display:flex;gap:12px;font-size:12px;color:#718793;white-space:nowrap}
.ib-stats b{color:#078c7f;font-size:14px}
.ib-stats .ib-warn b,.ib-stats .ib-warn{color:#c05621}
.ib-stats .tf-out b{color:#c53030}

.inbound-grid{width:auto;min-width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.inbound-grid th,.inbound-grid td{border:0;border-right:1px solid #e8eef1;border-bottom:1px solid #e8eef1;padding:3px 6px!important;height:auto!important;white-space:nowrap}
.inbound-grid thead th{position:sticky;top:0;z-index:3;background:#eef6f5;vertical-align:top}
.inbound-grid tfoot td{position:sticky;bottom:0;z-index:3;background:#f3f8f7;border-top:2px solid #cfe3df}
.inbound-grid .ib-prod{position:sticky;left:0;z-index:2;background:#fff;min-width:190px;max-width:230px}
.inbound-grid thead .ib-prod,.inbound-grid tfoot .ib-prod{z-index:4;background:#eef6f5}
.inbound-grid tfoot .ib-prod{background:#f3f8f7}
.inbound-grid .ib-total{position:sticky;left:190px;z-index:2;background:#f7fbfa;min-width:62px;text-align:right;font-weight:700;color:#078c7f;border-right:2px solid #cfe3df}
.inbound-grid thead .ib-total{z-index:4;background:#e4f2ef;vertical-align:middle}
.inbound-grid tbody tr:hover td{background:#f2faf8}
.ib-code{width:100%;box-sizing:border-box;height:22px;padding:0 4px;border:1px solid transparent;border-radius:4px;background:transparent;font:inherit;font-weight:700;color:#1f3a4d}
.ib-code:hover{border-color:#d7e8e5;background:#fff}.ib-code:focus{border-color:#16b8a6;outline:0;background:#fff}
.ib-pname{padding:0 4px;font-size:11.5px;color:#6f8290;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.ib-unmatched{color:#c05621;font-weight:600}
.ib-row-unmatched .ib-prod{background:#fff6ed!important;box-shadow:inset 3px 0 #ed8936}
.ib-batch{min-width:84px;text-align:center}
.ib-bname{display:flex;align-items:center;gap:2px}
.ib-name{flex:1;min-width:0;width:56px;height:22px;border:1px solid transparent;border-radius:4px;background:transparent;font:inherit;font-weight:700;color:#3b5568;text-align:center}
.ib-name:hover,.ib-date:hover{border-color:#c9dcde;background:#fff}
.ib-del{border:0;background:none;color:#b8c5ce;font-size:15px;line-height:1;padding:0 2px;cursor:pointer}
.ib-del:hover{color:#c53030}
.ib-date{width:100%;box-sizing:border-box;height:22px;border:1px solid transparent;border-radius:4px;background:transparent;font:inherit;font-size:11px;color:#5a6f7e;padding:0 2px}
.ib-note{font-size:10.5px;font-weight:400;color:#c05621}
.ib-cell{text-align:right}
.ib-cell input{width:64px;height:22px;box-sizing:border-box;border:1px solid transparent;border-radius:4px;background:transparent;text-align:right;font:inherit;color:#9aa9b5;-moz-appearance:textfield}
.ib-cell.has input{color:#1f3a4d;font-weight:600}
.ib-cell.has{background:#f4fbf9}
.ib-cell input:hover{border-color:#d7e8e5;background:#fff}
.ib-cell input:focus{border-color:#16b8a6;outline:0;background:#fff;color:#1f3a4d}
.ib-cell input::-webkit-outer-spin-button,.ib-cell input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ib-cell.saving{opacity:.5}

.transfer-grid{font-size:13px}
.transfer-grid th,.transfer-grid td{padding:5px 8px!important;height:auto!important;vertical-align:middle}
.transfer-grid .tf-form td{background:#f4fbf9}
.transfer-grid .tf-form input,.transfer-grid .tf-form select{width:100%;box-sizing:border-box;height:30px;padding:0 6px;border:1px solid #c9dcde;border-radius:5px;font:inherit;background:#fff}
.transfer-grid .tf-form button{height:30px}
.tf-dir{display:inline-block;padding:1px 8px;border-radius:10px;font-size:12px;font-weight:600}
.tf-dir.in{background:#def7ef;color:#0e8174}.tf-dir.out{background:#fde8e8;color:#c53030}
.tf-qty.in{color:#0e8174}.tf-qty.out{color:#c53030}
.transfer-grid .danger-link{border:0;background:none;color:#c53030;cursor:pointer}
.grid-wrap #grid.inbound-grid tbody tr td,.grid-wrap #grid.transfer-grid tbody tr td{height:auto!important;padding-top:2px!important;padding-bottom:2px!important}
.inbound-grid .ib-pname{line-height:1.3}
/* 在途批次 */
.inbound-grid th.ib-planned{background:#fff4e8!important}
.inbound-grid td.ib-planned{background:#fffaf3}
.ib-plan-tag{font-size:11px;color:#b34a1d;font-weight:700;margin-bottom:2px}
.ib-arrive{margin-top:4px;padding:2px 8px;font-size:12px}
.ib-inc{display:block;font-size:11px;color:#b34a1d;font-weight:600}
.ib-plan-stat{color:#b34a1d}
/* ===== 入库统计美化（2026-11-20） ===== */
.inbound-grid{font-size:13.5px}
.inbound-grid thead th{background:linear-gradient(#f3faf9,#e9f4f2)!important;padding:8px 8px 7px!important;vertical-align:middle;border-bottom:2px solid #cfe3df!important}
.inbound-grid thead .ib-prod{font-size:13px;color:#2c4a5c;font-weight:700}
.inbound-grid thead .ib-total{font-size:13px;color:#0f8f7f}
.inbound-grid .ib-batch{min-width:104px}
.ib-bname{justify-content:center}
.ib-name{font-size:13.5px;font-weight:800;color:#1f3a4d}
.ib-del{opacity:0;transition:opacity .15s}
.inbound-grid th:hover .ib-del{opacity:1}
.ib-date{text-align:center;font-size:11.5px;color:#4d6474;margin-top:2px;height:22px}
.ib-date::-webkit-calendar-picker-indicator{opacity:0;width:10px;margin-left:-10px;cursor:pointer}
.inbound-grid th:hover .ib-date::-webkit-calendar-picker-indicator{opacity:.6}
.ib-note{display:inline-block;margin-top:3px;padding:0 7px;border-radius:9px;font-size:10.5px;font-weight:600;background:#fff1e6;color:#c05621}
/* 行 */
.grid-wrap #grid.inbound-grid tbody tr td{padding-top:6px!important;padding-bottom:6px!important}
.inbound-grid tbody tr:nth-child(even) td{background:#fbfdfd}
.inbound-grid tbody tr:nth-child(even) td.ib-prod{background:#fbfdfd}
.inbound-grid tbody tr:hover td,.inbound-grid tbody tr:hover td.ib-prod{background:#eef8f6!important}
.inbound-grid .ib-prod{padding-left:10px!important}
.ib-code{font-size:14px;height:24px}
.ib-pname{font-size:11.5px;color:#7a8d9a;margin-top:1px}
.inbound-grid td.ib-total{font-size:15px;font-weight:800;color:#0f8f7f;text-align:right;padding-right:10px!important}
.inbound-grid td.ib-total .ib-inc{display:inline-block;margin-top:2px;padding:0 6px;border-radius:8px;background:#fff1e6;font-size:10.5px}
.ib-cell input{width:70px;font-size:13.5px}
.ib-cell.has{background:#effaf7!important}
.ib-cell.has input{color:#123447;font-weight:700}
/* 在途列 */
.inbound-grid th.ib-planned{background:linear-gradient(#fff6ec,#ffe9d6)!important;border-left:2px solid #f6c79c;border-right:2px solid #f6c79c}
.inbound-grid td.ib-planned{background:#fff9f2!important;border-left:2px solid #fbe0c6;border-right:2px solid #fbe0c6}
.inbound-grid td.ib-planned.has input{color:#b8501f}
.ib-plan-tag{display:inline-block;padding:1px 8px;border-radius:9px;background:#eb6834;color:#fff;font-size:10.5px;margin-bottom:4px}
.ib-arrive{display:block;margin:5px auto 0;padding:4px 12px;border-radius:7px;font-weight:700}
/* 合计行 */
.inbound-grid tfoot td{font-size:13.5px;color:#1f3a4d;padding-top:7px!important;padding-bottom:7px!important}
.inbound-grid th.ib-planned{white-space:normal;min-width:132px}.inbound-grid th.ib-planned .ib-note{display:block;white-space:normal;margin:4px auto 0;max-width:120px}
/* 表头紧凑：日期独占一行，备注标签居中放在日期下面，不再被挤出格子 */
.inbound-grid thead th{padding:6px 6px 5px!important;vertical-align:top!important;white-space:normal!important}
.inbound-grid thead th.ib-prod,.inbound-grid thead th.ib-total{vertical-align:middle!important}
.inbound-grid .ib-date{display:block;width:100%;margin:1px 0 0}
.inbound-grid thead .ib-note{display:table;margin:2px auto 0!important;white-space:nowrap}
.inbound-grid .ib-batch{min-width:92px;max-width:130px}
.inbound-grid th.ib-planned{min-width:120px}
.inbound-grid th.ib-planned .ib-plan-tag{margin-bottom:2px}
.inbound-grid th.ib-planned .ib-arrive{margin-top:3px;padding:2px 10px!important;height:24px;font-size:12px}
.inbound-grid th.ib-planned .ib-note{max-width:none}
.inbound-grid th.ib-planned .ib-note{display:none!important}.inbound-grid th.ib-planned .ib-bname{margin-top:1px}
.inbound-grid th.ib-planned{min-width:136px!important}.inbound-grid th.ib-planned .ib-plan-tag{white-space:nowrap}

/* 从代理表选产品 */
dialog.ibp-dlg{width:min(720px,96vw)!important}
.ibp-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}.ibp-top label{display:flex;align-items:center;gap:6px;font-weight:600}
.ibp-top select{height:32px;border:1px solid #cfdcdc;border-radius:7px;padding:0 8px}
.ibp-q{width:100%;box-sizing:border-box;height:36px;border:1px solid #cfdcdc;border-radius:8px;padding:0 10px;font-size:14px;margin-bottom:8px}
.ibp-q:focus{border-color:#16a394;outline:0;box-shadow:0 0 0 3px #16a3941f}
.ibp-list{max-height:52vh;overflow:auto;border:1px solid #e1ebea;border-radius:10px}
.ibp-row{display:grid;grid-template-columns:110px minmax(0,1fr) 120px 56px 90px;align-items:center;gap:10px;padding:6px 10px;border-bottom:1px solid #f0f4f4;font-size:13px}
.ibp-row:hover{background:#f5fbfa}
.ibp-code{color:#1f3a4d;font-size:14px}.ibp-name{color:#35505f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibp-spec{color:#8a9aa5;font-size:12px;white-space:nowrap;text-align:right;overflow:hidden;text-overflow:ellipsis}
.ibp-new{font-size:11px;font-weight:700;color:#9a6200;background:#fff3d6;border-radius:8px;padding:1px 7px;white-space:nowrap}
.ibp-row input{height:30px;width:100%;box-sizing:border-box;border:1px solid #cfdcdc;border-radius:6px;padding:0 6px;text-align:right}
.ibp-row input:not(:placeholder-shown){border-color:#16a394;background:#eef9f6;font-weight:700}
.ibp-tf{display:flex;gap:4px}.ibp-tf button{height:30px;padding:0 9px;border:1px solid #9fd0c6;background:#fff;color:#0f8f7f;border-radius:6px;font-weight:700;cursor:pointer}
