:root{--brand:#0b2d5c;--accent:#17a2b8;--bg:color-mix(in srgb,var(--brand) 6%,#fff);}
/* Salones: asegurar que el texto del selector de estado se vea completo */
#mesaEstado,.mesa-state-label select{box-sizing:border-box!important;min-height:44px!important;height:44px!important;line-height:1.35!important;padding:8px 38px 8px 12px!important;font-size:14px!important;display:block!important;overflow:visible!important;}
/* El mapa de salón se administra desde Tablas > Salones, no desde Configuración general. */
.config-nav a[href="#salon"],.config-grid>#salon{display:none!important;}
/* Diseñador: ancho y alto siempre editables y manija de tamaño bien visible. */
body .props-panel .advanced{display:grid!important;}
body .designer-item .resize-handle{display:grid!important;width:32px!important;height:32px!important;right:0!important;bottom:0!important;background:#fff!important;border:2px solid var(--brand)!important;color:var(--brand)!important;font-size:18px!important;font-weight:900!important;cursor:nwse-resize!important;pointer-events:auto!important;z-index:999!important;box-shadow:0 2px 8px rgba(16,24,40,.22)!important;}
body .designer-item.selected{overflow:visible!important;}
body .props-panel label:has(#pw)::before{content:'Ancho del objeto';display:block;font-size:11px;font-weight:900;color:var(--muted);margin-bottom:4px;}
body .props-panel label:has(#ph)::before{content:'Alto / largo del objeto';display:block;font-size:11px;font-weight:900;color:var(--muted);margin-bottom:4px;}
body .props-panel label:has(#pw),body .props-panel label:has(#ph){font-size:0;}
body .props-panel #pw,body .props-panel #ph{font-size:14px;}

/* Cabecera pública móvil: marca + acciones + navegación, sin elementos fuera del viewport. */
@media(max-width:900px){
 body:has(.public-header){padding-bottom:0!important;}
 body .public-header{
   position:sticky!important;top:0!important;z-index:1100!important;
   display:grid!important;grid-template-columns:minmax(0,1fr)!important;
   align-items:stretch!important;justify-content:stretch!important;
   gap:9px!important;height:auto!important;min-height:0!important;overflow:visible!important;
   padding:10px 12px!important;background:rgba(255,255,255,.98)!important;
   border-bottom:1px solid var(--border)!important;box-shadow:0 6px 20px rgba(16,24,40,.08)!important;
 }
 body .public-header .public-brand{
   display:flex!important;align-items:center!important;gap:10px!important;
   width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
 }
 body .public-header .public-brand img{flex:0 0 auto!important;}
 body .public-header .public-brand>div{min-width:0!important;}
 body .public-header .public-brand strong,body .public-header .public-brand small{
   display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
 }
 body .public-header .public-actions{
   display:grid!important;grid-template-columns:1fr 1fr!important;
   align-items:stretch!important;gap:8px!important;width:100%!important;
   margin:0!important;visibility:visible!important;opacity:1!important;position:static!important;
 }
 body .public-header .public-actions>.btn,
 body .public-header .public-actions>.btn.primary{
   display:flex!important;position:static!important;inset:auto!important;
   width:100%!important;min-width:0!important;max-width:none!important;
   min-height:44px!important;height:44px!important;margin:0!important;padding:8px 10px!important;
   align-items:center!important;justify-content:center!important;
   visibility:visible!important;opacity:1!important;transform:none!important;
   border-radius:11px!important;font-size:13px!important;font-weight:900!important;
   line-height:1.15!important;white-space:normal!important;text-align:center!important;box-shadow:none!important;
 }
 body .public-header .public-nav{
   display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
   position:static!important;inset:auto!important;z-index:auto!important;
   width:100%!important;margin:0!important;padding:0!important;gap:6px!important;
   align-items:stretch!important;background:transparent!important;border:0!important;
   box-shadow:none!important;backdrop-filter:none!important;overflow:visible!important;
 }
 body .public-header .public-nav a{
   display:flex!important;align-items:center!important;justify-content:center!important;
   min-width:0!important;min-height:42px!important;padding:7px 5px!important;
   text-align:center!important;white-space:normal!important;font-size:11px!important;
   line-height:1.15!important;border-radius:10px!important;
 }
 body .public-header .public-nav a[href="carta.php"]{font-weight:900!important;}
 body .orders-modal{z-index:12000!important;padding:14px!important;}
 body .orders-dialog{position:relative!important;z-index:12001!important;max-height:calc(100dvh - 28px)!important;}
 body .cart{z-index:12000!important;padding-bottom:24px!important;}
}
@media(max-width:520px){
 body .public-header{padding:9px 10px!important;gap:8px!important;}
 body .public-header .public-brand{max-width:100%!important;}
 body .public-header .public-actions{grid-template-columns:1fr 1fr!important;}
 body .public-header .public-actions>.btn,
 body .public-header .public-actions>.btn.primary{font-size:12px!important;padding:7px 8px!important;min-height:42px!important;height:42px!important;}
 body .public-header .public-nav a{font-size:10.5px!important;min-height:40px!important;}
}

/* Branding privado móvil: el logo nunca puede ocupar la pantalla. */
@media(max-width:900px){
 body .sidebar .brand.compact{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;}
 body .sidebar .brand.compact>div:last-child{min-width:0!important;overflow:hidden!important;}
 body .sidebar .brand.compact strong,body .sidebar .brand.compact small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
 body .sidebar img.sidebar-logo{display:block!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;flex:0 0 42px!important;object-fit:contain!important;object-position:center!important;margin:0!important;padding:0!important;border-radius:10px!important;}
 body img.login-company-logo{display:block!important;width:auto!important;height:auto!important;max-width:min(150px,48vw)!important;max-height:64px!important;object-fit:contain!important;margin:0 auto 10px!important;}
}
@media(max-width:560px){
 body .sidebar img.sidebar-logo{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;max-width:38px!important;max-height:38px!important;flex-basis:38px!important;}
 body img.login-company-logo{max-width:min(132px,44vw)!important;max-height:56px!important;}
}
