:root{--bg:#080b0d;--panel:#0d1216;--panel2:#11181e;--border:#263039;--text:#f2f5f7;--muted:#95a1aa;--blue:#2b89ff;--green:#43d17a;--red:#ff5a52;--amber:#ffb52e;--orange:#f37b35;--purple:#9b5de5}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at 65% -10%,#172029 0,#080b0d 45%);color:var(--text)}button,input,select{font:inherit}.app-shell{display:grid;grid-template-columns:190px 1fr;min-height:100vh}.sidebar{border-right:1px solid var(--border);background:linear-gradient(180deg,#0d1114,#090c0f);padding:18px 12px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;margin-bottom:24px}.brand img{width:68px;height:68px;object-fit:contain;border-radius:50%}.brand b{display:block;font-size:14px}.brand small{display:block;color:#bcc5ca;font-size:10px;margin:2px 0 7px}.live-dot,.live-badge{color:var(--green);font-size:10px}.nav{width:100%;background:transparent;border:0;color:#b8c0c6;padding:12px 10px;text-align:left;border-radius:8px;margin:2px 0;cursor:pointer}.nav.active,.nav:hover{background:#171d22;color:white}.nav span{margin-left:10px}main{padding:22px;overflow:hidden}header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:16px}h1{font-size:20px;margin:0 0 5px}header p{margin:0;color:var(--green);font-size:12px}.top-filters,.filterbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.top-filters input,.top-filters button,.filterbar select,.filterbar button,.orders-head input{background:#0b1014;color:var(--text);border:1px solid var(--border);border-radius:7px;padding:9px 10px}.top-filters button,.filterbar button{cursor:pointer}.metrics{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:8px;margin-bottom:12px}.metric{background:linear-gradient(180deg,#11171b,#0c1115);border:1px solid var(--border);border-radius:8px;padding:12px;min-height:92px}.metric small{display:block;color:#c0c7cc;font-size:10px}.metric strong{display:block;font-size:19px;margin:10px 0 5px}.metric em{font-style:normal;color:var(--green);font-size:10px}.filterbar{border:1px solid var(--border);background:#0c1115;border-radius:8px;padding:10px;margin-bottom:12px}.filterbar label{display:flex;flex-direction:column;gap:4px;color:#8e9aa2;font-size:9px;min-width:140px}.filterbar select{padding:8px}.filterbar button{margin-left:auto}.grid-main{display:grid;grid-template-columns:1.05fr 1.35fr 1.1fr .9fr;gap:10px}.grid-secondary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:10px}.panel{background:linear-gradient(180deg,#0f1519,#0b1014);border:1px solid var(--border);border-radius:8px;padding:13px;min-height:250px}.panel-title{font-size:11px;font-weight:700;margin-bottom:12px}.donut-wrap{display:flex;align-items:center;gap:16px;height:190px}.donut{width:150px;height:150px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--blue) 0 38%,var(--amber) 38% 66%,var(--orange) 66% 82%,var(--purple) 82% 92%,#65717a 92%)}.donut:after{content:"";position:absolute;width:88px;height:88px;background:#0d1216;border-radius:50%}.donut>div{position:relative;z-index:2;text-align:center}.donut strong{display:block}.donut small{color:var(--muted)}.legend{font-size:10px;display:grid;gap:8px;flex:1}.legend-row{display:flex;justify-content:space-between;gap:10px}.legend-row span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wide svg{width:100%;height:190px}.heatmap-map{height:310px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.heatmap-map svg{width:100%;height:100%;max-height:310px;display:block}.heatmap-map svg a{cursor:pointer}.heatmap-map svg path{transition:fill .2s ease,filter .2s ease;stroke:#dce5ea;stroke-width:.8}.heatmap-map svg a:hover path{filter:brightness(1.22)}.heatmap-map svg text{fill:#fff;font:11px Segoe UI,Arial,sans-serif;pointer-events:none;text-shadow:0 1px 2px #000}.heatmap-map svg .circle{stroke:#dce5ea;stroke-width:.5}.map-loading,.map-error{color:var(--muted);font-size:12px;text-align:center;padding:25px}.heat-tooltip{position:absolute;pointer-events:none;background:#06090b;border:1px solid #34414a;border-radius:7px;padding:7px 9px;font-size:11px;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.35);z-index:5;transform:translate(10px,10px);white-space:nowrap}.heat-legend{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:9px;margin-top:3px}.heat-gradient{height:8px;flex:1;border-radius:999px;background:linear-gradient(90deg,#123c25,#2a8a48,#f0b32f,#ef6a2c,#e32222)}.note{display:block;color:var(--muted);margin-top:10px}.gauge{width:160px;height:80px;margin:35px auto 15px;border-radius:160px 160px 0 0;background:conic-gradient(from 270deg,var(--green),var(--amber) 35%,#20272c 36% 50%,transparent 50%);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.gauge:after{content:"";position:absolute;width:118px;height:59px;bottom:0;background:#0d1216;border-radius:118px 118px 0 0}.gauge div,.gauge small{position:relative;z-index:2}.gauge div{font-size:25px}.gauge small{color:var(--muted)}.comparison{text-align:center;font-size:11px;color:#b8c2c8}.bars{display:grid;gap:10px}.barrow{display:grid;grid-template-columns:105px 1fr 42px;gap:7px;align-items:center;font-size:10px}.track{height:10px;background:#1b2329;border-radius:2px;overflow:hidden}.fill{height:100%;background:linear-gradient(90deg,#1e6fd6,#3896ff)}.alerts{display:grid;gap:8px}.alert{display:flex;justify-content:space-between;padding:8px;border-bottom:1px solid #222b31;font-size:10px}.alert strong{color:var(--red)}.orders-panel{margin-top:10px;min-height:340px}.orders-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.orders-head input{width:280px}.table-wrap{overflow:auto;max-height:380px}table{width:100%;border-collapse:collapse;min-width:1400px;font-size:10px}th,td{padding:9px 8px;border-bottom:1px solid #222b31;text-align:left;white-space:nowrap}th{color:#aeb8bf;font-weight:500;position:sticky;top:0;background:#0e1418}.status-pill{padding:3px 7px;border-radius:999px;border:1px solid #2b3740}.status-Entregue,.status-Faturado{color:var(--green)}.status-Cancelado{color:var(--red)}.status-Preparando,.status-Emtrânsito{color:#4aa3ff}@media(max-width:1200px){.metrics{grid-template-columns:repeat(4,1fr)}.grid-main{grid-template-columns:1fr 1fr}.grid-secondary{grid-template-columns:1fr 1fr}}@media(max-width:760px){.app-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--border)}.sidebar nav{display:flex;overflow:auto}.nav{min-width:55px}.nav span{display:none}.brand img{width:54px;height:54px}main{padding:12px}header{display:block}.top-filters{margin-top:12px}.metrics{grid-template-columns:1fr 1fr}.grid-main,.grid-secondary{grid-template-columns:1fr}.filterbar label{min-width:calc(50% - 8px)}.orders-head{align-items:stretch;flex-direction:column}.orders-head input{width:100%}}
.server-badge{display:block;margin-top:6px;font-size:10px;color:#9fb4c3}.server-badge.online{color:#21e57a}.server-badge.offline{color:#ff5252}

/* V2.6 - navegação, histórico e atualizações */
html{scroll-behavior:smooth}.nav-icon{display:inline-block;width:20px;text-align:center}.nav-update{margin-top:12px;border-top:1px solid var(--border)!important;padding-top:16px!important}.primary-action{border-color:#2b89ff!important;background:#123e69!important;color:#fff!important}.primary-action:hover{background:#19548d!important}.primary-action:disabled{opacity:.55;cursor:not-allowed}.reports-panel{margin-top:12px}.report-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.report-actions #historyStatus{color:var(--muted);font-size:12px}.progress{height:10px;background:#182128;border:1px solid var(--border);border-radius:99px;overflow:hidden;margin-top:12px}.progress>div{height:100%;width:0;background:var(--blue);transition:width .2s ease}.compact-table{max-height:320px}.empty{color:var(--muted);padding:16px}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}.modal-backdrop[hidden]{display:none}.modal{width:min(680px,95vw);background:#0d1419;border:1px solid var(--border);border-radius:14px;padding:20px;color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.45)}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.modal-head h2{font-size:18px;margin:0}.modal-head button{font-size:24px;border:0;background:transparent;color:var(--text);cursor:pointer}.modal input[type=file]{width:100%;margin:16px 0;padding:12px;border:1px dashed var(--border);border-radius:8px;background:#0a1116;color:var(--text)}.update-status{margin-top:12px;color:var(--green);min-height:20px}.update-list{margin-top:16px;padding-top:12px;border-top:1px solid var(--border);font-size:12px;color:var(--muted);max-height:180px;overflow:auto}.update-list div{padding:5px 0;border-bottom:1px solid #182128}section[id],article[id]{scroll-margin-top:16px}
@media(max-width:1200px){.top-filters{flex-wrap:wrap}.primary-action{font-size:11px}}

.status-text{color:var(--amber)!important}.status-text[hidden]{display:none!important}

.update-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0!important}.update-item span{min-width:0;overflow:hidden;text-overflow:ellipsis}.update-item small{display:block;margin-top:3px;color:#74828c}.apply-update{background:#123e69;color:#fff;border:1px solid #2b89ff;border-radius:6px;padding:7px 10px;cursor:pointer;white-space:nowrap}.apply-update:hover{background:#19548d}


/* V2.8.9 - clientes recorrentes */
.customers-panel{margin-top:12px;min-height:300px}
.customers-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.customers-head>div:first-child small{color:var(--muted);font-size:11px}
.customer-kpis{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.customer-kpis span{min-width:130px;border:1px solid var(--border);background:#0a1014;border-radius:8px;padding:9px 12px}
.customer-kpis b{display:block;font-size:15px;color:var(--green)}
.customer-kpis small{display:block;color:var(--muted);font-size:9px;margin-top:3px}
.customer-enrichment{font-size:10px;color:var(--muted);margin:10px 0}
.recurring-table{max-height:360px}
.recurring-table table{min-width:1150px}
@media(max-width:760px){.customers-head{flex-direction:column}.customer-kpis{justify-content:flex-start}}

/* V2.8.10 - remoção forçada do bloco legado Relatórios e Histórico */
#section-reports,
.reports-panel,
section[id="section-reports"],
[data-legacy-section="reports-history"]{
  display:none !important;
  visibility:hidden !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

/* V2.8.15 - regras de recorrência são internas, não exibidas */
.customers-head > div:first-child > small{display:none!important}
#customerEnrichment:empty{display:none!important}


/* ============================================================
   V2.8.18 — UI PROFISSIONAL / DASHBOARD
   ============================================================ */
:root{
  --bg:#070a0c;
  --panel:#0d1317;
  --panel2:#11191f;
  --border:#24313a;
  --border-soft:#19242b;
  --text:#f4f7f8;
  --muted:#8e9ca5;
  --blue:#2f8cff;
  --green:#37d47b;
  --red:#ff5b55;
  --amber:#ffb52e;
}
body{
  background:
    radial-gradient(900px 500px at 72% -12%,rgba(38,74,101,.18),transparent 58%),
    linear-gradient(180deg,#080c0f 0%,#070a0c 100%);
  letter-spacing:-.01em;
}
.app-shell{grid-template-columns:210px minmax(0,1fr)}
.sidebar{
  padding:16px 12px;
  background:linear-gradient(180deg,#0b1013 0%,#080c0f 100%);
  box-shadow:12px 0 35px rgba(0,0,0,.16);
  z-index:10;
}
.brand{
  min-height:76px;
  padding:8px 8px 14px;
  margin-bottom:10px;
  border-bottom:1px solid var(--border-soft);
}
.brand img{width:58px;height:58px;filter:drop-shadow(0 4px 12px rgba(0,0,0,.45))}
.brand b{font-size:16px;letter-spacing:.02em}
.brand .live-dot{display:block;margin-top:7px;font-size:9px;font-weight:600;letter-spacing:.04em}
.nav{
  display:flex;
  align-items:center;
  min-height:44px;
  border:1px solid transparent;
  padding:10px 11px;
  margin:3px 0;
  font-weight:500;
  transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}
.nav:hover{border-color:#26333c;background:#12191e;transform:translateX(1px)}
.nav.active{
  background:linear-gradient(90deg,#172129,#11181d);
  border-color:#2b3943;
  box-shadow:inset 3px 0 0 var(--blue);
}
.nav-icon{color:#9eb2c0}
.nav-update{margin-top:16px!important;border-top:1px solid var(--border-soft)!important}
main{padding:20px 22px 28px}
header{
  min-height:52px;
  align-items:center;
  padding-bottom:12px;
  border-bottom:1px solid var(--border-soft);
}
h1{font-size:22px;letter-spacing:-.025em}
.top-filters input,.top-filters button,.filterbar select,.filterbar button,.orders-head input{
  border-color:#2a3740;
  background:#0b1115;
  box-shadow:0 1px 0 rgba(255,255,255,.02);
}
.top-filters button:hover,.filterbar button:hover{border-color:#496272;background:#101920}
.metrics{gap:10px;margin-top:14px}
.metric{
  position:relative;
  border-color:#25323b;
  border-radius:10px;
  min-height:96px;
  padding:13px 14px;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}
.metric:before{
  content:"";
  position:absolute;left:0;top:14px;bottom:14px;width:2px;
  border-radius:4px;background:#30404b;
}
.metric:first-child:before{background:var(--green)}
.metric strong{font-size:20px;letter-spacing:-.025em}
.metric em{font-size:9px;opacity:.9}
.filterbar{padding:11px 12px;border-radius:10px}
.panel{
  border-color:#25323b;
  border-radius:11px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
}
.panel-title{
  font-size:10px;
  letter-spacing:.035em;
  color:#dbe3e7;
  margin-bottom:14px;
}
.grid-main,.grid-secondary{gap:11px}
.section-featured{margin-top:12px}
.section-last{margin-bottom:0}
.orders-panel{min-height:360px}
.orders-head{
  padding-bottom:10px;
  margin-bottom:2px;
  border-bottom:1px solid var(--border-soft);
}
.table-wrap{
  scrollbar-color:#44535d #11171b;
  scrollbar-width:thin;
}
th{
  text-transform:uppercase;
  letter-spacing:.025em;
  font-size:9px;
  color:#94a5b0;
  background:#0d1418;
}
td{font-size:10px;color:#e0e6e9}
tr:hover td{background:#10181d}
.legend{
  max-height:195px;
  overflow:auto;
  padding-right:3px;
  scrollbar-width:thin;
}
.legend-row{
  align-items:center;
  min-height:18px;
}
.legend-row span{
  display:flex;align-items:center;gap:6px;min-width:0;
}
.legend-row span i{
  width:7px;height:7px;border-radius:50%;display:inline-block;flex:0 0 auto;
}
.donut-wrap{gap:18px}
.empty-inline{color:var(--muted);font-size:10px}
.customers-panel{min-height:320px}
.customer-kpis span{
  background:linear-gradient(180deg,#0f171c,#0b1115);
  border-color:#26343d;
  border-radius:9px;
}
.customer-enrichment{
  min-height:0;
  color:#6f8795;
  margin:7px 0;
}
.customer-enrichment:empty{display:none!important}
.note{font-size:10px;color:#778892}
@media(max-width:1400px){
  .app-shell{grid-template-columns:190px minmax(0,1fr)}
  .grid-main{grid-template-columns:1fr 1.2fr 1.05fr .9fr}
}


/* V2.8.30 — Marketplace filter / carrier normalization / payments by channel */
.filterbar{
  display:flex;
  align-items:end;
  gap:8px;
  flex-wrap:wrap;
}
.filterbar label{
  min-width:145px;
}
.filterbar label:nth-child(2){
  min-width:165px;
}
.payment-channel-panel{
  min-height:320px;
}
.payments-by-channel{
  max-height:330px;
  overflow:auto;
  padding-right:5px;
  scrollbar-width:thin;
}
.payment-channel-group{
  padding:0 0 13px;
  margin:0 0 13px;
  border-bottom:1px solid var(--border-soft);
}
.payment-channel-group:last-child{
  border-bottom:0;
  margin-bottom:0;
}
.payment-channel-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
  font-size:10px;
  font-weight:700;
  color:#dce6ec;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.payment-channel-title b{
  color:var(--muted);
  font-weight:500;
  font-size:9px;
  text-transform:none;
}
.payment-row{
  margin-bottom:6px;
}


/* ============================================================
   V2.8.32 — Marketplace Container / Layout conforme mockup
   ============================================================ */
.commercial-overview{
  display:grid;
  grid-template-columns:minmax(300px,.95fr) minmax(420px,1.35fr) minmax(320px,1fr);
  gap:12px;
  margin-top:12px;
}
.commercial-overview .panel{
  min-height:315px;
}
.panel-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
.panel-title-row .panel-title{
  margin-bottom:3px;
}
.panel-title-row small{
  color:var(--muted);
  font-size:10px;
}
.panel-footnote{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--border-soft);
  color:#7890a0;
  font-size:9px;
}
.marketplace-total{
  font-size:15px;
  font-weight:700;
  color:#dce6ec;
  white-space:nowrap;
}
.marketplace-bars{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.marketplace-row{
  display:grid;
  grid-template-columns:110px minmax(100px,1fr) 100px 60px;
  align-items:center;
  gap:10px;
  font-size:10px;
}
.marketplace-name{
  color:#f2f6f8;
  font-weight:600;
}
.marketplace-value{
  text-align:right;
  color:#d7e1e6;
  font-variant-numeric:tabular-nums;
}
.marketplace-row b{
  text-align:right;
  color:#f2f6f8;
  font-variant-numeric:tabular-nums;
}
.marketplace-empty{
  padding:28px 0;
}
.carrier-container .bars{
  padding-top:4px;
}
.payment-full-width{
  margin-top:12px;
  min-height:0;
}
.payment-full-width .payments-by-channel{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:10px;
  max-height:none;
  overflow:visible;
  padding:0;
}
.payment-card{
  display:flex;
  flex-direction:column;
  min-height:250px;
  padding:13px;
  background:linear-gradient(180deg,#0e161b,#0a1014);
  border:1px solid #25343e;
  border-radius:10px;
}
.payment-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
  padding-bottom:10px;
  margin-bottom:10px;
  border-bottom:1px solid var(--border-soft);
}
.payment-channel-title-main{
  font-size:11px;
  font-weight:700;
  color:#f1f5f7;
  text-transform:uppercase;
}
.payment-orders{
  color:#89a0ad;
  font-size:9px;
  white-space:nowrap;
}
.payment-card-body{
  flex:1;
}
.payment-card-row{
  display:grid;
  grid-template-columns:minmax(90px,1.1fr) minmax(70px,1fr) 52px;
  align-items:center;
  gap:8px;
  min-height:31px;
}
.payment-label{
  color:#dfe7eb;
  font-size:9px;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
}
.payment-card-row b{
  text-align:right;
  font-size:9px;
}
.payment-card-foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-top:10px;
  margin-top:10px;
  border-top:1px solid var(--border-soft);
  color:#a5b5bf;
  font-size:9px;
}
@media(max-width:1450px){
  .commercial-overview{
    grid-template-columns:1fr 1.25fr;
  }
  .carrier-container{
    grid-column:1 / -1;
  }
}
@media(max-width:900px){
  .commercial-overview{
    grid-template-columns:1fr;
  }
  .carrier-container{grid-column:auto}
  .marketplace-row{
    grid-template-columns:95px minmax(70px,1fr) 85px 48px;
  }
  .payment-full-width .payments-by-channel{
    grid-template-columns:1fr;
  }
}

/* V2.8.33 — pagamentos gerenciais + pedidos acessíveis */
.payment-detail-row{display:grid;grid-template-columns:minmax(120px,1.2fr) minmax(80px,1fr) 52px;gap:9px;align-items:center;min-height:42px}.payment-detail-row>div:first-child{display:flex;flex-direction:column;gap:3px}.payment-detail-row b{font-size:10px}.payment-detail-row small{font-size:8px;color:var(--muted)}.payment-detail-row>strong{text-align:right;font-size:9px}.order-link{border:0;background:transparent;color:#66b2ff;text-decoration:underline;cursor:pointer;padding:0;font-size:inherit}.order-link:hover{color:#a7d4ff}.order-row:hover{background:#111b22}.order-detail-modal{width:min(920px,96vw);max-height:90vh;overflow:auto}.order-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.order-detail-grid>div{background:#0a1014;border:1px solid var(--border);border-radius:8px;padding:10px;min-height:62px}.order-detail-grid small{display:block;color:var(--muted);font-size:9px;margin-bottom:7px}.order-detail-grid b{font-size:11px}.order-detail-modal h3{font-size:12px;margin:18px 0 8px}.detail-items{max-height:260px}.detail-items table{min-width:600px}@media(max-width:800px){.order-detail-grid{grid-template-columns:1fr 1fr}}


/* V2.8.44 - botão de relatório de clientes recorrentes */
.customers-head{align-items:center}
.customers-title-wrap{min-width:250px}
.recurring-report-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  flex:0 0 auto;min-height:38px;padding:8px 14px;border-radius:8px;
  border:1px solid rgba(55,212,123,.75);background:linear-gradient(180deg,#15924d,#11743e);
  color:#fff;font-weight:700;font-size:11px;letter-spacing:.025em;cursor:pointer;
  box-shadow:0 0 0 1px rgba(55,212,123,.08) inset,0 5px 18px rgba(18,144,74,.16);
  transition:transform .15s ease,filter .15s ease,box-shadow .15s ease;
}
.recurring-report-btn:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 7px 22px rgba(18,144,74,.24)}
.recurring-report-btn:active:not(:disabled){transform:translateY(0)}
.recurring-report-btn:disabled{opacity:.45;cursor:not-allowed;filter:saturate(.6)}
.recurring-report-icon{font-size:15px;line-height:1}
@media(max-width:1100px){.customers-head{align-items:flex-start;flex-wrap:wrap}.recurring-report-btn{order:2}.customer-kpis{order:3;width:100%;justify-content:flex-start}}


/* V2.8.45 — Índice de entregas no prazo: mês vigente */
.delivery-performance-panel{margin-top:12px;padding:18px 20px 16px;min-height:0;background:linear-gradient(180deg,#0c1419 0%,#091015 100%);border-color:#263943}
.delivery-performance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}
.delivery-eyebrow{font-size:8px;letter-spacing:.14em;color:#60d998;font-weight:800;margin-bottom:6px}
.delivery-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.delivery-title-row .panel-title{font-size:13px;margin:0}.delivery-subtitle{margin-top:6px;color:#8198a6;font-size:9px}
.delivery-current-badge,.current-chip{display:inline-flex;align-items:center;border:1px solid rgba(55,212,123,.38);background:rgba(55,212,123,.09);color:#63e9a3;border-radius:999px;font-size:8px;font-weight:800;letter-spacing:.05em;padding:5px 8px}
.delivery-report-btn{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:8px 13px;border-radius:8px;border:1px solid #355263;background:#111d24;color:#dff7ea;font-size:9px;font-weight:800;cursor:pointer;transition:.15s ease}.delivery-report-btn:hover{border-color:#37d47b;background:#132820;transform:translateY(-1px)}
.delivery-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.delivery-kpi{position:relative;overflow:hidden;border:1px solid #273a45;border-radius:10px;padding:12px 13px;background:#0b1318;min-height:82px}.delivery-kpi-primary:before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:#37d47b}.delivery-kpi small{display:block;color:#79909e;font-size:8px;letter-spacing:.06em;margin-bottom:8px}.delivery-kpi strong{display:block;color:#f3f7f9;font-size:21px;line-height:1;font-variant-numeric:tabular-nums}.delivery-kpi-primary strong{color:#4ee293}.delivery-kpi em{display:block;color:#879da9;font-size:8px;font-style:normal;margin-top:8px}.delivery-kpi strong.positive,.positive{color:#43dc8c!important}.delivery-kpi strong.negative,.negative{color:#f06a72!important}.neutral{color:#8198a6!important}
.delivery-progress-card{border:1px solid #223640;border-radius:10px;padding:12px 14px;background:#091116;margin-bottom:14px}.delivery-progress-head{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#b9c7ce}.delivery-progress-head b{font-size:12px;color:#4ee293}.delivery-progress-track{height:9px;border-radius:99px;background:#18262e;overflow:hidden;margin:9px 0}.delivery-progress-track i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#20b969,#4ee293);box-shadow:0 0 15px rgba(55,212,123,.22);transition:width .35s ease}.delivery-progress-foot{display:flex;gap:20px;justify-content:space-between;color:#78909d;font-size:8px;flex-wrap:wrap}
.delivery-history-head{display:flex;justify-content:space-between;align-items:flex-end;margin:3px 0 7px}.delivery-history-head b{display:block;font-size:9px;color:#cbd7dc}.delivery-history-head small{display:block;color:#718895;font-size:8px;margin-top:3px}.delivery-table-wrap{max-height:300px}.delivery-history-table{min-width:760px}.delivery-history-table th{font-size:8px;letter-spacing:.035em}.delivery-history-table td{font-size:9px;height:38px}.delivery-history-table tr.current-month{background:linear-gradient(90deg,rgba(55,212,123,.07),rgba(55,212,123,.015))}.delivery-history-table tr.current-month td:first-child{border-left:2px solid #37d47b}.delivery-history-table td:first-child b{text-transform:capitalize}.current-chip{margin-left:8px;padding:3px 6px;font-size:7px}.delivery-index-pill{display:inline-flex;min-width:54px;justify-content:center;padding:5px 8px;border-radius:999px;font-weight:800;border:1px solid}.delivery-index-pill.good{color:#58e59a;background:rgba(55,212,123,.10);border-color:rgba(55,212,123,.35)}.delivery-index-pill.warn{color:#f4c86a;background:rgba(244,200,106,.08);border-color:rgba(244,200,106,.3)}.delivery-index-pill.bad{color:#f2777d;background:rgba(242,119,125,.08);border-color:rgba(242,119,125,.3)}
@media(max-width:1100px){.delivery-kpis{grid-template-columns:1fr 1fr}.delivery-performance-head{flex-wrap:wrap}}@media(max-width:650px){.delivery-kpis{grid-template-columns:1fr}.delivery-progress-foot{flex-direction:column;gap:5px}.delivery-report-btn{width:100%;justify-content:center}}
/* V2.8.46 — OTD Frete Rápido por região */
.otd-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.otd-summary>div{border:1px solid #273a45;border-radius:9px;background:#0a1217;padding:10px 12px}.otd-summary small{display:block;color:#7f96a3;font-size:8px;margin-bottom:5px}.otd-summary strong{font-size:17px;color:#f2f6f8}.otd-region-card{border:1px solid #263943;border-radius:10px;background:#0a1116;padding:18px 20px 12px;margin-bottom:14px}.otd-region-bars{display:flex;flex-direction:column;gap:13px}.otd-region-row{display:grid;grid-template-columns:88px 1fr 92px;align-items:center;gap:12px}.otd-region-name{text-align:right;color:#b7c7cf;font-size:9px}.otd-track{display:flex;height:24px;border-radius:2px;overflow:hidden;background:#18252d;box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)}.otd-seg{height:100%;display:flex;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden;font-size:9px;font-weight:800}.otd-seg.late{background:#f4bd55;color:#3b2a09}.otd-seg.ontime{background:#5b9cf2;color:#fff}.otd-region-count{font-size:8px;color:#79919f}.otd-legend{display:flex;justify-content:flex-end;gap:16px;margin-top:13px;color:#8ca0aa;font-size:8px}.otd-legend span{display:flex;align-items:center;gap:5px}.otd-legend i{width:9px;height:9px;border-radius:50%;display:inline-block}.otd-legend .late{background:#f4bd55}.otd-legend .ontime{background:#5b9cf2}.otd-empty{padding:30px;text-align:center;color:#7d929e;font-size:9px;border:1px dashed #29404c;border-radius:8px}.otd-source-error{color:#f4bd55}.delivery-performance-panel{min-height:0}.delivery-table-wrap{max-height:230px}@media(max-width:800px){.otd-summary{grid-template-columns:1fr 1fr}.otd-region-row{grid-template-columns:70px 1fr}.otd-region-count{display:none}}

.freterapido-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.freterapido-status{font-size:11px;color:#8b969e;padding:0 8px}.delivery-report-btn.secondary{background:transparent;border:1px solid #2b4656;color:#d7e4eb}.delivery-report-btn.secondary:hover{border-color:#39d98a;color:#39d98a}

.freterapido-status.ok{color:#39d98a}
.freterapido-status.warn{color:#f4c15d}
.freterapido-status.error{color:#ff6b6b}

.delivery-current-month-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);gap:14px;margin-top:14px}
.delivery-region-table-card,.delivery-participation-card{border:1px solid #213744;border-radius:12px;background:#091219;padding:14px}
.delivery-region-table{width:100%;border-collapse:collapse}
.delivery-region-table th{font-size:10px;color:#73bde9;text-align:left;padding:10px 12px;border-bottom:1px solid #243844}
.delivery-region-table td{padding:13px 12px;border-bottom:1px solid #1c303a;font-size:13px}
.delivery-region-table td:nth-child(n+2),.delivery-region-table th:nth-child(n+2){text-align:right}
.participation-value{display:inline-flex;min-width:62px;justify-content:center;padding:5px 9px;border:1px solid #1d664b;border-radius:999px;color:#42df92;background:#0b2a20}
.delivery-participation-bars{display:flex;flex-direction:column;gap:14px;padding-top:8px}
.participation-row{display:grid;grid-template-columns:1fr auto;gap:5px 10px;align-items:center}
.participation-label{grid-column:1/-1;display:flex;justify-content:space-between;font-size:12px}
.participation-track{height:10px;border-radius:999px;background:#142630;overflow:hidden}
.participation-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#32d489,#3d91ef)}
.participation-row small{color:#82939d;font-size:10px}
@media(max-width:1100px){.delivery-current-month-grid{grid-template-columns:1fr}}

.region-oper-row{display:grid;grid-template-columns:120px minmax(240px,1fr) 190px;gap:14px;align-items:center;margin:15px 0}
.region-oper-name{text-align:right;color:#cbd8df;font-size:12px;font-weight:700}
.region-oper-track{height:28px;background:#142431;border-radius:4px;overflow:hidden;border:1px solid #1e3847}
.region-oper-fill{height:100%;min-width:3px;background:linear-gradient(90deg,#5599ee,#4b8fe8);display:flex;align-items:center;justify-content:center;color:white;font-weight:800;font-size:11px}
.region-oper-meta{display:flex;flex-direction:column;gap:2px;color:#d9e5eb}
.region-oper-meta b{font-size:11px}
.region-oper-meta small{font-size:10px;color:#82949f}
@media(max-width:1100px){
  .region-oper-row{grid-template-columns:90px 1fr}
  .region-oper-meta{grid-column:2}
}

.otd-live-value{color:#6bb0ff;font-weight:800}.otd-late-value{color:#f7b94b;font-weight:800}
.otd-live-row{display:grid;grid-template-columns:105px minmax(220px,1fr) 90px;gap:10px;align-items:center;margin:17px 0}
.otd-live-name{text-align:right;font-size:11px;font-weight:700;color:#d5e0e6}
.otd-live-track{height:28px;display:flex;overflow:hidden;background:#142431;border:1px solid #203b4b;border-radius:3px}
.otd-live-late{height:100%;background:#f4b544;display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:800;white-space:nowrap}
.otd-live-on{height:100%;background:#5599ee;display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:800;white-space:nowrap}
.otd-live-meta{font-size:10px;color:#95a5ae}.otd-live-empty{height:28px;display:flex;align-items:center;padding:0 10px;border:1px dashed #294653;border-radius:3px;color:#82939d}
@media(max-width:1100px){.otd-live-row{grid-template-columns:80px 1fr}.otd-live-meta{grid-column:2}}

.otd-live-empty{background:#0b151c;color:#8fa1ac;font-weight:700;justify-content:center}

/* Interface 2026: contraste, leitura e adaptação ao espaço disponível. */
:root{--bg:#17212d;--panel:#223040;--panel2:#29394b;--border:#415369;--border-soft:#34465b;--text:#f4f7fb;--muted:#bdcbd9;--blue:#71b4ff;--green:#67e4a0;color-scheme:dark}
body{background:linear-gradient(145deg,#1c2938,#17212d);line-height:1.45}
.sidebar{background:#1c2836;box-shadow:none;overflow-y:auto}
main{min-width:0;padding:24px;overflow:hidden}
.panel,.metric,.filterbar,.customer-kpis span{background:#223040;border-color:var(--border);box-shadow:0 3px 12px #00000012}
.panel{padding:18px;border-radius:14px}
.metric{padding:16px;min-height:106px;border-radius:12px}
.metric small{font-size:11px;color:var(--muted)}
.metric strong{font-size:23px;overflow-wrap:anywhere}
.metric em{font-size:11px}
h1{font-size:26px}.panel-title{font-size:12px;color:#ecf3fa;letter-spacing:.03em}
.nav{color:#c6d4e2;font-size:12px}.nav.active{background:#30455d;border-color:#4e6b89;box-shadow:inset 3px 0 var(--blue)}
.nav:hover{background:#2a3b4e;transform:none}.nav-icon{color:#9dcaff}
.top-filters input,.top-filters button,.filterbar select,.filterbar button,.orders-head input,.order-pagination button{background:#1b2837;border:1px solid var(--border);color:var(--text);border-radius:8px;padding:10px 12px;min-height:42px}
button{cursor:pointer}button:disabled{opacity:.45;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #91c7ff;outline-offset:3px}
.top-filters button:hover,.order-pagination button:hover:not(:disabled){background:#334a62;border-color:#7fa7cb}
.filterbar label{color:var(--muted);font-size:11px;flex:1 1 145px;min-width:0}
.filterbar label:nth-child(2){min-width:0}.filterbar select{width:100%}
.metrics{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px}
.grid-main,.grid-secondary{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.commercial-overview{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:14px}
.carrier-container{grid-column:1/-1}.panel,.commercial-overview>*,.grid-main>*,.grid-secondary>*{min-width:0}
.donut:after,.gauge:after{background:var(--panel)}
.legend,.barrow,.alert,.comparison,.note,.heat-legend{font-size:12px}
.note,.customer-enrichment,.freterapido-status{color:var(--muted)}
.table-wrap{overscroll-behavior-x:contain;scrollbar-color:#6b839e #1b2837}
table{font-size:12px}th,td{padding:12px 10px;border-bottom-color:#3a4a5d}
th{background:#2c3e52;color:#d4e1ed;font-size:11px;z-index:1}td{font-size:12px;color:#edf3f9}
tr:hover td{background:#304258}
.orders-head input{width:min(350px,100%)}
.order-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;color:var(--muted);font-size:12px}
.order-pagination>div{display:flex;gap:8px}
.modal{background:#223040}.modal input[type=file],.order-detail-grid>div{background:#1b2837}
.delivery-region-table-card,.delivery-participation-card,.otd-region-card,.otd-summary>div{background:#1d2b3a;border-color:var(--border)}
.otd-summary small,.otd-region-count,.otd-live-meta,.participation-row small{color:var(--muted);font-size:11px}
.otd-live-name,.region-oper-name{font-size:12px}
.customer-kpis small{font-size:11px}.customer-kpis b{font-size:18px}
@media(min-width:1600px){.grid-secondary{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){header{align-items:flex-start;flex-direction:column}.commercial-overview{grid-template-columns:1fr}.delivery-current-month-grid{grid-template-columns:1fr}}
@media(max-width:760px){
 .app-shell{grid-template-columns:minmax(0,1fr)}
 .sidebar{position:relative;height:auto;padding:10px 12px;border-bottom:1px solid var(--border);overflow:visible}
 .brand{min-height:0;padding:0 4px 10px;margin:0 0 8px}.brand img{width:42px;height:42px}.brand b{font-size:14px}
 .sidebar nav{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding-bottom:6px}
 .nav{width:auto;flex:0 0 auto;white-space:nowrap;margin:0;padding:10px;font-size:11px;min-height:42px}
 .nav span{display:inline;margin-left:5px}.nav-icon{display:none!important}.nav-update{margin:0!important;border-top:1px solid transparent!important;padding:10px!important}
 main{padding:14px}.top-filters{width:100%;gap:6px}.top-filters input{width:calc(50% - 18px);min-width:0}.top-filters button{flex:1 0 auto;font-size:12px}
 .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:12px}.metric strong{font-size:21px}
 .grid-main,.grid-secondary,.commercial-overview{grid-template-columns:minmax(0,1fr)}
 .filterbar label{flex:1 1 calc(50% - 8px);min-width:0}.filterbar button{width:100%;margin-left:0}
 .panel{padding:14px}.orders-head{align-items:stretch;flex-direction:column}
 .marketplace-row{grid-template-columns:minmax(80px,1fr) minmax(40px,1fr) auto}.marketplace-row b{grid-column:3}
 .otd-live-row,.region-oper-row{grid-template-columns:70px minmax(0,1fr);gap:8px}.otd-live-meta,.region-oper-meta{grid-column:2}
 .payment-detail-row{grid-template-columns:minmax(100px,1fr) minmax(40px,1fr) 46px}
 .customer-kpis{display:grid;grid-template-columns:1fr 1fr;width:100%}.customer-kpis span{min-width:0}
 .order-pagination{flex-wrap:wrap}.order-pagination>div{margin-left:auto}
 .modal-backdrop{padding:10px}.modal{max-height:90dvh;overflow:auto;padding:16px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}

/* REMOVER_MOVIDESK_DASHBOARD */
#md-app-widget,
.md-chat-widget-wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}