.wh-plan-tabs{display:flex;gap:24px;margin:0 0 18px;padding:0 24px;background:var(--panel-solid);border-radius:18px;overflow:auto;border:1px solid var(--ui-color-border)}
.wh-plan-tabs button{background:transparent;border:0;border-bottom:3px solid transparent;border-radius:0;padding:18px 2px;color:var(--ui-color-muted);font:inherit;font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-medium);white-space:nowrap;cursor:pointer}
.wh-plan-tabs button.active{color:var(--ui-color-primary);border-bottom-color:var(--ui-color-primary);font-weight:var(--ui-font-weight-semibold)}
.wh-plan-meta{display:flex;gap:16px;align-items:center;margin:10px 0 20px;color:var(--ui-color-muted);font-size:var(--ui-font-size-note);flex-wrap:wrap}
.wh-plan-empty{padding:45px 20px;text-align:center;color:var(--ui-color-muted)}
.wh-plan-dialog{width:min(760px,94vw);max-height:90vh;overflow:auto;border:1px solid var(--ui-color-border);border-radius:20px;padding:26px;background:var(--panel-solid);color:var(--ui-color-text);font-family:var(--ui-font-family);font-size:var(--ui-font-size-body);line-height:var(--ui-line-height)}
.wh-plan-dialog::backdrop{background:rgba(34,48,71,.28)}
.wh-plan-dialog h2,.wh-plan-dialog h3,.wh-plan-zones h3{font-size:var(--ui-font-size-section-title);font-weight:var(--ui-font-weight-semibold);color:var(--ui-color-title)}
.wh-plan-dialog h3{margin-top:24px}
.wh-plan-dialog footer{display:flex;gap:12px;justify-content:flex-end;padding-top:22px;margin-top:24px;border-top:1px solid var(--ui-color-border);flex-wrap:wrap}
.wh-plan-dialog details{padding:14px 0}.wh-plan-dialog summary{cursor:pointer;color:var(--ui-color-muted)}
.wh-plan-wide{display:block;width:100%;padding:12px;margin-top:10px;border:1px solid var(--ui-color-control-border);border-radius:10px;font:inherit;color:var(--ui-color-text);background:var(--panel-solid)}
.wh-plan-check{display:flex;gap:12px;align-items:center;padding:16px;border:1px solid var(--ui-color-border);border-radius:12px;margin-top:16px}.wh-plan-check input{width:18px;height:18px;accent-color:var(--ui-color-primary)}
.wh-plan-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;border-bottom:1px solid var(--ui-color-border);padding:24px 0;margin-bottom:22px;color:var(--ui-color-muted)}
.wh-plan-stats strong{display:block;margin-top:8px;font-size:var(--ui-font-size-page-title);font-weight:var(--ui-font-weight-semibold);color:var(--ui-color-title)}
.wh-plan-zones{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.wh-plan-zones section{padding:24px;border:1px solid var(--ui-color-border);border-radius:14px}
.wh-plan-racks{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.wh-plan-racks section{border:1px solid var(--ui-color-border);border-radius:10px;padding:12px}.wh-plan-racks span{display:block;color:var(--ui-color-muted);font-size:var(--ui-font-size-note);margin-top:5px}
.wh-image-button{border:1px solid var(--ui-color-border);background:var(--panel-solid);padding:0;border-radius:8px;cursor:zoom-in;flex-shrink:0}.wh-plan-large-image{display:block;max-width:100%;max-height:70vh;margin:auto;object-fit:contain}
#warehousePlanning .warehouse-product img{width:56px;height:64px;object-fit:contain}.wh-plan-dialog .warehouse-product img{width:76px;height:88px;object-fit:contain}
.wh-plan-tabs button:focus-visible,.wh-image-button:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:3px}
@media(max-width:760px){.wh-plan-tabs{gap:16px;padding:0 16px}.wh-plan-zones{grid-template-columns:1fr}.wh-plan-dialog{padding:18px}.wh-plan-racks{grid-template-columns:repeat(2,1fr)}.wh-plan-stats strong{font-size:var(--ui-font-size-section-title)}}

.wh-sheet-list { min-width: 940px; table-layout: auto; }
.wh-sheet-list > thead > tr > th, .wh-sheet-list > tbody > tr > td { vertical-align: middle; padding: 12px; }
.wh-sheet-list > thead > tr > th:first-child { width: 44px; }
.wh-sheet-list input[type=checkbox] { accent-color: var(--ui-color-primary); }
.wh-sheet-id { display: inline-block; white-space: nowrap; margin-left: 8px; }
.wh-sheet-actions { display: flex; gap: 8px; white-space: nowrap; }
.wh-sheet-products { display: grid; gap: 12px; padding: 4px 0; }
.wh-move-product { display: block; border: 1px solid var(--ui-color-border); border-radius: 10px; padding: 12px; }
.wh-move-product-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.wh-move-product-head .warehouse-product { display: flex; align-items: center; gap: 12px; font-weight: var(--ui-font-weight-semibold); }
.wh-move-detail { width: 100%; min-width: 620px; table-layout: fixed; }
.wh-move-detail th, .wh-move-detail td { text-align: center; vertical-align: middle; padding: 8px 12px; }
.wh-move-detail th:nth-child(1) { width: 18%; }
.wh-move-detail th:nth-child(2) { width: 10%; }
.wh-move-detail th:nth-child(3), .wh-move-detail th:nth-child(4) { width: 36%; }
.wh-move-location { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wh-move-location .wh-move-barcode { display: block; width: 190px; max-width: 100%; height: 36px; object-fit: fill; margin: 0; }
.wh-sheet-status { display: inline-block; padding: 4px 10px; border-radius: 16px; color: var(--ui-color-warning); background: var(--panel-solid); border: 1px solid var(--ui-color-border); font-size: var(--ui-font-size-note); white-space: nowrap; }
.wh-sheet-status-completed { color: var(--ui-color-success); }
@media(max-width:700px) { .wh-move-product { padding: 8px; } .wh-move-product-head { flex-wrap: wrap; } }

.wh-move-detail th:nth-child(1) { width: 12%; }
.wh-move-detail th:nth-child(2) { width: 22%; }
.wh-move-detail th:nth-child(3), .wh-move-detail th:nth-child(4), .wh-move-detail th:nth-child(5) { width: 22%; }
.wh-move-detail { min-width: 860px; }

.wh-move-onsite .wh-move-barcode { height: 52px; width: 100%; }

.wh-sheet-list > thead > tr > th:first-child { width: 82px; min-width: 82px; }
.wh-sheet-list > thead > tr > th:first-child label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.wh-sheet-list > thead > tr > th:first-child input { flex-shrink: 0; margin: 0; }

/* 货位预排：仅在已确认的预排列表及其详情内使用。 */
#warehousePlanningContent.wh-prearrange{display:flex;flex-direction:column;min-height:0;gap:10px;overflow:hidden}
.wh-prearrange>.panel-head{margin:0;flex-shrink:0;gap:12px}
.wh-prearrange .panel-head h2{font-size:var(--ui-font-size-section-title);font-weight:var(--ui-font-weight-semibold)}
.wh-pre-meta{display:flex;align-items:center;gap:12px;font-size:var(--ui-font-size-note);color:var(--ui-color-muted)}
.wh-pre-views{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0}
.wh-pre-views button{padding:7px 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ui-color-text);font:inherit;font-size:var(--ui-font-size-section-title);font-weight:var(--ui-font-weight-semibold)}
.wh-pre-views button.active{color:var(--ui-color-primary);background:var(--ui-color-primary-soft);border-color:var(--ui-color-border)}
.wh-pre-views button span{margin-left:8px;font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-medium)}
.wh-pre-tools{margin:0;padding:0;flex-shrink:0;gap:10px;align-items:center}
.wh-pre-tools input[type=search]{width:230px;max-width:100%}
.wh-pre-table{flex:1;min-height:0;overflow:auto;margin:0}
.wh-pre-table table{min-width:1180px}
.wh-pre-table td,.wh-pre-table th{font-size:var(--ui-font-size-body);padding:8px 10px;vertical-align:middle}
.wh-pre-table th{font-weight:var(--ui-font-weight-semibold);white-space:nowrap;background:var(--ui-color-table-head)}
.wh-pre-table .warehouse-product{min-width:200px;display:flex;align-items:center;gap:10px}
#warehousePlanning .wh-prearrange .warehouse-product img,.wh-pre-dialog .warehouse-product img{width:64px;height:64px;min-width:64px;min-height:64px;object-fit:contain;flex-shrink:0}
.wh-pre-noimage{display:flex;align-items:center;justify-content:center;width:64px;height:64px;flex-shrink:0;border:1px solid var(--ui-color-border);border-radius:6px;font-size:var(--ui-font-size-note);color:var(--ui-color-muted)}
.wh-pre-table .wh-pre-locations{min-width:170px;max-width:300px;overflow-wrap:anywhere}
.wh-pre-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.wh-pre-candidate{font-size:var(--ui-font-size-body);color:var(--ui-color-primary);font-weight:var(--ui-font-weight-medium)}
.wh-pre-status{font-size:var(--ui-font-size-business-status);font-weight:var(--ui-font-weight-semibold)}
.wh-pre-empty{padding:28px;text-align:center;color:var(--ui-color-muted)}
.wh-pre-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;flex-shrink:0}
.wh-pre-bottom>div{display:flex;align-items:center;gap:12px}
.wh-pre-dialog{width:min(960px,96vw);max-width:96vw;max-height:90vh;min-width:min(420px,94vw);min-height:200px;resize:both;padding:16px;border-radius:12px}
.wh-pre-dialog>.panel-head{position:sticky;top:0;z-index:2;background:var(--panel-solid);gap:12px;align-items:center;padding-bottom:10px}
.wh-pre-dialog footer{position:sticky;bottom:0;z-index:2;background:var(--panel-solid);padding-top:10px;margin-top:12px}
.wh-pre-detail-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.wh-pre-detail-head>.warehouse-product{display:flex;gap:12px;align-items:center}
.wh-pre-facts{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.wh-pre-facts dl{display:grid;grid-template-columns:132px minmax(0,1fr);gap:8px;margin:12px 0}
.wh-pre-facts dt{font-size:var(--ui-font-size-note);color:var(--ui-color-muted)}
.wh-pre-facts dd{margin:0;overflow-wrap:anywhere}
.wh-pre-suggestion{border-block:1px solid var(--ui-color-border);padding-bottom:12px}
.wh-pre-dialog h3{font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-semibold);margin-top:16px}
.wh-pre-photo .wh-plan-large-image{max-width:100%;max-height:75vh;width:auto;height:auto}
@media(max-width:760px){.wh-pre-facts{grid-template-columns:1fr;gap:0}.wh-pre-meta{flex-wrap:wrap}.wh-pre-facts dl{grid-template-columns:112px minmax(0,1fr)}.wh-prearrange>.panel-head{flex-wrap:wrap}.wh-pre-views{gap:4px}.wh-pre-views button{padding:7px 8px}.wh-pre-bottom>div{gap:6px}}

