/* Scoped to the original stock screen and its column dialog. */
.stock-history-filter{max-width:360px;margin:16px 0}.history-dialog .history-row{align-items:flex-start;gap:16px}.history-dialog .history-row>div{min-width:0;overflow-wrap:anywhere}.history-dialog .history-row small{display:block;line-height:1.5}.history-dialog .movement-amount{flex-shrink:0}@media(max-width:600px){.history-dialog .history-row{flex-wrap:wrap}.stock-history-filter{max-width:none}}
.stock-panel{--stock-filter-surface:var(--stock-menu-surface,#edf1f6);--stock-filter-border:var(--stock-menu-border,#bccbdc)}
html[data-theme="dark"] .stock-panel{--stock-filter-surface:#243241;--stock-filter-border:#435364}
.stock-column-filter{display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;background:transparent;color:inherit;text-align:left;padding:6px 0;width:100%;font-size:inherit;font-weight:inherit;min-height:36px}
.stock-column-filter.is-active{color:var(--blue);text-decoration:underline;text-underline-offset:5px}
.stock-active-filters,.stock-filter-totals,.stock-filter-pagination{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0}
.stock-active-filters:empty{display:none}.stock-filter-tag{font-size:12px}.stock-filter-totals{border-bottom:1px solid var(--stock-filter-border);margin-bottom:10px}.stock-filter-pagination{justify-content:flex-end}
.stock-filter-dialog{width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
.stock-filter-dialog .stock-filter-form{display:grid;gap:14px;min-width:0}.stock-filter-form label{display:flex;align-items:center;gap:8px}.stock-filter-form>label:has([type="search"]),.stock-filter-form .field label,.stock-filter-range label{display:grid;gap:6px}.stock-filter-range{display:grid;grid-template-columns:1fr 1fr;gap:16px}.stock-filter-range input{width:100%;min-width:0}
.stock-filter-options{max-height:300px;overflow-y:auto;overscroll-behavior:contain;display:grid;gap:4px}.stock-filter-options label{padding:7px 0;align-items:flex-start}.stock-filter-options label[hidden]{display:none}.stock-filter-options span{min-width:0;overflow-wrap:anywhere;flex:1}.stock-filter-options small{margin-left:auto}.stock-filter-options input{flex-shrink:0;margin-top:4px}.stock-filter-form .form-actions{flex-wrap:wrap}
@media(max-width:640px){.stock-filter-totals{align-items:flex-start;flex-direction:column}.stock-filter-pagination{justify-content:center}.stock-panel .stock-toolbar{flex-wrap:wrap}.stock-active-filters .button{max-width:100%;white-space:normal;overflow-wrap:anywhere}}
.stock-panel .stock-product-movement{display:grid;gap:6px;margin-top:12px;text-align:left;width:100%;max-width:300px;white-space:normal;overflow-wrap:anywhere;color:inherit;background:var(--stock-filter-surface);border:1px solid var(--stock-filter-border);box-shadow:none}
.stock-product-movement strong{font-size:12px}.stock-product-movement span{font-size:12px;line-height:1.5}.stock-product-movement:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.stock-product-history ul{list-style:none;margin:0;padding:0}.stock-product-history li{display:grid;gap:8px;padding:16px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.stock-product-history li span,.stock-product-history time{font-size:13px}.stock-product-history li p{margin:0}.stock-product-history li ul{border-left:2px solid var(--line);padding-left:16px}
@media(max-width:600px){#stock-rows .stock-table-wrap{overflow:visible}#stock-rows .stock-table{display:block;min-width:0;white-space:normal}#stock-rows .stock-table thead{display:block}#stock-rows .stock-table thead tr{display:flex;flex-wrap:wrap;gap:4px}#stock-rows .stock-table th{padding:4px;font-size:11px}#stock-rows .stock-table tbody{display:grid;gap:16px}#stock-rows .stock-table tbody tr[data-stock-product]{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--stock-filter-border);border-radius:8px;padding:12px;background:var(--stock-filter-surface)}#stock-rows tr[data-stock-product] td{display:flex;justify-content:space-between;gap:12px;padding:8px 0;min-width:0;flex-wrap:wrap}#stock-rows tr[data-stock-product] td:first-child{display:block}#stock-rows tr[data-stock-product] td:not(:first-child)::before{content:attr(data-stock-label);font-size:12px}#stock-rows .stock-product-movement{max-width:none}#stock-rows .stock-actions{flex-wrap:wrap}.stock-product-history-dialog{max-width:calc(100vw - 24px)}}