.stock-list-tools{display:flex;align-items:center;gap:7px;margin:8px 0;color:var(--muted,#6b8193);font-size:12px}.stock-list-tools .active{background:var(--accent-soft,#e3f3f1);border-color:var(--accent,#0d9488);color:var(--accent,#0d766d);font-weight:600}.stock-list-active{display:block!important;min-width:0}.stock-list-scroll{width:100%;max-width:100%;overflow:auto;border:1px solid var(--line,#dce6ed);border-radius:8px;background:var(--surface,#fff)}.stock-list-table{width:100%;min-width:800px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px;line-height:1.5;text-align:left}.stock-list-table th,.stock-list-table td{padding:11px 12px;border-bottom:1px solid var(--line,#e6edf1);vertical-align:middle;overflow-wrap:anywhere}.stock-list-table thead th{position:sticky;top:0;z-index:1;background:var(--surface-alt,#f0f6f8);color:var(--text,#244052);font-weight:600}.stock-list-table thead th:first-child{width:24%}.stock-list-table tbody th{font-weight:600}.stock-list-table tr.selected>th,.stock-list-table tr.selected>td{background:var(--accent-soft,#e3f3f1)}.stock-list-table [data-stock-list-row]{cursor:pointer}.stock-list-table [data-stock-list-row]:hover>td,.stock-list-table [data-stock-list-row]:hover>th{background:var(--surface-alt,#f4f9fa)}.stock-list-table .stock-list-group th{background:var(--surface-alt,#edf5f6);font-size:14px;font-weight:700;padding-top:13px;padding-bottom:9px}.stock-list-empty{text-align:center;color:var(--muted,#738799);padding:25px!important}.stock-list-name{border:0;background:none;color:inherit;text-align:left;padding:0;font:inherit;cursor:pointer}.stock-list-name:focus-visible{outline:2px solid var(--accent,#0d9488);outline-offset:4px}.stock-origin-badge{display:inline-block;border-radius:5px;padding:3px 7px;font-size:12px;background:#e6f3ed;color:#23684e}.stock-origin-badge.outsourced{background:#fff0d9;color:#966016}.stock-origin-badge.unknown{background:#fff0ed;color:#a94b39}
.stock-origin-picker .mobile-picker-parts{display:block!important;overflow-x:auto}.stock-origin-picker .mobile-picker-part{display:grid!important;grid-template-columns:minmax(140px,1.6fr) 110px 110px 110px 110px minmax(220px,2fr);gap:10px;align-items:center;min-width:860px;width:100%;padding:12px;margin:0;border-radius:0;border-width:0 0 1px!important;background:#fff}.stock-origin-picker .mobile-picker-product{overflow:hidden}.stock-origin-picker .stock-origin-editor{display:flex;flex-direction:column;gap:5px}.stock-origin-picker .mobile-picker-quantity-edit{margin:0}.stock-origin-picker .mobile-picker-quantity-edit>div{display:flex;gap:8px;flex-wrap:wrap}.stock-origin-picker .mobile-picker-sets input{width:70px}.stock-origin-picker .mobile-picker-variant input[type=number]{max-width:80px}.stock-origin-picker .mobile-picker-part>span{font-size:12px}.stock-origin-picker .mobile-picker-part>strong{font-size:14px}.stock-origin-picker .stock-origin-head{background:#eef5f7;font-size:12px;font-weight:600}.stock-origin-picker .stock-origin-head>strong{font-size:12px}.stock-origin-picker .mobile-picker-footer{gap:8px}.stock-origin-picker .mobile-picker-footer>div:last-child{display:flex;gap:8px;flex-wrap:wrap}.stock-origin-picker .mobile-picker-part.selected{background:#f0faf5}.stock-origin-picker .stock-origin-choice{font-size:12px;font-weight:600;color:#25694f}.stock-origin-picker .stock-origin-choice.outsourced{color:#966016}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){.stock-list-table{min-width:0;width:100%;font-size:12px}.stock-list-table th,.stock-list-table td{padding:7px 6px;line-height:1.35}.stock-list-table thead th{font-size:11px;font-weight:500;line-height:1.25}.stock-list-scroll{overflow-x:hidden}.stock-list-tools button{min-height:40px}.stock-origin-picker .mobile-picker-parts{max-width:100%}.stock-origin-picker .mobile-picker-part{min-width:800px;grid-template-columns:150px 95px 95px 95px 95px 230px}.stock-origin-picker .mobile-picker-product{margin:8px 0}.stock-list-scroll{margin-bottom:8px}}
.stock-list-product{margin:0 0 12px}.stock-list-product>summary{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:9px 4px 7px;list-style:none;cursor:pointer}.stock-list-product>summary::-webkit-details-marker{display:none}.stock-list-product>summary>strong{font-size:14px;font-weight:600;color:var(--text,#244052)}.stock-list-product>summary>small{font-size:11px;color:var(--muted,#6b8193);white-space:nowrap}.stock-list-product>.stock-list-scroll{border-radius:8px}@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){.stock-list-product{margin:0 0 14px}.stock-list-product>summary{padding:8px 2px 6px}.stock-list-product .stock-list-table th:first-child{padding-left:4px}}@media(min-width:761px) and (min-height:561px){body.desktop-shell-active #desktopTransferReturnPane #mobileRawReturnToolbar:not(.hidden){display:flex!important;gap:8px;align-items:center}#desktopTransferReturnPane #mobileRawReturnBoard .mobile-handoff-tools{display:flex;gap:8px}.stock-origin-picker{max-width:1200px!important;width:94vw!important}.stock-origin-picker .mobile-picker-products{overflow:auto}}
.stock-list-table th,.stock-list-table td{white-space:normal;min-height:44px;line-height:1.45}.stock-list-table .stock-list-relation-parent>th{background:var(--surface-alt,#edf5f6);font-weight:700}.stock-list-table .stock-list-relation-child>th{padding-left:30px}.stock-list-name{display:block;min-height:28px;line-height:1.45}.stock-list-parent-marker,.stock-list-child-marker{display:inline-block;width:20px;color:var(--accent,#0d9488);font-weight:700}.stock-list-relation{display:block;margin-top:2px;color:var(--muted,#738799);font-size:11px;font-weight:400;line-height:1.35}
.stock-list-table th,.stock-list-table td{height:auto!important;max-height:none!important;overflow:visible;text-overflow:clip;word-break:break-word}.stock-list-table .stock-list-name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(1){width:18%}.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(2),.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(3){width:14%}.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(4){width:12%}.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(5),.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(6){width:14%}.stock-list-table:not(.stock-list-table-with-chart) thead th:nth-child(7){width:14%}.stock-list-table-with-chart thead th:nth-child(1){width:14%}.stock-list-table-with-chart thead th:nth-child(2){width:24%;min-width:220px}.stock-list-table-with-chart thead th:nth-child(3){width:10%}.stock-list-table-with-chart thead th:nth-child(4){width:10%}.stock-list-table-with-chart thead th:nth-child(5){width:10%}.stock-list-table-with-chart thead th:nth-child(6){width:11%}.stock-list-table-with-chart thead th:nth-child(7){width:11%}.stock-list-table-with-chart thead th:nth-child(8){width:10%}.stock-list-inline-chart{display:flex;flex-direction:column;gap:4px;min-width:180px}.stock-list-inline-track{position:relative;height:16px;border:1px solid var(--line,#dce6ed);border-radius:4px;background:var(--surface-alt,#f2f7f8);overflow:visible}.stock-list-inline-segment{position:absolute;top:0;bottom:0;display:block}.stock-list-inline-segment.in-house{background:#2eaf61}.stock-list-inline-segment.outsourced{background:#e79324}.stock-list-inline-target{position:absolute;top:-4px;bottom:-4px;width:3px;border-radius:2px;background:#0d9488;transform:translateX(-1px)}.stock-list-inline-facts{display:block;white-space:normal;color:var(--muted,#6f8493);font-size:11px;line-height:1.3}.stock-list-inline-chart-empty{color:var(--muted,#738799);font-size:12px}@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){.stock-list-table-with-chart thead th:nth-child(2){min-width:200px}.stock-list-inline-chart{min-width:160px}}
/* 手机上的“按来源挑部件”：六列在 480 宽里只能露出一半，右边永远被切。
   改成三列——部件名 / 自家可用 / 外包可用，来源和数量各自占一行，一行一个部件看全。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  .stock-origin-picker .mobile-picker-parts{display:block!important;overflow-x:visible}
  .stock-origin-picker .mobile-picker-part{display:grid!important;grid-template-columns:minmax(0,1fr) 74px 74px;gap:3px 8px;min-width:0!important;width:100%;padding:8px 10px!important;align-items:center}
  .stock-origin-picker .mobile-picker-part>strong{grid-column:1;grid-row:1;font-size:13px;padding-right:0;min-width:0;overflow-wrap:anywhere}
  .stock-origin-picker .mobile-picker-part>span:nth-of-type(1){grid-column:2;grid-row:1;text-align:right;white-space:nowrap}
  .stock-origin-picker .mobile-picker-part>span:nth-of-type(2){grid-column:3;grid-row:1;text-align:right;white-space:nowrap}
  .stock-origin-picker .mobile-picker-part>span:nth-of-type(3){display:none!important}
  .stock-origin-picker .stock-origin-head{grid-template-columns:minmax(0,1fr) 74px 74px}
  .stock-origin-picker .stock-origin-head>span:nth-of-type(4),.stock-origin-picker .stock-origin-head>span:nth-of-type(5){display:none!important}
  .stock-origin-picker .mobile-picker-part>.stock-origin-choice{grid-column:1;grid-row:2;text-align:left;font-size:11px;font-weight:500}
  .stock-origin-picker .mobile-picker-part>.stock-origin-editor{grid-column:1/-1;grid-row:3;margin-top:2px}
  .stock-origin-picker .mobile-picker-variant{flex-wrap:wrap}
}
/* 手机上表格行不再被 44px 最小高度撑开，操作按钮也不许折成两行。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  .stock-list-table th,.stock-list-table td{min-height:0!important;max-height:none!important;padding-top:5px!important;padding-bottom:5px!important}
  .stock-list-table .stock-list-name{min-height:0!important;line-height:1.35}
  .stock-list-table td .btn,.stock-list-table th .btn{padding:4px 8px;font-size:12px;min-height:0;white-space:nowrap;line-height:1.3}
}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  .stock-origin-picker .mobile-picker-part{border:1px solid #e6eef8!important;border-radius:10px!important;margin-bottom:6px;background:#fff}
  .stock-origin-picker .stock-origin-head{border:0!important;border-radius:0!important;margin-bottom:4px;background:#eef5fb!important}
}
/* 收起时也要能看出可以点开：自绘一个三角，不依赖浏览器默认的 marker。 */
.stock-list-product>summary::marker{content:''}
.stock-list-product>summary::before{content:'▸';flex:0 0 auto;margin-right:4px;color:#5a7899;font-size:12px}
.stock-list-product[open]>summary::before{content:'▾'}
.stock-list-product>summary{justify-content:flex-start}
.stock-list-product>summary>small{margin-left:auto}
/* 手机库存表：和电脑端同一套列（排序 / 部件 / 进度 / 总数量 / 目标 / 缺口 / 状态 / 来源两列）。
   列宽按像素写死，屏幕放不下就左右滑，不再把右边几列裁掉，也不挤成两行字。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  .stock-list-table,.stock-list-table-with-chart{width:max-content;min-width:0!important;table-layout:auto}
  .stock-list-table thead th,.stock-list-table tbody th,.stock-list-table td{width:auto;min-width:0}
  .stock-list-scroll{overflow-x:auto!important;overflow-y:visible;max-width:100%}
  .stock-list-table .stock-list-inline-chart{min-width:180px}
  .stock-list-table .stock-list-relation-child>th{padding-left:18px}
  .stock-list-product>.stock-list-scroll{overflow-x:auto}
}
/* 列宽写死像素的表格：总宽由脚本算好，这里只保证不被压扁。 */
.stock-list-table-px{table-layout:fixed}
.stock-list-thumb{width:34px;height:34px;border-radius:8px;object-fit:contain;vertical-align:middle;margin-right:6px;border:1px solid #e2eaf5;background:#eef4fb}
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){.stock-list-thumb{width:30px;height:30px;border-radius:7px;margin-right:5px}}

/* 手机物料移交：四列铺满屏。移动端上面的通用规则把表格设成 max-content，
   这里用更高优先级把移交表固定为 100% 宽，列按百分比分配。 */
@media(max-width:760px), (orientation:landscape) and (any-pointer:coarse) and (max-height:600px){
  .stock-list-table.stock-list-table-transfer{width:100%!important;min-width:0!important;table-layout:fixed!important}
  .stock-list-table.stock-list-table-transfer thead th,
  .stock-list-table.stock-list-table-transfer tbody th,
  .stock-list-table.stock-list-table-transfer td{width:auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
  .stock-list-table.stock-list-table-transfer thead th:nth-child(2),
  .stock-list-table.stock-list-table-transfer thead th:nth-child(3),
  .stock-list-table.stock-list-table-transfer thead th:nth-child(4){text-align:center}
  .stock-list-table.stock-list-table-transfer tbody td:nth-child(2),
  .stock-list-table.stock-list-table-transfer tbody td:nth-child(3){text-align:center}
}
.stock-list-transfer-bag{display:block;margin-top:2px;font-size:10px;font-weight:400;line-height:1.25;color:#6881a2;overflow-wrap:anywhere}