.wh-pre-table td{white-space:normal!important;overflow:visible;text-overflow:clip}
.wh-pre-code{white-space:normal;overflow-wrap:anywhere;min-width:120px}
.wh-pre-dialog .primary-button{background:var(--ui-color-primary);background-image:none;border-color:var(--ui-color-primary);color:var(--ui-color-on-primary);box-shadow:none}
.wh-pre-dialog .primary-button:hover{background:var(--ui-color-primary-strong)}

/* 已确认的表格建议详情：仅影响查看建议/安排弹窗。 */
.wh-pre-tabular{width:min(1320px,96vw);max-height:92vh}
.wh-pre-tabular[open]{display:flex;flex-direction:column;overflow:hidden}
.wh-pre-tabular>.panel-head,.wh-pre-tabular>.wh-pre-detail-head,.wh-pre-tabular>footer{flex-shrink:0}
.wh-pre-tabular>.panel-head{position:static;margin:0;padding-bottom:10px}
.wh-pre-tabular>.wh-pre-detail-head{padding-bottom:8px;gap:12px}
.wh-pre-detail-body{flex:1;min-height:0;overflow:auto;padding-right:2px}
.wh-pre-tabular>footer{position:static;margin-top:10px;padding-top:10px}
.wh-pre-tabular>[data-wh-error]:empty{display:none}
.wh-pre-table-section{margin:0 0 12px}
.wh-pre-tabular h3{margin:4px 0 6px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.wh-pre-tabular h3 .ui-note-text{font-weight:var(--ui-font-weight-regular)}
.wh-pre-tabular .report-table-wrap{margin:0;overflow:auto;max-width:100%}
.wh-pre-detail-table{width:100%;min-width:700px;table-layout:auto}
.wh-pre-tabular .wh-pre-detail-table th,.wh-pre-tabular .wh-pre-detail-table td{font-size:var(--ui-font-size-body);line-height:var(--ui-line-height);padding:7px 10px;vertical-align:middle;white-space:normal!important;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.wh-pre-detail-table th{font-weight:var(--ui-font-weight-semibold);background:var(--ui-color-table-head)}
.wh-pre-detail-table tfoot{background:var(--ui-color-detail);font-weight:var(--ui-font-weight-medium)}
.wh-pre-spec-table{min-width:1160px}
.wh-pre-original-table{min-width:900px}
.wh-pre-recommend-table{min-width:960px}
.wh-pre-overview{min-width:640px}
.wh-pre-overview th,.wh-pre-overview td{text-align:right}
.wh-pre-overview td{font-weight:var(--ui-font-weight-medium)}
.wh-pre-reason{display:block;min-width:240px;max-width:520px;white-space:normal;overflow-wrap:anywhere}
.wh-pre-tabular .table-preference-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 0}
.wh-pre-tabular .table-preference-controls h3{margin:0 auto 0 0}
.wh-pre-tabular .table-preference-status{font-size:var(--ui-font-size-note)}
.wh-pre-tabular .wh-pre-field-help{display:inline-block;vertical-align:middle;padding:0;margin:0;text-align:left;font-weight:var(--ui-font-weight-regular)}
.wh-pre-field-help summary{display:inline;color:var(--ui-color-primary);font-size:var(--ui-font-size-caption);cursor:help}
.wh-pre-field-help span{display:block;max-width:300px;min-width:160px;white-space:normal;margin-top:6px;padding:8px;background:var(--ui-color-detail);border:1px solid var(--ui-color-border);border-radius:6px;font-size:var(--ui-font-size-note);color:var(--ui-color-text)}
.wh-pre-extra-facts{display:flex;gap:8px 20px;flex-wrap:wrap;font-size:var(--ui-font-size-note);margin-top:10px}
.wh-pre-tabular .global-row-number{white-space:nowrap!important;min-width:44px}
@media(max-width:760px){.wh-pre-tabular{padding:12px;max-height:94vh}.wh-pre-tabular>.panel-head{align-items:flex-start}.wh-pre-tabular>.panel-head h2{white-space:normal}.wh-pre-tabular .table-preference-controls{gap:6px}.wh-pre-tabular .table-preference-controls h3{flex-basis:100%}.wh-pre-tabular>footer{gap:8px}}
.wh-pre-tabular .report-table-wrap{max-height:none;scrollbar-gutter:stable}
.wh-pre-tabular .report-table-wrap::-webkit-scrollbar{height:10px;width:10px}
.wh-pre-tabular .report-table-wrap::-webkit-scrollbar-track{background:var(--ui-color-detail)}
.wh-pre-tabular .report-table-wrap::-webkit-scrollbar-thumb{background:var(--ui-color-control-border);border-radius:6px}
.wh-pre-tabular .wh-pre-detail-table .wh-pre-number{text-align:right;white-space:nowrap!important}
.wh-pre-tabular .report-table-wrap:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:2px}

