/* ============================================================
   ComandApp — app.css
   Diseño limpio, profesional y funcional
   ============================================================ */

/* BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f3f4f6;
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TOPNAV ─────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0;        /* sticky: en flujo normal, se pega al top al scrollear */
  height: 58px; background: #fff;
  display: flex; align-items: center;
  padding: 0 14px; gap: 2px; z-index: 100;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.brand-wrap {
  display: flex; flex-direction: column;
  justify-content: center; flex-shrink: 0;
  padding-right: 14px; line-height: 1.2;
}
.brand { color: #1e293b; font-size: 20px; font-weight: 900; letter-spacing: -.8px; line-height: 1; }
.brand span { color: #1a6b3c; }
.brand-local {
  color: #94a3b8; font-size: 10px;
  margin-top: 2px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-sep { width: 1px; height: 28px; background: #e5e7eb; margin: 0 4px; flex-shrink: 0; }
.nav-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 5px 9px; min-width: 50px; height: 50px;
  border-radius: 9px; border: none; cursor: pointer;
  background: transparent; color: #64748b;
  font-size: 9px; font-weight: 700; letter-spacing: .4px;
  gap: 3px; text-transform: uppercase; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.nav-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-btn span { line-height: 1; }
.nav-btn:hover { color: #1e293b; background: #f3f4f6; }
.nav-btn.active { color: #1a6b3c; background: rgba(26,107,60,.08); box-shadow: inset 0 -2px 0 #1a6b3c; }
.spacer { flex: 1; }
.clock {
  font-size: 13px; font-weight: 600;
  color: #94a3b8; white-space: nowrap;
  font-variant-numeric: tabular-nums; margin: 0 6px; flex-shrink: 0;
}
.user-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 5px; border-radius: 9px;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s;
}
.user-pill:hover { background: #f3f4f6; }
.uavatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1a6b3c; display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; gap: 1px; }
.uname { font-size: 12px; color: #1e293b; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.urole { font-size: 10px; color: #94a3b8; line-height: 1.2; text-transform: capitalize; }
.btn-logout {
  padding: 5px 12px; border-radius: 7px; font-size: 11px; font-weight: 700;
  cursor: pointer; border: 1px solid #e5e7eb;
  background: transparent; color: #94a3b8;
  transition: all .15s; text-transform: uppercase;
  letter-spacing: .4px; flex-shrink: 0; margin-left: 4px;
}
.btn-logout:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
#turno-banner { font-size: 12px; }

/* ── PAGES ──────────────────────────────────────────────── */
.page { display: none; min-height: calc(100vh - 58px); background: #f3f4f6; }
.page.active { display: block; }
.main { max-width: none; padding: 0 24px 80px; }
/* Mesas: espacio para el sector-bar sticky (44px altura) */
#page-mesas .main { padding-top: 48px; }
.page-title { font-size: 20px; font-weight: 800; color: #1a1a1a; margin-bottom: 16px; padding-top: 16px; }

/* ── SECTOR TABS ────────────────────────────────────────── */
/* ── Sector bar — ahora sobre fondo claro dentro del panel derecho ── */
.sector-bar {
  background: #fff;
  display: flex; align-items: center;
  padding: 0 12px; height: 40px; gap: 4px;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto; scrollbar-width: none;
}
.sector-bar::-webkit-scrollbar { display: none; }
.sector-tab {
  padding: 4px 14px; height: 28px;
  display: flex; align-items: center;
  cursor: pointer; white-space: nowrap;
  font-size: 12px; font-weight: 600;
  color: #999;
  border-radius: 20px; border: 1px solid transparent;
  transition: all .15s; flex-shrink: 0;
}
.sector-tab:hover { color: #555; background: #f3f4f6; }
.sector-tab.active {
  background: #1a6b3c; color: #fff;
  border-color: #1a6b3c; font-size: 12px;
  font-weight: 700;
}

/* ── STATS ──────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: #fff; border-radius: 12px; padding: 14px 16px; border: 0.5px solid #e5e7eb; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.stat-card .slabel { font-size: 10px; color: #999; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .5px; }
.stat-card .sval { font-size: 18px; font-weight: 600; color: #1a1a1a; }
.proximo-mozo-bar {
  background: #fff; border: 0.5px solid #e5e7eb;
  border-radius: 10px; padding: 9px 14px;
  margin-bottom: 12px; display: flex;
  align-items: center; gap: 10px;
}
.pm-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: .5px; }
.pm-name {
  font-size: 14px; font-weight: 700; color: #1a4f8a;
  background: #e6f1fb; padding: 3px 12px;
  border-radius: 20px; border: 1px solid #85b7eb;
}

/* ── LEYENDA ────────────────────────────────────────────── */
.legend { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #777; }
.leg-dot { width: 10px; height: 10px; border-radius: 3px; }
.dot-libre { background: #e5e7eb; border: 1px solid #ccc; }
.dot-ocupada { background: #97c459; border: 1px solid #639922; }
.dot-cuenta { background: #a78bfa; border: 1px solid #7f77dd; }
.dot-cerrada { background: #f09595; border: 1px solid #e24b4a; }

/* ── FLOOR GRID ─────────────────────────────────────────── */
.floor-outer { position: relative; overflow: auto; }
.floor-grid {
  display: grid; gap: 8px; padding: 12px;
  background: #e5e7eb; border-radius: 12px;
  /* Sin overflow-x ni width:fit-content — el grid se adapta al contenedor */
  width: 100%; max-width: 100%;
}

/* ── MESA TILE ──────────────────────────────────────────── */
.mesa {
  border-radius: 11px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .12s, box-shadow .12s;
  user-select: none; position: relative;
  padding: 4px; aspect-ratio: 1; min-height: 68px;
  /* text-align para los spans internos */
  text-align: center;
}
.mesa.redonda { border-radius: 50%; }
.mesa:not(.edit-mode):hover { transform: scale(1.06); z-index: 2; }

/* Número grande */
.mesa .num { font-size: 17px; font-weight: 900; line-height: 1; }
/* Nombre del mozo */
.mesa .mtag {
  font-size: 8px; font-weight: 700; margin-top: 3px;
  max-width: 92%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; line-height: 1.2;
}
/* Personas */
.mesa .mpax { font-size: 8px; font-weight: 500; margin-top: 2px; opacity: .75; line-height: 1; }

/* ── ESTADOS DE MESA ────────────────────────────────────── */
/* Libre */
.mesa.libre { background: #fff; border-color: #e2e8f0; }
.mesa.libre .num { color: #ccc; }
.mesa.libre .mtag, .mesa.libre .mpax { color: #ccc; }

/* Ocupada — colores del mozo via JS inline style */
/* El JS aplica bg/border/color del mozo, este es el fallback */
.mesa.ocupada { background: #eaf3de; border-color: #97c459; }
.mesa.ocupada .num { color: #27500a; }
.mesa.ocupada .mtag { color: #3b6d11; }
.mesa.ocupada .mpax { color: #4e8a1a; }

/* Cuenta pedida — LILA, pulso suave */
.mesa.cuenta {
  background: #ede8ff !important;
  border-color: #a78bfa !important;
  animation: pulse-lila 1.8s infinite;
}
.mesa.cuenta .num { color: #3c3489 !important; }
.mesa.cuenta .mtag { color: #534ab7 !important; }
.mesa.cuenta .mpax { color: #7f77dd !important; }
@keyframes pulse-lila {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,.35); }
  60% { box-shadow: 0 0 0 5px rgba(167,139,250,.08); }
}

/* Cerrada — rojo claro */
.mesa.cerrada {
  background: #fcebeb !important;
  border-color: #f09595 !important;
}
.mesa.cerrada .num { color: #791f1f !important; }
.mesa.cerrada .mtag { color: #a32d2d !important; }
.mesa.cerrada .mpax { color: #c04040 !important; }

/* Modo edición */
.mesa.edit-mode { cursor: grab; opacity: .88; border-style: dashed; }
.mesa.edit-mode:active { cursor: grabbing; }
.mesa.dragging { opacity: .3; transform: scale(.88); }
.edit-badge { position: absolute; top: 2px; right: 4px; font-size: 9px; color: rgba(255,255,255,.5); }
.celda-vacia { border-radius: 9px; border: 1.5px dashed transparent; cursor: pointer; aspect-ratio: 1; min-height: 68px; }
.celda-vacia.edit-mode { border-color: #ccc; }
.celda-vacia.edit-mode:hover { border-color: #22875a; background: rgba(34,135,90,.08); }

/* ── MODAL / OVERLAY ────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 16px;
}
#modal-body {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}
.modal-inner-scroll { flex: 1; overflow-y: auto; padding: 20px; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: rgba(255,255,255,.7);
  line-height: 1; font-weight: 300; z-index: 2;
}
.modal-close:hover { color: #fff; }
.panel-mode {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
}

/* ── PANEL MESA OCUPADA ─────────────────────────────────── */
/* Header generado por JS con background del mozo */
.mesa-action-btn {
  padding: 6px 13px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .12s; white-space: nowrap;
}
.mesa-action-btn:hover { background: rgba(255,255,255,.24); }

/* No se presentó — siempre rojo oscuro */
.mesa-action-btn[onclick*="noSePresentoMesa"],
.btn-no-presento {
  background: rgba(180,30,30,.5) !important;
  border-color: rgba(240,100,100,.5) !important;
  color: #ffc8c8 !important;
}
.mesa-action-btn[onclick*="noSePresentoMesa"]:hover,
.btn-no-presento:hover { background: rgba(180,30,30,.72) !important; }

/* ── ITEMS DE MESA ──────────────────────────────────────── */
.mesa-item-row {
  display: grid; grid-template-columns: 28px 1fr auto auto;
  gap: 0 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f3f1ed;
}
.mesa-item-row:last-child { border-bottom: none; }
.mesa-item-name { font-size: 14px; color: #1a1a1a; font-weight: 500; }

/* Badge impresora — oculto en panel de mesa */
.mesa-item-imp { display: none; }

/* ── Controles qty (conservados para compatibilidad pero no usados en el panel mesa) */
.mesa-item-qty {
  display: flex; align-items: center;
  border: 1.5px solid #e2e8f0; border-radius: 9px;
  overflow: hidden; flex-shrink: 0;
}
.mesa-item-qty button {
  width: 32px; height: 32px; border: none;
  background: #f9fafb; color: #555; font-size: 18px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .1s; line-height: 1;
}
.mesa-item-qty button:hover { background: #eee; }
.mesa-item-qty span {
  width: 36px; text-align: center;
  font-size: 14px; font-weight: 700; color: #1a1a1a;
  border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0;
  height: 32px; line-height: 32px; background: #fff;
}

/* ── ITEM ROW — diseño comanda con trazabilidad ─────────── */
.item-qty-prefix {
  font-size: 12px; font-weight: 800; color: #1a6b3c;
}
.item-nota {
  display: block; font-size: 11px;
  color: #f0a830; font-style: italic; margin-top: 2px;
}
.item-tachado { text-decoration: line-through; color: #9ca3af !important; }
.mesa-item-row.anulado-audit {
  opacity: .4; background: #f3f4f6;
  border-radius: 6px; margin: 2px 0;
  padding: 6px 8px; border-bottom: none;
}
.mesa-item-del {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid #fee2e2; background: #fef2f2;
  color: #ef4444; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .12s; line-height: 1; padding: 0;
  font-weight: 400;
}
.mesa-item-del:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.mesa-item-price { font-size: 13px; font-weight: 700; color: #1a1a1a; min-width: 82px; text-align: right; }
.mesa-pedido-empty { text-align: center; padding: 28px 16px; color: #bbb; font-size: 13px; }

/* Footer panel mesa */
.mesa-footer { padding: 14px 18px; border-top: 1px solid #f3f4f6; background: #fafafa; flex-shrink: 0; }
.mesa-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mesa-total span:first-child { font-size: 13px; color: #888; font-weight: 500; }
.mesa-total span:last-child { font-size: 22px; font-weight: 800; color: #1a1a1a; }
.mesa-btns { display: flex; gap: 8px; }

/* ── ADICIONAR ──────────────────────────────────────────── */
.adicionar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 400; display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.adicionar-panel {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 640px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
.adicionar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 0.5px solid #f3f4f6; flex-shrink: 0;
}
.adicionar-header h3 { font-size: 17px; font-weight: 800; color: #1a1a1a; }
.adicionar-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #f3f4f6; color: #777;
  font-size: 19px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s;
}
.adicionar-close:hover { background: #e5e7eb; }
.adicionar-search { padding: 10px 14px; border-bottom: 0.5px solid #f3f4f6; flex-shrink: 0; }
.adicionar-search input {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; outline: none; background: #fafafa;
  transition: border-color .15s;
}
.adicionar-search input:focus { border-color: #1a6b3c; }
.adicionar-body { display: flex; flex: 1; overflow: hidden; }
.adicionar-cats { width: 115px; flex-shrink: 0; border-right: 0.5px solid #f3f4f6; overflow-y: auto; padding: 6px 0; }
.adicionar-cat {
  padding: 9px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; color: #999;
  border-left: 2px solid transparent;
  transition: all .12s;
}
.adicionar-cat:hover { background: #fafafa; color: #555; }
.adicionar-cat.active { color: #1a1a1a; background: #f3f4f6; border-left-color: #1a6b3c; font-weight: 700; }
.adicionar-prods { flex: 1; overflow-y: auto; padding: 8px; }

/* Producto */
.adicionar-prod {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid transparent; margin-bottom: 5px;
  background: #fafafa; transition: all .1s;
}
.adicionar-prod:hover { background: #f3f4f6; border-color: #e8ddd0; }
.adicionar-prod-info { flex: 1; min-width: 0; }
.adicionar-prod-name { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.adicionar-prod-desc { font-size: 11px; color: #bbb; margin-top: 2px; }
.adicionar-prod-price { font-size: 13px; font-weight: 700; color: #1a4f8a; white-space: nowrap; margin-right: 4px; }

/* Controles qty en adicionar */
.adicionar-prod-qty { display: flex; align-items: center; flex-shrink: 0; }

/* Solo + cuando qty=0 */
.adicionar-prod-qty button.add {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1.5px solid #a8d4b4; background: #d4f0dc;
  color: #1e7a3e; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; transition: background .1s;
}
.adicionar-prod-qty button.add:hover { background: #b8e6c4; }

/* Bloque − qty + cuando qty>0 */
.adicionar-prod-qty button:not(.add) {
  width: 30px; height: 30px; border: none;
  background: #f3f4f6; color: #555; font-size: 18px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .1s;
}
.adicionar-prod-qty button:first-child:not(.add) {
  border-radius: 8px 0 0 8px;
  border: 1.5px solid #e2e8f0; border-right: none;
}
.adicionar-prod-qty button:first-child:not(.add):hover { background: #e5e7eb; }
.adicionar-prod-qty button:last-child:not(.add) {
  border-radius: 0 8px 8px 0;
  border: 1.5px solid #a8d4b4; border-left: none;
  background: #d4f0dc; color: #1e7a3e;
}
.adicionar-prod-qty button:last-child:not(.add):hover { background: #b8e6c4; }
.adicionar-prod-qty span {
  width: 30px; text-align: center;
  font-size: 13px; font-weight: 700; color: #1a1a1a;
  border-top: 1.5px solid #e2e8f0; border-bottom: 1.5px solid #e2e8f0;
  height: 30px; line-height: 30px; background: #fff;
}
.adicionar-footer {
  padding: 12px 16px; border-top: 0.5px solid #f3f4f6;
  background: #fafafa; display: flex;
  align-items: center; justify-content: space-between; flex-shrink: 0;
}
.adicionar-footer-total { font-size: 14px; color: #666; }
.adicionar-footer-total strong { color: #1a1a1a; font-size: 16px; font-weight: 800; }

/* ── BOTONES ────────────────────────────────────────────── */
.btn {
  padding: 9px 18px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1.5px solid #ddd; background: #fff; color: #333;
  transition: all .12s; white-space: nowrap;
}
.btn:hover { background: #f5f5f5; }
.btn-primary { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.btn-primary:hover { background: #155e32; }
.btn-success { background: #1e7a3e; color: #fff; border-color: #1e7a3e; }
.btn-success:hover { background: #186032; }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; }
.btn-warning { background: #22875a; color: #fff; border-color: #22875a; }
.btn-warning:hover { background: #d4903a; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ── FORMULARIOS ────────────────────────────────────────── */
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-row label { font-size: 11px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .4px; }
.form-row input, .form-row select, .form-row textarea {
  padding: 9px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: 13px; outline: none;
  background: #fff; width: 100%; color: #1a1a1a;
  transition: border-color .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #1a6b3c; }
.mozos-check { display: flex; flex-wrap: wrap; gap: 7px; }
.mozo-btn {
  padding: 6px 13px; border: 2px solid #e2e8f0;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; background: #fff; color: #555; transition: all .12s;
}
.mozo-btn.sel { background: #e6f1fb; border-color: #378add; color: #0c447c; }
.edit-mesa-form { background: #f9fafb; border-radius: 10px; padding: 12px; margin-top: 10px; }

/* ── COBRO / TICKET ─────────────────────────────────────── */
.ticket {
  background: #fff; border-radius: 12px;
  margin-top: 12px; flex-shrink: 0;
  border: 1px solid #e8e4de; font-size: 13px;
}
.ticket h3 {
  font-size: 10px; font-weight: 800; color: #aaa;
  text-transform: uppercase; letter-spacing: 1px; margin: 0;
  padding: 12px 14px 8px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ticket-items { list-style: none; margin: 0; padding: 0 14px; }
.ticket-items li {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 0 10px; align-items: baseline;
  font-size: 13px; padding: 6px 0;
  border-bottom: 1px solid #f3f1ed; color: #333;
}
.ticket-items li:last-child { border-bottom: none; }
.ticket-items li > span:first-child { color: #1a6b3c; font-weight: 800; font-size: 12px; }
.ticket-items li > span:last-child { font-weight: 700; text-align: right; white-space: nowrap; }
.ticket-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 7px 14px; color: #888;
}
.ticket-row:last-child { padding-bottom: 12px; }
.ticket-row--strong {
  font-weight: 700; color: #1a1a1a;
  border-top: 1px solid #f0ede8; padding-top: 10px; margin-top: 2px;
}
.ticket-row--total {
  font-weight: 900; font-size: 15px; color: #1a1a1a;
  border-top: 1.5px solid #1a1a1a; padding-top: 11px; margin-top: 2px;
}
.ticket-row--green { color: #1e7a3e; font-weight: 600; }
.ticket-row--red { color: #c0392b; }
.ticket-row--amber { color: #b9770e; font-size: 12px; }
.ticket-divider { display: none; }
.precios-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
.precio-box { border: 0.5px solid #e2e8f0; border-radius: 9px; padding: 9px 12px; background: #fff; }
.pbox-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.pbox-val { font-size: 17px; font-weight: 800; color: #1a1a1a; }
.precio-box.efec { border-color: #97c459; background: #f5faee; }
.precio-box.efec .pbox-label { color: #3b6d11; }
.precio-box.efec .pbox-val { color: #27500a; }
.precio-box.cred { border-color: #f09595; background: #fff5f5; }
.precio-box.cred .pbox-label { color: #a32d2d; }
.precio-box.cred .pbox-val { color: #791f1f; }
.cobro-section { margin-top: 14px; border-top: 1px solid #eee; padding-top: 14px; }
.cobro-section h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: #555; }
.cobro-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cobro-row label { font-size: 12px; color: #666; width: 115px; flex-shrink: 0; }
.cobro-row input { flex: 1; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; font-size: 14px; text-align: right; outline: none; min-width: 80px; transition: border-color .15s; }
.cobro-row input:focus { border-color: #1a6b3c; }
.cobro-resumen { background: #f9fafb; border-radius: 10px; padding: 12px 14px; margin-top: 10px; border: 0.5px solid #e2e8f0; }
.cobro-res-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: #666; }
.cobro-res-row.total { font-weight: 800; font-size: 15px; color: #1a1a1a; border-top: 1px solid #ddd; margin-top: 6px; padding-top: 6px; }
.cobro-res-row.propina { color: #1e7a3e; font-weight: 600; }
.cobro-res-row.faltante { color: #c0392b; font-weight: 600; }

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; color: #fff;
  padding: 10px 22px; border-radius: 24px;
  font-size: 13px; font-weight: 600; z-index: 9999;
  opacity: 0; transition: all .25s; pointer-events: none;
  white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── LOADING / LOGIN ────────────────────────────────────── */
.loading-screen {
  position: fixed; inset: 0; background: #111;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; z-index: 9999;
}
.spinner { width: 34px; height: 34px; border: 3px solid #333; border-top-color: #1a6b3c; border-radius: 50%; animation: spin .8s linear infinite; }
.ldot { font-size: 13px; color: #555; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-screen { position: fixed; inset: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; z-index: 500; }
.login-box { background: #fff; border-radius: 16px; padding: 32px 28px; width: 100%; max-width: 380px; box-shadow: 0 8px 40px rgba(0,0,0,.1); border: 0.5px solid #e5e7eb; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .brand { font-size: 24px; }
.login-logo .sub { font-size: 12px; color: #aaa; margin-top: 4px; }
.login-field { margin-bottom: 14px; }
.login-field label { display: block; font-size: 11px; font-weight: 700; color: #999; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.login-field input { width: 100%; padding: 11px 13px; border: 1.5px solid #e2e8f0; border-radius: 9px; font-size: 14px; outline: none; transition: border-color .15s; background: #fafafa; }
.login-field input:focus { border-color: #1a6b3c; background: #fff; }
.login-btn { width: 100%; padding: 12px; background: #1a6b3c; color: #fff; border: none; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 6px; transition: background .15s; }
.login-btn:hover { background: #155e32; }
.login-err { color: #c0392b; font-size: 12px; margin-top: 8px; text-align: center; min-height: 18px; }
.login-link { text-align: center; margin-top: 14px; font-size: 13px; color: #aaa; }
.login-link a { color: #1a6b3c; cursor: pointer; text-decoration: none; font-weight: 600; }
.login-link a:hover { text-decoration: underline; }
.login-divider { border: none; border-top: 1px solid #f3f4f6; margin: 20px 0; }

/* ── MOZOS ──────────────────────────────────────────────── */
.mz-wrap { overflow-x: visible; }
.mz-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.mz-table th, .mz-table td { padding: 9px 14px; text-align: right; white-space: nowrap; }
.mz-table th:first-child, .mz-table td:first-child { text-align: left; font-weight: 700; color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; background: #f9fafb; border-right: 2px solid #e5e7eb; position: sticky; left: 0; z-index: 1; min-width: 130px; }
.mz-table thead th { font-size: 13px; font-weight: 800; padding: 12px 14px; border-bottom: 3px solid rgba(0,0,0,.08); }
.mz-table thead th:first-child { background: #f9fafb; color: #999; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.mz-table tbody tr:hover td { filter: brightness(.97); }
.mz-table tbody td { border-bottom: 1px solid rgba(0,0,0,.05); }
.mz-table .sep-row td { height: 6px; background: #f3f4f6; padding: 0; border: none; }
.mz-table tfoot td { font-weight: 800; font-size: 14px; border-top: 3px solid rgba(0,0,0,.1); padding: 12px 14px; }
.mz-totales-col { background: #1a6b3c !important; color: #fff !important; font-weight: 700; }
.mz-totales-col.header { font-size: 11px !important; letter-spacing: .5px !important; }
.mz-toggle-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; border: 2px solid rgba(0,0,0,.12); transition: all .12s; margin: 2px; }
.mz-toggle-chip.off { opacity: .4; filter: grayscale(.6); }
.mz-chips-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 16px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.mz-proximo-bar { background: #1a6b3c; border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; color: #fff; }
.mz-proximo-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.mz-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 16px; }
.mz-stat-card { background: #fff; border-radius: 10px; border: 0.5px solid #e5e7eb; padding: 12px 14px; text-align: center; }
.mz-stat-card .lbl { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.mz-stat-card .val { font-size: 18px; font-weight: 600; color: #1a1a1a; }
.mz-stat-card .val.green { color: #1e7a3e; }
.mz-stat-card .val.blue { color: #1a4f8a; }
.mz-stat-card .val.gold { color: #b8860b; }
.propina-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #eaf3de; color: #1e7a3e; font-weight: 600; }
.badge-activo { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5cbf7a; margin-right: 4px; }
.badge-inactivo { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin-right: 4px; }
.mozos-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 16px; }
.mstat-card { background: #fff; border-radius: 10px; padding: 12px 14px; border: 0.5px solid #e5e7eb; }
.mstat-card .slabel { font-size: 10px; color: #999; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.mstat-card .sval { font-size: 18px; font-weight: 600; color: #1a1a1a; }
.mstat-card .sval.green { color: #1e7a3e; }
.mstat-card .sval.blue { color: #1a4f8a; }

/* ── CAJA ───────────────────────────────────────────────── */
.caja-wrap { display: flex; flex-direction: column; gap: 16px; }
.caja-form { background: #fff; border-radius: 12px; border: 0.5px solid #e5e7eb; padding: 16px; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.caja-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.caja-field { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.caja-field label { font-size: 11px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .4px; }
.caja-field input, .caja-field select { padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; outline: none; background: #fff; transition: border-color .15s; }
.caja-field input:focus, .caja-field select:focus { border-color: #1a6b3c; }
.caja-field.grow { flex: 1; }
.caja-resumen { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 4px; }
.movimientos-list { background: #fff; border-radius: 12px; border: 0.5px solid #e5e7eb; overflow: hidden; box-shadow: 0 1px 5px rgba(0,0,0,.04); }
.mov-header { display: grid; grid-template-columns: 80px 1fr 100px 100px 70px 70px; gap: 8px; padding: 8px 12px; background: #f3f4f6; font-size: 10px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .4px; }
.mov-row { display: grid; grid-template-columns: 80px 1fr 100px 100px 70px 70px; gap: 8px; padding: 9px 12px; border-top: 0.5px solid #f3f4f6; font-size: 13px; align-items: center; }
.mov-row:hover { background: #fafafa; }
.mov-row.anulado { opacity: .5; }
.mov-row.anulado .mov-tipo, .mov-row.anulado .mov-monto, .mov-row.anulado > div { text-decoration: line-through; color: #aaa !important; }
.mov-tipo { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.mov-tipo.ingreso { background: #eaf3de; color: #1e7a3e; }
.mov-tipo.egreso { background: #fcebeb; color: #c0392b; }
.mov-monto { font-weight: 700; }
.mov-monto.ingreso { color: #1e7a3e; }
.mov-monto.egreso { color: #c0392b; }

/* ── MOSTRADOR ──────────────────────────────────────────── */
.mostrador-layout { display: flex; height: calc(100vh - 58px); overflow: hidden; } /* 88→58px: nav ya en flujo */
.mostrador-left { flex: 1; display: flex; flex-direction: column; border-right: 1px solid #e5e7eb; background: #fff; overflow: hidden; }
.mostrador-left-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 0.5px solid #e5e7eb; flex-shrink: 0; }
.mostrador-pedido-header { padding: 10px 16px; background: #1a6b3c; color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.mostrador-cats { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; flex-shrink: 0; border-bottom: 0.5px solid #f3f4f6; scrollbar-width: none; }
.mostrador-cats::-webkit-scrollbar { display: none; }
.mostrador-cat-btn { padding: 5px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .12s; color: #666; }
.mostrador-cat-btn.active { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.mostrador-prods { flex: 1; overflow-y: auto; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 8px; align-content: start; }
.mostrador-prod-card { background: #f9fafb; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all .12s; display: flex; flex-direction: column; gap: 4px; position: relative; }
.mostrador-prod-card:hover { background: #f3f4f6; border-color: #bbb; transform: translateY(-1px); }
.mostrador-prod-card.added { border-color: #1e7a3e; background: #f0faf4; }
.mostrador-prod-name { font-size: 12px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.mostrador-prod-price { font-size: 13px; font-weight: 800; color: #1a4f8a; }
.mostrador-prod-qty-badge { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: #1e7a3e; color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mostrador-activo-footer { padding: 12px 16px; border-top: 0.5px solid #e5e7eb; background: #fafafa; flex-shrink: 0; max-height: 240px; overflow-y: auto; }
.mostrador-item-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 0.5px solid #f3f4f6; font-size: 13px; }
.mostrador-item-name { flex: 1; color: #1a1a1a; font-size: 12px; }
.mostrador-item-qty-ctrl { display: flex; align-items: center; gap: 4px; }
.mostrador-item-qty-ctrl button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; line-height: 1; }
.mostrador-item-qty-num { font-size: 12px; font-weight: 700; min-width: 18px; text-align: center; }
.mostrador-item-price { font-size: 12px; font-weight: 600; color: #666; min-width: 70px; text-align: right; }
.mostrador-right { width: 300px; flex-shrink: 0; background: #f9fafb; display: flex; flex-direction: column; overflow: hidden; }
.mostrador-cola-card { background: #fff; border-radius: 12px; border: 1.5px solid #e5e7eb; overflow: hidden; }
.mostrador-cola-card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #1a6b3c; color: #fff; }
.mostrador-cola-card-num { font-size: 16px; font-weight: 800; }
.mostrador-cola-card-hora { font-size: 11px; color: #888; }
.mostrador-cola-card-items { padding: 8px 14px; font-size: 12px; color: #666; border-bottom: 0.5px solid #f3f4f6; line-height: 1.6; }
.mostrador-cola-card-total { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-size: 14px; font-weight: 700; }
.mostrador-cola-card-btns { display: flex; gap: 6px; padding: 8px 14px; border-top: 0.5px solid #f3f4f6; }

/* ── RESERVAS ───────────────────────────────────────────── */
.reserva-card { background: #fff; border-radius: 14px; border: 1.5px solid #e5e7eb; margin-bottom: 12px; display: flex; align-items: stretch; overflow: hidden; transition: box-shadow .15s, transform .1s; }
.reserva-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.reserva-lateral { width: 6px; flex-shrink: 0; }
.reserva-lateral.est-nollego { background: #ccc; }
.reserva-lateral.est-llego { background: #97c459; }
.reserva-lateral.est-consumiendo { background: #378add; }
.reserva-lateral.est-pagada { background: #a78bfa; }
.reserva-lateral.est-cancelada { background: #e24b4a; }
.reserva-lateral.est-novino { background: #ef9f27; }
.reserva-body { flex: 1; padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.reserva-hora-blk { text-align: center; min-width: 58px; flex-shrink: 0; }
.reserva-hora-blk .hora { font-size: 20px; font-weight: 800; color: #1a1a1a; line-height: 1; }
.reserva-hora-blk .fecha-tag { font-size: 10px; color: #aaa; margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }
.reserva-sep { width: 1px; height: 48px; background: #eee; flex-shrink: 0; }
.reserva-info { flex: 1; }
.reserva-nombre { font-size: 15px; font-weight: 700; color: #1a1a1a; display: flex; align-items: center; gap: 6px; }
.reserva-detalles { font-size: 12px; color: #999; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.res-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; background: #f3f4f6; color: #777; }
.res-tag.sector-adentro { background: #e6f1fb; color: #185fa5; }
.res-tag.sector-afuera { background: #eaf3de; color: #1e7a3e; }
.res-tag.senia { background: #faeeda; color: #633806; }
.res-tag.mozo { background: #ede8ff; color: #534ab7; }
.reserva-estado { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: .3px; text-transform: uppercase; }
.est-nollego { background: #f3f4f6; color: #999; }
.est-llego { background: #eaf3de; color: #1e7a3e; }
.est-consumiendo { background: #e6f1fb; color: #185fa5; }
.est-pagada { background: #ede8ff; color: #534ab7; }
.est-cancelada { background: #fcebeb; color: #c0392b; }
.est-novino { background: #faeeda; color: #633806; }
.reserva-acciones { display: flex; gap: 6px; flex-shrink: 0; padding-right: 4px; }

/* ── ARQUEO ─────────────────────────────────────────────── */
.arqueo-wrap { display: flex; flex-direction: column; gap: 16px; }
.arqueo-card { background: #fff; border-radius: 14px; padding: 18px; border: 0.5px solid #e5e7eb; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.arq-diff-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 0.5px solid #f3f4f6; font-size: 14px; }
.arq-diff-row:last-child { border-bottom: none; }
.arq-total { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 800; padding-top: 10px; border-top: 2px solid #eee; margin-top: 8px; }
.billete-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 0.5px solid #f5f5f5; }
.billete-row label { font-size: 13px; font-weight: 600; min-width: 80px; color: #666; }
.billete-row input { width: 80px; padding: 6px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; text-align: center; outline: none; transition: border-color .15s; }
.billete-row input:focus { border-color: #1a6b3c; }
.bsub { font-size: 12px; color: #999; min-width: 60px; text-align: right; }

/* ── AJUSTES/ADMIN ──────────────────────────────────────── */
.admin-wrap { display: flex; flex-direction: column; gap: 16px; }
.admin-card { background: #fff; border-radius: 14px; padding: 18px; border: 0.5px solid #e5e7eb; box-shadow: 0 1px 5px rgba(0,0,0,.05); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid #f3f4f6; }
.user-row:last-child { border-bottom: none; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex-shrink: 0; }
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; background: #f3f4f6; color: #666; text-transform: uppercase; letter-spacing: .3px; }
.role-badge.admin { background: #1a1a1a; color: #fff; }
.role-badge.mozo { background: #eaf3de; color: #1e7a3e; }
.role-badge.encargado { background: #faeeda; color: #633806; }
.perms-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 6px; margin-top: 10px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f9fafb; border-radius: 8px; font-size: 12px; cursor: pointer; border: 1.5px solid transparent; transition: all .12s; }
.perm-item:hover { background: #f3f4f6; }
.perm-item.active { background: #eaf3de; border-color: #97c459; color: #1e7a3e; }

/* ── CARTA ──────────────────────────────────────────────── */
.carta-wrap { display: flex; border: 0.5px solid #e5e7eb; border-radius: 11px; overflow: hidden; margin-bottom: 12px; min-height: 280px; }
.carta-cats { width: 130px; background: #f9fafb; border-right: 0.5px solid #e5e7eb; overflow-y: auto; flex-shrink: 0; }
.carta-cat-item { padding: 10px 14px; font-size: 12px; cursor: pointer; border-bottom: 0.5px solid #eee; color: #666; transition: all .1s; }
.carta-cat-item:hover { background: #f3f4f6; }
.carta-cat-item.active { background: #1a6b3c; color: #fff; font-weight: 600; }
.carta-prods { flex: 1; overflow-y: auto; padding: 6px; }
.prod-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: all .1s; gap: 8px; }
.prod-row:hover { background: #f3f4f6; border-color: #e5e7eb; }
.prod-info { flex: 1; min-width: 0; }
.prod-nombre { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.prod-desc { font-size: 11px; color: #bbb; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-precio { font-size: 12px; color: #666; white-space: nowrap; }
.prod-add-btn { width: 28px; height: 28px; border-radius: 50%; background: #eaf3de; border: 1px solid #97c459; color: #1e7a3e; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-weight: 500; line-height: 1; }

/* ── VENTAS ─────────────────────────────────────────────── */
.rep-grid { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.add { color: #1e7a3e; }
.sub { color: #c0392b; }
.total { font-weight: 700; }
.sep { border-top: 1px dashed #ddd; margin: 6px 0; }
.header { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #999; }
.green { color: #1e7a3e; }
.blue { color: #1a4f8a; }
.gold { color: #b8860b; }
.num { font-variant-numeric: tabular-nums; }
.col-opt { display: flex; flex-direction: column; gap: 4px; }

/* ── WIZARD ─────────────────────────────────────────────── */
.wizard-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; backdrop-filter: blur(4px); }
.wizard-box { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,.4); display: flex; flex-direction: column; max-height: 90vh; }
.wizard-header { background: #1a1a1a; padding: 24px 28px 20px; flex-shrink: 0; }
.wizard-header .wiz-brand { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.5px; margin-bottom: 4px; }
.wizard-header .wiz-brand span { color: #1a6b3c; }
.wizard-header .wiz-sub { font-size: 13px; color: #888; }
.wizard-steps { display: flex; gap: 6px; padding: 0 28px 20px; background: #1a1a1a; }
.wiz-step-dot { height: 4px; border-radius: 2px; flex: 1; background: #333; transition: background .3s; }
.wiz-step-dot.done { background: #1a6b3c; }
.wiz-step-dot.active { background: #3dba6f; }
.wizard-body { padding: 28px; overflow-y: auto; flex: 1; }
.wizard-body h2 { font-size: 18px; font-weight: 800; color: #1a1a1a; margin-bottom: 6px; }
.wizard-body .wiz-desc { font-size: 13px; color: #999; margin-bottom: 24px; line-height: 1.5; }
.wiz-option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; margin-bottom: 10px; transition: all .15s; background: #fff; }
.wiz-option:hover { border-color: #1a6b3c; background: #fafafa; }
.wiz-option.selected { border-color: #1a6b3c; background: #eaf5ee; }
.wiz-option .wiz-opt-icon { font-size: 28px; flex-shrink: 0; }
.wiz-option .wiz-opt-text .title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.wiz-option .wiz-opt-text .sub { font-size: 12px; color: #999; margin-top: 2px; }
.wiz-mod-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 0.5px solid #f3f4f6; }
.wiz-mod-row:last-child { border-bottom: none; }
.wiz-mod-info .title { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.wiz-mod-info .sub { font-size: 12px; color: #999; margin-top: 2px; }
.wiz-toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.wiz-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.wiz-toggle-track { position: absolute; inset: 0; border-radius: 26px; background: #ddd; transition: .25s; cursor: pointer; }
.wiz-toggle-track.on { background: #1a6b3c; }
.wiz-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.wiz-toggle-thumb.on { left: 22px; }
.wizard-footer { padding: 20px 28px; border-top: 0.5px solid #f3f4f6; display: flex; gap: 10px; flex-shrink: 0; }
.wiz-btn-primary { flex: 1; padding: 13px; background: #1a6b3c; color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s; }
.wiz-btn-primary:hover { background: #155e32; }
.wiz-btn-skip { padding: 13px 18px; background: transparent; color: #bbb; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 13px; cursor: pointer; }
.wiz-input { width: 100%; padding: 12px 14px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 15px; font-weight: 600; outline: none; transition: border .15s; background: #fafafa; }
.wiz-input:focus { border-color: #1a6b3c; background: #fff; }

/* ============================================================
   RESPONSIVE — MÓVIL VERTICAL
   ============================================================ */
@media (max-width: 600px) {
  /* Nav compacto */
  .topnav { gap: 0; padding: 0 6px; height: 52px; }
  .brand-wrap { padding-right: 8px; }
  .brand { font-size: 17px; }
  .brand-local { display: none; }
  .nav-sep { display: none; }
  .nav-btn { min-width: 36px; padding: 3px 5px; font-size: 8px; height: 44px; gap: 2px; }
  .nav-btn svg { width: 17px; height: 17px; }
  .clock { font-size: 12px; margin: 0 4px; }

  /* Sector bar */
  .sector-bar { top: 52px; min-height: 40px; height: auto; padding: 0 8px; flex-wrap: nowrap; }
  .sector-tab { font-size: 11px; padding: 4px 10px; }
  .sector-tab.active { font-size: 12px; padding: 4px 12px; }
  /* Botones Plano/Por mozo/Editar — compactos en mobile */
  #btn-vista-plano, #btn-vista-mozos, #btn-editar-plano {
    font-size: 10px !important; padding: 4px 8px !important;
  }

  /* Pages */
  .page { padding-top: 52px; }
  .main { padding: 0 10px 80px; }

  /* Stats */
  .stats { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .mz-stats-row { grid-template-columns: repeat(2,1fr); }
  .mozos-stats { grid-template-columns: repeat(2,1fr); }

  /* Floor */
  .floor-grid { gap: 6px; padding: 8px; }
  .mesa { min-height: 58px; border-radius: 9px; }
  .mesa .num { font-size: 14px; }
  .mesa .mtag { font-size: 7px; }
  .mesa .mpax { font-size: 7px; }

  /* Modal — sube desde abajo en móvil */
  .overlay { align-items: flex-end; padding: 0; }
  #modal-body {
    max-width: 100%; border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }

  /* Adicionar — sube desde abajo */
  .adicionar-overlay { align-items: flex-end; padding: 0; }
  .adicionar-panel { max-width: 100%; max-height: 95vh; border-radius: 16px 16px 0 0; }
  .adicionar-cats { width: 95px; }

  /* Cobro */
  .cobro-row { flex-direction: column; }
  .precios-grid { gap: 5px; }

  /* Movimientos */
  .mov-header, .mov-row { grid-template-columns: 70px 1fr 80px 80px; }
  .mov-header > :last-child, .mov-row > :last-child { display: none; }

  /* Mostrador */
  .mostrador-layout { flex-direction: column; height: auto; }
  .mostrador-right { width: 100%; border-top: 1px solid #e5e7eb; }

  /* Items */
  .mesa-item-row { padding: 8px 0; }
  .mesa-footer { padding: 12px 14px; }
}

/* ── VENTAS ─────────────────────────────────────────────────────────────────── */
.venta-row {
  display: grid;
  grid-template-columns: 100px 100px 80px 50px 50px 1fr 110px;
  border-bottom: 0.5px solid #f3f4f6;
  transition: background .1s;
}
.venta-row.clickable { cursor: pointer; }
.venta-row.clickable:hover { background: #f9fafb; }

/* ════════════════════════════════════════════════════════════════════════════
   VENTAS — Mejoras UX para cajero (jornadas largas, pantalla táctil)
   Agregado: Mayo 2026. No modifica estilos existentes del resto de la app.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Variables de ventas ─────────────────────────────────────────────────── */
#page-ventas {
  --v-bg:          #f4f5f7;
  --v-card:        #ffffff;
  --v-border:      #e4e2dd;
  --v-shadow:      0 2px 8px rgba(0,0,0,0.04);
  --v-text-main:   #1a1a1a;
  --v-text-muted:  #6b7280;
  --v-text-label:  #9ca3af;
  --v-green:       #137333;
  --v-green-bg:    #e6f4ea;
  --v-blue:        #1a4f8a;
  --v-blue-bg:     #e8f0fe;
  --v-amber-bg:    #fef7e0;
  --v-amber:       #b06000;
  --v-accent:      #1a73e8;
  --v-radius:      12px;
  --v-row-hover:   #f1f3f6;
  --v-row-active:  #e8f0fe;
  background: var(--v-bg);
}

/* ── Panel izquierdo ─────────────────────────────────────────────────────── */
#ventas-panel-izq {
  background: var(--v-bg);
}

/* ── Filtros: botones de período ─────────────────────────────────────────── */
#ventas-panel-izq button[onclick*="vSetPeriodo"] {
  transition: background .15s, border-color .15s, color .15s;
}
#ventas-panel-izq button[onclick*="vSetPeriodo"]:hover {
  border-color: #9ca3af !important;
  background: #f9fafb !important;
}

/* ── Cards de métricas ───────────────────────────────────────────────────── */
#ventas-panel-izq .stat-card {
  background: var(--v-card);
  border-color: var(--v-border);
  border-radius: var(--v-radius);
  box-shadow: var(--v-shadow);
  padding: 14px 16px;
  transition: box-shadow .15s;
}
#ventas-panel-izq .stat-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}
#ventas-panel-izq .stat-card .slabel {
  font-size: 10px;
  font-weight: 700;
  color: var(--v-text-label);
  letter-spacing: .6px;
  margin-bottom: 6px;
}
/* Resetear el 22px global — el tamaño real lo pone ventas.js inline */
#ventas-panel-izq .stat-card .sval {
  font-size: 18px;
  font-weight: 800;
  color: var(--v-text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Gráfico de medios de pago ───────────────────────────────────────────── */
#ventas-panel-izq svg { max-width: 560px; }
#ventas-panel-izq svg text {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Tabla de ventas — filas con más aire y hover claro ─────────────────── */
#ventas-panel-izq .venta-row {
  min-height: 46px;
  align-items: center;
  transition: background .12s;
}
#ventas-panel-izq .venta-row.clickable:hover {
  background: var(--v-row-hover) !important;
}
/* Fila seleccionada: línea azul izquierda + fondo azul traslúcido */
#ventas-panel-izq .venta-row[style*="outline"] {
  background: var(--v-row-active) !important;
  border-left: 3px solid var(--v-accent) !important;
  outline: none !important;
}

/* ── Badges de estado ────────────────────────────────────────────────────── */
/* Cerrada */
#ventas-panel-izq span[style*="#eaf3de"] {
  background: var(--v-green-bg) !important;
  color: var(--v-green) !important;
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 20px !important;
}
/* En cobro */
#ventas-panel-izq span[style*="#faeeda"] {
  background: var(--v-amber-bg) !important;
  color: var(--v-amber) !important;
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 20px !important;
}
/* Ocupada */
#ventas-panel-izq span[style*="#e6f1fb"] {
  background: var(--v-blue-bg) !important;
  color: var(--v-blue) !important;
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 20px !important;
}

/* ── Panel derecho — sidebar de detalle ──────────────────────────────────── */
#ventas-detalle-panel {
  background: #f4f5f7;
}

/* Card del ticket */
#ventas-detalle-panel > div,
#ventas-detalle-panel .ticket {
  box-shadow: var(--v-shadow);
}

/* Ticket: items del consumo */
#ventas-detalle-panel .ticket-items li {
  color: var(--v-text-main);
  border-bottom-color: #f3f4f6;
}

/* Filas de totales */
#ventas-detalle-panel .ticket-row {
  font-size: 13px;
}

/* Total cobrado — resaltar */
#ventas-detalle-panel .ticket-row--total {
  color: var(--v-text-main) !important;
}

/* Bloque medios de pago en vista — fondo diferenciado */
#ventas-detalle-panel #vd-pagos-panel {
  background: #f1f3f5;
  border-radius: 10px;
  border: 0.5px solid #e4e2dd;
  padding: 12px 14px;
  margin-top: 12px;
}
#ventas-detalle-panel #vd-pagos-panel [style*="font-weight:700"],
#ventas-detalle-panel #vd-pagos-panel [style*="font-weight: 700"] {
  color: var(--v-text-main) !important;
}

/* ── Botones de acción (Editar pagos / Reimprimir) ───────────────────────── */
#ventas-detalle-panel button {
  min-height: 44px;
  transition: background .15s, border-color .15s, transform .08s;
}
#ventas-detalle-panel button:hover {
  background: #f1f3f5 !important;
  border-color: #9ca3af !important;
}
#ventas-detalle-panel button:active {
  transform: scale(.98);
}

/* ── Editor de pagos — inputs y select ──────────────────────────────────── */
#ventas-detalle-panel select,
#ventas-detalle-panel input[type="text"] {
  transition: border-color .15s, box-shadow .15s;
}
#ventas-detalle-panel select:focus,
#ventas-detalle-panel input[type="text"]:focus {
  border-color: var(--v-accent) !important;
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
  outline: none;
}

/* Botón Guardar cambios */
#ventas-detalle-panel button[onclick*="_vGuardar"] {
  background: var(--v-text-main) !important;
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: .2px;
  border: none !important;
}
#ventas-detalle-panel button[onclick*="_vGuardar"]:hover {
  background: #333 !important;
  border: none !important;
}

/* ── Placeholder vacío ───────────────────────────────────────────────────── */
#ventas-detalle-panel [style*="border: 0.5px dashed"] {
  background: var(--v-card);
  border-radius: var(--v-radius);
}

/* ── Responsive: colapsar panel derecho en pantallas angostas ────────────── */
@media (max-width: 900px) {
  #ventas-detalle-panel {
    width: 320px !important;
  }
}
@media (max-width: 700px) {
  #rep-content {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  #ventas-panel-izq,
  #ventas-detalle-panel {
    width: 100% !important;
    height: auto !important;
    overflow-y: visible !important;
    border-left: none !important;
    border-top: 0.5px solid var(--v-border);
  }
}


/* ════════════════════════════════════════════════════════════════════════════
   MESAS — Layout split (panel izquierdo + plano derecho)
   Agregado: Mayo 2026
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Altura del split: solo navbar (58px) — sector-bar ahora está dentro del panel der ── */
#mesas-split {
  height: calc(100vh - 58px);
}

/* ── Panel izquierdo — flex column, sin overflow propio (lo maneja el contenido interno) ── */
#mesas-panel-izq {
  background: #f8fafc;
  border-right: 0.5px solid #d1d5db;
  /* overflow manejado por mesas-panel-body internamente */
}

/* panel-mode dentro del panel izquierdo — anular el max-width del modal */
#mesas-panel-body.panel-mode {
  max-width: 100% !important;
  border-radius: 0 !important;
  max-height: none !important;
  height: 100% !important;
}

/* El header de color del mozo en el panel izquierdo — sin border-radius superior */
#mesas-panel-body > div:first-child[style*="background"] {
  border-radius: 0 !important;
}

/* Botón × en el panel izquierdo */
#mesas-panel-body .modal-close {
  font-size: 18px;
}

/* El contenido del panel izquierdo es scrollable */
#mesas-panel-body {
  overflow-y: auto;
  flex: 1;
}

/* Estado libre/cuenta/cerrada — padding interno y scroll */
#mesas-panel-izq-inner > div:not(#mesas-panel-placeholder) {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ── Mesa activa — highlight en el plano ─────────────────────────────────── */
.mesa.mesa-activa {
  outline: 3px solid #1a73e8 !important;
  outline-offset: 2px;
  z-index: 3;
}

/* ── Panel derecho: flex column, barra de controles + scroll ─────────────── */
#mesas-panel-der {
  background: #f3f4f6;
}

/* Stats en mesas: mismo estilo que ventas */
#mesas-panel-der .stat-card {
  background: #fff;
  border-radius: 12px;
  border-color: #e4e2dd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ── Celdas vacías — limpias sin borde punteado visible ──────────────────── */
.celda-vacia {
  border-color: transparent !important;
  background: rgba(0,0,0,.025) !important;
}
.celda-vacia.edit-mode {
  border-color: rgba(255,255,255,.15) !important;
  border-style: dashed !important;
}

/* ── Floor grid dentro del panel derecho ────────────────────────────────── */
#mesas-panel-der .floor-grid {
  width: auto;
  max-width: 100%;
}

/* ── Responsive: en pantallas angostas apilar verticalmente ──────────────── */
@media (max-width: 800px) {
  #mesas-split {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  #mesas-panel-izq {
    width: 100% !important;
    border-right: none;
    border-bottom: 0.5px solid #d1d5db;
    max-height: 50vh;
  }
  #mesas-panel-der {
    overflow-y: visible;
  }
}

