/* pos.css -- pantalla de venta, inspirada en la de SmartFran pero limpia */

:root {
  --chrome: #e9edf1;
  --panel: #ffffff;
  --panel-2: #f4f6f8;
  --panel-3: #eef1f4;
  --ink: #1a2230;
  --muted: #5b6675;
  --line: #ccd3db;
  --line-suave: #e0e5ea;
  --azul: #2f6fed;
  --azul-fuerte: #1b52c4;
  --azul-suave: #e8f0fe;
  --rojo: #e4002b;
  --rojo-fuerte: #b80022;
  --verde: #1c8a4d;
  --amarillo: #f6d34a;
  --tb-fondo: #2b3444;
  --tb-texto: #c9d3e2;
  --sombra: 0 1px 2px rgba(20, 28, 40, .07), 0 4px 14px -6px rgba(20, 28, 40, .16);
  --radio: 10px;
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chrome: #10141b;
    --panel: #1a2029;
    --panel-2: #161b23;
    --panel-3: #202834;
    --ink: #e7ecf2;
    --muted: #9aa6b5;
    --line: #333d4b;
    --line-suave: #262e3a;
    --azul: #5b93ff;
    --azul-fuerte: #7dabff;
    --azul-suave: #1c2c48;
    --rojo: #ff3355;
    --rojo-fuerte: #ff5c77;
    --verde: #3cbf78;
    --tb-fondo: #05070a;
    --tb-texto: #aab6c6;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px -8px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --chrome: #10141b; --panel: #1a2029; --panel-2: #161b23; --panel-3: #202834;
  --ink: #e7ecf2; --muted: #9aa6b5; --line: #333d4b; --line-suave: #262e3a;
  --azul: #5b93ff; --azul-fuerte: #7dabff; --azul-suave: #1c2c48;
  --rojo: #ff3355; --rojo-fuerte: #ff5c77; --verde: #3cbf78;
  --tb-fondo: #05070a; --tb-texto: #aab6c6;
  --sombra: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px -8px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--fuente);
  background: var(--chrome);
  color: var(--ink);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ---------- barra de titulo ---------- */