/* 主页面尺码明细：整款分页，合并产品与货位信息，独立的框选复制。 */
.wh-prearrange .wh-pre-views{gap:18px;flex-wrap:wrap;border-bottom:1px solid var(--ui-color-border);padding-bottom:4px}
.wh-prearrange .wh-pre-views button{border:0;border-radius:0;background:transparent;padding:6px 2px;font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-regular);color:var(--ui-color-text)}
.wh-prearrange .wh-pre-views button.active{color:var(--ui-color-primary);font-weight:var(--ui-font-weight-medium);box-shadow:inset 0 -2px var(--ui-color-primary)}
.wh-prearrange .wh-pre-views button span{font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-medium)}
.wh-prearrange .wh-pre-main{table-layout:fixed;min-width:0;width:max-content;border-collapse:separate;border-spacing:0}
.wh-prearrange .wh-pre-main th,.wh-prearrange .wh-pre-main td{padding:4px 8px;font-size:var(--ui-font-size-body);line-height:var(--ui-line-height);border-right:1px solid var(--ui-color-border);border-bottom:1px solid var(--ui-color-border);white-space:normal!important;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;user-select:none}
.wh-prearrange .wh-pre-main th{position:sticky;top:0;z-index:2;background:var(--ui-color-table-head)}
.wh-prearrange .wh-pre-main .wh-pre-number{text-align:right;white-space:nowrap!important;font-variant-numeric:tabular-nums}
.wh-prearrange .wh-pre-main .wh-pre-placeholder{display:none!important}
.wh-prearrange .wh-pre-main .warehouse-product{display:flex;flex-direction:column;gap:8px;min-width:0;text-align:center}
.wh-prearrange .wh-pre-main .wh-pre-code{text-align:center;color:var(--ui-color-primary);overflow-wrap:anywhere;margin-top:8px}
.wh-prearrange .wh-pre-main .wh-pre-subtotal td{background:var(--ui-color-detail);font-weight:var(--ui-font-weight-medium);border-bottom:2px solid var(--ui-color-control-border)}
.wh-prearrange .wh-pre-main .wh-pre-selected{background:var(--ui-color-row-selected)!important;box-shadow:inset 0 0 0 1px var(--ui-color-primary)}
.wh-prearrange .wh-pre-main:focus-visible{outline:2px solid var(--ui-color-primary);outline-offset:-2px}
.wh-prearrange .wh-pre-main .wh-pre-reason{min-width:0;max-width:none;white-space:normal}
.wh-prearrange .wh-pre-table .table-preference-controls{position:sticky;left:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%;padding:6px 0;background:var(--panel-solid)}
.wh-pre-table-title{font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-semibold);margin-right:auto}
.wh-pre-copy-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.wh-prearrange .wh-pre-bottom{flex-wrap:wrap;gap:8px}
.wh-prearrange .wh-pre-table{scrollbar-gutter:stable;overscroll-behavior:contain}
.wh-prearrange .wh-pre-table::-webkit-scrollbar{height:10px;width:10px}
.wh-prearrange .wh-pre-table::-webkit-scrollbar-track{background:var(--ui-color-detail)}
.wh-prearrange .wh-pre-table::-webkit-scrollbar-thumb{background:var(--ui-color-control-border);border-radius:6px}

