/* ============================================================
   BOX BOY WEB V5.6.86 — PEDIDOS: MAPA PRINCIPAL + FILA À DIREITA
   Apenas composição visual. IDs, eventos, endpoints e regras permanecem.
   ============================================================ */

/* Estrutura desktop: mapa ocupa a esquerda/centro e fila fica à direita. */
#ordersPanelPage .orders-panel-shell{
  grid-template-columns:minmax(0,1fr) 350px!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:0!important;
  border-radius:6px!important;
  background:#17191b!important;
}
#ordersPanelPage .orders-map-area{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  border:0!important;
}
#ordersPanelPage .orders-panel-list{
  grid-column:2!important;
  grid-row:1!important;
  width:350px!important;
  min-width:0!important;
  max-width:350px!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  border:0!important;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px),
    #191b1d!important;
  background-size:24px 24px!important;
  box-shadow:inset 1px 0 0 #344754!important;
}
#ordersPanelPage .orders-groups{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#42505a #17191b;
}
#ordersPanelPage .orders-groups::-webkit-scrollbar{width:7px}
#ordersPanelPage .orders-groups::-webkit-scrollbar-track{background:#17191b}
#ordersPanelPage .orders-groups::-webkit-scrollbar-thumb{background:#42505a;border-radius:4px}

/* Cabeçalho da fila: texto à esquerda e Ações ao lado. */
#ordersPanelPage .orders-list-head-v5686{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:10px 10px 7px!important;
  background:#191b1d!important;
  border:0!important;
  box-shadow:none!important;
}
#ordersPanelPage .orders-list-head-v5686>.orders-list-head-copy-v5686{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
}
#ordersPanelPage .orders-list-head-v5686 .orders-list-head-copy-v5686 strong{
  display:block!important;
  width:auto!important;
  margin:0!important;
  font-size:13px!important;
  line-height:16px!important;
  color:#f5f8fb!important;
  font-weight:900!important;
}
#ordersPanelPage .orders-list-head-v5686 .orders-list-head-copy-v5686>span{
  display:block!important;
  width:auto!important;
  margin:2px 0 0!important;
  font-size:8.3px!important;
  line-height:11px!important;
  color:#9dabb5!important;
}
#ordersPanelPage .orders-head-actions-v5686{
  position:relative!important;
  inset:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:0 0 auto!important;
  gap:5px!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#ordersPanelPage .orders-head-actions-v5686.hidden{display:none!important}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-select-v540{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  min-width:30px!important;
  min-height:29px!important;
  padding:0 6px!important;
  border:1px solid #405460!important;
  border-radius:6px!important;
  background:#111d25!important;
  color:#cbd7df!important;
  font-size:8px!important;
  line-height:1!important;
}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-select-v540 input{
  width:12px!important;
  height:12px!important;
  margin:0!important;
}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-select-v540 span{
  display:inline!important;
  width:auto!important;
  margin:0!important;
  font-size:8px!important;
  line-height:1!important;
  color:#dce5ea!important;
}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-menu-toggle-v540{
  min-height:29px!important;
  height:29px!important;
  padding:0 8px!important;
  border-radius:6px!important;
  border-color:#405460!important;
  background:#10202b!important;
  color:#edf4f7!important;
  font-size:8.5px!important;
  font-weight:900!important;
  box-shadow:none!important;
}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-menu-toggle-v540 span{
  display:inline!important;
  width:auto!important;
  margin:0!important;
  color:inherit!important;
}
#ordersPanelPage .orders-head-actions-v5686 .orders-bulk-dropdown-v540{
  top:calc(100% + 6px)!important;
  right:0!important;
  bottom:auto!important;
  margin:0!important;
  width:136px!important;
  border-radius:6px!important;
  z-index:900!important;
}

/* Busca, abas e indicação das duas etapas principais. */
#ordersPanelPage .orders-search-row{padding:6px 10px!important}
#ordersPanelPage .orders-search-box{height:32px!important;border-radius:6px!important}
#ordersPanelPage .orders-list-tabs{padding:0 10px!important}
#ordersPanelPage .orders-list-tabs button{height:31px!important;font-size:9px!important}
#ordersPanelPage .orders-stage-strip-v5686{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:6px 10px 7px;
  background:transparent;
}
#ordersPanelPage .orders-stage-chip-v5686{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  min-height:27px;
  padding:0 8px;
  border:1px solid #334854;
  border-radius:6px;
  background:#121c23;
  color:#dce5ea;
  font-size:8.5px;
  font-weight:850;
}
#ordersPanelPage .orders-stage-chip-v5686 i{
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:50%;
  box-shadow:0 0 0 2px rgba(255,255,255,.04);
}
#ordersPanelPage .orders-stage-chip-v5686.production i{background:#a85ae6}
#ordersPanelPage .orders-stage-chip-v5686.ready i{background:#2bc477}

