.restobar-wrapper .content { padding-bottom: 35px; }
.restobar-header h1 { font-weight: 700; color: #233142; }
.restobar-header h1 i { color: #00a65a; margin-right: 8px; }
.restobar-alert { border-radius: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.restobar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.restobar-toolbar .btn { border-radius: 10px; font-weight: 600; }
.restobar-resumen { margin-bottom: 18px; }
.restobar-metric { min-height: 112px; border-radius: 18px; color: #fff; padding: 20px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; margin-bottom: 15px; box-shadow: 0 10px 25px rgba(0,0,0,.12); }
.restobar-metric i { position: absolute; right: 18px; bottom: 12px; font-size: 50px; opacity: .18; }
.restobar-metric span { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; opacity: .92; }
.restobar-metric strong { font-size: 28px; line-height: 1.2; }
.metric-blue { background: linear-gradient(135deg,#1e88e5,#0d47a1); }
.metric-green { background: linear-gradient(135deg,#00a65a,#00733e); }
.metric-red { background: linear-gradient(135deg,#dd4b39,#b71c1c); }
.metric-orange { background: linear-gradient(135deg,#f39c12,#e65100); }
.restobar-shortcuts { margin-top: 10px; }
.restobar-shortcut { display: block; min-height: 135px; background: #fff; border-radius: 18px; padding: 22px; margin-bottom: 18px; color: #263238; box-shadow: 0 8px 22px rgba(0,0,0,.08); border: 1px solid #edf1f5; transition: transform .2s ease, box-shadow .2s ease; }
.restobar-shortcut:hover, .restobar-shortcut:focus { color: #111; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.13); text-decoration: none; }
.restobar-shortcut i { font-size: 32px; color: #00a65a; margin-bottom: 12px; display: block; }
.restobar-shortcut strong { display: block; font-size: 19px; margin-bottom: 6px; }
.restobar-shortcut span { color: #6d7780; }
.restobar-box-info { border-radius: 16px; border-top: 0; box-shadow: 0 8px 22px rgba(0,0,0,.08); overflow: hidden; }
.restobar-flow { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.restobar-flow span { background: #f4f7fb; padding: 12px 16px; border-radius: 999px; font-weight: 700; color: #263238; }
.restobar-flow span i { color: #00a65a; margin-right: 6px; }
.restobar-flow > i { color: #90a4ae; }
.restobar-mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.restobar-mesa-card { background: #fff; border-radius: 20px; padding: 18px; position: relative; min-height: 235px; box-shadow: 0 8px 22px rgba(0,0,0,.08); border: 1px solid #eef1f4; transition: transform .2s ease, box-shadow .2s ease; }
.restobar-mesa-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.13); }
.mesa-libre { border-left: 6px solid #00a65a; }
.mesa-ocupada { border-left: 6px solid #dd4b39; }
.mesa-reservada { border-left: 6px solid #f39c12; }
.mesa-limpieza { border-left: 6px solid #607d8b; }
.mesa-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mesa-zona { color: #6d7780; font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: .5px; }
.mesa-icon { width: 62px; height: 62px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: #eefaf3; color: #00a65a; font-size: 28px; margin: 16px 0 12px; }
.restobar-mesa-card h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: #233142; }
.restobar-mesa-card p { color: #72808e; margin-bottom: 10px; }
.mesa-total { display: block; font-size: 24px; color: #dd4b39; margin-bottom: 12px; }
.restobar-status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .4px; }
.status-libre, .status-cerrado, .status-entregado { background: #e8f7ef; color: #008d4c; }
.status-ocupada, .status-anulado { background: #fdecea; color: #c62828; }
.status-reservada, .status-enviado, .status-pendiente { background: #fff5df; color: #c77700; }
.status-limpieza, .status-abierto { background: #eef3f7; color: #455a64; }
.status-preparando { background: #ffe9dc; color: #e65100; }
.status-listo, .status-atendido { background: #e3f2fd; color: #0d47a1; }
.restobar-area { display: inline-block; padding: 4px 8px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.area-cocina { background: #fff0e6; color: #d35400; }
.area-bar { background: #e9f5ff; color: #0277bd; }
.area-general { background: #f1f3f4; color: #455a64; }
.restobar-empty { background: #fff; border: 1px dashed #cfd8dc; border-radius: 18px; padding: 35px 20px; text-align: center; color: #607d8b; box-shadow: 0 8px 22px rgba(0,0,0,.05); }
.restobar-empty i { display: block; font-size: 46px; color: #b0bec5; margin-bottom: 10px; }
.restobar-empty p { margin: 0; font-size: 16px; }
.restobar-modal-header { background: linear-gradient(135deg,#263238,#111); color: #fff; border-radius: 5px 5px 0 0; }
.restobar-modal-header .close { color: #fff; opacity: .85; }
.restobar-modal-lg { width: 94%; max-width: 1100px; }
.restobar-form-add { background: #f8fafc; border-radius: 16px; padding: 15px 10px; border: 1px solid #edf1f5; }
.restobar-form-add label { font-size: 12px; text-transform: uppercase; color: #607d8b; letter-spacing: .5px; }
.restobar-form-add .form-control, .restobar-form-add .select2-container .select2-selection--single { border-radius: 10px !important; min-height: 38px; }
.table-restobar-detalle td { vertical-align: middle !important; }
.restobar-total-box { display: flex; justify-content: flex-end; align-items: center; gap: 15px; padding: 14px; background: #f4f7fb; border-radius: 12px; font-size: 16px; }
.restobar-total-box strong { font-size: 26px; color: #00a65a; }
.restobar-modal-actions .btn { border-radius: 10px; font-weight: 700; }
.restobar-comandas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.restobar-comanda-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.08); border: 1px solid #edf1f5; }
.restobar-comanda-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px; background: #263238; color: #fff; }
.restobar-comanda-head strong { display: block; font-size: 18px; }
.restobar-comanda-head small { display: block; color: #cfd8dc; margin-top: 4px; }
.restobar-comanda-body { padding: 16px; }
.restobar-comanda-item { padding: 10px 0; border-bottom: 1px dashed #e0e0e0; font-size: 15px; }
.restobar-comanda-item:last-child { border-bottom: 0; }
.restobar-comanda-item small { display: block; color: #777; margin-left: 24px; margin-top: 3px; }
.restobar-comanda-actions { padding: 14px 16px 16px; background: #f8fafc; display: flex; gap: 8px; flex-wrap: wrap; }
.restobar-comanda-actions .btn { border-radius: 10px; font-weight: 700; }

@media (max-width: 767px) {
  .restobar-toolbar { align-items: stretch; }
  .restobar-toolbar > div, .restobar-toolbar .btn { width: 100%; margin-bottom: 6px; }
  .restobar-mesas-grid, .restobar-comandas-grid { grid-template-columns: 1fr; }
  .restobar-modal-lg { width: 98%; margin: 8px auto; }
  .restobar-modal-actions .btn { width: 100%; margin-bottom: 6px; }
  .restobar-total-box { justify-content: space-between; }
  .restobar-flow { justify-content: flex-start; }
}

.restobar-alert-light { border-radius: 12px; border: 1px solid #d9edf7; background: #f5fbff; }
.restobar-config-form { margin: 0; }
.restobar-config-inline { display: grid; grid-template-columns: minmax(110px,1fr) minmax(100px,1fr) 90px 96px; gap: 8px; align-items: center; }
.table-restobar-config td { vertical-align: middle !important; }
.restobar-row-saved { animation: restobarSaved .9s ease; }
@keyframes restobarSaved { 0% { background:#e8f7ef; } 100% { background:transparent; } }
.restobar-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.restobar-modal-actions .btn { margin: 0 !important; }
.restobar-modal-actions .pull-left { margin-right: auto !important; }
.restobar-comanda-actions .btnRestobarImprimirComanda { background:#fff; border:1px solid #d2d6de; }

@media (max-width: 767px) {
  .restobar-config-inline { grid-template-columns: 1fr; }
  .restobar-modal-actions { display:block; }
  .restobar-modal-actions .btn { width: 100%; margin-bottom: 6px !important; }
  .restobar-modal-actions .pull-left { float:none !important; }
}

/* Paso 4: uso real en local */
.status-cobrado { background:#e8f7ef; color:#008d4c; }
.restobar-servicio-panel { background:#fffdf5; border:1px solid #ffe8a3; border-radius:16px; padding:14px; margin-bottom:14px; }
.restobar-servicio-title { font-weight:800; color:#5d4037; margin-bottom:10px; }
.restobar-servicio-title i { color:#f39c12; margin-right:6px; }
.restobar-servicio-title small { display:block; color:#8d6e63; font-weight:500; margin-top:3px; }
.restobar-servicio-panel label { font-size:12px; text-transform:uppercase; color:#795548; letter-spacing:.4px; }
.restobar-split-total { display:flex; justify-content:flex-end; align-items:center; gap:14px; background:#f4f7fb; border-radius:12px; padding:14px; margin-top:12px; }
.restobar-split-total span { font-weight:700; color:#607d8b; }
.restobar-split-total strong { font-size:25px; color:#00a65a; }
.table-restobar-dividir td, .table-restobar-dividir th { vertical-align:middle!important; }
.restobar-report-card { background:#fff; border-radius:18px; padding:18px; box-shadow:0 8px 22px rgba(0,0,0,.08); border:1px solid #edf1f5; margin-bottom:18px; }
.restobar-report-card h4 { margin-top:0; font-weight:800; color:#233142; }
.restobar-report-table th { background:#f8fafc; text-transform:uppercase; font-size:12px; letter-spacing:.4px; }
@media (max-width:767px){ .restobar-servicio-panel .btn { margin-top:8px; } }

/* Paso 5: abonos parciales por monto */
.mesa-abonos{
  display:block;
  margin-top:2px;
  margin-bottom:8px;
  color:#0b8f56;
  font-weight:600;
}
.restobar-pago-resumen{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:10px;
}
.restobar-pago-resumen>div{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px 12px;
}
.restobar-pago-resumen span{
  display:block;
  color:#64748b;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.restobar-pago-resumen strong{
  display:block;
  color:#0f172a;
  font-size:18px;
}
.restobar-pago-resumen .restobar-saldo{
  background:linear-gradient(135deg,#0e3a6d,#00a88f);
  border-color:transparent;
}
.restobar-pago-resumen .restobar-saldo span,
.restobar-pago-resumen .restobar-saldo strong{
  color:#fff;
}
.restobar-abonos-list{
  margin-top:12px;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:10px;
  padding:10px;
}
.restobar-abonos-list h5{
  margin:0 0 8px 0;
  font-weight:700;
  color:#0e3a6d;
}
.restobar-abono-callout{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#eef9f6;
  border:1px solid #b7eadb;
  border-left:4px solid #00a88f;
  border-radius:10px;
  padding:12px;
  margin:12px 0;
}
.restobar-abono-saldo-box{
  background:linear-gradient(135deg,#0e3a6d,#00a88f);
  color:#fff;
  border-radius:12px;
  padding:14px 16px;
  margin-bottom:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.restobar-abono-saldo-box span{
  font-size:13px;
  opacity:.9;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.restobar-abono-saldo-box strong{
  font-size:22px;
}
@media (max-width: 767px){
  .restobar-pago-resumen{grid-template-columns:1fr;}
  .restobar-abono-callout{display:block;}
  .restobar-abono-callout .text-right{text-align:left;margin-top:8px;}
}

/* Mejora UX pedido restobar: desktop limpio + móvil rápido */
:root{
  --restobar-dark:#17242b;
  --restobar-dark-2:#0f171d;
  --restobar-primary:#0f8fb8;
  --restobar-primary-2:#07698f;
  --restobar-success:#00a86b;
  --restobar-teal:#009688;
  --restobar-warning:#f39c12;
  --restobar-danger:#df4b3f;
  --restobar-bg:#f5f7fa;
  --restobar-line:#e6edf3;
  --restobar-text:#263238;
}

.restobar-pos-modal .modal-content{
  border:0;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 18px 45px rgba(15,23,42,.28);
}
.restobar-pos-modal .restobar-modal-header{
  background:linear-gradient(135deg,var(--restobar-dark),var(--restobar-dark-2));
  border:0;
  padding:14px 18px;
}
.restobar-pos-modal .restobar-modal-header .modal-title{
  font-weight:800;
  letter-spacing:.2px;
}
.restobar-pos-modal .restobar-modal-header .close{
  text-shadow:none;
  font-size:26px;
  margin-top:-2px;
}
.restobar-pedido-body{
  background:#fff;
  padding:16px;
}

.restobar-servicio-panel{
  background:linear-gradient(135deg,#fffdf4,#fffaf0);
  border:1px solid #ffe1a6;
  box-shadow:0 6px 16px rgba(243,156,18,.08);
}
.restobar-servicio-panel .form-control{
  height:38px;
  border-radius:10px;
  border-color:#d8e1ea;
  box-shadow:none;
}
.restobar-servicio-panel .btn{
  height:38px;
  border-radius:10px;
  font-weight:800;
}

.restobar-add-card{
  background:linear-gradient(135deg,#f8fbff,#f3f7fb);
  border:1px solid var(--restobar-line);
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  margin-left:0;
  margin-right:0;
}
.restobar-add-card label{
  margin-top:2px;
  margin-bottom:6px;
  font-weight:800;
}
.restobar-add-card .form-control,
.restobar-add-card .select2-container .select2-selection--single{
  height:40px!important;
  border:1px solid #d6dee7!important;
  box-shadow:none!important;
  background:#fff!important;
}
.restobar-add-card .select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height:38px!important;
}
.restobar-add-card .select2-container--default .select2-selection--single .select2-selection__arrow{
  height:38px!important;
}
#btnRestobarAgregarProducto{
  height:40px;
  border:0;
  border-radius:10px;
  background:linear-gradient(135deg,var(--restobar-primary),var(--restobar-primary-2));
  box-shadow:0 7px 14px rgba(15,143,184,.20);
  font-weight:900;
  letter-spacing:.1px;
}
#btnRestobarAgregarProducto:active{
  transform:scale(.99);
}
#restobarObservacion{
  margin-top:2px;
}

.restobar-detalle-wrap{
  border-radius:14px;
  border:1px solid #edf2f7;
  overflow:hidden;
  background:#fff;
}
.table-restobar-detalle{
  margin-bottom:0;
  font-size:14px;
}
.table-restobar-detalle thead th{
  background:#f8fafc;
  color:#425466;
  border-bottom:1px solid #edf2f7!important;
  text-transform:uppercase;
  letter-spacing:.55px;
  font-size:12px;
  font-weight:900;
  padding:13px 10px!important;
}
.table-restobar-detalle tbody td{
  border-top:1px solid #f0f3f6!important;
  padding:12px 10px!important;
}
.table-restobar-detalle tbody tr:hover{
  background:#fbfdff;
}
.restobar-producto-cell strong{
  color:#263238;
  font-weight:900;
}
.restobar-cantidad-cell{
  font-weight:800;
  color:#34495e;
}
.restobar-importe-cell{
  font-size:15px;
  font-weight:800;
  color:#233142;
}
.btnRestobarAnularDetalle{
  border:0;
  border-radius:8px!important;
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.restobar-total-box{
  margin-top:12px;
  padding:16px 18px;
  background:linear-gradient(135deg,#f3f7fb,#eef4fb);
  border:1px solid #e7edf5;
  border-radius:14px;
}
.restobar-total-box span{
  color:#4b5563;
}
.restobar-total-box strong{
  color:var(--restobar-success);
  font-weight:900;
}
.restobar-pago-resumen{
  gap:12px;
}
.restobar-pago-resumen>div{
  border-radius:12px;
  padding:13px 14px;
  background:#fbfcfe;
}
.restobar-pago-resumen .restobar-saldo{
  background:linear-gradient(135deg,#0c406b,#049d90);
  box-shadow:0 8px 18px rgba(4,157,144,.15);
}
.restobar-abonos-list{
  border-radius:14px;
  padding:12px;
}
.restobar-abonos-list .table{
  margin-bottom:4px;
}

.restobar-modal-actions{
  background:#fff;
  border-top:1px solid #edf2f7;
  padding:12px 16px;
}
.restobar-modal-actions .btn{
  border:0;
  border-radius:10px;
  box-shadow:0 6px 14px rgba(15,23,42,.08);
  text-transform:uppercase;
  letter-spacing:.3px;
}
#btnRestobarPrecuenta,
#btnRestobarCobrarPos,
#btnRestobarAbrirAbono{
  background:linear-gradient(135deg,var(--restobar-success),#07935f);
}
#btnRestobarEnviarComanda{
  background:linear-gradient(135deg,var(--restobar-warning),#e28400);
  color:#fff;
}
#btnRestobarAbrirDividir,
#btnRestobarAbrirUnirPedidos{
  background:linear-gradient(135deg,#398dbc,#23739d);
}

@media (max-width: 767px){
  body.modal-open{
    overflow:hidden!important;
  }
  .restobar-pos-modal .modal-dialog{
    width:100%!important;
    height:100%;
    margin:0!important;
  }
  .restobar-pos-modal .modal-content{
    min-height:100vh;
    border-radius:0;
    display:flex;
    flex-direction:column;
  }
  .restobar-pos-modal .restobar-modal-header{
    position:sticky;
    top:0;
    z-index:5;
    padding:12px 14px;
  }
  .restobar-pos-modal .restobar-modal-header .modal-title{
    font-size:16px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    padding-right:24px;
  }
  .restobar-pedido-body{
    flex:1 1 auto;
    overflow:auto;
    padding:12px;
    padding-bottom:14px;
    -webkit-overflow-scrolling:touch;
  }
  .restobar-servicio-panel{
    padding:11px;
    margin-bottom:10px;
    border-radius:14px;
  }
  .restobar-servicio-title{
    font-size:13px;
    margin-bottom:8px;
  }
  .restobar-servicio-title small{
    font-size:11px;
  }
  .restobar-servicio-panel .row>div{
    margin-bottom:8px;
  }
  .restobar-servicio-panel label,
  .restobar-add-card label{
    font-size:11px;
  }
  .restobar-add-card{
    padding:11px 8px;
    border-radius:14px;
    margin-bottom:10px;
  }
  .restobar-add-card [class*="col-"]{
    padding-left:6px;
    padding-right:6px;
    margin-bottom:9px;
  }
  .restobar-add-card .col-md-5,
  .restobar-add-card .col-md-2,
  .restobar-add-card .col-md-12{
    width:100%;
  }
  .restobar-add-card .col-md-1,
  .restobar-add-card .col-xs-4{
    width:34%;
    float:left;
  }
  .restobar-add-card .col-md-2.col-xs-8{
    width:66%;
    float:left;
  }
  #btnRestobarAgregarProducto{
    height:44px;
    font-size:15px;
  }
  #restobarDetallePedido{
    padding-bottom:4px;
  }
  .restobar-detalle-wrap,
  .restobar-detalle-wrap.table-responsive{
    border:0;
    overflow:visible;
    background:transparent;
  }
  .table-restobar-detalle,
  .table-restobar-detalle thead,
  .table-restobar-detalle tbody,
  .table-restobar-detalle th,
  .table-restobar-detalle td,
  .table-restobar-detalle tr{
    display:block;
    width:100%;
  }
  .table-restobar-detalle thead{
    display:none;
  }
  .table-restobar-detalle tbody tr{
    position:relative;
    background:#fff;
    border:1px solid #e7edf5;
    border-radius:15px;
    margin-bottom:10px;
    padding:10px 44px 10px 12px;
    box-shadow:0 8px 18px rgba(15,23,42,.06);
  }
  .table-restobar-detalle tbody td{
    border:0!important;
    padding:4px 0!important;
    min-height:24px;
  }
  .table-restobar-detalle tbody td:not(.restobar-producto-cell):not(.restobar-delete-cell){
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    text-align:right!important;
    font-size:13px;
  }
  .table-restobar-detalle tbody td:not(.restobar-producto-cell):not(.restobar-delete-cell)::before{
    content:attr(data-label);
    color:#718096;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.35px;
  }
  .restobar-producto-cell{
    padding-right:4px!important;
    margin-bottom:5px;
  }
  .restobar-producto-cell strong{
    display:block;
    font-size:14px;
    line-height:1.25;
    padding-right:8px;
  }
  .restobar-producto-cell small.text-muted{
    display:block;
    margin-top:4px;
  }
  .restobar-cantidad-cell{
    font-size:15px!important;
  }
  .restobar-importe-cell{
    color:var(--restobar-success)!important;
    font-size:17px!important;
  }
  .restobar-delete-cell{
    position:absolute;
    top:10px;
    right:10px;
    width:30px!important;
    padding:0!important;
  }
  .btnRestobarAnularDetalle{
    width:30px;
    height:30px;
    border-radius:9px!important;
  }
  .restobar-area,
  .restobar-status{
    font-size:10px;
    padding:4px 8px;
  }
  .restobar-total-box{
    position:sticky;
    bottom:0;
    z-index:3;
    margin-top:8px;
    padding:13px;
    justify-content:space-between;
    box-shadow:0 -8px 18px rgba(15,23,42,.08);
  }
  .restobar-total-box strong{
    font-size:22px;
  }
  .restobar-pago-resumen{
    grid-template-columns:1fr;
    gap:8px;
    margin-top:9px;
  }
  .restobar-pago-resumen>div{
    padding:11px 12px;
  }
  .restobar-pago-resumen span{
    font-size:10px;
  }
  .restobar-pago-resumen strong{
    font-size:18px;
  }
  .restobar-abonos-list{
    padding:10px;
  }
  .table-restobar-abonos,
  .table-restobar-abonos thead,
  .table-restobar-abonos tbody,
  .table-restobar-abonos th,
  .table-restobar-abonos td,
  .table-restobar-abonos tr{
    display:block;
    width:100%;
  }
  .table-restobar-abonos thead{
    display:none;
  }
  .table-restobar-abonos tr{
    border:1px solid #e7edf5;
    border-radius:12px;
    padding:8px 10px;
    margin-bottom:8px;
    background:#fff;
  }
  .table-restobar-abonos td{
    display:flex;
    justify-content:space-between;
    gap:8px;
    border:0!important;
    padding:4px 0!important;
    text-align:right!important;
  }
  .table-restobar-abonos td::before{
    content:attr(data-label);
    color:#718096;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
  }
  .restobar-modal-actions{
    position:sticky;
    bottom:0;
    z-index:6;
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:7px;
    padding:9px;
    box-shadow:0 -10px 24px rgba(15,23,42,.12);
  }
  .restobar-modal-actions .btn{
    width:100%!important;
    min-height:42px;
    margin:0!important;
    padding:9px 8px;
    font-size:12px;
    white-space:normal;
  }
  .restobar-modal-actions .pull-left{
    float:none!important;
  }
  #btnRestobarCobrarPos,
  #btnRestobarPrecuenta,
  #btnRestobarEnviarComanda{
    grid-column:span 1;
  }
  #btnRestobarCobrarPos{
    grid-column:1 / -1;
    font-size:13px;
  }
  .restobar-modal-actions [data-dismiss="modal"]{
    background:#f4f6f8;
    color:#263238;
    box-shadow:none;
    border:1px solid #dde5ed;
  }
}

@media (min-width: 768px){
  .restobar-pos-modal .modal-body{
    max-height:calc(100vh - 168px);
    overflow:auto;
  }
}

/* V7: mapa de mesas más ordenado y responsive para PC, tablet y móvil */
.restobar-wrapper{
  background:#eef2f6;
}
.restobar-wrapper .content{
  padding-top:12px;
}
.restobar-mesas-hero{
  background:linear-gradient(135deg,#ffffff,#f7fbff);
  border:1px solid #e4ebf2;
  border-radius:18px;
  padding:14px 16px;
  margin-bottom:14px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.restobar-mesas-title{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:240px;
}
.restobar-hero-icon{
  width:46px;
  height:46px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e7f8ef,#d8f5e6);
  color:#00a65a;
  font-size:22px;
}
.restobar-mesas-title h2{
  margin:0;
  font-size:22px;
  line-height:1.1;
  font-weight:900;
  color:#17242b;
}
.restobar-mesas-title p{
  margin:5px 0 0;
  color:#6b7280;
  font-size:13px;
}
.restobar-toolbar-mesas{
  margin:0;
  justify-content:flex-end;
  flex:1 1 auto;
}
.restobar-toolbar-mesas .restobar-toolbar-left{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.restobar-toolbar-mesas .btn{
  border:0;
  border-radius:12px;
  padding:9px 13px;
  font-weight:800;
  box-shadow:0 6px 14px rgba(15,23,42,.08);
}
.restobar-mesas-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(120px,1fr));
  gap:10px;
  margin-bottom:16px;
}
.restobar-summary-card{
  background:#fff;
  border:1px solid #e5ebf1;
  border-radius:16px;
  padding:12px 14px;
  box-shadow:0 6px 18px rgba(15,23,42,.05);
  min-height:72px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.restobar-summary-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:5px;
  height:100%;
  background:#7c8da3;
}
.restobar-summary-card span{
  display:block;
  color:#7b8794;
  text-transform:uppercase;
  font-size:11px;
  letter-spacing:.45px;
  font-weight:900;
}
.restobar-summary-card strong{
  display:block;
  margin-top:4px;
  color:#17242b;
  font-size:22px;
  line-height:1;
  font-weight:900;
}
.restobar-summary-card.summary-ocupadas:before{background:#dd4b39;}
.restobar-summary-card.summary-libres:before{background:#00a65a;}
.restobar-summary-card.summary-alerta:before{background:#f39c12;}
.restobar-summary-card.summary-saldo{
  background:linear-gradient(135deg,#0c406b,#049d90);
  border-color:transparent;
}
.restobar-summary-card.summary-saldo:before{background:rgba(255,255,255,.55);}
.restobar-summary-card.summary-saldo span,
.restobar-summary-card.summary-saldo strong{color:#fff;}
.restobar-mesas-grid{
  grid-template-columns:repeat(auto-fill,minmax(205px,1fr));
  gap:14px;
  align-items:stretch;
}
.restobar-mesa-card{
  min-height:0;
  padding:15px;
  border-radius:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  box-shadow:0 8px 20px rgba(15,23,42,.07);
  overflow:hidden;
}
.restobar-mesa-card:hover{
  transform:translateY(-2px);
}
.restobar-mesa-card:after{
  content:"";
  position:absolute;
  right:-28px;
  top:-28px;
  width:90px;
  height:90px;
  background:rgba(0,166,90,.06);
  border-radius:50%;
  pointer-events:none;
}
.mesa-ocupada:after{background:rgba(221,75,57,.07);}
.mesa-reservada:after{background:rgba(243,156,18,.08);}
.mesa-limpieza:after{background:rgba(96,125,139,.08);}
.mesa-top{
  min-height:22px;
}
.mesa-card-main{
  display:flex;
  align-items:center;
  gap:12px;
}
.mesa-icon{
  width:54px;
  height:54px;
  min-width:54px;
  margin:0;
  border-radius:16px;
}
.mesa-info h3,
.restobar-mesa-card h3{
  margin:0;
  font-size:25px;
  line-height:1;
}
.mesa-info p,
.restobar-mesa-card p{
  margin:7px 0 0;
  font-size:12px;
}
.mesa-info p i{
  color:#94a3b8;
  margin-right:4px;
}
.mesa-bill-box{
  background:#fff5f4;
  border:1px solid #fde0dc;
  border-radius:14px;
  padding:10px 11px;
  margin-top:2px;
}
.mesa-bill-box span{
  display:block;
  color:#9b2c2c;
  font-size:10px;
  font-weight:900;
  letter-spacing:.4px;
  text-transform:uppercase;
}
.mesa-bill-box strong{
  display:block;
  color:#dd4b39;
  font-size:21px;
  line-height:1.15;
  margin-top:3px;
}
.mesa-free-box{
  background:#f0fbf5;
  border:1px solid #d8f3e4;
  color:#008d4c;
  border-radius:12px;
  padding:9px 10px;
  font-size:12px;
  font-weight:800;
  margin-top:2px;
}
.mesa-action-btn{
  margin-top:auto;
  border:0;
  border-radius:12px!important;
  min-height:36px;
  font-weight:900;
  box-shadow:0 7px 14px rgba(15,23,42,.10);
}
.mesa-action-btn.btn-success{
  background:linear-gradient(135deg,#00a65a,#07935f);
}
.mesa-action-btn.btn-primary{
  background:linear-gradient(135deg,#3498db,#2578aa);
}
.restobar-status{
  padding:5px 9px;
}
.mesa-abonos{
  margin-bottom:0;
  font-size:11px;
}

@media (min-width: 1500px){
  .restobar-mesas-grid{grid-template-columns:repeat(auto-fill,minmax(195px,1fr));}
}
@media (max-width: 1199px){
  .restobar-mesas-summary{grid-template-columns:repeat(3,minmax(120px,1fr));}
  .restobar-mesas-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));}
}
@media (max-width: 991px){
  .restobar-header .breadcrumb{display:none;}
  .restobar-mesas-hero{align-items:flex-start;}
  .restobar-toolbar-mesas{width:100%;}
  .restobar-toolbar-mesas .restobar-toolbar-left{justify-content:flex-start;}
  .restobar-mesas-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));}
}
@media (max-width: 767px){
  .restobar-wrapper .content{padding:10px 9px 18px;}
  .restobar-header{padding:10px 10px 0;}
  .restobar-header h1{font-size:20px;}
  .restobar-mesas-hero{
    padding:12px;
    border-radius:16px;
    margin-bottom:10px;
  }
  .restobar-mesas-title{width:100%;}
  .restobar-hero-icon{width:40px;height:40px;font-size:19px;}
  .restobar-mesas-title h2{font-size:19px;}
  .restobar-mesas-title p{font-size:12px;}
  .restobar-toolbar-mesas,
  .restobar-toolbar-mesas>div,
  .restobar-toolbar-mesas .btn{
    width:auto;
    margin-bottom:0;
  }
  .restobar-toolbar-mesas{
    display:block;
  }
  .restobar-toolbar-mesas .restobar-toolbar-left{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
  }
  .restobar-toolbar-mesas .btn{
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 9px;
    font-size:12px;
  }
  .restobar-mesas-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .restobar-summary-card{
    min-height:64px;
    padding:10px 12px;
    border-radius:14px;
  }
  .restobar-summary-card strong{font-size:20px;}
  .restobar-summary-card.summary-saldo{grid-column:1/-1;}
  .restobar-mesas-grid,
  .restobar-comandas-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .restobar-mesa-card{
    padding:11px;
    border-radius:15px;
    gap:8px;
    border-left-width:5px;
  }
  .mesa-zona{font-size:9px;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .restobar-status{font-size:9px;padding:4px 7px;}
  .mesa-card-main{gap:8px;}
  .mesa-icon{width:42px;height:42px;min-width:42px;border-radius:13px;font-size:20px;}
  .mesa-info h3,.restobar-mesa-card h3{font-size:20px;}
  .mesa-info p,.restobar-mesa-card p{font-size:11px;margin-top:5px;}
  .mesa-bill-box{padding:8px;border-radius:12px;}
  .mesa-bill-box strong{font-size:17px;}
  .mesa-bill-box span{font-size:9px;}
  .mesa-free-box{font-size:10px;padding:7px 8px;}
  .mesa-action-btn{min-height:35px;font-size:11px;padding:7px 6px;}
}
@media (max-width: 380px){
  .restobar-mesas-grid{grid-template-columns:1fr;}
  .restobar-toolbar-mesas .restobar-toolbar-left{grid-template-columns:1fr;}
}

/* V8: Pedidos abiertos responsive: PC, tablet y móvil */
.restobar-pedidos-page .content{
  padding-top:12px;
}
.restobar-pedidos-hero{
  background:linear-gradient(135deg,#ffffff,#f7fbff);
  border:1px solid #e4ebf2;
  border-radius:18px;
  padding:14px 16px;
  margin-bottom:12px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.restobar-pedidos-title{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:260px;
}
.restobar-pedidos-title h2{
  margin:0;
  font-size:22px;
  line-height:1.1;
  font-weight:900;
  color:#17242b;
}
.restobar-pedidos-title p{
  margin:5px 0 0;
  color:#6b7280;
  font-size:13px;
}
.restobar-pedidos-toolbar{
  margin:0;
  flex:1 1 auto;
  justify-content:flex-end;
}
.restobar-pedidos-toolbar .restobar-toolbar-left{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.restobar-pedidos-toolbar .btn{
  margin:0;
  border:0;
  border-radius:12px;
  padding:9px 13px;
  font-weight:900;
  box-shadow:0 6px 14px rgba(15,23,42,.08);
}
.restobar-pedidos-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:10px;
  margin-bottom:14px;
}
.restobar-pedidos-summary .summary-total:before{
  background:#3498db;
}
.restobar-pedidos-box{
  border-radius:18px;
  overflow:hidden;
}
.restobar-pedidos-body{
  padding:0!important;
}
.table-restobar-pedidos{
  margin:0;
  background:#fff;
}
.table-restobar-pedidos thead th{
  background:#f8fafc;
  color:#334155;
  border-bottom:1px solid #edf2f7!important;
  text-transform:uppercase;
  letter-spacing:.55px;
  font-size:12px;
  font-weight:900;
  padding:14px 12px!important;
  white-space:nowrap;
}
.table-restobar-pedidos tbody td{
  vertical-align:middle!important;
  border-top:1px solid #f0f3f6!important;
  padding:13px 12px!important;
}
.table-restobar-pedidos tbody tr:hover{
  background:#fbfdff;
}
.pedido-id-cell strong,
.pedido-money-cell strong,
.pedido-saldo-cell strong{
  color:#0f172a;
  font-weight:900;
}
.pedido-mesa-cell strong{
  display:block;
  color:#17242b;
  font-weight:900;
}
.pedido-mesa-cell small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-weight:700;
  text-transform:uppercase;
}
.pedido-saldo-cell strong{
  color:#0b8f56;
}
.pedido-actions-cell{
  min-width:245px;
}
.pedido-actions-cell .btn{
  border:0;
  border-radius:9px!important;
  font-weight:800;
  margin:2px;
  box-shadow:0 4px 10px rgba(15,23,42,.08);
}

@media (max-width:991px){
  .restobar-pedidos-hero{
    align-items:flex-start;
  }
  .restobar-pedidos-toolbar{
    width:100%;
  }
  .restobar-pedidos-toolbar .restobar-toolbar-left{
    justify-content:flex-start;
  }
  .restobar-pedidos-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .restobar-pedidos-summary .summary-saldo{
    grid-column:span 2;
  }
}

@media (max-width:767px){
  .restobar-pedidos-page .content{
    padding:10px 9px 18px;
  }
  .restobar-pedidos-page .restobar-header{
    padding:10px 10px 0;
  }
  .restobar-pedidos-page .restobar-header h1{
    font-size:20px;
  }
  .restobar-pedidos-hero{
    padding:12px;
    border-radius:16px;
    margin-bottom:10px;
  }
  .restobar-pedidos-title{
    width:100%;
    min-width:0;
  }
  .restobar-pedidos-title h2{
    font-size:19px;
  }
  .restobar-pedidos-title p{
    font-size:12px;
  }
  .restobar-pedidos-toolbar,
  .restobar-pedidos-toolbar>div,
  .restobar-pedidos-toolbar .btn{
    width:auto;
    margin-bottom:0;
  }
  .restobar-pedidos-toolbar{
    display:block;
  }
  .restobar-pedidos-toolbar .restobar-toolbar-left{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
  }
  .restobar-pedidos-toolbar .btn{
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 9px;
    font-size:12px;
    white-space:normal;
    text-align:center;
  }
  .restobar-pedidos-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .restobar-pedidos-summary .summary-saldo{
    grid-column:1/-1;
  }
  .restobar-pedidos-body.table-responsive{
    overflow:visible!important;
    border:0;
  }
  .table-restobar-pedidos,
  .table-restobar-pedidos thead,
  .table-restobar-pedidos tbody,
  .table-restobar-pedidos th,
  .table-restobar-pedidos td,
  .table-restobar-pedidos tr{
    display:block;
    width:100%;
  }
  .table-restobar-pedidos{
    background:transparent;
    padding:0;
  }
  .table-restobar-pedidos thead{
    display:none;
  }
  .table-restobar-pedidos tbody{
    padding:0;
  }
  .table-restobar-pedidos tbody tr{
    position:relative;
    background:#fff;
    border:1px solid #e7edf5;
    border-left:5px solid #3498db;
    border-radius:17px;
    margin:0 0 11px;
    padding:12px;
    box-shadow:0 8px 18px rgba(15,23,42,.07);
  }
  .table-restobar-pedidos tbody tr:after{
    content:"";
    display:block;
    clear:both;
  }
  .table-restobar-pedidos tbody td{
    border:0!important;
    padding:5px 0!important;
    min-height:25px;
    text-align:left!important;
  }
  .pedido-id-cell{
    width:48%!important;
    float:left;
    font-size:18px;
    padding-top:0!important;
  }
  .pedido-id-cell:before{
    content:attr(data-label);
    display:block;
    color:#64748b;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.45px;
    margin-bottom:2px;
  }
  .pedido-mesa-cell{
    width:52%!important;
    float:left;
    text-align:right!important;
    padding-top:0!important;
  }
  .pedido-mesa-cell strong{
    font-size:18px;
  }
  .pedido-mesa-cell small{
    font-size:10px;
  }
  .table-restobar-pedidos tbody td:not(.pedido-id-cell):not(.pedido-mesa-cell):not(.pedido-actions-cell){
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    clear:both;
    border-top:1px dashed #eef2f6!important;
    padding:7px 0!important;
    font-size:13px;
    text-align:right!important;
  }
  .table-restobar-pedidos tbody td:not(.pedido-id-cell):not(.pedido-mesa-cell):not(.pedido-actions-cell)::before{
    content:attr(data-label);
    color:#64748b;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.35px;
    text-align:left;
  }
  .pedido-money-cell strong,
  .pedido-saldo-cell strong{
    font-size:15px;
  }
  .pedido-saldo-cell strong{
    color:#00a65a;
  }
  .pedido-actions-cell{
    clear:both;
    min-width:0;
    padding-top:10px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .pedido-actions-cell .btn{
    margin:0!important;
    min-height:38px;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    padding:8px 6px;
    white-space:normal;
  }
  .pedido-actions-cell .btn:last-child:nth-child(odd){
    grid-column:1/-1;
  }
  .restobar-status{
    font-size:10px;
    padding:5px 8px;
  }
}

@media (max-width:380px){
  .restobar-pedidos-toolbar .restobar-toolbar-left{
    grid-template-columns:1fr;
  }
  .pedido-actions-cell{
    grid-template-columns:1fr;
  }
}

/* V9: control de cantidad amigable para móvil y tablet */
.restobar-cantidad-box{
  display:flex;
  align-items:center;
  gap:6px;
}
.restobar-cantidad-box #restobarCantidad{
  min-width:0;
  text-align:center;
  font-weight:700;
  padding-left:6px;
  padding-right:6px;
}
.restobar-cantidad-btn{
  width:40px;
  min-width:40px;
  height:40px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
@media (max-width: 991px){
  .restobar-cantidad-box #restobarCantidad{
    font-size:16px;
    height:40px;
  }
}
@media (max-width: 767px){
  .restobar-form-add > [class*='col-']{
    margin-bottom:10px;
  }
  .restobar-cantidad-box #restobarCantidad{
    font-size:18px;
  }
}


/* V10: asegurar que los botones +/- reciban toque en móvil */
.restobar-cantidad-btn{
  position:relative;
  z-index:5;
  touch-action:manipulation;
  cursor:pointer;
}
.restobar-cantidad-box{
  position:relative;
  z-index:5;
}


/* V12: asegurar click/touch del botón Agregar en móvil */
#btnRestobarAgregarProducto{
  position:relative;
  z-index:20;
  pointer-events:auto!important;
  touch-action:manipulation;
  cursor:pointer;
}
