.category-tabs{display:flex;gap:8px;margin:0 0 18px;flex-wrap:wrap}
.category-tab{display:flex;align-items:center;gap:12px;padding:12px 18px;border-radius:9px;background:transparent}
.category-tab span{font-size:11px;border-radius:5px;padding:3px 7px;background:#e8ede4;color:var(--muted)}
.category-tab.selected{background:var(--green);color:white;border-color:var(--green)}
.category-tab.selected span{background:#ffffff26;color:white}
.category-panel .panel-head{align-items:flex-start}
.category-panel .panel-head p{font-size:12px;margin:8px 0 0;line-height:1.6}
.category-panel table{min-width:700px}
.category-panel td:first-child{min-width:220px}
.category-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center;white-space:nowrap}
.category-actions button{padding:8px 11px;font-size:11px}
.category-name{display:flex;align-items:center;gap:7px;min-height:24px}
.category-indent{display:inline-block;min-width:10px;flex-shrink:0}
.category-root,.category-branch{color:var(--green);font-size:16px;flex-shrink:0}
.category-name strong{font-size:13px}
.category-upgrade{display:flex;justify-content:space-between;align-items:center;gap:18px}
.category-upgrade p{margin:5px 0 0}
.category-upgrade button{flex-shrink:0}
@media(max-width:760px){.category-tab{flex:1;justify-content:center;padding:11px 8px;font-size:12px;gap:7px}.category-upgrade{align-items:stretch;flex-direction:column}.category-panel .panel-head{flex-direction:column}.category-panel .panel-head>button{align-self:flex-start}.category-actions{justify-content:flex-start}}
@media print{.category-tabs,.category-upgrade{display:none}.category-panel table{min-width:0}}

.category-panel .panel-head{align-items:center}
.category-panel th:last-child{text-align:right}
.category-categories-panel :is(th,td):nth-child(3),.category-categories-panel :is(th,td):nth-child(4),.category-units-panel :is(th,td):nth-child(2){text-align:center}
.category-units-panel table{min-width:320px}
.category-branch{width:11px;height:9px;border-left:1px solid var(--green);border-bottom:1px solid var(--green);align-self:flex-start;margin-top:5px}
@media(max-width:760px){.category-panel .panel-head{align-items:flex-start}.category-tabs .category-tab{flex:0 1 auto}}
/* The category picker overlays the table without expanding the filter row. */
.panel.receipt-history,.panel.stock-panel{overflow:visible}
.category-filter{position:relative;display:grid;align-content:start;gap:5px;min-width:0}
.category-filter-label{font-size:12px;font-weight:600}
.category-filter-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:42px;min-width:0;padding:0 12px;border-color:#d7e1d8;font-weight:400;text-align:left}
.category-filter-trigger:focus-visible,.category-filter-trigger[aria-expanded=true]{outline:2px solid #87b6a2;outline-offset:1px}
.category-filter-value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.category-filter-arrow{display:block;flex:none;width:7px;height:7px;margin-inline-end:3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.category-filter-trigger[aria-expanded=true] .category-filter-arrow{transform:rotate(225deg) translate(-2px,-1px)}
.category-filter-popover{position:absolute;z-index:15;inset-inline-start:0;inset-block-start:calc(100% + 6px);box-sizing:border-box;inline-size:max(100%,17rem);max-block-size:min(20rem,45dvh);overflow:auto;overscroll-behavior:contain;padding:6px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 26px #18362f26}
.category-filter-popover.opens-above{inset-block-start:auto;inset-block-end:calc(100% + 6px)}
.category-filter-list{list-style:none;margin:0;padding:0}
.category-filter-children{margin:2px 0 3px 14px;padding-inline-start:7px;border-inline-start:1px solid #cddbd0}
.category-filter-row{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;min-height:36px;padding:7px 9px;border:0;border-radius:6px;text-align:left;font-weight:500}
.category-filter-row-text{min-width:0;overflow-wrap:anywhere}
.category-filter-row:focus-visible{outline:2px solid #87b6a2;outline-offset:-2px}
.category-filter-branch{font-weight:600}
.category-filter-branch .category-filter-arrow{color:var(--muted);transform:rotate(-45deg)}
.category-filter-branch[aria-expanded=true] .category-filter-arrow{transform:rotate(45deg)}
.category-filter-row[aria-pressed=true]{background:#e6f1e5;color:#164a39;font-weight:600}
.category-filter-row[aria-pressed=true]::after{content:'';flex:none;width:5px;height:9px;margin-inline-end:3px;border:solid currentColor;border-width:0 1.75px 1.75px 0;transform:rotate(45deg) translateY(-1px)}
@media(max-width:580px){.category-filter-popover{inline-size:100%}}
@media print{.category-filter-popover{display:none!important}}
