/* SincroPOS — tema oscuro táctil */
:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #273549;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --green: #22c55e;
  --green-dark: #16a34a;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
input, textarea, select { user-select: text; }

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel-2);
  transition: filter .1s, transform .05s;
}
button:active { transform: scale(.97); filter: brightness(1.15); }
button:disabled { opacity: .4; pointer-events: none; }

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

.btn { padding: 14px 20px; font-size: 16px; font-weight: 600; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-green { background: var(--green-dark); color: #fff; }
.btn-red { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }

.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-wrap {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top, #1e3a5f 0%, var(--bg) 60%);
}
.login-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px; width: 380px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 16px;
}
.login-card h1 { font-size: 26px; text-align: center; }
.login-card h1 span { color: var(--accent); }
.login-card .error { color: var(--red); font-size: 14px; text-align: center; min-height: 18px; }

/* ---------- Layout caja ---------- */
.caja {
  display: grid;
  grid-template-rows: 60px 1fr;
  height: 100vh;
  overflow: hidden;
}
.topbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 0 14px;
}
.topbar .brand { font-weight: 700; font-size: 18px; white-space: nowrap; }
.topbar .brand span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.chip {
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap;
}
.chip.ok { border-color: var(--green); color: var(--green); }
.chip.warn { border-color: var(--amber); color: var(--amber); }
.badge {
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 12px; padding: 1px 8px; margin-left: 6px; font-weight: 700;
}

.main {
  display: grid;
  grid-template-columns: 1fr 470px;
  overflow: hidden;
}
/* En pantallas chicas (tablet) el catálogo necesita el espacio */
@media (max-width: 1100px) { .main { grid-template-columns: 1fr 370px; } }

/* ---------- Panel catálogo ---------- */
.catalogo { display: flex; flex-direction: column; overflow: hidden; padding: 12px; gap: 10px; }
.cat-header { display: flex; align-items: center; gap: 10px; }
.cat-header h2 { font-size: 18px; flex: 1; text-align: center; }
.btn-volver { padding: 12px 22px; font-size: 16px; background: var(--amber); color: #111; font-weight: 700; }
.grid-botones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  overflow-y: auto;
  align-content: start;
  padding-bottom: 20px;
}
.btn-cat, .btn-prod {
  min-height: 86px; padding: 10px; font-size: 16px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  text-transform: uppercase;
}
.btn-cat { border-left: 5px solid var(--accent); font-size: 17px; }
/* ★ FAVORITOS: primera del grid y visualmente distinta (como en Restofy) */
.btn-cat-fav { border-left-color: var(--amber); color: var(--amber); }
.btn-prod { position: relative; }
.btn-prod .precio { color: var(--accent); font-size: 15px; font-weight: 600; }
/* Estrella para marcar favorito sin salir de la pantalla de venta. El área
   táctil es generosa a propósito: se toca con el pulgar sin abrir el producto. */
.btn-prod .fav-btn {
  position: absolute; top: 0; right: 0; width: 36px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; color: var(--muted); opacity: .55;
}
.btn-prod .fav-btn.on { color: var(--amber); opacity: 1; }
.btn-prod .fav-btn:active { transform: scale(1.25); }

/* ---------- Panel pedido ---------- */
.pedido {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border-left: 1px solid var(--border);
}
/* La cabecera se mantiene lo más baja posible: cada píxel que gasta aquí es
   una línea menos de pedido visible, que es lo que el cajero necesita leer. */
