/* Órdenes — distribución canónica de acciones en el encabezado de detalle. */
.app-modal:has(.order-detail-head) .detail-header-right>.detail-header-actions,
.app-modal:has(.order-detail-head) .detail-header-right>.order-actions,
.app-modal:has(.order-detail-head) .detail-header-right>.canonical-order-actions-v281127,
.app-modal:has(.order-detail-head) .detail-header-right>.admin-action-row{
  position:static!important;
  display:flex!important;
  flex-flow:row wrap!important;
  justify-content:flex-end!important;
  align-items:center!important;
  align-content:flex-start!important;
  gap:7px!important;
  width:100%!important;
  height:auto!important;
  min-height:42px!important;
  max-height:none!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.order-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.order-tools .order-type-filters{flex:0 0 auto;margin:0;padding:0}.order-search-scope,.order-sort-control{display:grid;gap:3px}.order-search-scope span,.order-sort-control span{font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.order-search-scope select,.order-sort-control select{min-height:40px}.order-list-card{position:relative!important;isolation:isolate!important}.order-list-card .order-state-stack{position:static!important;display:flex!important;grid-column:3!important;grid-row:1!important;flex-direction:column!important;align-items:flex-end!important;align-self:stretch!important;justify-self:end!important;justify-content:space-between!important;width:max-content!important;max-width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:2px 0 6px!important}.order-list-card .order-state-stack>.status,.order-list-card .order-state-stack>.payment-pill{position:static!important;right:auto!important;top:auto!important;bottom:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;justify-self:end!important;max-width:100%!important;margin:0!important;padding:7px 10px!important;border-radius:999px!important;font-size:9px!important;line-height:1!important;font-weight:900!important;white-space:nowrap!important;opacity:1!important;visibility:visible!important;z-index:2!important;pointer-events:none!important;transform:none!important;filter:none!important}.order-list-card .order-state-stack>.payment-pill{min-height:27px!important;color:#fff!important}.order-list-card .order-state-stack>.payment-pill.is-paid{background:#287044!important}.order-list-card .order-state-stack>.payment-pill.is-unpaid{background:#d84236!important}.priority-order .order-folio{height:76px!important;grid-template-rows:14px 18px 25px 14px!important}.priority-order .order-folio>.priority-badge{position:static!important;grid-row:1;display:block!important;align-self:start;justify-self:start;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#765300!important;font-size:9px!important;font-weight:900!important;line-height:14px!important;white-space:nowrap;opacity:1!important;visibility:visible!important}.priority-order .order-folio>.mobile-card-heading,.priority-order .order-folio>.order-type{grid-row:2!important}.priority-order .order-folio>.folio-component{grid-row:3!important}.priority-order .order-folio>.order-date{grid-row:4!important}.priority-order .order-summary{top:84px!important}
.attention-v17{margin-top:1rem}
.order-option-manager form{display:grid;gap:.5rem}
.order-option-manager form button{min-height:42px}
@media(max-width:760px){.attention-panel{min-width:0}}
@media(max-width:760px){
  .order-list-card{height:148px!important;min-height:148px!important}
  .order-list-card>button{position:relative!important;display:block!important;height:100%!important;min-height:0!important;padding:8px 9px!important;overflow:hidden!important}
  .order-list-card .order-folio{position:absolute!important;inset:auto!important;left:9px!important;top:8px!important;display:grid!important;grid-template-rows:auto 25px 14px!important;align-content:start!important;gap:2px!important;width:48%!important;height:58px!important}
  .order-list-card.priority-order .order-folio{height:58px!important;grid-template-rows:auto 25px 14px!important}
  .order-list-card .mobile-card-heading{display:flex!important;align-items:center!important;gap:6px!important;width:max-content!important;max-width:100%!important;height:20px!important;white-space:nowrap!important}
  .order-list-card .mobile-card-heading .order-type{flex:0 1 auto!important;max-width:112px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .order-list-card .mobile-card-heading .delivery-chip{position:static!important;display:inline-flex!important;width:auto!important;max-width:92px!important;height:20px!important;margin:0!important;padding:3px 6px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .order-list-card.priority-order .order-folio>.mobile-card-heading,.order-list-card.priority-order .order-folio>.order-type{grid-row:1!important}
  .order-list-card.priority-order .order-folio>.folio-component{grid-row:2!important}
  .order-list-card.priority-order .order-folio>.order-date{grid-row:3!important}
  .order-list-card .order-summary{position:absolute!important;inset:auto!important;left:9px!important;top:68px!important;display:grid!important;grid-template-rows:20px 16px 1fr!important;width:43%!important;height:56px!important}
  .order-list-card .order-summary .order-progress.mini-stage{position:absolute!important;left:calc(100% - 32px)!important;top:-3px!important;display:grid!important;width:128%!important;max-width:none!important;height:52px!important;margin:0!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;overflow:visible!important}
  .order-list-card .order-state-stack{display:contents!important}
  .order-list-card .order-state-stack>.status{position:absolute!important;right:20px!important;top:8px!important;bottom:auto!important;max-width:46%!important;margin:0!important;opacity:1!important;visibility:visible!important;z-index:20!important}
  .order-list-card .order-state-stack>.payment-pill{position:absolute!important;right:20px!important;bottom:7px!important;top:auto!important;max-width:48%!important;margin:0!important;opacity:1!important;visibility:visible!important;z-index:20!important}
  .order-list-card.priority-order .order-folio>.priority-badge{position:absolute!important;left:0!important;bottom:-75px!important;top:auto!important;display:inline-flex!important;align-items:center!important;min-height:27px!important;margin:0!important;padding:7px 10px!important;border-radius:999px!important;background:#fff4cf!important;color:#765300!important;line-height:1!important;z-index:20!important}
  .order-list-card.priority-order .order-summary{top:68px!important}
  .order-list-card .order-arrow{position:absolute!important;right:7px!important;top:50%!important;display:block!important;transform:translateY(-50%)!important}
}
@media(max-width:600px){.order-tools .order-type-filters{width:100%;max-width:100%;order:1;overflow-x:auto;padding-bottom:4px}.order-tools .order-search-scope{order:2}.order-tools .order-sort-control{order:3}.order-tools #order-search{order:4;width:100%}}
.app-modal:has(.order-detail-head) .detail-header-right>.detail-header-actions>*,
.app-modal:has(.order-detail-head) .detail-header-right>.order-actions>*,
.app-modal:has(.order-detail-head) .detail-header-right>.canonical-order-actions-v281127>*,
.app-modal:has(.order-detail-head) .detail-header-right>.admin-action-row>*{
  box-sizing:border-box!important;
  flex:0 1 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
}
.app-modal:has(.order-detail-head) .detail-header-right [hidden],
.app-modal:has(.order-detail-head) .detail-header-right .permission-hidden{display:none!important}
@media(min-width:901px){
  .app-modal:has(.order-detail-head) .detail-header-right>.detail-header-actions,
  .app-modal:has(.order-detail-head) .detail-header-right>.order-actions,
  .app-modal:has(.order-detail-head) .detail-header-right>.canonical-order-actions-v281127,
  .app-modal:has(.order-detail-head) .detail-header-right>.admin-action-row{flex-wrap:nowrap!important}
}

/* Piloto 1.0.0.8 — controles compactos: búsqueda y ordenamiento comparten fila. */
.order-tools .order-sort-control{display:flex;align-items:center;gap:7px;min-height:40px;padding:4px 5px 4px 10px}
.order-tools .order-sort-control>span{font-size:9px;font-weight:850;letter-spacing:normal;text-transform:none}
.order-tools .order-sort-control select{min-width:245px;min-height:32px}
.order-query-row{display:flex;align-items:center;gap:8px;flex:1 1 480px;min-width:0}
.order-query-row #order-search{order:initial;flex:1 1 220px;width:auto;min-width:160px;max-width:360px}
.order-query-row .order-sort-control{order:initial;flex:0 1 330px}
@media(max-width:600px){
  .order-tools .order-query-row{order:3;display:flex;flex-flow:row nowrap;width:100%;flex-basis:100%}
  .order-tools .order-query-row #order-search{order:initial;width:36%;min-width:0;max-width:none}
  .order-tools .order-query-row .order-sort-control{order:initial;width:64%;min-width:0}
  .order-tools .order-query-row .order-sort-control select{min-width:0;width:100%;font-size:9px}
}
/* Piloto 1.0.0.9 — alcance de búsqueda sin encabezado y centrado verticalmente. */
.order-tools .order-search-scope{display:flex;align-items:center;align-self:center}