/* Mapa principal e controles compactos apenas por ícone. */
#ordersPanelPage .orders-map-actions-v5613{
  left:10px!important;
  right:auto!important;
  top:10px!important;
  width:auto!important;
  max-width:calc(100% - 62px)!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-actions-left{
  gap:5px!important;
  flex-wrap:wrap!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-action{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:32px!important;
  min-width:32px!important;
  height:31px!important;
  min-height:31px!important;
  padding:0!important;
  gap:0!important;
  border:1px solid #536b7a!important;
  border-radius:6px!important;
  background:rgba(11,28,40,.94)!important;
  color:#eef5f8!important;
  box-shadow:0 3px 10px rgba(0,0,0,.24)!important;
  backdrop-filter:blur(6px)!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-action.primary{
  width:36px!important;
  min-width:36px!important;
  background:linear-gradient(180deg,#ffbd42,#ffab1d)!important;
  border-color:#ffc14b!important;
  color:#21160a!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-action:hover:not(:disabled){
  border-color:#ffba48!important;
  background:#173247!important;
  color:#fff!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-action.primary:hover:not(:disabled){
  background:linear-gradient(180deg,#ffc55a,#ffb02b)!important;
  color:#21160a!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-map-action svg{
  width:14px!important;
  height:14px!important;
  flex:0 0 14px!important;
}
#ordersPanelPage .orders-layer-action-v5686[aria-pressed="true"],
#ordersPanelPage .orders-position-quick-v5613.active{
  border-color:#ffb532!important;
  box-shadow:0 0 0 1px rgba(255,181,50,.15),0 3px 10px rgba(0,0,0,.24)!important;
}
#ordersPanelPage .orders-map-actions-v5613 .orders-position-count-v5613{
  position:absolute!important;
  top:-5px!important;
  right:-5px!important;
  min-width:15px!important;
  height:15px!important;
  padding:0 3px!important;
  border-radius:7px!important;
  border:1px solid #0c1720!important;
  background:#ffad20!important;
  color:#1c1409!important;
  font-size:7px!important;
  line-height:13px!important;
  text-align:center!important;
}

/* Rodapé reduzido: somente indicadores operacionais e legenda. */
#ordersPanelPage .bb-map-footer-v5613{
  position:absolute!important;
  left:12px!important;
  right:12px!important;
  bottom:10px!important;
  z-index:500!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  pointer-events:none!important;
}
#ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613,
#ordersPanelPage .bb-map-footer-v5613 .orders-map-legend-v5613{
  position:static!important;
  inset:auto!important;
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  gap:5px!important;
  min-height:27px!important;
  margin:0!important;
  padding:0 7px!important;
  border:1px solid rgba(96,117,131,.74)!important;
  border-radius:6px!important;
  background:rgba(15,26,34,.91)!important;
  box-shadow:0 3px 10px rgba(0,0,0,.22)!important;
  backdrop-filter:blur(5px)!important;
  color:#edf3f6!important;
  font-size:8px!important;
  line-height:12px!important;
  pointer-events:auto!important;
}
#ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613{max-width:58%;overflow-x:auto;scrollbar-width:none}
#ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613::-webkit-scrollbar{display:none}
#ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613 span,
#ordersPanelPage .bb-map-footer-v5613 .orders-map-legend-v5613 span{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  white-space:nowrap!important;
}
#ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613 b{font-size:8.5px!important;color:#f4f7f9!important}
#ordersPanelPage .bb-map-footer-v5613 .orders-map-legend-v5613{margin-left:auto!important;max-width:42%!important;justify-content:flex-end!important}
#ordersPanelPage .orders-stat-dot-v5613,
#ordersPanelPage .orders-legend-pin-v5613{width:7px!important;height:7px!important;flex:0 0 7px!important}

/* Fila continua slim: menos arredondamento sem alterar conteúdo/ações. */
#ordersPanelPage .orders-group-v5662{border-radius:6px!important}
#ordersPanelPage .orders-card-v5662{border-radius:5px!important}
#ordersPanelPage .orders-card-v5662 .orders-status-menu>summary,
#ordersPanelPage .bb-card-square-action-v5662,
#ordersPanelPage .bb-card-assign-v5662{border-radius:5px!important}

/* Tema claro continua disponível; a reorganização não remove o recurso global. */
body.boxboy-theme-light #ordersPanelPage .orders-panel-shell{background:#edf2f5!important}
body.boxboy-theme-light #ordersPanelPage .orders-panel-list{
  background:#f7f9fa!important;
  box-shadow:inset 1px 0 0 #cbd6dd!important;
}
body.boxboy-theme-light #ordersPanelPage .orders-list-head-v5686{background:#f7f9fa!important}
body.boxboy-theme-light #ordersPanelPage .orders-list-head-v5686 .orders-list-head-copy-v5686 strong{color:#16222b!important}
body.boxboy-theme-light #ordersPanelPage .orders-list-head-v5686 .orders-list-head-copy-v5686>span{color:#657783!important}
body.boxboy-theme-light #ordersPanelPage .orders-stage-chip-v5686{background:#fff;border-color:#cbd6dd;color:#20313b}
body.boxboy-theme-light #ordersPanelPage .orders-head-actions-v5686 .orders-bulk-select-v540,
body.boxboy-theme-light #ordersPanelPage .orders-head-actions-v5686 .orders-bulk-menu-toggle-v540{background:#fff!important;border-color:#b9c8d1!important;color:#1b2d38!important}
body.boxboy-theme-light #ordersPanelPage .orders-map-actions-v5613 .orders-map-action:not(.primary){background:rgba(255,255,255,.95)!important;border-color:#9cabb5!important;color:#20313b!important}
body.boxboy-theme-light #ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613,
body.boxboy-theme-light #ordersPanelPage .bb-map-footer-v5613 .orders-map-legend-v5613{background:rgba(255,255,255,.95)!important;border-color:#b7c7d1!important;color:#263640!important}
body.boxboy-theme-light #ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613 b{color:#17242d!important}

