.page-orders>.order-filters{flex:none;margin-bottom:8px;background:#fff;border:1px solid #dce3ed;border-radius:9px;max-height:53dvh;overflow:hidden}
.order-filters[open]>form{display:flex;flex-direction:column;max-height:calc(53dvh - 38px)}.order-filter-body{min-height:0;overflow:auto;scrollbar-gutter:stable}.order-search-actions{flex:none}
.order-filters>summary{cursor:pointer;padding:8px 12px;font-size:13px;font-weight:700;color:#34516e}.order-filters>form{padding:0 12px 10px}
.order-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px 10px}.order-filter-grid label,.order-date-row label{margin:0;font-size:12px;color:#536780;gap:4px}
.order-multi{min-width:0}.order-filter-label{display:block;font-size:12px;color:#536780;margin-bottom:4px}.order-select{display:block;width:100%;text-align:left;padding:7px 23px 7px 9px;border:1px solid #cdd6e2;border-radius:6px;background:#fff;color:#243449;font-size:13px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}.order-select::after{content:'⌄';position:absolute;right:8px;color:#6d7c8e}.order-select.has-selection{background:#f0f5ff;border-color:#a4bfe8;color:#234d8a}
.order-sort{display:flex;gap:5px;min-width:0}.order-sort>label{min-width:0}.order-sort>label:first-child{flex:1}.order-sort select{width:100%;font-size:12px;padding-left:6px;padding-right:2px}
.order-customer{grid-column:span 3;display:flex;gap:8px;min-width:0}.order-customer>label:first-child{width:110px;flex:none}.order-customer>label:last-child{flex:1;min-width:0}.order-customer input{width:100%}
.order-dates{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;margin-top:9px;padding-top:8px;border-top:1px solid #e7ecf3}.order-date-row{display:flex;gap:6px;align-items:end;flex-wrap:wrap;min-width:0}.order-date-row input[type=date]{width:132px;font-size:12px;padding:7px 5px}.order-date-row select{font-size:12px}.order-date-quick{display:flex;gap:3px;align-items:center}.order-date-quick>button{font-size:11px;padding:5px 7px;min-height:32px}.order-date-row .order-unknown{display:flex;align-items:center;gap:4px;height:36px;white-space:nowrap}.order-unknown input{width:15px;height:15px;min-height:0;padding:0;margin:0;accent-color:#255bd5}
.order-search-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:8px}.order-page-size{margin-right:auto}.order-page-size>label{display:flex;align-items:center;gap:7px;margin:0;font-size:12px;white-space:nowrap;color:#536780}.order-page-size select{width:88px;font-size:12px}.order-search-actions>button{min-width:76px}.order-search-actions>button[type=submit]{min-width:90px}
.order-multi-panel{position:fixed;inset:auto;margin:0;border:1px solid #c6d3e5;border-radius:9px;padding:11px;box-shadow:0 10px 36px #152c482b;background:#fff;color:#243449;overflow:hidden}
.order-multi-panel:popover-open{display:flex;flex-direction:column;gap:8px}.order-multi-panel::backdrop{background:transparent}.order-multi-panel>input{width:100%;flex:none}.order-picker-actions{display:flex;gap:5px;align-items:center;flex:none}.order-picker-actions>button{min-height:28px;font-size:11px;padding:4px 7px}.order-picker-count{font-size:11px;color:#718095;margin-left:auto}.order-multi-options{min-height:0;overflow:auto;overscroll-behavior:contain;max-height:240px}.order-check{display:flex;align-items:center;gap:8px;margin:0;min-height:34px;padding:6px;border-radius:5px;cursor:pointer;font-size:13px}.order-check:hover{background:#f0f5fd}.order-check>input{width:15px;height:15px;min-height:0;margin:0;padding:0;flex:none;accent-color:#255bd5}.order-check>span{overflow-wrap:anywhere}.order-picker-done{flex:none;font-size:12px;min-height:30px}
.order-table table{table-layout:fixed;min-width:1180px}.order-table th,.order-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:9px 8px;font-size:12px}.order-table th:nth-child(1){width:118px}.order-table th:nth-child(2){width:94px}.order-table th:nth-child(3),.order-table th:nth-child(4){width:125px}.order-table th:nth-child(5){width:90px}.order-table th:nth-child(6){width:72px}.order-table th:nth-child(7){width:78px}.order-table th:nth-child(8){width:180px}.order-table th:nth-child(9){width:100px}.order-table th:nth-child(10),.order-table th:nth-child(11){width:85px}.order-table .link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-state{padding:3px 6px;background:transparent;border-radius:0;color:#3d5876}.order-detail{grid-template-columns:90px minmax(0,1fr) 90px minmax(0,1fr);font-size:13px}.order-detail dd{white-space:normal}.order-pager{flex:none}
/* Order status text only: primary red/blue, approved orange/green, no status backgrounds. */
.order-state--contract,.order-state--estimate,.order-state--complete,.order-state--visit{font-weight:600}
.order-state--contract{color:rgb(255,0,0)}
.order-state--estimate{color:rgb(0,0,255)}
.order-state--complete{color:rgb(180,83,9)}
.order-state--visit{color:rgb(0,200,100)}
@media(max-width:1250px){.order-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.order-sort{grid-column:span 1}.order-customer{grid-column:span 3}.order-dates{grid-template-columns:1fr}.order-date-row input[type=date]{width:145px}}
@media(max-width:760px){.page-orders>.order-filters{max-height:48dvh}.order-filters[open]>form{max-height:calc(48dvh - 38px)}.order-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.order-sort{grid-column:span 2}.order-sort>label{flex:1}.order-customer{grid-column:span 2}.order-dates{gap:12px}.order-date-row{align-items:end}.order-date-row input[type=date]{width:125px}.order-page-size>label{gap:5px}.order-page-size select{width:78px}.order-search-actions>button{min-width:62px}.order-search-actions>button[type=submit]{min-width:62px}.order-search-actions>button{flex:1}.order-detail{grid-template-columns:80px minmax(0,1fr)}.order-table table{min-width:1180px}}

/* Wide screens: one date/action row; narrow screens keep scrollable fields and fixed actions. */
@media(min-width:1360px){
 .order-filters[open]>form{display:grid;grid-template-columns:max-content minmax(80px,1fr) auto auto;gap:8px 12px;overflow:auto}
 .order-filter-body,.order-search-actions{display:contents}.order-filter-grid{grid-column:1/-1;padding-bottom:8px;border-bottom:1px solid #e7ecf3}
 .order-dates{grid-template-columns:max-content max-content;gap:12px;border-top:0;margin:0;padding:0}
 .order-date-row{flex-wrap:nowrap;gap:5px}.order-date-row input[type=date]{width:124px}
 .order-date-row select{width:70px;padding-left:6px;padding-right:2px}.order-date-quick>button{padding-left:5px;padding-right:5px}
 .order-page-size{align-self:end;justify-self:start;margin:0}.order-page-size>label{display:grid;gap:4px}.order-page-size select{width:80px}
 .order-search-actions>button{align-self:end;min-width:62px;padding-left:10px;padding-right:10px}.order-search-actions>button[type=submit]{min-width:72px}
}
