/* Warehouse is the parent scope; customer type and name are its children. */
.list-toolbar .query-bar{grid-template-columns:minmax(180px,1fr) minmax(190px,1fr) auto auto auto;gap:12px;align-items:end}
.list-toolbar .query-field{min-width:0}
.list-toolbar .query-summary,.list-toolbar .advanced-query,.list-toolbar .browse-result{grid-column:1/-1}
.scope-label{font-size:11px;color:#62766a;flex-shrink:0;min-width:48px;letter-spacing:.2px}
.warehouse-scope{display:flex;align-items:center;gap:18px;padding:13px 20px;background:#f5f8f2;border-bottom:1px solid #c6d0c0}
.warehouse-bar{display:flex;align-items:center;gap:9px;min-width:0}
.warehouse-bar button{display:flex;align-items:center;gap:8px;padding:8px 13px;min-height:37px;border:1px solid #c3cfbe;border-radius:6px;background:#fff;color:#345647;font-size:13px;font-weight:500;white-space:nowrap}
.warehouse-bar button .lucide{width:16px;height:16px}
.warehouse-bar .count-tag{background:#eaf0e5;color:#617960;min-width:20px;padding:1px 5px}
.warehouse-bar button.active{background:#204e40;border-color:#204e40;color:white}
.warehouse-bar button.active .count-tag{background:#ffffff20;color:white}
.warehouse-context{margin-left:auto;color:#6c7e70;font-size:11px;white-space:nowrap}
.list-scope{justify-content:flex-start;gap:18px}
.list-scope .category-bar{flex:1;gap:23px;overflow-x:auto;white-space:nowrap;min-width:0}
.list-scope .category-bar button{flex-shrink:0}
.list-scope-meta{flex-shrink:0;margin-left:auto}
.query-field .ts-wrapper{width:100%;min-width:0}
.ts-wrapper.single .ts-control{min-height:36px;padding:7px 30px 7px 10px;border:1px solid #c9d2c4;border-radius:6px;box-shadow:none;background:#fff;color:#23453a;font-family:inherit;font-size:12px;line-height:20px;gap:0}
.query-field .ts-wrapper.single .ts-control{min-height:40px;padding-top:9px;padding-bottom:9px}
.ts-wrapper.focus .ts-control{border-color:#719483;box-shadow:0 0 0 2px #204e4010}
.ts-wrapper .ts-control input{font-family:inherit!important;font-size:12px!important;line-height:20px!important;min-height:0!important;padding:0!important;color:#23453a;box-shadow:none!important}
.ts-wrapper .ts-control .item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.ts-wrapper .clear-button{font-size:19px!important;color:#6c8073;right:10px!important}
.ts-dropdown{font-family:inherit;font-size:12px;color:#23453a;border:1px solid #b7c5b3;border-radius:7px;background:#fff;box-shadow:0 8px 24px #183e301c;overflow:hidden;z-index:100}
.ts-dropdown .ts-dropdown-content{max-height:240px;padding:5px}
.ts-dropdown .option,.ts-dropdown .create,.ts-dropdown .no-results{padding:9px 10px;border-radius:4px;line-height:1.5}
.ts-dropdown .active{background:#eaf1e7;color:#204e40}
.ts-dropdown .highlight{background:#e7d7b5;color:#193f33;border-radius:2px}
.document-form .header-fields>.ts-wrapper,.document-form .header-fields label>.ts-wrapper{min-width:0;flex:1}
.document-form .header-fields label .ts-control{width:100%}

@media(max-width:1300px){
 .warehouse-scope{padding:12px 16px;gap:13px}
 .warehouse-context{display:none}
 .list-scope{gap:13px}
 .list-toolbar .query-bar{grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) auto auto}
 .list-toolbar .search-field{grid-column:1/2;grid-row:1}
 .list-toolbar .customer-field{grid-column:2/-1;grid-row:1}
 .list-toolbar .date-field{grid-column:1/3;grid-row:2}
 .list-toolbar .date-field .query-date{justify-content:flex-start}
 .list-toolbar .date-field .query-date input{width:145px}
 .list-toolbar .browse-button{grid-column:3;grid-row:2}
 .list-toolbar .filter-toggle{grid-column:4;grid-row:2}
 .list-scope .category-bar{gap:18px}
 .list-scope-meta{display:none}
}
@media(max-width:850px){
 .warehouse-scope{flex-wrap:wrap;gap:8px;padding:10px 12px}
 .warehouse-scope .scope-label{min-width:100%}
 .warehouse-bar{gap:6px;max-width:100%;overflow-x:auto}
 .warehouse-bar button{font-size:12px;padding:7px 9px;gap:6px}
 .warehouse-bar button[data-list-warehouse=""]{margin-left:0}
 .list-scope{gap:8px;flex-wrap:wrap;padding-top:8px}
 .list-scope>.scope-label{flex-basis:100%}
 .list-scope .category-bar{flex-basis:100%;max-width:100%;gap:18px}
 .list-toolbar .query-bar{grid-template-columns:minmax(0,1fr) auto auto;gap:10px}
 .list-toolbar .search-field{grid-column:1/-1;grid-row:1}
 .list-toolbar .customer-field{grid-column:1/-1;grid-row:2}
 .list-toolbar .date-field{grid-column:1/-1;grid-row:3}
 .list-toolbar .date-field .query-date input{width:0;flex:1}
 .list-toolbar .browse-button{grid-column:2;grid-row:4}
 .list-toolbar .filter-toggle{grid-column:3;grid-row:4}
}
@media print{.ts-wrapper .clear-button{display:none}.document-form .ts-control{border:0;box-shadow:none}}

/* Native Chromium disclosure, shared by the shell and document editor. */
.sidebar-disclosure{display:block;flex-shrink:0}
.sidebar-disclosure>summary{display:flex;align-items:center;min-height:32px;padding:6px 8px;border:1px solid transparent;border-radius:5px;list-style:none;cursor:pointer;color:#395b4b;font-size:11px;background:transparent;-webkit-app-region:no-drag;app-region:no-drag}
.sidebar-disclosure>summary::-webkit-details-marker{display:none}
.sidebar-disclosure>summary::marker{content:''}
.sidebar-disclosure>summary:hover{background:#eaf0e5}
.sidebar-disclosure>summary:focus-visible{outline:2px solid #719483;outline-offset:2px}
.sidebar-disclosure>summary>span{display:flex;align-items:center;gap:6px}
.sidebar-disclosure>summary .lucide{width:17px;height:17px}
.sidebar-disclosure[open]>summary .sidebar-expand-content,.sidebar-disclosure:not([open])>summary .sidebar-collapse-content{display:none}
.sidebar-disclosure>.tree-panel{-webkit-app-region:no-drag;app-region:no-drag;user-select:auto}
body:has(#sidebar-disclosure:not([open])){--sidebar-width:0px}
body:has(#sidebar-disclosure:not([open])) .titlebar-brand{min-width:0;padding:0;overflow:hidden;gap:0}
@media(max-width:1000px){.sidebar-disclosure>summary>span>span{display:none}.sidebar-disclosure>summary{padding:6px}}

/* Independent native disclosure groups inside the existing left navigation. */
.tree-panel .navigation-group{margin:0 0 12px}
.tree-panel .navigation-group>summary{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:39px;padding:9px 13px;gap:11px;border:0;border-radius:7px;background:transparent;color:#b8cac0;font-size:13px;font-weight:400;text-align:left;list-style:none;cursor:pointer;user-select:none;-webkit-app-region:no-drag;app-region:no-drag}
.navigation-group>summary::-webkit-details-marker{display:none}
.navigation-group>summary::marker{content:''}
.tree-panel .navigation-group>summary:hover{background:#ffffff09;color:#fff}
.tree-panel .navigation-group>summary.active{background:#305447;color:#f5f8f0}
.navigation-group>summary:focus-visible{outline:2px solid #b4c9b8;outline-offset:2px}
.navigation-group>summary .nav-chevron{width:14px;height:14px;flex-shrink:0;opacity:.85}
.navigation-group:not([open])>summary .nav-chevron{transform:rotate(-90deg)}
.navigation-group>.tree-children{margin-bottom:0}
@media(max-width:1000px){.tree-panel .navigation-group>summary{justify-content:center;padding:14px 8px;gap:0}.navigation-group>summary>span,.navigation-group>summary>em,.navigation-group>summary .nav-chevron{display:none}.tree-panel .navigation-group>summary>.lucide{width:20px;height:20px}}

/* Fit all document fields to the available width; Tabulator measures wrapped rows. */
.list-view .list-table.tabulator{display:flex;flex-direction:column}
.list-view .list-table .tabulator-header{flex-shrink:0}
.list-view .list-table .tabulator-header .tabulator-headers{display:inline-flex;align-items:stretch;height:auto!important}
.list-view .list-table .tabulator-header .tabulator-col{height:auto!important}
.list-view .list-table .tabulator-tableholder{flex:1;min-height:0;height:auto!important}
.list-view .list-table .tabulator-header .tabulator-col .tabulator-col-content{padding:8px 6px}
.list-view .list-table .tabulator-header .tabulator-col .tabulator-col-title{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.45}
.list-view .list-table .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0}
.list-view .list-table .tabulator-header .tabulator-col .tabulator-col-sorter{position:static;display:flex;justify-content:flex-end;width:auto;height:7px;min-height:7px;margin-top:3px}
.list-view .list-table .tabulator-header .tabulator-col .tabulator-arrow{border-left-width:4px;border-right-width:4px}
.list-view .list-table .tabulator-row{min-height:42px}
.list-view .list-table .tabulator-row .tabulator-cell{white-space:normal;overflow-wrap:anywhere;word-break:normal;text-overflow:clip;padding:8px 6px;line-height:20px}
.list-view .list-table .doc-link{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left;line-height:20px}
.list-view .list-table .status-badge{max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:2px 4px;line-height:18px}
