/* Gestión > Mesa ONLY. Original product layout and full-width SIN/NOTA details retained. */
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;grid-column:2!important;grid-row:1!important;min-width:0!important;flex:0 0 auto!important;white-space:nowrap!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools{display:inline-flex!important;align-items:center!important;gap:4px!important;justify-content:center!important;white-space:nowrap!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools button,
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-back{box-sizing:border-box!important;appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:29px!important;min-width:29px!important;height:36px!important;min-height:36px!important;margin:0!important;border:1px solid #d5deea!important;background:#f7f9fc!important;color:#475569!important;border-radius:9px!important;font-size:17px!important;font-weight:800!important;padding:0!important;cursor:pointer!important;box-shadow:none!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-value{display:inline-block!important;text-align:center!important;min-width:17px!important;font-size:15px!important;font-weight:900!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-phase-arrow{position:relative!important;grid-column:auto!important;grid-row:auto!important;inset:auto!important;margin:0!important;flex:0 0 38px!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-phase-arrow:before{inset:2px!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:6px!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-product-content{grid-column:1!important;grid-row:1!important;min-width:0!important;max-width:100%!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-line-select{display:none!important;}
#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-line-detail{display:block!important;clear:both!important;width:auto!important;}
@media(max-width:360px){#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls{gap:3px!important}#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools{gap:2px!important}#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools button,#fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-back{width:26px!important;min-width:26px!important;}}

/* 1.0.2: una unica fila, alinea todas las acciones con el titulo. */
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading{
 display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;
 column-gap:6px!important;align-items:center!important;min-height:40px!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-product-content{
 grid-column:1!important;grid-row:1!important;align-self:center!important;
 display:flex!important;align-items:center!important;min-width:0!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-product-content>.fy-product-name{
 display:block!important;min-width:0!important;margin:0!important;line-height:1.18!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-mesa-group-controls{
 grid-column:2!important;grid-row:1!important;justify-self:end!important;align-self:center!important;
 display:flex!important;align-items:center!important;gap:4px!important;margin:0!important;padding:0!important;
 line-height:1!important;height:40px!important;min-height:40px!important;width:max-content!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools{
 display:flex!important;align-items:center!important;gap:3px!important;height:36px!important;
 margin:0!important;padding:0!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools button,
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-back{
 display:flex!important;position:static!important;inset:auto!important;align-self:center!important;
 flex:none!important;vertical-align:middle!important;width:31px!important;min-width:31px!important;
 height:36px!important;min-height:36px!important;max-height:36px!important;
 font-size:17px!important;line-height:1!important;margin:0!important;padding:0!important;
 border-radius:9px!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-value{
 display:flex!important;align-items:center!important;justify-content:center!important;flex:none!important;
 height:36px!important;min-width:17px!important;margin:0!important;line-height:1!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls>.fy-phase-arrow{
 grid-column:auto!important;grid-row:auto!important;align-self:center!important;
 flex:none!important;position:relative!important;inset:auto!important;transform:none!important;
 width:39px!important;min-width:39px!important;max-width:39px!important;
 height:39px!important;min-height:39px!important;max-height:39px!important;
 margin:0!important;padding:0!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls>.fy-phase-arrow:before{
 inset:2px!important;
}
/* Evitar que el panel SIN/NOTA afecte al centrado de los controles. */
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row>.fy-line-detail{
 grid-column:1/-1!important;grid-row:auto!important;margin-top:6px!important;
}
@media(max-width:380px){
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls{gap:2px!important}
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools{gap:2px!important}
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-tools button,
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-back{width:28px!important;min-width:28px!important}
}

/* 1.0.3: fila tactil estable para grupos, sin ocultar retroceso ni + */
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading {
 display:flex!important; flex-direction:row!important; flex-wrap:nowrap!important;
 align-items:center!important; justify-content:space-between!important;
 width:100%!important; min-width:0!important; max-width:100%!important;
 box-sizing:border-box!important; gap:6px!important; overflow:visible!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-product-content {
 flex:1 1 auto!important; width:auto!important; min-width:0!important;
 max-width:none!important; grid-column:auto!important; grid-row:auto!important;
 overflow:visible!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading>.fy-mesa-group-controls {
 flex:0 0 auto!important; width:auto!important; min-width:max-content!important;
 max-width:none!important; height:40px!important; display:inline-flex!important;
 align-items:center!important; justify-content:flex-end!important; gap:4px!important;
 grid-column:auto!important; grid-row:auto!important; overflow:visible!important;
 white-space:nowrap!important; position:relative!important; inset:auto!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-tools {
 display:inline-flex!important; flex:0 0 auto!important; width:auto!important;
 min-width:max-content!important; max-width:none!important; gap:3px!important;
 overflow:visible!important; align-items:center!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-plus,
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-minus,
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-back {
 display:inline-flex!important; visibility:visible!important; opacity:1!important;
 flex:0 0 28px!important; width:28px!important; min-width:28px!important;
 max-width:28px!important; height:34px!important; min-height:34px!important;
 max-height:34px!important; padding:0!important; margin:0!important;
 position:static!important; transform:none!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-value{
 display:inline-flex!important; flex:0 0 16px!important; min-width:16px!important;
 max-width:16px!important; height:34px!important; font-size:14px!important;
 align-items:center!important; justify-content:center!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls>.fy-phase-arrow {
 display:inline-flex!important; flex:0 0 36px!important; width:36px!important;
 min-width:36px!important; max-width:36px!important; height:38px!important;
 min-height:38px!important; max-height:38px!important;
 align-items:center!important; justify-content:center!important; position:relative!important;
}
/* No comprimir textos SIN/NOTA por los controles superiores. */
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row>.fy-line-detail{
 width:100%!important; max-width:100%!important; box-sizing:border-box!important;
}
@media(max-width:340px){
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-heading{gap:3px!important}
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls{gap:2px!important}
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-plus,
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-group-minus,
 body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-controls .fy-mesa-back{flex-basis:26px!important;width:26px!important;min-width:26px!important;max-width:26px!important}
}

/* 1.0.6: modal FoodYa para acciones en Mesa; aislado del KDS */
.fy-mesa-dialog-layer{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.46);padding:20px;box-sizing:border-box}
.fy-mesa-dialog{width:min(460px,100%);padding:24px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 22px 70px rgba(15,23,42,.22);font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#152034}
.fy-mesa-dialog-title{font-size:21px;line-height:1.3;font-weight:800;margin:0 0 10px;color:#111827}
.fy-mesa-dialog-message{font-size:14px;line-height:1.5;color:#475569;margin:0 0 22px;white-space:pre-wrap}
.fy-mesa-dialog-actions{display:flex;gap:10px;justify-content:flex-end}
.fy-mesa-dialog-actions button{min-height:44px;padding:10px 18px;border-radius:11px;font:700 14px system-ui,-apple-system,Segoe UI,sans-serif;cursor:pointer}
.fy-mesa-dialog-cancel{background:#f8fafc;border:1px solid #d8e0e9;color:#334155}
.fy-mesa-dialog-danger{background:#dc2626;border:1px solid #dc2626;color:#fff}
.fy-mesa-dialog-ok{background:#f97316;border:1px solid #f97316;color:#fff}
.fy-mesa-dialog-actions button:focus-visible{outline:3px solid #fdba74;outline-offset:2px}
@media(max-width:460px){.fy-mesa-dialog{padding:18px}.fy-mesa-dialog-title{font-size:18px}.fy-mesa-dialog-actions button{flex:1}}


/* 1.0.8: legibilidad TPV. Solo tipografia; sin cambiar estructura ni acciones. */
body #fy-of-kds .fy-products-card .fy-pq-detail,
body #fyk-app .fy-products-card .fy-pq-detail{
  font-size:14px!important;line-height:1.38!important;font-weight:700!important;
}
body #fy-of-kds .fy-products-card .fy-pq-detail b,
body #fyk-app .fy-products-card .fy-pq-detail b{
  font-size:12px!important;font-weight:900!important;
}
body #fy-of-kds .fy-products-card .fy-ops-time,
body #fyk-app .fy-products-card .fy-ops-time{
  font-size:13px!important;line-height:1.4!important;
}
body #fy-of-kds .fy-products-card .fy-pq-count,
body #fyk-app .fy-products-card .fy-pq-count{
  font-size:16px!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-product-name{
  font-size:20px!important;line-height:1.24!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-line-detail .fy-detail-row,
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-line-detail .fy-detail-row span{
  font-size:14px!important;line-height:1.4!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-line-detail .fy-detail-row strong{
  font-size:12px!important;line-height:1.35!important;font-weight:900!important;
}
body #fy-of-kds .fy-table-card.fy-compact-card .fy-product-row .fy-mesa-group-value{
  font-size:16px!important;
}
@media(max-width:520px){
 body #fy-of-kds .fy-products-card .fy-pq-detail,
 body #fyk-app .fy-products-card .fy-pq-detail{font-size:14px!important}
}