.pedido-head { padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.pedido-head .fila { display: flex; gap: 8px; align-items: center; }
.pedido-head input { padding: 9px 12px; }
.pedido-num { font-weight: 700; color: var(--amber); white-space: nowrap; font-size: 14px; }
.btn-mini {
  flex: 0 0 auto; width: 44px; height: 40px; font-size: 18px;
  border: 1px solid var(--border); border-radius: 10px;
}
.btn-mini.activo { background: var(--accent); color: #fff; border-color: var(--accent); }

.fila-puestos { display: flex; gap: 8px; align-items: flex-start; }
.puestos { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.puesto-chip {
  min-width: 50px; height: 42px; border-radius: 10px; font-size: 16px; font-weight: 700;
  border: 1px solid var(--border);
}
.puesto-chip.activo { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-canal {
  flex: 0 0 auto; padding: 0 12px; height: 42px; font-size: 15px; font-weight: 700;
  background: transparent; border: 2px dashed var(--border); color: var(--muted);
  white-space: nowrap;
}
.btn-canal.activo {
  background: var(--amber); color: #111; border: 2px solid var(--amber); border-style: solid;
}

/* Lista del pedido: letra grande (el cajero la lee de lejos para repetir lo
   que pidió el cliente) pero filas bajas, para que quepan ~10-12 renglones. */
.items { flex: 1; overflow-y: auto; padding: 0 6px; scrollbar-width: thin; }
.items::-webkit-scrollbar { width: 10px; }
.items::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 8px; }
.item-row {
  display: grid; grid-template-columns: 38px 1fr auto auto; gap: 8px;
  align-items: center; padding: 5px 4px;
  border-bottom: 1px solid var(--border);
}
.item-row.sin-puestos { grid-template-columns: 1fr auto auto; }
.item-row .nota-btn {
  background: transparent; border: none; cursor: pointer; font-size: 15px;
  padding: 0 4px; opacity: .75; vertical-align: middle;
}
.item-row .nota-btn:active { transform: scale(.9); }
.item-row .nota-txt {
  display: block; font-size: 12.5px; color: var(--amber); font-weight: 600; margin-top: 2px;
}
.nota-rapidas { display: flex; flex-wrap: wrap; gap: 6px; }
.nota-chip {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 999px; font-size: 14px;
}
#nota-texto { width: 100%; resize: vertical; }

.menu-vacio {
  grid-column: 1 / -1; text-align: center; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.menu-vacio p { font-size: 17px; }
.menu-vacio .btn { min-height: 54px; padding: 0 28px; }
.item-row .p-badge {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; text-align: center; padding: 6px 0; font-weight: 700; font-size: 13px;
}
.item-row .nombre { font-size: 17px; font-weight: 700; line-height: 1.15; }
.item-row .nombre .dom { color: var(--amber); font-weight: 700; }
.item-row .cant { display: flex; align-items: center; gap: 4px; }
.item-row .cant button {
  width: 34px; height: 34px; font-size: 18px; font-weight: 700; border-radius: 9px;
}
.item-row .total { font-weight: 700; text-align: right; min-width: 74px; font-size: 16px; }
.item-row .del { color: var(--red); background: transparent; font-size: 17px; width: 32px; height: 34px; }
.item-row.pendiente { background: rgba(14,165,233,.07); }
/* Barra verde = ya salió para la cocina (borrarlo pide confirmación) */
.item-row.comandado { box-shadow: inset 3px 0 0 var(--green); }
.items .vacio { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 15px; }

.pedido-footer { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.total-grande { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.total-grande > span:first-of-type { flex: 1; font-weight: 600; }
.total-grande .valor { font-size: 32px; font-weight: 800; color: var(--green); }
.btn-limpiar {
  flex: 0 0 auto; width: 38px; height: 38px; font-size: 16px; border-radius: 10px;
  background: transparent; border: 1px solid var(--red); color: var(--red);
}
.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acciones .btn { min-height: 56px; font-size: 17px; }
.acciones .full { grid-column: 1 / -1; }

/* ---------- Modales ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  width: 560px; max-width: 94vw; max-height: 92vh; overflow-y: auto;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.modal h3 { font-size: 20px; }
.modal .fila { display: flex; gap: 10px; align-items: center; }
.modal .fila > * { flex: 1; }
.modal-close { position: sticky; float: right; background: transparent; font-size: 22px; color: var(--muted); }

/* ---------- Aviso de licencia (demo / modo consulta) ---------- */
.lic-modal { width: 460px; text-align: center; gap: 0; padding: 28px 26px; }
.lic-kicker {
  align-self: center; font-size: 11px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: #fff; background: var(--accent);
  border-radius: 100px; padding: 5px 14px; margin-bottom: 16px;
}
.lic-kicker.gris { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.lic-kicker.rojo { background: var(--amber); color: #1a1205; }
.lic-dias { font-size: 54px; font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.lic-dias-lab { font-size: 13px; color: var(--muted); margin-top: 5px; margin-bottom: 18px; }
.lic-titulo { font-size: 19px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.lic-titulo .fecha { color: var(--accent); }
.lic-texto { font-size: 14px; color: var(--muted); line-height: 1.65; }
.lic-texto b { color: var(--text); font-weight: 700; }
.lic-barra { height: 7px; border-radius: 100px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; margin: 18px 0 8px; }
.lic-barra i { display: block; height: 100%; background: var(--accent); }
.lic-pie { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.lic-btn { margin-top: 20px; min-height: 50px; font-size: 16px; font-weight: 700; background: var(--accent); color: #fff; }
.lic-btn:disabled { opacity: 1; background: var(--panel-2); color: var(--muted); pointer-events: none; }
/* cinta permanente cuando la empresa quedó en modo consulta */
.lic-cinta {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 8px 14px; background: var(--amber); color: #1a1205;
  font-size: 13px; font-weight: 700; text-align: center;
}

.medios-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-medio { min-height: 56px; font-size: 16px; font-weight: 700; border: 1px solid var(--border); }
.btn-medio.activo { background: var(--accent); color: #fff; }
.billetes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.billetes button { min-height: 48px; font-weight: 700; }
.cambio-linea { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; }
.cambio-linea .ok { color: var(--green); }
.cambio-linea .falta { color: var(--red); }

.lista-abiertos { display: flex; flex-direction: column; gap: 8px; }
.pedido-abierto {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  text-align: left; padding: 14px; border: 1px solid var(--border);
}
.pedido-abierto .num { color: var(--amber); font-weight: 800; font-size: 17px; }
.pedido-abierto .tot { font-weight: 700; color: var(--green); }

table.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tabla th, table.tabla td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
table.tabla td.num, table.tabla th.num { text-align: right; }

/* ---------- Impresión 80mm ---------- */
#print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area {
    display: block !important;
    position: absolute; left: 0; top: 0;
    width: 72mm;
    color: #000; background: #fff;
    font-family: 'Courier New', monospace;
    font-size: 11px;
  }
  @page { margin: 2mm; size: 80mm auto; }
}
#print-area .t-center { text-align: center; }
#print-area .t-right { text-align: right; }
#print-area .t-bold { font-weight: bold; }
#print-area .t-grande { font-size: 14px; font-weight: bold; }
#print-area hr { border: none; border-top: 1px dashed #000; margin: 4px 0; }
#print-area table { width: 100%; border-collapse: collapse; font-size: 11px; }
#print-area td { padding: 1px 0; vertical-align: top; }
#print-area .puesto-titulo { font-weight: bold; margin-top: 4px; }

/* ---------- Comanda de cocina: grande y en NEGRILLA ---------- */
#print-area .comanda { font-weight: bold; }
#print-area .comanda .cmd-titulo { text-align: center; font-size: 17px; font-weight: bold; }
#print-area .comanda .cmd-canal {
  text-align: center; font-size: 16px; font-weight: bold;
  border: 2px solid #000; padding: 3px; margin: 5px 0;
}
#print-area .comanda .cmd-adicion { text-align: center; font-size: 15px; font-weight: bold; margin: 4px 0; }
/* El localizador (mesa / nombre / referencia): lo más visible de la comanda */
#print-area .comanda .cmd-localizador {
  text-align: center; font-size: 30px; font-weight: bold; line-height: 1.1;
  border: 3px solid #000; padding: 8px 4px; margin: 7px 0; word-break: break-word;
}
#print-area .comanda .cmd-meta { font-size: 11px; font-weight: normal; margin: 2px 0; }
#print-area .comanda .cmd-domicilio {
  font-size: 14px; font-weight: bold; text-align: center;
  border: 2px solid #000; padding: 5px; margin: 5px 0;
}
#print-area .comanda .cmd-sep { border-top: 2px solid #000; margin: 6px 0; }
#print-area .comanda .cmd-puesto {
  font-size: 15px; font-weight: bold; margin: 8px 0 3px;
  border-bottom: 2px solid #000; padding-bottom: 2px;
}
#print-area .comanda .cmd-items { font-size: 20px; font-weight: bold; }
#print-area .comanda .cmd-items td { padding: 3px 0; line-height: 1.25; }
#print-area .comanda .cmd-items .cmd-cant {
  width: 40px; font-size: 22px; font-weight: bold; vertical-align: top;
}
#print-area .comanda .cmd-items .cmd-nom { padding-left: 6px; }
#print-area .comanda .cmd-items .cmd-nota {
  font-size: 15px; font-weight: bold; padding-left: 6px; text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Mapa de mesas y habitaciones (restaurante de hotel)
--------------------------------------------------------------------------- */
.vista-mesas {
  position: fixed; inset: 56px 0 0 0; z-index: 30;
  background: var(--bg); overflow-y: auto; padding: 16px 20px 28px;
}
.mesas-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mesas-top h2 { font-size: 20px; }
.zona-titulo {
  font-size: 13px; letter-spacing: 2px; color: var(--muted);
  margin: 16px 0 8px; border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
.mesas-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px;
}
.mesa-card {
  border-radius: 12px; padding: 10px 8px; min-height: 86px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid transparent; font-weight: 700; font-size: 15px;
  background: var(--green-dark); color: #fff;
}
.mesa-card .m-icono { font-size: 20px; }
.mesa-card .m-sub { font-size: 12px; font-weight: 500; opacity: .9; }
.mesa-card.ocupada { background: var(--red); }
.mesa-card.ocupada .m-sub { font-weight: 700; }
.mesa-card:active { transform: scale(.97); }

.mesa-badge {
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}

/* Propina en el modal de cobro */
.propina-chips { display: flex; gap: 8px; align-items: center; }
.propina-chips .prop-chip {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 14px;
}
.propina-chips .prop-chip.activo { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.propina-chips input { width: 130px; }
.cambio-linea.total-pagar span:last-child { color: var(--green); }

/* Tiquete: banner de cortesía y precuenta */
#print-area .banner-doc {
  text-align: center; font-weight: bold; font-size: 13px;
  border: 2px solid #000; padding: 4px; margin: 5px 0;
}

/* Opción elegida de un ítem (ej. la bebida del desayuno) */
.item-row .opcion-txt {
  display: block; font-size: 12.5px; color: var(--accent); font-weight: 600; margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   Vista móvil (celular del mesero) — réplica del flujo Restofy en el teléfono
--------------------------------------------------------------------------- */
/* Botón flotante del carrito y botón "volver al menú": solo existen en móvil */
.fab { display: none; }
.btn-cerrar-pedido { display: none; }

/* Aviso no bloqueante (toast) */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--green);
  border-radius: 12px; padding: 12px 18px; font-size: 14.5px; font-weight: 600;
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 92vw; text-align: center;
}
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--amber); color: var(--amber); }

@media (max-width: 700px) {
  /* Topbar en una sola fila con scroll horizontal (patrón app móvil) */
  .caja { grid-template-rows: 52px 1fr; }
  .topbar { overflow-x: auto; padding: 0 8px; gap: 6px; scrollbar-width: none; }
  .topbar::-webkit-scrollbar { display: none; }
  .topbar .brand { font-size: 15px; }
  .chip { padding: 6px 10px; font-size: 12.5px; flex: 0 0 auto; }

  .main { grid-template-columns: 1fr; }
  .catalogo { padding: 8px; }
  .cat-header h2 { font-size: 15px; }
  .btn-volver { padding: 10px 14px; font-size: 14px; }
  .grid-botones {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px; padding-bottom: 90px;   /* deja aire para el botón flotante */
  }
  .btn-cat, .btn-prod { min-height: 72px; font-size: 13.5px; padding: 8px 6px; }
  .btn-cat { font-size: 14.5px; }
  .btn-prod .precio { font-size: 13px; }

  /* El panel del pedido se vuelve una capa completa que entra desde la derecha */
  .pedido {
    position: fixed; inset: 0; z-index: 40; border-left: none;
    transform: translateX(102%); transition: transform .18s ease;
  }
  body.pedido-abierto .pedido { transform: translateX(0); }
  .btn-cerrar-pedido { display: block; font-size: 20px; }
  .item-row .nombre { font-size: 15px; }
  .item-row .total { min-width: 64px; font-size: 15px; }
  .total-grande .valor { font-size: 26px; }
  .acciones .btn { min-height: 52px; font-size: 15px; }

  .fab {
    display: flex; align-items: center; gap: 10px;
    position: fixed; right: 12px; bottom: 12px; z-index: 35;
    background: var(--green-dark); color: #fff;
    border-radius: 999px; padding: 14px 18px;
    font-size: 15px; font-weight: 800;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  }
  .fab .fab-n {
    background: rgba(255, 255, 255, .25); border-radius: 999px;
    padding: 2px 10px; font-size: 13px;
  }

  /* Mapa de mesas bajo la topbar compacta */
  .vista-mesas { inset: 52px 0 0 0; padding: 10px 12px 20px; }
  .mesas-top { flex-wrap: wrap; }
  .mesas-top h2 { font-size: 16px; }
  .mesas-top .btn { padding: 10px 12px; font-size: 13.5px; }
  .mesas-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .mesa-card { min-height: 72px; font-size: 13px; padding: 8px 6px; }
  .mesa-card .m-icono { font-size: 17px; }

  .modal { width: 100%; max-width: 96vw; padding: 14px; gap: 10px; }
  .medios-grid { grid-template-columns: 1fr; }
  .billetes { grid-template-columns: repeat(3, 1fr); }
}

/* Celular acostado (como usan Restofy en el video): dos columnas compactas */
@media (max-height: 500px) and (min-width: 701px) {
  .caja { grid-template-rows: 44px 1fr; }
  .topbar { overflow-x: auto; padding: 0 8px; gap: 6px; scrollbar-width: none; }
  .chip { padding: 5px 10px; font-size: 12px; flex: 0 0 auto; }
  .main { grid-template-columns: 1fr 300px; }
  .catalogo { padding: 8px; }
  .grid-botones { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
  .btn-cat, .btn-prod { min-height: 62px; font-size: 13px; padding: 6px; }
  .pedido-head { padding: 6px 8px; gap: 6px; }
  .item-row .nombre { font-size: 14px; }
  .total-grande .valor { font-size: 22px; }
  .acciones .btn { min-height: 44px; font-size: 14px; }
  .pedido-footer { padding: 6px 8px; gap: 6px; }
  .vista-mesas { inset: 44px 0 0 0; padding: 8px 12px 16px; }
  .mesas-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .mesa-card { min-height: 64px; font-size: 13px; }
}

/* Búsqueda de terceros en el cobro: el cajero escribe cédula o nombre y elige
   de la lista, sin salir de la pantalla de la factura. */
.sugerencias {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  max-height: 220px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.sugerencias .sug {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
}
.sugerencias .sug:last-child { border-bottom: none; }
.sugerencias .sug:hover, .sugerencias .sug.activa { background: var(--panel-2); }
.sugerencias .sug .doc { font-size: 12px; opacity: .7; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sugerencias .vacio { padding: 10px 12px; opacity: .7; font-size: 13px; }