.titlebar {
  flex: none;
  background: var(--tb-fondo);
  color: var(--tb-texto);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  letter-spacing: .01em;
}
.titlebar b { color: #fff; font-weight: 600; }
.tb-app { font-weight: 700; color: #fff; letter-spacing: .02em; }
.tb-sep { opacity: .4; }
.tb-reloj { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- toolbar ---------- */
.toolbar {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 7px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.tb-spacer { flex: 1; }
.tbtn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 62px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.tbtn svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.tbtn:hover { background: var(--panel-3); color: var(--ink); border-color: var(--line-suave); }
.tbtn:active { transform: translateY(1px); }

/* Botón de turno: rojo suave cuando hay turno abierto (acción = cerrar),
   verde cuando está cerrado (acción = abrir). */
.tbtn-turno { color: var(--rojo); }
.tbtn-turno.turno-cerrado { color: var(--verde); }
.tbtn-turno:hover { border-color: currentColor; background: color-mix(in srgb, currentColor 8%, transparent); }

/* ---------- layout principal ---------- */
.pos {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 356px;
  gap: 10px;
  padding: 10px;
}
.pos > section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- columna familias ---------- */
.familias-lista {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
}
.fam-btn {
  border: 1px solid var(--line-suave);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.fam-btn:hover { border-color: var(--azul); }
.fam-btn.activo {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}
.fam-btn .fam-conteo {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: .6;
  margin-top: 2px;
}
.fam-btn.activo .fam-conteo { opacity: .8; }

/* ---------- columna catálogo ---------- */
.catalogo-barra {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line-suave);
  align-items: center;
}
.buscador {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.buscador:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-suave); }
.buscador svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.buscador input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  padding: 9px 0;
  outline: none;
}
.lista-precios { display: flex; background: var(--panel-3); border-radius: 8px; padding: 3px; flex: none; }
.lista-precios .lp {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.lista-precios .lp.activo { background: var(--panel); color: var(--azul); box-shadow: var(--sombra); }
.lista-precios.mayorista .lp.activo { color: var(--rojo); }

.grilla {
  flex: 1;
  min-height: 130px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: min-content;
  gap: 8px;
  padding: 10px;
  align-content: start;
}
@media (max-width: 1120px) { .grilla { grid-template-columns: repeat(3, 1fr); } }

.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .08s, box-shadow .12s, border-color .12s;
  text-align: left;
  padding: 0;
}
.tile:hover { border-color: var(--azul); box-shadow: var(--sombra); }
.tile:active { transform: scale(.97); }
.tile-color {
  height: 10px;
  flex: none;
}
.tile-info { padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 3px; }
.tile-nombre {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}
.tile-precio { font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-precio .tp-kg { font-size: 10px; font-weight: 600; color: var(--muted); }
.tile.fav .tile-fav {
  position: absolute; top: 4px; right: 7px; color: var(--amarillo);
  font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.5);
  z-index: 1;
}
.grilla-nada { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }

.grilla-pag {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 7px;
  border-top: 1px solid var(--line-suave);
  font-size: 12px;
  color: var(--muted);
}
.grilla-pag button {
  width: 30px; height: 26px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: 7px;
  font-size: 15px;
  cursor: pointer;
}
.grilla-pag button:disabled { opacity: .35; cursor: default; }

/* ---------- carga manual ---------- */
.carga-manual {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px 12px;
}
.cm-nombre { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.cm-nombre.activo { color: var(--azul); }
.cm-campos { display: flex; gap: 8px; align-items: flex-end; }
.cm-campos label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  position: relative;
}
.cm-unidad {
  position: absolute; right: 0; top: 0;
  font-size: 9.5px; color: var(--azul); background: var(--azul-suave);
  padding: 1px 5px; border-radius: 5px;
}
.cm-campos input {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 7px;
  padding: 8px 9px;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.cm-campos input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-suave); }
.cm-campos input[readonly] { background: var(--panel-3); color: var(--muted); }
.cm-ok {
  flex: none;
  width: 46px; height: 38px;
  border: 1px solid var(--verde);
  background: var(--verde);
  color: #fff;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}
.cm-ok:hover { filter: brightness(1.06); }
.cm-ok:disabled { opacity: .4; cursor: default; }

/* ---------- columna ticket ---------- */
.col-ticket { background: var(--panel); }
.ticket-cab {
  flex: none;
  padding: 10px;
  border-bottom: 1px solid var(--line-suave);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cliente {
  border: 1px dashed var(--line);
  background: var(--panel-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  text-align: left;
}
.cliente:hover { border-color: var(--azul); border-style: solid; }

.club-grido {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.club-grido .cg-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line); flex: none;
}
.club-grido:hover { border-color: var(--rojo); }
.club-grido.activo { background: color-mix(in srgb, var(--rojo) 12%, transparent); border-color: var(--rojo); color: var(--rojo); }
.club-grido.activo .cg-dot { background: var(--rojo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rojo) 25%, transparent); }

.canal, .medios, .lista-precios { -webkit-user-select: none; user-select: none; }
.canal { display: flex; gap: 4px; }
.canal .cn {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 4px;
  border-radius: 7px;
  cursor: pointer;
}
.canal .cn.activo { background: var(--ink); border-color: var(--ink); color: var(--panel); }

.ticket-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-suave);
}
.tg-head, .tg-fila {
  display: grid;
  grid-template-columns: 1fr 46px 66px 72px 26px;
  gap: 4px;
  align-items: center;
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
}
.tg-head {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-suave);
}
.tg-head span:not(:first-child), .tg-fila span:not(.tgf-detalle) { text-align: right; }
.tg-body { flex: 1; min-height: 0; overflow-y: auto; }
.tg-vacio { color: var(--muted); text-align: center; padding: 30px 0; font-size: 13px; }
.tg-fila {
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-suave);
  cursor: pointer;
}
.tg-fila:hover { background: var(--panel-2); }
.tg-fila.sel { background: var(--azul-suave); }
.tgf-detalle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgf-detalle small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
.tgf-total { font-weight: 800; }
.tgf-x {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px; border-radius: 4px;
}
.tgf-x:hover { color: var(--rojo); background: var(--panel-3); }

