/* Citroguz · barra de accesos alineada. Conserva estados y permisos existentes. */
body[data-cg-view] header .cg-mobile-tools{
 width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;
 gap:10px!important;margin:0!important;padding:16px 0 0!important;
 border-top:1px solid #edf0f5;grid-column:1/-1;flex-basis:100%;min-width:0;
}
body[data-cg-view] header .cg-mobile-tools:empty{display:none}
body[data-cg-view] header .cg-mobile-tools .cg-push-tools,
body[data-cg-view] header .cg-mobile-tools .cg-view-tools{display:contents!important}
body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>span{
 order:2;flex-basis:100%;max-width:none!important;margin:0!important;
 font-size:12px!important;line-height:1.5;overflow-wrap:anywhere;
}
body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>span:empty{display:none}
body[data-cg-view] header .cg-mobile-tools>a,
body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>:is(a,button),
body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings>summary{
 margin:0!important;min-height:44px!important;height:auto!important;padding:10px 14px!important;
 border-radius:10px!important;font:600 12px/1.4 Inter,system-ui,sans-serif!important;
 white-space:normal!important;text-align:center;box-shadow:none!important;max-width:100%;
}
body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings{margin:0!important;align-self:stretch;min-width:0}
body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings>summary{display:flex;align-items:center;justify-content:center;height:100%!important}
body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings-panel{left:0;right:auto}
body[data-cg-view] header .cg-mobile-tools [hidden],
body[data-cg-view] header .cg-mobile-tools [aria-hidden=true]{display:none!important}
@media screen and (max-width:780px){
 body[data-cg-view] header .cg-mobile-tools{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;align-items:stretch}
 body[data-cg-view] header .cg-mobile-tools>a,
 body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>:is(a,button){width:100%;min-width:0;justify-content:center;align-self:stretch}
 body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>span{grid-column:1/-1;order:2}
 body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings[open]{grid-column:1/-1;width:100%}
 body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings-panel{width:100%!important;max-width:100%!important;left:auto;right:auto}
}
@media print{body[data-cg-view] header .cg-mobile-tools{display:none!important}}
/* Orden estable aunque los módulos terminen de cargar en momentos distintos. */
body[data-cg-view] header .cg-mobile-tools .cg-confirmation-settings{order:1}
body[data-cg-view] header .cg-mobile-tools :is(.cg-role-link,.prod-link,.volver),
body[data-cg-view] header .cg-mobile-tools .cg-view-tools>:is(a,button){order:2}
body[data-cg-view] header .cg-mobile-tools>.cg-clientes-link{order:3}
body[data-cg-view] header .cg-mobile-tools>.cg-tutorial-link{order:4}
body[data-cg-view] header .cg-mobile-tools :is(.cg-push-tools,.cg-view-tools)>span{order:9}
@media screen and (max-width:780px){body[data-cg-view] header .cg-mobile-tools>.cg-tutorial-link{grid-column:1/-1}}

/* El menú debe sobresalir de la cabecera sin que ésta lo recorte. */
body[data-cg-view=ventas] header,
body[data-cg-view=produccion].cg-prod-v4 header{
 overflow:visible!important;position:relative!important;z-index:50;
}
body[data-cg-view] header .cg-mobile-tools,
body[data-cg-view] header .cg-confirmation-settings{overflow:visible!important}
body[data-cg-view] header .cg-confirmation-settings-panel{
 z-index:1100!important;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;
}
@media screen and (max-width:1024px),screen and (max-height:600px){
 body[data-cg-view] header .cg-confirmation-settings[open]{flex-basis:100%!important;width:100%;grid-column:1/-1}
 body[data-cg-view] header .cg-confirmation-settings-panel{position:static!important;width:min(320px,100%)!important;max-width:100%!important;margin-top:8px;box-shadow:none!important}
}
