.cs-retired-tool{display:none!important}
html body #appShell #stockNavAndTools .cs-retired-tool{display:none!important}
html body #appShell #stockNavAndTools #stockQuickPanel{display:none!important}
html body #appShell #view-stock>#mobileInventoryHeader{display:none!important}
html body #appShell #view-stock>#stockNavAndTools{display:flex!important;align-items:center;gap:3px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;white-space:nowrap!important;scrollbar-width:thin}
html body #appShell #view-stock.hidden{display:none!important}
html body #appShell #stockNavAndTools>#stockQuickActions{display:contents!important}
html body #appShell #stockNavAndTools>#stockQuickActions[hidden]{display:none!important}
/* One readable button style across the scanner, inventory and utility actions. */
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button){display:inline-flex;box-sizing:border-box;flex:0 0 auto!important;align-items:center;justify-content:center!important;gap:4px!important;width:auto!important;min-width:0!important;height:32px!important;min-height:32px!important;margin:0!important;padding:5px!important;text-align:center;font-size:13px!important;line-height:20px!important;font-weight:600!important;white-space:nowrap!important;border:1px solid var(--fh-theme-border-strong,#cbd5e1)!important;border-radius:6px!important;background:var(--fh-theme-surface,#fff)!important;color:var(--fh-theme-copy,#111827)!important;box-shadow:none!important;transform:none!important}
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button)>span:not([id$="Badge"]){font:inherit!important;white-space:inherit!important}
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button)>i{display:inline-block!important;flex-shrink:0!important;color:inherit!important;font-size:13px!important;width:14px!important;margin:0!important}
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button):hover{background:var(--fh-theme-surface-2,#f1f5f9)!important}
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button):is(.tab-active,.stock-quick-modal-active,.scan-launcher-active){background:#064e3b!important;border-color:#064e3b!important;color:#fff!important}
html body #appShell #view-stock.scanning-only>#stockNavAndTools #stockSectionTopMount>#stockSectionSidebar .stock-tab.tab-active{background:var(--fh-theme-surface,#fff)!important;border-color:var(--fh-theme-border-strong,#cbd5e1)!important;color:var(--fh-theme-copy,#111827)!important;font-weight:600!important}
html body #appShell #view-stock>#stockNavAndTools :is(#stockScanningButton,#stockSectionTopMount>#stockSectionSidebar .stock-tab,#stockQuickActions>button):is([hidden],.hidden,.fh-permission-hidden,.fh-role-hidden,.cs-retired-tool){display:none!important}
/* Keep the same icons and readable text at every screen width. */
@media(max-width:1150px){html body #appShell #view-stock>#stockNavAndTools{gap:2px!important}}
.cs-history-tools{display:flex;justify-content:flex-end;margin-bottom:8px}
.cs-workspace{--cs-ink:#111827;--cs-muted:#475569;--cs-border:#cbd5e1;--cs-bg:#fff;--cs-soft:#f8fafc;--cs-accent:#0f766e;color:var(--cs-ink);background:var(--cs-bg);border:1px solid var(--cs-border);border-radius:9px;padding:12px;font-size:14px;line-height:1.4;min-width:0}
.cs-workspace *{box-sizing:border-box}
.cs-workspace [hidden]{display:none!important}
.cs-header,.cs-save-tools,.cs-tabs,.cs-footer,.cs-recent-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cs-header{padding-bottom:9px;border-bottom:1px solid var(--cs-border);flex-wrap:wrap}
.cs-header h2{font-size:17px;line-height:1.3;margin:0 0 2px;font-weight:700}
.cs-header strong{font-size:17px}
.cs-workspace button,.cs-workspace input,.cs-workspace select{font:inherit;line-height:1.4}
.cs-workspace button{border:1px solid var(--cs-border);border-radius:6px;background:var(--cs-bg);color:var(--cs-ink);min-height:35px;padding:6px 11px;font-weight:600;cursor:pointer;white-space:nowrap}
.cs-workspace button:hover{background:var(--cs-soft)}
.cs-workspace button:disabled{opacity:.5;cursor:default}
.cs-workspace :is(button,input,select):focus-visible{outline:2px solid #0891b2;outline-offset:2px}
.cs-save-tools{flex-wrap:wrap;font-size:13px}
.cs-workspace #csPending{color:#166534;background:#ecfdf5;border-color:#a7f3d0}
.cs-workspace #csPending.cs-pending{color:#92400e;background:#fffbeb;border-color:#fcd34d}
.cs-tabs{justify-content:flex-start;flex-wrap:wrap;padding:9px 0}
.cs-workspace .cs-tabs .cs-selected,.cs-workspace .cs-primary{color:#fff;background:var(--cs-accent);border-color:var(--cs-accent)}
.cs-workspace .cs-primary:hover{background:#115e59}
.cs-form{margin:0}
.cs-fields{display:grid;grid-template-columns:1.05fr 1fr 1.5fr .95fr 1.2fr;gap:8px;align-items:end}
.cs-workspace label{display:block;font-weight:600;font-size:13px;min-width:0;color:var(--cs-ink)}
.cs-workspace input,.cs-workspace select{display:block;width:100%;min-width:0;min-height:36px;padding:7px 8px;color:var(--cs-ink);background:var(--cs-bg);border:1px solid var(--cs-border);border-radius:6px;margin-top:4px;font-weight:400}
.cs-scan-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin-top:10px}
.cs-workspace #csCode{min-height:41px;font-size:15px;border:2px solid var(--cs-accent);font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.cs-scan-row button{min-height:41px}
.cs-status{min-height:34px;padding:7px 9px;border:1px solid var(--cs-border);border-radius:6px;margin-top:8px;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.cs-status-info{background:var(--cs-soft);color:var(--cs-ink)}
.cs-status-success{background:#ecfdf5;color:#166534;border-color:#a7f3d0}
.cs-status-saving{background:#fffbeb;color:#92400e;border-color:#fde68a}
.cs-status-error{background:#fff1f2;color:#9f1239;border-color:#fecdd3}
.cs-manual{margin-top:8px;border-top:1px solid var(--cs-border);padding-top:7px}
.cs-manual summary{cursor:pointer;font-size:13px;font-weight:600;padding:2px 0}
.cs-manual-row{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:8px;align-items:end;margin:8px 0}
.cs-footer{margin-top:8px;color:var(--cs-muted);font-size:12px;flex-wrap:wrap}
.cs-footer button{font-size:12px;min-height:30px;padding:4px 8px}
.cs-recent{margin-top:10px;border-top:1px solid var(--cs-border);padding-top:7px}
.cs-recent-title h3{font-size:14px;font-weight:700;margin:0}
.cs-recent-title button{font-size:12px;min-height:27px;padding:3px 7px}
.cs-recent ul{padding:0;margin:6px 0 0;list-style:none;max-height:180px;overflow:auto;overscroll-behavior:contain}
.cs-notice{display:grid;grid-template-columns:85px minmax(0,1fr) minmax(100px,25%);gap:8px;padding:7px 2px;border-bottom:1px solid var(--cs-border);font-size:13px;align-items:start}
.cs-notice time{color:var(--cs-muted);white-space:nowrap}
.cs-notice code{font-size:12px;overflow-wrap:anywhere}
.cs-notice-success span{color:#166534}
.cs-notice-error span{color:#9f1239}
.cs-empty{padding:10px;color:var(--cs-muted);font-size:13px;margin:0}
.cs-table-scroll{max-height:calc(100dvh - 330px);min-height:180px;overflow:auto;border:1px solid var(--cs-border);border-radius:6px;overscroll-behavior:contain}
.cs-table{width:100%;border-collapse:collapse;font-size:13px}
.cs-table th,.cs-table td{padding:7px 9px;border-bottom:1px solid var(--cs-border);text-align:left;vertical-align:top}
.cs-table th{position:sticky;top:0;background:var(--cs-soft);font-weight:700;z-index:1;white-space:nowrap}
.cs-table td{overflow-wrap:anywhere}
.cs-inventory-tools{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:8px;align-items:end;margin-bottom:9px}
.cs-workspace .cs-checkbox{display:flex;gap:7px;align-items:center;min-height:36px}
.cs-workspace .cs-checkbox input{width:16px;height:16px;min-height:0;margin:0}
.cs-row-actions{white-space:nowrap}
.cs-row-actions button{min-height:29px;padding:4px 7px;font-size:12px;margin:0 2px 2px 0}
.cs-qty{font-weight:700;font-size:15px;white-space:nowrap}
.cs-low{display:inline-block;font-size:11px;margin-left:6px;background:#fff1f2;color:#9f1239;border-radius:4px;padding:1px 5px}
.cs-inventory-count{font-size:12px;color:var(--cs-muted);margin:7px 0 0}
.cs-undo-tools{display:flex;align-items:end;gap:8px;margin-bottom:9px}
.cs-undo-tools label{flex:1;min-width:0}
#view-stock.cs-stock-active #stockWorkflowPanel,#view-stock.cs-stock-active #stockSummaryStats,#view-stock.cs-stock-active #stockExportPanel{display:none!important}
html[data-fh-theme="dark"] .cs-workspace,html[data-fh-theme="medium-dark"] .cs-workspace{--cs-ink:#f1f5f9;--cs-muted:#cbd5e1;--cs-border:#475569;--cs-bg:#172334;--cs-soft:#223348}
@media(max-width:1200px){.cs-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.cs-workspace{padding:10px}}
@media(max-width:700px){.cs-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.cs-header h2{font-size:16px}.cs-notice{grid-template-columns:80px minmax(0,1fr)}.cs-notice code{grid-column:2}.cs-manual-row{grid-template-columns:minmax(0,1fr) 85px}.cs-manual-row button{grid-column:1/-1}.cs-workspace button{white-space:normal}.cs-table-scroll{max-height:55dvh}.cs-inventory-tools{grid-template-columns:minmax(0,1fr) 130px}.cs-checkbox{grid-column:1/-1}}

/* Central stock: one aligned toolbar, with readable controls and no overlapping. */
#sview-central.cs-workspace{padding:7px}
.cs-workspace .cs-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cs-toolbar{display:flex;align-items:center;gap:5px;min-height:40px;margin-bottom:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;white-space:nowrap}
.cs-toolbar .cs-header{display:contents}
.cs-toolbar .cs-heading{order:0;flex:0 0 auto;min-width:108px;line-height:20px}
html body #appShell #sview-central .cs-toolbar .cs-heading h2{font-size:14px!important;line-height:20px!important;margin:0!important;font-weight:700}
.cs-toolbar .cs-availability{display:block;font-size:13px;line-height:20px;white-space:nowrap}
.cs-toolbar .cs-availability strong{font-size:13px}
.cs-toolbar .cs-tabs{order:1;flex:0 0 auto;flex-wrap:nowrap;gap:3px;padding:0;justify-content:flex-start}
html body #appShell #sview-central .cs-toolbar button{height:32px;min-height:32px;padding:4px 6px;font-size:13px!important;line-height:20px!important;white-space:nowrap}
.cs-toolbar #csInventoryToolbar{order:2;flex:1 0 290px;min-width:290px}
.cs-toolbar #csInventoryToolbar:empty{display:none}
.cs-toolbar .cs-inventory-tools{display:flex;align-items:center;gap:5px;margin:0}
.cs-toolbar .cs-inventory-tools label{font-size:13px;line-height:20px}
.cs-toolbar .cs-search{flex:1;min-width:108px}
.cs-toolbar .cs-sort{flex:0 0 100px;width:100px}
html body #appShell #sview-central .cs-toolbar :is(input[type="search"],select){height:32px;min-height:32px;padding:4px 6px;margin:0;font-size:13px!important;line-height:20px!important}
.cs-workspace .cs-toolbar .cs-checkbox{flex:0 0 auto;min-height:32px;gap:5px;white-space:nowrap}
.cs-toolbar .cs-save-tools{order:3;flex:0 0 auto;flex-wrap:nowrap;gap:4px;font-size:13px}
#sview-central #csInventoryList .cs-table-scroll{max-height:calc(100dvh - 220px)}
@media(max-width:700px){.cs-toolbar{gap:4px}.cs-toolbar .cs-heading h2{font-size:14px}.cs-toolbar .cs-checkbox{grid-column:auto}.cs-toolbar #csInventoryToolbar{flex-basis:290px}.cs-workspace .cs-toolbar button{white-space:nowrap}}

/* Forecast display is scoped to Inventory; scanning and forms are unaffected. */
#csInventoryList .cs-clearance{min-width:148px;font-size:12px;line-height:17px}
#csInventoryList .cs-clearance strong{display:block;font-weight:700}
#csInventoryList .cs-clearance small{display:block;color:var(--cs-muted);font-size:10px;line-height:14px}
#csInventoryList .cs-clearance-help{font-size:11px;line-height:16px;color:var(--cs-muted);margin:5px 0 0}
#csInventoryList .cs-inventory-table th:nth-child(5){white-space:normal;min-width:148px}
