.sw-page{display:flex;flex-direction:column;gap:9px}.sw-tabs{margin-bottom:3px}.sw-filters{display:flex;gap:8px;margin:9px 0}.sw-filters input{width:min(400px,65%)}.sw-filters select{max-width:220px}.sw-scroll{overflow:auto;max-height:var(--frame,68vh);border:1px solid #d6dfd8;margin-top:9px}.sw-table{font-size:13px;border-collapse:collapse;min-width:530px}.sw-table th,.sw-table td{padding:7px 9px;border-bottom:1px solid #dfe6e0;white-space:nowrap}.sw-table thead th{background:#edf2ef;position:sticky;top:0}.sw-table tbody tr:nth-child(even){background:#f0f5f1}.sw-table th:first-child{min-width:155px;text-align:left}.sw-table small{display:block;color:#607465;font-size:11px;font-weight:400}.sw-table button{font-size:12px;padding:5px 7px}.sw-hint{font-size:12px;color:#607164;margin:8px 0}.sw-qty{display:flex;gap:6px}.sw-qty label{font-size:11px}.sw-qty input{display:block;width:65px;font-size:20px;font-weight:650;text-align:center;padding:6px}.sw-move-lines{max-height:39vh;overflow:auto;margin:9px 0;border:1px solid #d6dfd8}.sw-move-line{display:grid;grid-template-columns:minmax(130px,1fr) auto auto;gap:8px;padding:9px;border-bottom:1px solid #dce5de;align-items:end}.sw-move-line .field{margin:0}.sw-move-line small{grid-column:1/3;font-size:11px;color:#607164}.sw-move-line>button{grid-column:3;grid-row:1/3;font-size:12px}.sw-move-lines article{padding:10px;border-bottom:1px solid #dce5de}.sw-move-lines article small{display:block;font-size:12px;margin:5px 0;color:#607164}.sw-reminders{margin-top:8px;background:#fff5d9;border:1px solid #e2c783;border-radius:5px;padding:8px 10px;font-size:12px}.sw-reminders summary{cursor:pointer;font-weight:700;color:#775918}.sw-reminders>div{padding:7px 0;border-top:1px solid #e8d7b0}.sw-reminders small{display:block;color:#786545}.sw-reminders button{padding:3px 7px;font-size:11px;margin:5px 5px 0 0}.sw-optional{padding:8px 0;margin-top:8px;border-top:1px solid #d9e1da}.sw-optional summary{font-size:12px;cursor:pointer;color:#526b59}.sw-optional .field{margin-top:6px}@media(max-width:700px){.sw-move-line{grid-template-columns:1fr auto}.sw-move-line>.field{grid-column:1/-1}.sw-move-line>button{grid-column:2;grid-row:3}.sw-move-line small{grid-column:1;grid-row:3}.sw-filters select{max-width:40%}.sw-table td:first-child,.sw-table th:first-child{position:sticky;left:0;background:#f1f6f2;z-index:1;white-space:normal;min-width:125px}.sw-table thead th:first-child{z-index:2}.sw-tabs button{font-size:12px;padding:6px 8px}}
/* 异常货：桌面密集列表，手机按一笔货集中显示。 */
[data-damage-list] strong {font-size:18px;}
[data-damage-list] .danger {font-size:20px;font-weight:800;}
[data-damage-list] td {vertical-align:top;overflow-wrap:anywhere;}
[data-damage-search] {width:100%;max-width:420px;margin:8px 0;}
@media(max-width:640px){
 [data-damage-list] table,[data-damage-list] tbody,[data-damage-list] tr,[data-damage-list] td {display:block;width:auto;min-width:0;}
 [data-damage-list] thead {display:none;}
 [data-damage-list] tr {border:1px solid #d6dfe7;border-radius:10px;padding:10px;margin:8px 0;background:white;}
 [data-damage-list] td {border:0;padding:4px 0;white-space:normal;}
 [data-damage-list] [data-damage-edit] {width:100%;min-height:44px;font-size:18px;}
}
/* Inventory work shares one content frame: current stock is the default, history is a report. */
[data-owner-stock-mode]{height:100%;min-height:0;display:flex;flex-direction:column;gap:8px}
[data-stock-body]{flex:1;min-height:0;min-width:0}
.sw-page{height:100%;min-height:0;min-width:0;overflow:hidden;gap:6px}
.sw-page>[data-stock-content]{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:auto}
.sw-tabs{flex-shrink:0;gap:4px;margin:0;padding:0 0 5px;border-bottom:1px solid #d6e0d9}
.sw-tabs button{border:0;background:transparent;border-radius:4px;min-height:38px;padding:6px 11px;font-size:14px;color:#526b5a;font-weight:500}
.sw-tabs button[aria-pressed=true]{background:#e5eee8;color:#175a3e;font-weight:750}
.sw-current{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column}
.sw-current .sw-filters{flex-shrink:0;margin:2px 0 5px;min-width:0}
.sw-filters input,.sw-filters select{min-width:0;min-height:38px;font-size:15px}
.sw-current-caption{display:flex;justify-content:space-between;gap:8px;align-items:baseline;flex-shrink:0;font-size:12px;color:#526b5a;margin:0 0 5px}
.sw-current-caption strong{font-size:14px;color:#294b38;overflow-wrap:anywhere}
.sw-scroll.sw-current-scroll{flex:1;min-height:120px;max-height:none;min-width:0;width:100%;margin:0;border:0;border-bottom:1px solid #d6dfd8;overscroll-behavior:contain}
.sw-current-table{min-width:100%;width:100%;table-layout:auto;font-variant-numeric:tabular-nums}
.sw-current-table th,.sw-current-table td{height:38px;padding:5px 8px;text-align:right;font-size:14px}
.sw-current-table .sw-current-product{font-size:16px;text-align:left;min-width:190px;white-space:normal}
.sw-current-product>strong,.sw-stock-name{font-size:16px;line-height:1.3;font-weight:700;overflow-wrap:anywhere}
.sw-current-product .sw-stock-name{display:flex;align-items:center;justify-content:space-between;gap:3px;width:100%;min-height:32px;padding:0;border:0;background:none;text-align:left;color:inherit}
.sw-stock-name>span{font-size:12px;color:#6a7c70;flex-shrink:0}
.sw-current-table .sw-current-number{font-size:18px;font-weight:700}
.sw-current-table tfoot th,.sw-current-table tfoot td{position:sticky;bottom:0;background:#e7efe9;border-top:1px solid #a8c0af;font-weight:700}
.sw-stock-breakdown td{padding:0 8px;background:#edf3ee!important}
.sw-stock-breakdown p{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px 14px;margin:0;padding:6px 4px;border-bottom:1px solid #dbe5de;text-align:left}
.sw-stock-breakdown p>span{overflow-wrap:anywhere;white-space:normal}
.sw-stock-breakdown p>small{white-space:nowrap}
.sw-current-product .sw-mobile-held,.sw-transfer-mobile-qty{display:none}
.sw-transfer-goods>div+div{margin-top:5px}
.sw-qty input{width:100px;min-width:0;font-size:22px;min-height:44px;font-variant-numeric:tabular-nums}
.sw-receive-verified{display:flex;align-items:center;gap:7px;font-size:17px;font-weight:700;color:#ad2b22;margin:8px 0}
.sw-receive-verified input{width:22px;height:22px;flex-shrink:0}
@media(max-width:900px){
 .sw-tabs{display:flex;flex-wrap:wrap;gap:3px;padding-bottom:4px}
 .sw-tabs button{font-size:14px;padding:5px 8px;min-height:36px}
 .sw-current .sw-filters{gap:5px}
 .sw-current .sw-filters input{flex:1;width:55%;font-size:16px;padding:6px 8px}
 .sw-current .sw-filters select{width:40%;max-width:40%;font-size:14px;padding:6px}
 .sw-current-caption{font-size:11px;gap:4px}.sw-current-caption strong{font-size:13px}
 .sw-current-table{min-width:0;table-layout:fixed;width:100%}
 .sw-current-table th,.sw-current-table td{position:static!important;white-space:normal;min-width:0!important;padding:5px 6px;line-height:1.35}
 .sw-current-table thead th{position:sticky!important;top:0;z-index:2;font-size:12px}
 .sw-current-table th:first-child{width:auto;max-width:none}
 .sw-current-table th:nth-child(2),.sw-current-table th:nth-child(3){width:72px}
 .sw-current-table .sw-held,.sw-current-table .sw-by-location{display:none}
 .sw-current-table .sw-current-product{font-size:17px;min-width:0}
 .sw-current-product>strong,.sw-current-product .sw-stock-name{font-size:17px;min-height:34px}
 .sw-current-product .sw-mobile-held{display:block;font-size:12px;line-height:1.35;margin-top:2px}
 .sw-current-table .sw-current-number{font-size:20px;overflow-wrap:anywhere;line-height:1.3}
 .sw-current-table tfoot th,.sw-current-table tfoot td{position:sticky!important;bottom:0;top:auto;font-size:14px}
 .sw-stock-breakdown p{grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;padding:5px 2px;font-size:14px}
 .sw-stock-breakdown p small{grid-column:2;font-size:12px}
 .sw-stock-breakdown p strong{font-size:17px}
 .sw-current .sw-hint{font-size:11px;line-height:1.4;margin:5px 0 0;flex-shrink:0}
 .sw-transfer-table,.sw-transfer-table tbody,.sw-date-table,.sw-date-table tbody{display:block;width:100%;min-width:0}
 .sw-transfer-table thead,.sw-date-table thead{display:none}
 .sw-transfer-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px 4px;border-bottom:1px solid #d5e0d8}
 .sw-transfer-table td,.sw-date-table td{position:static!important;min-width:0!important;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;background:transparent!important;font-size:14px}
 .sw-transfer-table td:first-child{grid-column:1/-1}
 .sw-transfer-table td:first-child>button{font-size:15px;font-weight:700;min-height:30px;padding:0}
 .sw-transfer-table td:first-child>small{font-size:13px;margin-bottom:2px}
 .sw-transfer-table .sw-transfer-desktop-qty{display:none}
 .sw-transfer-table .sw-transfer-goods strong{font-size:17px;line-height:1.3}
 .sw-transfer-table .sw-transfer-mobile-qty{display:block;font-size:15px;color:#405d4a;margin-top:3px;font-variant-numeric:tabular-nums}
 .sw-transfer-table td:last-child{align-self:center;justify-self:end}
 .sw-transfer-table [data-receive-transfer]{min-height:44px;font-size:16px;padding:7px 10px;color:#155a3c;background:#edf5ef}
 .sw-date-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;padding:8px 5px;border-bottom:1px solid #d5e0d8}
 .sw-date-table td:first-child{grid-column:1/-1;font-size:17px;font-weight:700}
 .sw-date-table td:first-child small{font-size:13px}
 .sw-date-table td:last-child{grid-column:1/-1;display:flex;gap:5px;flex-wrap:wrap}
 .sw-date-table td:last-child button{min-height:38px;font-size:14px}
 .sw-date-table td:nth-child(4){font-size:14px}
 .sw-page .toolbar.between{gap:5px}.sw-page .toolbar.between>span{flex:1;min-width:0}
 .sw-scroll{border:0;min-width:0;width:100%}
 .sw-move-line{grid-template-columns:minmax(0,1fr) auto;padding:8px;gap:6px}
 .sw-move-line>.field{grid-column:1/-1;min-width:0}
 .sw-move-line select{min-width:0;max-width:100%;width:100%;font-size:16px}
 .sw-move-line [data-quantity]{min-width:0}
 .sw-move-line>button{grid-column:2;grid-row:2;min-height:40px}
 .sw-move-line small{grid-column:1/-1;grid-row:3}
 .sw-move-lines article strong{font-size:18px;overflow-wrap:anywhere}
 .sw-move-lines article{padding:8px}
 dialog:has(.sw-move-lines) .form-actions button{min-height:48px;font-size:17px}
 dialog:has(.sw-move-lines) [data-transfer-fill]{min-height:42px;font-size:16px}
 dialog:has(.sw-move-lines) .grid{grid-template-columns:minmax(0,1fr)}
 .sw-qty input{width:100px;font-size:22px;min-height:44px;appearance:textfield;-moz-appearance:textfield}
 .sw-qty input::-webkit-inner-spin-button,.sw-qty input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
}
@media(max-width:900px){
 /* Explicit three-column mobile rows keep hidden desktop cells and colspan out of sizing. */
 .sw-current-table,.sw-current-table thead,.sw-current-table tbody,.sw-current-table tfoot{display:block;width:100%}
 .sw-current-table tr{display:grid;grid-template-columns:minmax(0,1fr) 74px 74px;width:100%;align-items:center}
 .sw-current-table th,.sw-current-table td{display:block;width:auto!important;max-width:none;min-width:0!important}
 .sw-current-table .sw-current-product,.sw-current-table .sw-current-product>strong,.sw-current-table .sw-current-product .sw-stock-name{font-size:17px;white-space:normal;line-height:1.35;min-width:0}
 .sw-current-table .sw-held,.sw-current-table .sw-by-location{display:none!important}
 .sw-current-table .sw-current-number{text-align:right;font-size:20px}
 .sw-current-table thead{position:sticky;top:0;z-index:4;background:#e7efe9}
 .sw-current-table thead th{position:static!important}
 .sw-current-table tfoot{position:sticky;bottom:0;z-index:4;background:#e7efe9}
 .sw-current-table tfoot tr{grid-template-columns:minmax(0,1fr) 148px}
 .sw-current-table tfoot th,.sw-current-table tfoot td{position:static!important}
 .sw-current-table .sw-stock-breakdown{display:block}
 .sw-current-table .sw-stock-breakdown>td{width:100%!important}
}
@media(max-width:900px){
 .sw-current-table tr,.sw-current-table th,.sw-current-table td{height:auto!important;min-height:0}
 .sw-current-table .sw-current-product .sw-stock-name{height:auto!important;min-height:34px;align-items:flex-start;color:var(--ink)}
 .sw-current-table .sw-current-product>strong{color:var(--ink)}
}
@media(max-width:900px){
 .sw-transfer-table tr,.sw-transfer-table td,.sw-date-table tr,.sw-date-table td{height:auto!important}
}
.sw-date-count-label{display:none}
@media(max-width:900px){.sw-date-count-label{display:inline;font-size:12px;color:#6a7c70}}
/* One transfer product stays on a compact row, with finger-sized quantity and remove controls. */
.sw-move-lines .sw-transfer-line{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:4px 6px;align-items:end;padding:8px}
.sw-transfer-line .sw-transfer-product{display:grid;gap:2px;min-width:0;font-size:12px}
.sw-transfer-line .sw-transfer-product select{width:100%;min-width:0;min-height:44px;font-size:18px;font-weight:650;padding:4px}
.sw-transfer-line [data-quantity]{min-width:0}
dialog .sw-move-lines .sw-transfer-line .sw-qty{gap:4px}
dialog .sw-move-lines .sw-transfer-line .sw-qty label{font-size:12px;margin:0}
dialog .sw-move-lines .sw-transfer-line .sw-qty input{width:80px;min-width:0;min-height:44px;height:44px;padding:4px;font-size:22px;box-sizing:border-box}
.sw-move-lines .sw-transfer-line [data-available]{grid-column:1/3;margin:0;font-size:12px;line-height:1.3}
.sw-transfer-line [data-remove]{grid-column:3;grid-row:1;min-width:44px;min-height:44px;padding:3px;font-size:12px;margin:0}
@media(max-width:420px){dialog .sw-move-lines .sw-transfer-line:has([name$="-bag"]) .sw-qty input{width:60px}}

.stock-change-choices{display:grid;gap:9px}.stock-change-choices button{display:grid;gap:4px;text-align:left;padding:12px;min-height:60px}.stock-change-choices strong{font-size:17px}.stock-change-choices small{font-size:13px;color:#57695e}
.stock-return-orders{max-height:55vh;overflow:auto;display:grid;gap:5px}.stock-return-orders button{text-align:left;display:grid;grid-template-columns:1fr auto;gap:4px;padding:9px}.stock-return-orders small{grid-column:1/-1;white-space:normal;font-size:13px;color:#57695e}
.damage-quantity{font-size:18px;font-weight:750;color:#283f30}.damage-pending,.stock-shortage{color:#85551b}.damage-done{color:#28704b}.damage-change-preview{font-weight:650;color:#445a4b;line-height:1.45}
