/* CITROGUZ MÓVIL V1. Ajustes acotados por vista; sin ocultar desbordamientos. */
body[data-cg-view] *,body[data-cg-view] *::before,body[data-cg-view] *::after{box-sizing:border-box}
body[data-cg-view] .cg-mobile-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;max-width:100%;grid-column:1/-1;flex-basis:100%}
body[data-cg-view] .cg-mobile-tools:empty{display:none}
body[data-cg-view] .cg-mobile-tools .cg-push-tools{flex-basis:100%;margin:0!important}
body[data-cg-view] .cg-mobile-tools .cg-view-tools{margin:0!important}
body[data-cg-view] .cg-mobile-tools .cg-confirmation-settings{flex:none;grid-column:auto}
body[data-cg-view] .cg-mobile-tools .cg-clientes-link{flex:none}
body[data-cg-view] .cg-mobile-tools .cg-push-tools span{overflow-wrap:anywhere;line-height:1.5}
@media screen and (max-width:1024px){
 body[data-cg-view] :is(input,select,textarea){min-width:0;max-width:100%}
 body[data-cg-view] :is(.card,.panel,.field,.section,.form-main,.client-card,.cgv2-card,.cg-p4-controls){min-width:0}
 body[data-cg-view] :is(.folio,.cliente,.meta,.client-card h3,.client-card p,.obs,.cg-user-name){overflow-wrap:anywhere}
 body[data-cg-view=ventas].cg-design-v3 .grid{grid-template-columns:minmax(0,1fr)!important}
 body[data-cg-view=ventas].cg-design-v3 .cgv2-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body[data-cg-view=produccion].cg-prod-v4 header{flex-wrap:wrap!important}
}
@media screen and (max-width:780px){
 body[data-cg-view=ventas],body[data-cg-view=produccion]{padding:12px max(12px,env(safe-area-inset-right)) max(30px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
 body[data-cg-view] .wrap{width:100%!important;max-width:100%!important;margin-inline:auto!important}
 body[data-cg-view=ventas] header,body[data-cg-view=produccion].cg-prod-v4 header{display:grid!important;grid-template-columns:100px minmax(0,1fr)!important;gap:14px 12px!important;padding:16px!important;align-items:center!important;overflow:visible!important}
 body[data-cg-view=ventas] header .logo,body[data-cg-view=produccion].cg-prod-v4 header .logo{width:100px!important;min-width:0!important;max-width:100%!important;height:52px!important;min-height:0!important;background-size:contain!important;flex:none!important}
 body[data-cg-view=ventas] header .logo::after{display:none!important}
 body[data-cg-view=ventas] header>.logo+div,body[data-cg-view=produccion] header .cg-production-title{min-width:0;padding-left:0!important;border-left:0!important}
 body[data-cg-view=ventas] header h1,body[data-cg-view=produccion].cg-prod-v4 header h1{font-size:20px!important;line-height:1.25!important;overflow-wrap:anywhere}
 body[data-cg-view] header .cg-session-area{grid-column:1/-1!important;width:100%!important;min-width:0!important;margin:0!important;justify-content:flex-start!important;flex-wrap:wrap!important}
 body[data-cg-view] header .cg-user-card{width:100%!important;max-width:100%!important;min-width:0!important;padding:8px!important;gap:10px!important;display:flex!important}
 body[data-cg-view] header .cg-user-text{display:block!important;min-width:0!important;flex:1!important}
 body[data-cg-view] header .cg-user-name{font-size:13px!important;line-height:1.4!important;white-space:normal!important;max-width:none!important}
 body[data-cg-view] header .cg-user-role{font-size:11px!important}
 body[data-cg-view] header .cg-logout{min-width:44px!important;min-height:44px!important;width:auto!important;flex:none!important;margin-left:auto!important}
 body[data-cg-view] .cg-mobile-tools :is(a,button,summary){min-height:44px!important;white-space:normal!important;line-height:1.3!important}
 body[data-cg-view] .cg-mobile-tools .cg-view-tools{flex-wrap:wrap!important;flex-basis:auto!important}
 body[data-cg-view] .cg-confirmation-settings-panel{position:static!important;width:min(300px,100%)!important;max-width:100%!important;margin-top:8px;box-shadow:none!important}
 body[data-cg-view] .cg-confirmation-settings[open]{flex-basis:100%!important;width:100%}
 body[data-cg-view] .cg-push-tools{gap:8px!important;padding:0!important}
 body[data-cg-view] .cg-push-tools span{flex-basis:100%!important;max-width:100%!important}
 body[data-cg-view] :is(input,select,textarea):not([type=checkbox]):not([type=radio]),body[data-cg-view=ventas].cg-design-v3 #form :is(input,select,textarea):not([type=checkbox]){font-size:16px!important;min-height:44px!important;max-width:100%}
 body[data-cg-view] input[type=checkbox],body[data-cg-view] input[type=radio]{flex:none;accent-color:#f58220}
 body[data-cg-view] :is(.cg-confirm-card,.cg-direct-dialog){width:100%!important;max-width:100%!important;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;overflow-y:auto!important;overscroll-behavior:contain}
 body[data-cg-view] :is(.cg-confirm-overlay,.cg-direct-overlay){padding:16px max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
 body[data-cg-view] .toast{left:12px!important;right:12px!important;bottom:max(16px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:calc(100vw - 24px)!important;transform:none!important;overflow-wrap:anywhere;white-space:normal!important}
 body[data-cg-view=ventas].cg-design-v3 #form{padding:18px!important}
 body[data-cg-view=ventas].cg-design-v3 #form .row2{grid-template-columns:minmax(0,1fr)!important}
 body[data-cg-view=ventas].cg-design-v3 #form .segment{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;flex-wrap:wrap!important;width:100%!important}
 body[data-cg-view=ventas].cg-design-v3 #form .segment button{min-width:0!important;min-height:44px!important;font-size:12px!important;white-space:normal!important;line-height:1.35!important}
 body[data-cg-view=ventas] .qty{max-width:100%!important}
 body[data-cg-view=ventas].cg-design-v3 .cgv2-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-cg-view=ventas].cg-design-v3 .cgv2-filters{grid-template-columns:minmax(0,1fr)!important}
 body[data-cg-view=ventas] .cgv2-filters>*{grid-column:auto!important}
 body[data-cg-view=ventas] .cgv2-client{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}
 body[data-cg-view=ventas] .cgv2-client>span{overflow-wrap:anywhere}
 body[data-cg-view=ventas] .cgv2-client .cgv2-track{grid-row:2;grid-column:1/-1}
 body[data-cg-view=ventas] .cgv2-client>b{grid-column:2;grid-row:1;white-space:normal;overflow-wrap:anywhere}
 body[data-cg-view=ventas] .cgv2-bars{gap:5px!important}
 body[data-cg-view=ventas] .cg-order-actions,body[data-cg-view=ventas] .cg-attachment-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 body[data-cg-view=ventas] .cg-order-actions button,body[data-cg-view=ventas] .cg-attachment-actions button{flex:1 1 120px!important;min-height:44px!important;white-space:normal!important}
 body[data-cg-view=ventas] :is(.order,.cart-item,.cg-confirm-client,.cg-confirm-product){min-width:0;overflow-wrap:anywhere}
 body[data-cg-view=produccion].cg-prod-v4 .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body[data-cg-view=produccion].cg-prod-v4 .stats .stat{min-height:88px!important;padding:12px!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;flex-direction:row!important}
 body[data-cg-view=produccion].cg-prod-v4 .stat span{font-size:12px!important;line-height:1.45!important;letter-spacing:0!important}
 body[data-cg-view=produccion].cg-prod-v4 .stat strong{font-size:22px!important;padding:4px 7px!important;flex:none!important}
 body[data-cg-view=produccion] .cg-p4-title .cg-production-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 body[data-cg-view=produccion] .cg-production-actions>button{flex:1 1 130px!important;min-height:44px!important;white-space:normal!important}
 body[data-cg-view=produccion] .cg-p4-rounds button{min-height:44px!important;font-size:12px!important}
 body[data-cg-view=produccion].cg-prod-v4 #lista .pedido{grid-template-columns:minmax(0,1fr)!important;gap:16px!important;padding:18px!important}
 body[data-cg-view=produccion] :is(.cg-p4-client,.cg-productos-pedido,.cg-p4-delivery,.cg-p4-actions){grid-column:1/-1!important}
 body[data-cg-view=produccion] .cg-p4-delivery{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px}
 body[data-cg-view=produccion] .cg-p4-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
 body[data-cg-view=produccion] .cg-p4-actions>*{min-width:0!important;min-height:44px!important;font-size:13px!important;white-space:normal!important}
 body[data-cg-view=produccion] .cg-auth-actions{grid-column:1/-1}
 body[data-cg-view=produccion] .cg-auth-actions button{flex:1 1 100px;min-height:44px!important;font-size:13px!important}
 body[data-cg-view=produccion] :is(.cg-p4-round,.cg-p4-prep,.cg-p4-product-line,.cg-total-litros,.meta,.folio){font-size:12px!important}
 body[data-cg-view=produccion] .cg-report-actions{width:100%;display:flex;flex-wrap:wrap}
 body[data-cg-view=produccion] .cg-report-actions button{flex:1 1 130px;min-height:44px!important}
 body[data-cg-view=produccion] .cg-p4-drawer{padding-bottom:env(safe-area-inset-bottom)!important}
 body[data-cg-view=produccion] .cg-p4-drawer-head{padding-top:max(16px,env(safe-area-inset-top));gap:12px}
 body[data-cg-view=produccion] .cg-p4-drawer-close{width:44px!important;height:44px!important;flex:none}
 body[data-cg-view=produccion] .cg-direct-line{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-cg-view=produccion] .cg-direct-line label:first-child,body[data-cg-view=produccion] .cg-direct-line label:nth-child(2){grid-column:1/-1!important}
 body[data-cg-view=produccion] .cg-direct-remove{min-width:44px;min-height:44px}
 body[data-cg-view=clientes] header{flex-wrap:wrap;gap:14px;padding:16px}
 body[data-cg-view=clientes] header nav{width:100%;justify-content:space-between;flex-wrap:wrap;gap:12px}
 body[data-cg-view=clientes] .brand{min-width:0;max-width:100%}
 body[data-cg-view=clientes] main{padding:24px 16px max(40px,env(safe-area-inset-bottom))}
 body[data-cg-view=clientes] .page-title{flex-wrap:wrap;gap:12px}
 body[data-cg-view=clientes] .page-title>button{max-width:none;min-height:44px}
 body[data-cg-view=clientes] .tabs{gap:18px;flex-wrap:wrap}
 body[data-cg-view=clientes] :is(.client-card .actions,.save-bar){flex-wrap:wrap}
 body[data-cg-view=clientes] .client-card .actions>button{flex:1;min-width:0;white-space:normal;min-height:44px}
 body[data-cg-view=clientes] .prices input{min-width:80px}
 body[data-cg-view=clientes] .table-scroll{max-width:100%;overscroll-behavior-x:contain}
 body[data-cg-view=oficina] header,body[data-cg-view=chofer] header{display:flex;flex-wrap:wrap;gap:12px;padding:16px}
 body[data-cg-view=oficina] header img,body[data-cg-view=chofer] header img{width:115px;height:56px;max-width:40%;object-fit:contain;flex:none}
 body[data-cg-view=oficina] header h1,body[data-cg-view=chofer] header h1{flex:1;min-width:0;font-size:19px;overflow-wrap:anywhere;line-height:1.4}
 body[data-cg-view=oficina] .toolbar{display:grid;grid-template-columns:minmax(0,1fr)}
 body[data-cg-view=oficina] .toolbar :is(input,select){width:100%;min-width:0}
 body[data-cg-view=oficina] .card,body[data-cg-view=chofer] .card{padding:16px;overflow-wrap:anywhere}
 body[data-cg-view=chofer] .toolbar{align-items:stretch}
 body[data-cg-view=chofer] .toolbar button{width:100%}
 body[data-cg-view=chofer] .route{flex-wrap:wrap}
 body[data-cg-view=chofer] .actions button{min-width:0;white-space:normal}
 body[data-cg-view=login]{min-height:100svh;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 body[data-cg-view=login] .login-card{padding:26px 20px}
 body[data-cg-view=dashboard] .workspace{padding:20px max(16px,env(safe-area-inset-right)) max(30px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 body[data-cg-view=dashboard] .sidebar{padding:14px 16px}
 body[data-cg-view=dashboard] .sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body[data-cg-view=dashboard] .sidebar nav a{min-height:44px;justify-content:center;font-size:13px;text-align:center}
 body[data-cg-view=dashboard] .topline{flex-wrap:wrap;font-size:12px;line-height:1.5}
 body[data-cg-view=dashboard] .head-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
 body[data-cg-view=dashboard] .head-actions .button{white-space:normal;min-height:44px;font-size:13px}
 body[data-cg-view=dashboard] .periods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body[data-cg-view=dashboard] .periods button{font-size:13px;min-height:44px}
 body[data-cg-view=dashboard] .panel-heading{flex-wrap:wrap}
 body[data-cg-view=dashboard] .kpi-top{align-items:flex-start}
 body[data-cg-view=dashboard] .metric-icon{flex:none}
 body[data-cg-view=dashboard] .rank-item{grid-template-columns:20px minmax(0,1fr);gap:10px}
 body[data-cg-view=dashboard] .rank-value{grid-column:2;white-space:normal;overflow-wrap:anywhere}
 body[data-cg-view=dashboard] .attention-caption{flex-wrap:wrap}
 body[data-cg-view=dashboard] .insight{flex-wrap:wrap;gap:8px}
 body[data-cg-view=dashboard] .insight b{max-width:100%;text-align:left}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table){min-width:0;width:100%;display:block}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) tbody{display:grid;gap:12px;width:100%}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) tr{display:block;border:1px solid #e4e9f0;border-radius:10px;padding:12px;width:100%}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) td{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:10px;width:100%;max-width:none!important;padding:10px 0;overflow-wrap:anywhere}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) td::before{content:attr(data-mobile-label);font-size:11px;font-weight:600;color:#64766a;grid-row:1/5}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) td>*{min-width:0;max-width:100%;grid-column:2;white-space:normal}
 body[data-cg-view=dashboard] :is(.orders-table,.seller-table) td[colspan]{display:block;text-align:center}
 body[data-cg-view=dashboard] td[colspan]::before{content:none}
 body[data-cg-view=dashboard] .table-scroll{margin-inline:0}
 body[data-cg-view=dashboard] .tag{white-space:normal}
 body[data-cg-view=dashboard] footer{font-size:11px;line-height:1.5}
}
@media screen and (max-width:360px){
 body[data-cg-view=produccion] .cg-p4-actions,body[data-cg-view=ventas] .cg-confirm-grid{grid-template-columns:minmax(0,1fr)!important}
 body[data-cg-view=dashboard] .filters{grid-template-columns:minmax(0,1fr)}
 body[data-cg-view=dashboard] .filters>*{grid-column:auto}
 body[data-cg-view=clientes] .brand span{font-size:11px}
}
/* Los avisos se mantienen ocultos hasta que su controlador los muestra. */
body[data-cg-view] .toast:not(.show){visibility:hidden!important;pointer-events:none!important}
@media screen and (max-width:780px){
 body[data-cg-view=clientes] :is(button,.tabs button){min-height:44px!important}
 body[data-cg-view=clientes] .prices{display:block;width:100%;min-width:0}
 body[data-cg-view=clientes] .prices thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
 body[data-cg-view=clientes] .prices tbody{display:grid;gap:12px;width:100%}
 body[data-cg-view=clientes] .prices tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #e4e9f0;border-radius:10px}
 body[data-cg-view=clientes] .prices td{padding:0;border:0;min-width:0;width:auto}
 body[data-cg-view=clientes] .prices td:first-child{grid-column:1/-1;font-size:13px;font-weight:600}
 body[data-cg-view=clientes] .prices td:not(:first-child)::before{content:attr(data-mobile-label);display:block;margin-bottom:6px;font-size:11px;color:#6e7b8e}
 body[data-cg-view=clientes] .prices input{width:100%;min-width:0;text-align:left}
}
@media screen and (max-width:780px){body[data-cg-view] .cg-confirmation{max-height:calc(100dvh - 32px);overflow-y:auto}body[data-cg-view] .cg-confirmation.with-note{pointer-events:auto}}
@media print{body[data-cg-view] .cg-mobile-tools{display:none!important}}
