/* Keep the inventory overview compact and the primary desktop tools on one row. */
.inventory-overview{display:flex;align-items:stretch;gap:10px;margin-bottom:14px}
.inventory-overview .metrics-grid{display:flex;flex:1;gap:0;margin:0;background:var(--white);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.inventory-overview .metric{display:flex;flex:1;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:8px 12px;border:0;border-radius:0;box-shadow:none;background:transparent}
.inventory-overview .metric+.metric{border-left:1px solid var(--line)}
.inventory-overview .metric-number{font-size:21px;letter-spacing:-.5px}
.inventory-overview .metric-label{margin:0;font-size:12px;letter-spacing:0;text-transform:none;white-space:nowrap}
.inventory-overview .inventory-alert{width:auto;flex:0 0 auto;margin:0;padding:8px 12px;gap:8px;font-size:12px}
.inventory-toolbar{display:flex;flex-wrap:nowrap;gap:10px;margin-bottom:12px;align-items:stretch}
.toolbar-container{display:flex;align-items:center;gap:4px;min-width:0;padding:4px;background:var(--white);border:1px solid var(--line);border-radius:10px}
.toolbar-search{flex:1}
.inventory-toolbar .search-box{min-width:0;height:36px}
.inventory-toolbar .search-box input{height:36px;border:0;background:transparent;padding-left:34px;font-size:12px}
.inventory-toolbar .search-box>.icon{left:9px;top:9px}
.inventory-toolbar .toolbar-filters{height:36px;min-height:36px;min-width:86px;padding:7px 10px;border:0;border-left:1px solid var(--line);border-radius:0 6px 6px 0;font-size:12px}
.toolbar-view,.toolbar-tools{flex:0 0 auto}
.inventory-toolbar .view-switch{height:36px;padding:0 4px;border:0;border-left:1px solid var(--line);border-radius:0}
.inventory-toolbar .view-switch .btn-icon{width:32px;min-width:32px;height:32px}
.inventory-toolbar .toolbar-customize{width:34px;min-width:34px;height:34px;min-height:34px;border:0;background:transparent}
.toolbar-menu{position:relative;min-width:0}
.toolbar-menu summary{display:flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 10px;border-radius:6px;font-size:12px;font-weight:700;color:var(--ink);list-style:none;white-space:nowrap;cursor:pointer;user-select:none}
.toolbar-menu summary::-webkit-details-marker{display:none}
.toolbar-menu summary .icon svg{width:16px;height:16px}
.toolbar-menu summary:hover,.toolbar-menu[open]>summary{background:#f0f0fd;color:#363899}
.toolbar-chevron{color:var(--muted);font-size:14px}
.toolbar-tools>.toolbar-menu+.toolbar-menu{border-left:1px solid var(--line);padding-left:4px}
.toolbar-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:30;display:flex;flex-direction:column;gap:12px;width:280px;max-width:calc(100vw - 36px);margin:0;padding:14px;background:var(--white);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px #1d24441f;white-space:normal}
.toolbar-sort .toolbar-popover{left:0;right:auto;width:240px}
.toolbar-popover .quick-sort,.toolbar-popover .sort-direction{display:flex;flex-direction:column;align-items:stretch;gap:6px;font-size:12px;font-weight:700;color:var(--muted)}
.toolbar-popover .filter-select{height:38px;min-width:0;width:100%;max-width:none;flex:none;margin:0;padding:0 28px 0 10px;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:var(--white);font-size:12px}
.toolbar-popover .quick-sort span{display:block}
.toolbar-popover .saved-search-actions{display:flex;flex-wrap:nowrap;width:100%;gap:6px}
.toolbar-popover .saved-search-actions .btn{flex:1;min-width:0;padding:7px;font-size:11px}
.toolbar-popover .saved-search-hint{font-size:11px;margin:0;line-height:1.5;overflow-wrap:anywhere}
.saved-search-indicator{color:#3c4ab0}
.saved-search-indicator[hidden]{display:none}
.listing-action-menu{width:245px;gap:4px;padding:7px}
.listing-action-menu .btn{width:100%;justify-content:flex-start;border:0;background:transparent;text-align:left}
.listing-action-menu .btn:hover{background:#f0f0fd}
.inventory-toolbar :is(summary,button,input,select):focus-visible{outline:2px solid #6769c5;outline-offset:2px}
[data-theme="dark"] :is(.toolbar-container,.toolbar-popover,.inventory-overview .metrics-grid){background:#1d2435;border-color:#353e54}
[data-theme="dark"] .inventory-overview .metric{background:transparent}
[data-theme="dark"] .toolbar-popover .filter-select{background:#1d2435;color:var(--ink);border-color:#353e54}
[data-theme="dark"] .toolbar-menu summary:hover,[data-theme="dark"] .toolbar-menu[open]>summary,[data-theme="dark"] .listing-action-menu .btn:hover{background:#303650;color:#dddefe}
@media(max-width:1000px){
 .inventory-toolbar{flex-wrap:wrap}
 .toolbar-search{flex:1 1 100%}
 .toolbar-view{flex:1;justify-content:space-between}
}
@media(max-width:560px){
 .inventory-overview{flex-wrap:wrap;gap:8px}
 .inventory-overview .metrics-grid{flex-basis:100%}
 .inventory-overview .metric{flex-direction:column;gap:2px;min-height:52px;padding:6px}
 .inventory-overview .metric-label{font-size:10px}
 .inventory-overview .inventory-alert{margin-left:auto;padding:6px 10px}
 .inventory-toolbar{gap:8px}
 .toolbar-view,.toolbar-tools{flex:1 1 100%;justify-content:space-between}
 .toolbar-tools>.toolbar-menu{flex:1}
 .toolbar-popover{max-width:calc(100vw - 36px)}
 .toolbar-saved .toolbar-popover{left:0;right:auto}
}