.ticket-total {
  flex: none;
  padding: 10px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-suave);
}
.tt-row { display: flex; align-items: baseline; justify-content: space-between; }
.tt-row > span:first-child { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.tt-monto {
  font-size: 30px;
  font-weight: 800;
  color: var(--rojo);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.tt-kilos { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; min-height: 0; }
.tt-descuento {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  border: 1px dashed var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tt-descuento:hover { border-color: var(--azul); border-style: solid; }
.tt-descuento b { color: var(--muted); font-weight: 700; }
.tt-descuento.activo { border-style: solid; border-color: var(--rojo); color: var(--rojo); }
.tt-descuento.activo b { color: var(--rojo); }

.medios {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
}
.medios .mp {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 7px;
  cursor: pointer;
}
.medios .mp.activo { background: var(--azul-suave); border-color: var(--azul); color: var(--azul-fuerte); }

.ticket-acciones { flex: none; display: flex; gap: 8px; padding: 0 10px 12px; }
.btn-confirmar {
  flex: 1;
  border: none;
  background: var(--rojo);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 15px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px -4px var(--rojo);
}
.btn-confirmar:hover { background: var(--rojo-fuerte); }
.btn-confirmar:disabled { background: var(--line); color: var(--muted); box-shadow: none; cursor: default; }
.btn-cancelar {
  flex: none;
  width: 52px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-cancelar:hover { color: var(--rojo); border-color: var(--rojo); }

/* ---------- modal ---------- */
.modal-fondo {
  position: fixed; inset: 0;
  background: rgba(10, 14, 22, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 40;
}
.modal {
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 20px 60px -12px rgba(0,0,0,.4);
  width: 100%; max-width: 460px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line-suave);
}
.modal-cab h2 { margin: 0; font-size: 16px; }
.modal-x { border: none; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-cuerpo { padding: 16px 18px; overflow-y: auto; }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.res-card {
  background: var(--panel-2);
  border: 1px solid var(--line-suave);
  border-radius: 10px;
  padding: 12px;
}
.res-card .rc-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.res-card .rc-valor { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 3px; }
.res-medios { border-top: 1px solid var(--line-suave); padding-top: 12px; }
.res-medios h3 { font-size: 12px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.res-medio-fila { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line-suave); }
.res-medio-fila:last-child { border: none; }

/* ---------- modal abrir turno ---------- */
.modal-abrir { max-width: 400px; }
.modal-pie {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-top: 1px solid var(--line-suave);
}
.ma-nota { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.ma-campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ma-campo label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ma-campo input {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none;
}
.ma-campo input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-suave); }
.ma-campo input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.btn-sec-pos, .btn-pri-pos {
  border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-sec-pos { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); }
.btn-pri-pos { background: var(--verde); border: 1px solid var(--verde); color: #fff; }
.btn-pri-pos:hover { filter: brightness(1.06); }
.btn-pri-pos:disabled { opacity: .5; cursor: default; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--verde);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 100px;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 60;
}
.toast.mostrar { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--rojo); }

/* ---------- movimientos de caja ---------- */
.modal-movcaja { max-width: 480px; }
.mc-totales {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.mc-totales > div {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line-suave);
  border-radius: 8px; padding: 8px 10px;
}
.mc-totales span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.mc-totales b { font-size: 15px; font-variant-numeric: tabular-nums; }
.mc-totales .mc-ingresos b { color: var(--verde); }
.mc-totales .mc-egresos b { color: var(--rojo); }

.mc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-suave);
  border-radius: 10px;
  margin-bottom: 14px;
}
.mc-sentido { grid-column: 1 / -1; display: flex; gap: 4px; background: var(--panel-3); padding: 3px; border-radius: 7px; }
.mc-sentido .mc-s { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 7px; border-radius: 6px; }
.mc-sentido .mc-s.activo[data-sentido="egreso"] { background: var(--rojo); color: #fff; }
.mc-sentido .mc-s.activo[data-sentido="ingreso"] { background: var(--verde); color: #fff; }
.mc-form select, .mc-form input {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 7px; padding: 8px 9px; font-size: 13px; font-family: inherit; outline: none;
}
.mc-form select:focus, .mc-form input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-suave); }
.mc-form #mcImporte { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.mc-form .btn-pri-pos { grid-column: 1 / -1; }

.mc-lista { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.mc-fila {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-suave); border-radius: 8px; padding: 8px 10px; font-size: 12.5px;
}
.mc-fila .mc-icono { flex: none; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.mc-fila.ingreso .mc-icono { background: var(--verde); }
.mc-fila.egreso .mc-icono { background: var(--rojo); }
.mc-fila .mc-info { flex: 1; }
.mc-fila .mc-concepto { font-weight: 700; }
.mc-fila .mc-detalle { color: var(--muted); font-size: 11px; }
.mc-fila .mc-importe { font-weight: 800; font-variant-numeric: tabular-nums; }
.mc-fila.ingreso .mc-importe { color: var(--verde); }
.mc-fila.egreso .mc-importe { color: var(--rojo); }
.mc-fila .mc-x { border: none; background: none; color: var(--muted); font-size: 13px; padding: 2px 4px; }
.mc-fila .mc-x:hover { color: var(--rojo); }
.mc-vacio { color: var(--muted); font-size: 12.5px; text-align: center; padding: 14px; }

/* ---------- cliente ---------- */
.cl-resultados { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 220px; overflow-y: auto; }
.cl-item {
  text-align: left; border: 1px solid var(--line-suave); background: var(--panel-2);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer;
}
.cl-item:hover { border-color: var(--azul); }
.cl-item b { display: block; }
.cl-item small { color: var(--muted); }
.cl-fila { display: flex; gap: 10px; }
.cl-fila .ma-campo { flex: 1; }

/* ---------- ticket de venta imprimible ---------- */
.modal-ticket { max-width: 340px; }
.ti-recibo { font-family: "Courier New", ui-monospace, monospace; font-size: 12.5px; color: var(--ink); }
.ti-cab { text-align: center; margin-bottom: 10px; }
.ti-sucursal { font-size: 15px; font-weight: 800; text-transform: uppercase; }
.ti-meta { color: var(--muted); font-size: 11.5px; }
.ti-sep { border-top: 1px dashed var(--line); margin: 8px 0; }
.ti-linea {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  padding: 3px 0; align-items: baseline;
}
.ti-linea .ti-detalle { grid-column: 1; }
.ti-linea .ti-cant { grid-column: 1 / -1; color: var(--muted); font-size: 11px; padding-left: 8px; }
.ti-linea .ti-total { grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ti-linea.ti-cabecera { font-weight: 700; }
.ti-linea.ti-grande { font-size: 15px; font-weight: 800; }
.ti-cg { text-align: center; font-weight: 800; margin-top: 8px; color: var(--azul-fuerte); }
.ti-pie { text-align: center; color: var(--muted); font-size: 11px; margin-top: 12px; }

@media print {
  .titlebar, .toolbar, .pos, .toast, .modal-x, .modal-pie { display: none !important; }
  .modal-fondo { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: none; }
}

[hidden] { display: none !important; }
