.item-stock-workspace{display:flex;flex-direction:column;gap:14px;height:calc(100dvh - 108px);min-height:360px}
.item-stock-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:14px 16px;flex:0 0 auto}
.item-stock-toolbar h1{margin:0;font-size:16px;font-weight:800;white-space:nowrap}
.item-stock-heading{flex:1 1 100%;min-width:0}.item-stock-heading p{margin:4px 0 0;color:var(--muted);font-size:13px}
.item-stock-toolbar input{flex:1 1 190px;min-width:140px;max-width:280px;height:40px;border-radius:7px;font-size:12px}
.item-stock-totals{display:flex;flex-wrap:wrap;gap:16px;color:var(--muted);font-size:11px}
.item-stock-totals>span{display:flex;align-items:center;gap:7px}
.item-stock-totals strong{color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.item-stock-actions{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
.item-stock-actions .button{min-height:40px;padding:9px 13px;font-size:11px;border-radius:7px}
.item-stock-body{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;flex:1 1 auto;min-height:0}
.item-stock-categories{overflow:auto;padding:12px 8px;border-radius:7px;scrollbar-gutter:stable}
.item-stock-categories h2{margin:4px 8px 12px;color:var(--muted);font-size:11px;font-weight:700}
.item-stock-categories button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:42px;padding:10px 9px 10px calc(9px + var(--category-depth,0)*12px);border:0;border-radius:5px;background:transparent;color:var(--ink);text-align:left;font-size:12px;line-height:1.35}
.item-stock-categories button+button{margin-top:3px}
.item-stock-categories button:hover,.item-stock-categories button.active{background:var(--mint);color:var(--green-2)}
.item-stock-categories button.active{font-weight:800;box-shadow:inset 3px 0 var(--green-2)}
.item-stock-categories button:focus-visible{outline:2px solid var(--green-2);outline-offset:-2px}
.item-stock-categories button small{display:block;margin-top:2px;color:var(--muted);font-size:10px}
.item-stock-categories [data-stock-warning]>span{padding:2px 6px;border-radius:9px;background:var(--cream);font-size:10px}
.item-stock-panel{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border-radius:7px}
.item-stock-panel .data-table-wrap{flex:1 1 auto;overflow:auto;min-height:0;scrollbar-gutter:stable}
.item-stock-panel .tracking-stock-table{min-width:1050px;width:100%;border-collapse:separate;border-spacing:0}
.item-stock-panel .tracking-stock-table th{position:sticky;top:0;z-index:1;height:40px;padding:10px 12px;background:var(--cream);color:var(--muted);font-size:10px;font-weight:700;letter-spacing:0;text-transform:none;white-space:nowrap}
.item-stock-panel .tracking-stock-table td{height:64px;padding:9px 12px;font-size:12px;border-bottom:1px solid var(--line)}
.item-stock-panel .tracking-stock-table td:first-child{min-width:230px}
.item-stock-panel .tracking-stock-table td:nth-child(5){min-width:130px;max-width:190px}
.item-stock-panel .tracking-stock-table td:nth-child(6),.item-stock-panel .tracking-stock-table td:nth-child(7),.item-stock-panel .tracking-stock-table td:nth-child(8){white-space:nowrap;font-variant-numeric:tabular-nums}
.item-stock-panel .tracking-stock-table tr.stock-low-row{background:var(--cream)}
.item-stock-panel .tracking-stock-table tr:hover{background:var(--mint)}
.item-stock-name{display:flex;align-items:center;gap:9px}
.item-stock-name>span:last-child{min-width:0}
.item-stock-name .resource-thumb{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;margin:0;border-radius:5px;background:var(--mint);color:var(--green);font-size:11px}
.item-stock-name .resource-thumb img{width:100%;height:100%;object-fit:cover;border-radius:5px}
.item-stock-name strong{display:block;font-size:12px;font-weight:700;line-height:1.35}
.item-stock-name small{margin-top:3px;font-size:10px;color:var(--muted)}
.item-stock-name .stock-mode{display:inline-flex;min-height:16px;padding:2px 5px;margin-top:4px;font-size:8px;background:var(--mint);color:var(--green)}
.item-stock-panel .row-actions{max-width:140px;gap:4px}
.item-stock-panel .tiny-button{padding:5px 7px;font-size:10px;border-radius:5px;white-space:nowrap}
.item-stock-quantity.negative,.item-stock-warning.low{color:var(--red);font-weight:700}
.item-stock-warning small{display:block;font-size:9px;margin-top:3px;color:inherit}
.item-stock-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:9px 12px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);background:var(--paper)}
.item-stock-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.stock-batch-workflow{display:grid;gap:14px;padding:6px 0}.stock-batch-workflow h3{margin:10px 0;color:var(--green-2,#0969b5)}.stock-batch-workflow p{margin:0;line-height:1.6}.stock-batch-workflow>a{justify-self:start}.stock-batch-warning,.stock-batch-errors{color:#a32626}.stock-batch-file{display:grid;gap:10px}.stock-batch-file input{max-width:100%;padding:12px;border:1px dashed var(--line);border-radius:6px}.stock-batch-preview-table{min-width:900px}.stock-batch-preview-table th{white-space:normal}.stock-batch-preview-table td{font-variant-numeric:tabular-nums}.stock-batch-errors{margin:14px 0}.modal:has(.stock-batch-workflow){width:min(1080px,100%)}
@media(max-width:1100px){.item-stock-toolbar{gap:10px}.item-stock-totals{gap:10px}.item-stock-body{grid-template-columns:155px minmax(0,1fr)}}
@media(max-width:700px){.item-stock-workspace{height:auto;min-height:0}.item-stock-toolbar h1{width:100%}.item-stock-toolbar input{max-width:none;flex-basis:100%}.item-stock-totals{width:100%}.item-stock-actions{margin-left:0}.item-stock-body{grid-template-columns:minmax(0,1fr)}.item-stock-categories{display:flex;align-items:stretch;gap:6px;overflow-x:auto;padding:8px;max-height:100px}.item-stock-categories h2{display:none}.item-stock-categories button{width:auto;flex:0 0 auto;max-width:210px;min-height:40px;padding:8px 10px}.item-stock-categories button+button{margin-top:0}.item-stock-panel .data-table-wrap{max-height:65dvh;min-height:180px}.item-stock-footer>span:last-child{display:none}}
