/* V5.1.4 — correções isoladas. Carregar DEPOIS dos demais estilos. */
#sidebarToggle.sidebar-toggle {
  box-sizing:border-box!important;position:relative!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;flex:0 0 40px!important;
  width:40px!important;min-width:40px!important;max-width:40px!important;
  height:40px!important;min-height:40px!important;max-height:40px!important;
  padding:4px!important;overflow:hidden!important;isolation:isolate;border-radius:10px;
}
#sidebarToggle.sidebar-toggle > img {
  box-sizing:border-box!important;display:block!important;position:static!important;
  width:30px!important;height:30px!important;min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;object-fit:contain!important;
  margin:0!important;transform:none!important;filter:none!important;pointer-events:none;
}
#sidebarToggle.sidebar-toggle > span{display:block;line-height:1;font-size:20px}
/* O conteúdo compacto começa no topo, sem o margin:auto vertical herdado. */
.main-content.wrap{margin:0;align-self:start}
/* Desktop: quatro campos por linha; sete filtros + ações = exatamente duas linhas. */
#reportsPage .general-report-filter-panel{padding:14px 16px;margin-bottom:12px;background:linear-gradient(110deg,#10212e,#0c1b25);border:1px solid #35434c}
#reportsPage .report-filter-title{margin:0 0 10px;gap:9px}
#reportsPage .report-filter-title h3{font-size:13px;margin:0}
#reportsPage .report-filter-title .desc{font-size:10px;margin-top:2px}
#reportsPage .report-filter-icon{width:28px;height:28px}
#reportsPage .general-report-filters{display:grid!important;grid-template-columns:minmax(170px,1.35fr) minmax(136px,1fr) minmax(136px,1fr) minmax(180px,1.35fr)!important;gap:9px 12px;align-items:end}
#reportsPage .general-report-filters .filter{min-width:0;width:auto;grid-column:auto!important;margin:0;padding:0}
#reportsPage .general-report-filters label{display:block;margin:0 0 4px;font-size:10px;line-height:1.25}
#reportsPage .general-report-filters input,#reportsPage .general-report-filters select{box-sizing:border-box;width:100%;height:36px!important;min-height:36px!important;padding:6px 9px;font-size:12px;border-radius:7px;margin:0}
#reportsPage .report-filter-actions .actions{display:flex!important;align-items:center;justify-content:flex-end;gap:8px;width:100%;max-width:none;height:36px;margin:0;padding:0}
#reportsPage .report-filter-actions .btn,#reportsPage .report-filter-actions .btn2{flex:0 0 auto!important;width:auto!important;min-width:82px!important;height:36px!important;min-height:36px!important;max-height:36px!important;box-sizing:border-box;padding:6px 18px;font-size:12px}
/* Os oito indicadores são um bloco, não oito cartões grandes. */
#reportsPage .general-report-kpis{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;background:linear-gradient(110deg,#0e202e,#0a1925);border:1px solid #35434c;border-radius:12px;overflow:hidden;margin:0 0 12px}
#reportsPage .general-report-kpis>.kpi{min-width:0;min-height:83px;padding:13px 11px 11px;border:0;border-right:1px solid #2e3e49;border-radius:0;background:transparent;box-shadow:none;margin:0}
#reportsPage .general-report-kpis>.kpi:last-child{border-right:0}
#reportsPage .general-report-kpis .label{font-size:8px;letter-spacing:.35px;padding-right:16px;min-height:20px;line-height:1.3}
#reportsPage .general-report-kpis .value{font-size:clamp(15px,1.15vw,21px);line-height:1.2;margin:4px 0;white-space:nowrap;letter-spacing:-.3px}
#reportsPage .general-report-kpis .hint{font-size:8px;line-height:1.3}
#reportsPage .general-report-kpis .kpi-eye{top:7px;right:5px;width:20px;height:20px;font-size:9px;border:0;background:transparent;padding:0}
#reportsPage .general-report-table-card{margin-top:0}
#reportsPage .general-report-table-card .toolbar{padding-bottom:10px}
/* Fila operacional */
.orders-panel-toolbar{gap:8px}
.orders-history-btn{margin-left:auto;white-space:nowrap;height:36px;border:1px solid #48535b;border-radius:8px;background:#202629;color:#dbe4ea;font-size:11px;padding:0 10px;cursor:pointer}
.orders-summary-strip{font-size:10px;padding:9px 12px}
.orders-panel-notice{padding:8px 12px;color:#ffd9a1;background:#3a2b16;font-size:11px;border-bottom:1px solid #64491d}
.orders-map-theme{display:flex;pointer-events:auto;background:#131c22;border:1px solid #48535b;border-radius:8px;padding:3px;gap:3px}
.orders-map-theme button{padding:6px 10px;border:0;border-radius:5px;color:#c5d0d6;background:transparent;font-size:11px;cursor:pointer}
.orders-map-theme button.active{background:#ffad46;color:#20160c;font-weight:800}
.orders-map-topbar{align-items:flex-start;z-index:600}
.orders-map-topbar .orders-map-kpis{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;pointer-events:auto}
.orders-map-topbar .orders-map-kpis>span{font-size:9px}
#ordersMap.map-theme-dark .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) saturate(.5) brightness(.82) contrast(1.15)}
#ordersMap .leaflet-top.leaflet-right{top:66px}
#ordersMap .leaflet-control-attribution{font-size:10px;line-height:1.5}
.orders-map-error{position:absolute;inset:auto 16px 45px;z-index:650;padding:12px;border:1px solid #ad752d;background:#2e261b;color:#ffe2bc;border-radius:9px;font-size:12px}
.orders-card{padding:10px;margin-bottom:8px}
.orders-card-client{font-size:12px;line-height:1.3}
.orders-card-address{font-size:10px;line-height:1.4;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.orders-code{font-size:10px;max-width:80px;overflow:hidden;text-overflow:ellipsis}
.orders-status{font-size:9px;padding:4px 7px}
.orders-card-time{font-size:9px}
.orders-card-detail{font-size:9px;flex-wrap:wrap;gap:4px 10px}
.orders-assignee{align-items:flex-start;flex-direction:column;gap:8px}
.orders-assignee-name{font-size:10px;width:100%}
.orders-assignee-dot.unassigned{background:#8b959c;box-shadow:none}
.orders-card-actions{width:100%;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.orders-card-actions button,.orders-card-actions select{font-size:10px;height:30px;padding:0 10px}
.orders-card-actions .advance{background:#d99c35;border-color:#f3b44d;color:#21180b;font-weight:850}
.orders-card-actions .finish{background:#1b6944;border-color:#2ba86b;color:#ebfff3;font-weight:850}
.orders-card-actions .cancel{margin-right:auto;color:#f3abb2;border-color:#653d42;background:#2c1d21;font-size:10px}
.orders-card-actions .history{color:#b8c5cd}
.orders-tariffs{display:flex;gap:10px;flex-wrap:wrap;font-size:10px;padding:8px 0 0;color:#98a8b3}
.orders-tariffs b{color:#e9eef2}
.orders-machine{color:#ffd082!important}
.orders-group-title{font-size:11px}.orders-group-count{font-size:10px;min-width:21px;height:21px}
.orders-status.production{background:#3e301b;color:#ffe2b2;border-color:#76602e}
.orders-status.ready{background:#203f66;color:#d6e9ff;border-color:#42679b}
.orders-status.dispatched{background:#413057;color:#edddff;border-color:#74528c}
.orders-status.accepted{background:#153e49;color:#c1f3ff;border-color:#286e7d}
.orders-status.establishment{background:#453918;color:#ffefac;border-color:#7d6d30}
.orders-status.returning{background:#4b2541;color:#ffe0f6;border-color:#854774}
.orders-panel-page .hidden{display:none!important}
.orders-drawer-card{width:min(540px,96vw)}
.orders-form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:start;gap:12px;flex:1;min-height:0;padding:16px}
.orders-form-grid .wide{grid-column:1/-1}
.orders-form-grid label>span{font-size:11px}
.orders-form-grid input,.orders-form-grid select,.orders-form-grid textarea{font-size:12px;padding:9px 10px;min-width:0;box-sizing:border-box}
.orders-form-grid input:not([type=checkbox]),.orders-form-grid select{height:39px}
.orders-form-grid .orders-checkbox{display:flex;flex-direction:row;align-items:center;gap:9px;padding-top:14px}
.orders-checkbox input{width:18px;height:18px;flex:0 0 18px;accent-color:#ffab42}
.orders-checkbox small{display:block;font-size:10px;line-height:1.4;font-weight:400;color:#aebac1;margin-top:4px}
.orders-origin{font-size:11px;line-height:1.5;color:#aab9c4;border-left:2px solid #b17a32;padding:3px 9px}
.orders-quote-toolbar{display:flex;align-items:center;gap:10px}
.orders-quote-toolbar .btn2{font-size:11px;padding:8px 12px}
.orders-quote-toolbar>span{color:#9cacb7;font-size:10px}
.orders-quote{padding:13px;border:1px solid #3e5663;border-radius:10px;background:#12222c;color:#b5c8d4;font-size:11px;line-height:1.5}
.orders-quote.error{border-color:#8b464c;background:#342024;color:#ffccd3}
.orders-quote-main{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #334852;padding-bottom:9px;margin-bottom:9px}
.orders-quote-main b{display:block;margin-top:3px;font-size:18px;color:#f2f7fa}
.orders-google-attribution{display:block;font-family:Arial,sans-serif;font-weight:400;font-style:normal;font-size:12px;letter-spacing:normal;color:#fff;white-space:nowrap}
.orders-quote-prices{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.orders-quote-prices b{font-size:18px;color:#ffbd61;display:block}
.orders-quote-prices small{display:block;color:#aabdc8;font-size:10px}
.orders-quote details{margin-top:10px;color:#a9bac6;font-size:10px}
.orders-drawer-actions .btn,.orders-drawer-actions .btn2{font-size:12px;min-height:36px}
.orders-modal-head b{font-size:15px}.orders-modal-head span{font-size:11px;line-height:1.4}
.orders-action-body{padding:16px;font-size:13px;color:#d1d9df;line-height:1.55}
.orders-action-body p{margin:0 0 12px}
.orders-action-body label{display:block;font-size:11px;margin-bottom:5px}
.orders-action-body textarea{box-sizing:border-box;width:100%;padding:10px;border:1px solid #6c5140;border-radius:8px;background:#25282b;color:#fff;font-size:12px}
.orders-history-card{width:min(820px,94vw);max-height:88vh;display:flex;flex-direction:column}
.orders-history-list{padding:12px 15px;overflow:auto;min-height:100px;flex:1}
.orders-history-tools{display:flex;align-items:center;gap:10px;padding:12px 15px;border-top:1px solid #343d43;font-size:11px;color:#b2c0c9}
.orders-history-tools input{font-size:12px;max-width:180px;height:34px;border:1px solid #53616a;background:#242a2e;color:#fff;border-radius:7px;padding:5px 8px;box-sizing:border-box}
.orders-history-tools button{padding:7px 10px;font-size:11px}
.orders-history-item{padding:12px;border:1px solid #354650;border-radius:9px;margin-bottom:9px;background:#172329}
.orders-history-item header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.orders-history-item p{font-size:11px;color:#aebcc5;margin:8px 0 0;line-height:1.5}
.orders-history-item .orders-tariffs{font-size:12px}
.orders-toast{font-size:12px;line-height:1.45;max-width:min(450px,85vw);min-width:0}
.orders-courier-main b{font-size:12px}.orders-courier-main span,.orders-courier-online{font-size:10px}
.orders-empty{font-size:12px;line-height:1.5}
.orders-panel-page button:disabled{opacity:.55;cursor:wait}
.orders-panel-page button:focus-visible,#sidebarToggle:focus-visible{outline:2px solid #ffc875;outline-offset:3px}
@media(max-width:1250px){#reportsPage .general-report-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}#reportsPage .general-report-kpis>.kpi:nth-child(-n+4){border-bottom:1px solid #2e3e49}#reportsPage .general-report-kpis .value{font-size:19px}}
@media(max-width:950px){#reportsPage .general-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}#reportsPage .report-filter-actions .actions{justify-content:flex-start}.orders-map-topbar .orders-map-kpis>span{display:none}}
@media(max-width:600px){#reportsPage .general-report-filter-panel{padding:12px}#reportsPage .general-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}#reportsPage .general-report-kpis>.kpi{border-bottom:1px solid #2e3e49;min-height:75px}#reportsPage .general-report-kpis .value{font-size:18px}.orders-form-grid{grid-template-columns:minmax(0,1fr)}.orders-form-grid .wide{grid-column:auto}.orders-history-tools{flex-wrap:wrap}.orders-map-topbar{left:10px;right:10px;gap:6px}.orders-map-theme button{padding:6px 7px}.orders-drawer-card{width:100vw}.orders-quote-toolbar{flex-wrap:wrap}#reportsPage .general-report-filters .report-filter-actions{grid-column:1/-1!important}}