/* Responsividade: em telas menores o mapa continua primeiro e a fila vem abaixo. */
@media(max-width:1180px) and (min-width:861px){
  #ordersPanelPage .orders-panel-shell{grid-template-columns:minmax(0,1fr) 315px!important}
  #ordersPanelPage .orders-panel-list{width:315px!important;max-width:315px!important}
}
@media(max-width:860px){
  #ordersPanelPage .orders-panel-shell{
    grid-template-columns:1fr!important;
    grid-template-rows:500px auto!important;
    height:auto!important;
    min-height:0!important;
  }
  #ordersPanelPage .orders-map-area{grid-column:1!important;grid-row:1!important;height:500px!important}
  #ordersPanelPage .orders-panel-list{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    max-width:none!important;
    min-height:460px!important;
    box-shadow:inset 0 1px 0 #344754!important;
  }
  #ordersPanelPage .orders-list-head-v5686{padding-left:12px!important;padding-right:12px!important}
  #ordersPanelPage .bb-map-footer-v5613 .orders-map-legend-v5613{display:none!important}
  #ordersPanelPage .bb-map-footer-v5613 .orders-footer-stats-v5613{max-width:100%!important}
}
@media(max-width:520px){
  #ordersPanelPage .orders-panel-shell{grid-template-rows:430px auto!important}
  #ordersPanelPage .orders-map-area{height:430px!important}
  #ordersPanelPage .orders-map-actions-v5613{left:7px!important;top:7px!important;max-width:calc(100% - 52px)!important}
  #ordersPanelPage .orders-map-actions-v5613 .orders-map-action{width:30px!important;min-width:30px!important;height:29px!important;min-height:29px!important}
  #ordersPanelPage .orders-map-actions-v5613 .orders-map-action.primary{width:33px!important;min-width:33px!important}
  #ordersPanelPage .bb-map-footer-v5613{left:7px!important;right:7px!important;bottom:7px!important}
  #ordersPanelPage .orders-list-head-v5686{align-items:center!important}
  #ordersPanelPage .orders-list-head-v5686 .orders-list-head-copy-v5686>span{max-width:210px}
}

/* Garante flex no cabeçalho mesmo sobre a regra legada .orders-bulk-bar:not(.hidden). */
#ordersPanelPage .orders-head-actions-v5686:not(.hidden){display:flex!important}

/* V5.6.93 — paginação da fila e camada de pedidos leve */
#ordersPanelPage .orders-group-pagination-v5693{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 30px!important;
  align-items:center!important;
  gap:7px!important;
  margin:7px 1px 1px!important;
  padding:7px!important;
  border:1px solid #263e4d!important;
  border-radius:6px!important;
  background:#0b1923!important;
}
#ordersPanelPage .orders-group-pagination-v5693 button{
  width:30px!important;
  min-width:30px!important;
  height:29px!important;
  min-height:29px!important;
  padding:0!important;
  border:1px solid #425d6d!important;
  border-radius:5px!important;
  background:#102634!important;
  color:#f3f7f9!important;
  font-size:17px!important;
  font-weight:900!important;
  cursor:pointer!important;
}
#ordersPanelPage .orders-group-pagination-v5693 button:not(:disabled):hover{
  border-color:#ffb22c!important;
  color:#ffbd4b!important;
}
#ordersPanelPage .orders-group-pagination-v5693 button:disabled{
  opacity:.35!important;
  cursor:default!important;
}
#ordersPanelPage .orders-group-pagination-v5693>span{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  color:#cbd8df!important;
  font-size:8.5px!important;
  white-space:nowrap!important;
}
#ordersPanelPage .orders-group-pagination-v5693>span b{
  color:#fff!important;
  font-size:9px!important;
}
#ordersPanelPage .orders-group-pagination-v5693>span small{
  color:#8299a7!important;
  font-size:7.5px!important;
}
body.boxboy-theme-light #ordersPanelPage .orders-group-pagination-v5693{
  background:#f7f9fa!important;
  border-color:#c6d2d9!important;
}
body.boxboy-theme-light #ordersPanelPage .orders-group-pagination-v5693>span,
body.boxboy-theme-light #ordersPanelPage .orders-group-pagination-v5693>span b{color:#20313b!important}
body.boxboy-theme-light #ordersPanelPage .orders-group-pagination-v5693 button{
  background:#fff!important;
  border-color:#aebfc9!important;
  color:#20313b!important;
}