/* 货位建议紧凑排版：只收紧留白，不改变字号、字段或保存设置。 */
#warehousePlanning:has(>.wh-prearrange){padding:12px 16px;margin-bottom:0}
#warehousePlanningContent.wh-prearrange{gap:6px}
.wh-prearrange>.panel-head h2{margin:0}
.wh-prearrange .wh-pre-tools input,.wh-prearrange .wh-pre-tools select,.wh-prearrange .wh-pre-tools summary{padding:5px 8px;min-height:32px;box-sizing:border-box}
.wh-prearrange .wh-pre-meta button,.wh-prearrange .wh-pre-bottom button{padding:5px 10px;min-height:32px}
.wh-prearrange .wh-pre-views{padding-bottom:0}
.wh-prearrange .wh-pre-views button{padding:4px 2px}
.wh-prearrange .wh-pre-table .table-preference-controls{padding:2px 0;min-height:32px;justify-content:flex-start}
.wh-prearrange .wh-pre-table .table-preference-controls .table-preference-status{margin-left:auto}
.wh-prearrange .wh-pre-main th{padding:5px 8px;height:auto;white-space:nowrap!important}
.wh-prearrange .wh-pre-main .warehouse-product{gap:4px}
.wh-prearrange .wh-pre-main .wh-pre-code{margin-top:4px;min-width:0}
.wh-prearrange .wh-pre-main .wh-pre-subtotal td{padding-block:4px}

.wh-prearrange .wh-pre-product-select{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:var(--ui-font-size-body);cursor:pointer}
.wh-prearrange td .wh-pre-product-select{margin-bottom:6px}
.wh-prearrange .wh-pre-product-select input{margin:0;accent-color:var(--ui-color-primary)}

/* 整张移位单人工完成确认，姓名与时间紧邻勾选。 */
.wh-sheet-completion {display:flex;align-items:center;gap:6px;font-size:var(--ui-font-size-body);font-weight:var(--ui-font-weight-medium);white-space:nowrap;}
.wh-sheet-completion-meta {display:block;margin-top:4px;color:var(--ui-color-muted);font-size:var(--ui-font-size-note);font-weight:var(--ui-font-weight-regular);white-space:nowrap;}
