/* app.css — componentes de la app. NO define colores propios: lee las variables
   de theme.css. Estética mostrador: claro, alto contraste, botones grandes,
   listo para touch y para mouse/teclado. */

* { box-sizing: border-box; }
html { font-size: var(--fs-root); }
body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--texto);
  line-height: 1.4;
  transition: background .18s ease;
}
h1, h2, h3 { margin: 0; font-weight: var(--fw-bold); }
button { font-family: inherit; font-size: 1rem; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--color-acento); }

/* Foco visible para teclado (no depende de hover) */
:focus-visible {
  outline: 3px solid var(--color-acento);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; row-gap: 10px;
  background: var(--surface);
  border-top: var(--topbar-strip) solid var(--color-principal);
  border-bottom: 1px solid var(--border);
  padding: 10px var(--content-pad-x); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 10;
}
/* min-width:0 → los grupos (marca/estado) ENVUELVEN dentro de la topbar en vez de
   desbordarse y quedar cortados contra el borde derecho. */
.topbar > * { min-width: 0; }
.topbar .brand { font-size: 1.15rem; font-weight: var(--fw-bold); color: var(--color-principal); }
.topbar .spacer { flex: 1 1 0; }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-muted); font-weight: var(--fw-semibold); }

/* Botonera de MARCA (reemplaza al desplegable) */
.marca-botonera { display: flex; gap: 8px; flex-wrap: wrap; }
.marca-btn {
  min-height: var(--touch); padding: 0 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface); color: var(--texto);
  font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: 8px;
  transition: background .12s, border-color .12s, color .12s;
}
.marca-btn:hover { border-color: var(--color-acento); }
.marca-btn.active { background: var(--color-acento); color: var(--acento-ink); border-color: var(--color-acento); }
.marca-btn .marca-logo { height: 30px; width: auto; display: block; border-radius: 5px; background: #fff; padding: 2px; }
.marca-btn .marca-name { white-space: nowrap; }

select {
  font-size: 1rem; padding: var(--input-py) 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--texto); min-height: var(--touch-min);
}
input[type="text"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], textarea {
  font-size: 1rem; padding: var(--input-py) 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--texto); min-height: var(--touch);
  scroll-margin-bottom: 120px;   /* el teclado en pantalla no tapa el campo activo al enfocar */
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--color-acento); border-color: var(--color-acento); }

/* ---------- Botones ---------- */
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--texto);
  padding: var(--btn-py) var(--btn-px); border-radius: var(--radius-sm); min-height: var(--touch);
  font-size: var(--btn-fs); font-weight: var(--fw-semibold);
  transition: background .12s, border-color .12s, transform .04s;
}
.btn:hover { background: color-mix(in srgb, var(--color-acento) 8%, #fff); }
.btn:active { transform: translateY(1px); }   /* feedback táctil inmediato (no depende de hover) */
.btn-accent { background: var(--color-acento); color: var(--acento-ink); border-color: var(--color-acento); }
.btn-accent:hover { background: color-mix(in srgb, var(--color-acento) 85%, #000); }
/* ★ SE CAMBIA EL COLOR, NO SÓLO LA TRANSPARENCIA. Un `.btn-accent` al 50% sigue siendo del
     color del acento —apenas más claro— y se lee como apretable. El cursor ya avisaba, pero el
     cursor no existe en el teléfono, que es donde más se usa esto. Medido en la tienda el
     06/09: Christian creyó que el botón lo dejaba seguir. */
.btn:disabled, .btn-accent:disabled {
  opacity: 1; cursor: not-allowed; box-shadow: none;
  background: #E6E9EC; color: var(--texto-muted); border-color: transparent;
}
.btn:disabled, .btn-accent:disabled {
  background: color-mix(in srgb, var(--texto-muted) 16%, var(--surface));
}
.btn-lg { font-size: var(--btn-lg-fs); padding: var(--btn-lg-py) var(--btn-lg-px); min-height: var(--btn-lg-min); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--color-acento); min-height: var(--touch-min); }

.chip { background: var(--acento-soft); color: var(--texto); padding: 6px 12px; border-radius: var(--radius-pill); font-size: .82rem; font-weight: var(--fw-bold); }

/* Interruptor Modo PC ↔ Tablet: SEGMENTED (2 opciones visibles; la activa pintada). */
.modo-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface); }
.modo-opt {
  border: 0; background: transparent; color: var(--texto-muted); font-weight: var(--fw-bold);
  padding: 6px 14px; min-height: var(--touch-min); white-space: nowrap; font-size: .9rem;
}
.modo-opt + .modo-opt { border-left: 1px solid var(--border); }
.modo-opt:hover { background: color-mix(in srgb, var(--color-acento) 8%, #fff); }
.modo-opt.active { background: var(--color-acento); color: var(--acento-ink); }
.login-modo { position: fixed; top: 14px; right: 14px; z-index: 60; }

/* ---------- Popup (Pantalla 1) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 32, 58, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.popup { background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(16,32,58,.25); width: min(480px, 100%); padding: 26px; position: relative; }
/* X de cerrar (esquina sup. der. del modal) */
.popup-x {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  min-height: var(--touch-min); min-width: var(--touch-min); border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--texto-muted); font-size: 1.2rem; line-height: 1;
}
.popup-x:hover { background: var(--placeholder); color: var(--texto); }
.popup h2 { margin-bottom: 6px; }
.popup .sub { color: var(--texto-muted); margin-bottom: 18px; font-size: .92rem; }
.popup .row { display: flex; flex-direction: column; gap: 12px; }
.popup { max-height: 92vh; overflow: auto; }
.ficha { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ficha .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ficha textarea { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; font-family: inherit; resize: vertical; }
.ficha .hint { color: var(--texto-muted); font-size: .82rem; }
.envio-row { display: flex; justify-content: space-between; color: var(--texto-muted); font-size: .95rem; margin-bottom: 8px; }
.hidden { display: none !important; }
.msg { font-size: .9rem; padding: 8px 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* ---------- Pantalla 2 — armado (3 columnas) ---------- */
/* ⚠️ `minmax(0, 1fr)` Y NO `1fr`. Un `1fr` a secas NO SE ACHICA por debajo de su contenido:
   la grilla de productos pide 190px por celda y, cuando no entraban, la columna del medio
   empujaba el panel del Pedido FUERA de la pantalla. En una tablet de 820px se iba 6px, y esos
   6px son el borde del botón «Continuar al cierre» — el que hay que apretar. No daba ningún
   error: simplemente había que arrastrar la pantalla de costado, parado, con las manos llenas.
   Lo encontró el recorrido con navegador. */
.armado { display: grid; grid-template-columns: 220px minmax(0, 1fr) 350px; gap: var(--sp-3); padding: var(--sp-3) var(--content-pad-x); max-width: var(--content-max-pc); margin-inline: auto; align-items: start; }

/* Y en tablet angosta el panel del pedido se achica antes de que nada se salga. Debajo de 700px
   —un celular de costado— las tres columnas se apilan: el pedido queda abajo, siempre alcanzable. */
@media (max-width: 900px) {
  .armado { grid-template-columns: 180px minmax(0, 1fr) 290px; gap: var(--sp-2, 12px); }
}
@media (max-width: 700px) {
  .armado { grid-template-columns: 1fr; }
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel .panel-h { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: var(--fw-bold); font-size: .95rem; }
.panel .panel-b { padding: 12px; }

.cats { display: flex; flex-direction: column; gap: 8px; }
.cat-btn { text-align: left; min-height: var(--touch); }
.cat-btn.active { background: var(--color-acento); color: var(--acento-ink); border-color: var(--color-acento); }

/* Placeholder neutro de imagen (mientras no haya assets reales) */
.thumb { width: 46px; height: 46px; flex: 0 0 46px; border-radius: var(--radius-sm); background: var(--placeholder); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.ph::after { content: "▧"; color: var(--placeholder-ink); font-size: 1.2rem; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.prod-tile { display: flex; align-items: center; gap: 10px; text-align: left; min-height: var(--touch); }
.prod-tile .p-info { display: flex; flex-direction: column; gap: 2px; }
.prod-tile .p-name { font-weight: var(--fw-semibold); }
.prod-tile .p-price { color: var(--texto-muted); font-size: .9rem; }
.prod-tile .p-add { margin-left: auto; font-size: 1.1rem; opacity: .55; }
.prod-tile:hover .p-add { opacity: 1; }
.searchbar { margin-bottom: 12px; }
.searchbar input { width: 100%; }
/* 20/10 (H05) · buscar por código: el buscador y el botón del teclado en la misma fila; el código en la tarjeta del plato */
.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; min-width: 0; }
.prod-tile .p-cod { font-variant-numeric: tabular-nums; }
.popup-codigo { width: min(360px, 100%); }
.cod-visor { font-size: 2rem; font-weight: var(--fw-bold); text-align: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.cod-teclas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.cod-teclas .btn { min-height: var(--touch); font-size: 1.3rem; }

/* Panel del pedido (derecha) */
.order .panel-b { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow: auto; }
.order-cat-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-muted); font-weight: var(--fw-bold); margin-bottom: 4px; }
.line { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.line .l-top { display: flex; justify-content: space-between; gap: 8px; }
.line .l-name { font-weight: var(--fw-semibold); }
.line .l-sub { color: var(--texto-muted); font-size: .9rem; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty button { width: var(--touch); height: var(--touch); border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: 1.3rem; line-height: 1; }
.qty .q { min-width: 34px; text-align: center; font-weight: var(--fw-bold); }
.note-btn { display: block; margin-top: 8px; padding-left: 0; font-size: .85rem; text-align: left; }
.line textarea { width: 100%; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; font-family: inherit; resize: vertical; min-height: 44px; }
.empty { color: var(--texto-muted); text-align: center; padding: 24px 0; }

.order-foot { border-top: 1px solid var(--border); padding: 14px 16px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.total-row .t-label { color: var(--texto-muted); font-weight: var(--fw-semibold); }
.total-row .t-val { font-size: 1.7rem; font-weight: var(--fw-bold); color: var(--color-principal); }
.order-foot .btn { width: 100%; }

/* ---------- Pantalla 3 — cierre ---------- */
.cierre-wrap { display: grid; grid-template-columns: 1fr 420px; gap: var(--sp-3); padding: var(--sp-3) var(--content-pad-x); max-width: var(--content-max-pc); margin-inline: auto; align-items: start; }
.detalle { width: 100%; border-collapse: collapse; }
.detalle th, .detalle td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.detalle th.r, .detalle td.r { text-align: right; white-space: nowrap; }
.detalle .nota { color: var(--texto-muted); }
.subtotal-row { display: flex; justify-content: space-between; padding: 12px 6px 0; font-weight: var(--fw-semibold); }

.cierre-form { display: flex; flex-direction: column; gap: 14px; }
.cf { display: flex; flex-direction: column; gap: 4px; font-weight: var(--fw-semibold); font-size: .9rem; }
.cf input[type="number"], .cf input[type="text"], .cf textarea { font-weight: var(--fw-normal); }
.cf .todo { color: var(--danger); font-weight: var(--fw-normal); font-size: .78rem; }
.cf .hint { color: var(--texto-muted); font-weight: var(--fw-normal); font-size: .78rem; }
.cf textarea { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; font-family: inherit; resize: vertical; }

fieldset.cf { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
fieldset.cf legend { font-size: .82rem; color: var(--texto-muted); padding: 0 6px; }
.pago-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pago-row .pago-medio { flex: 1; }
.pago-row .pago-monto { width: 130px; }
.pago-row .pago-del { min-height: var(--touch-min); padding: 0 14px; }

.toggle { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: var(--fw-semibold); }
.toggle input { width: 22px; height: 22px; }
fieldset.toggles { display: flex; flex-direction: column; gap: 10px; }

.totales { border-top: 2px solid var(--border); padding-top: 12px; }
.total-final { display: flex; justify-content: space-between; align-items: baseline; }
.total-final span:first-child { font-weight: var(--fw-bold); }
.total-final span:last-child { font-size: 1.7rem; font-weight: var(--fw-bold); color: var(--color-principal); }
.vuelto-row { display: flex; justify-content: space-between; color: var(--texto-muted); margin-top: 4px; }
.dl-row { display: flex; justify-content: space-between; color: var(--texto-muted); font-size: .95rem; padding: 2px 0; }
.cupon-row { display: flex; gap: 8px; }
.cupon-row input { flex: 1; }
.cupon-row select { width: 72px; }
.cierre-actions { display: flex; gap: 10px; }
.cierre-actions .btn { flex: 1; }

/* Renglón de AJUSTE (adicional manual) en las tablas de detalle */
tr.ajuste td { border-top: 1px dashed var(--border); font-style: italic; color: var(--texto-muted); }

/* ---------- Pantalla 4 — listado de comandas + estados ---------- */
.estado-filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.estado-btn {
  min-height: var(--touch-min); padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--texto);
  font-weight: var(--fw-semibold); font-size: .85rem; display: inline-flex; align-items: center; gap: 6px;
}
.estado-btn.active { border-color: var(--color-acento); background: var(--acento-soft); }
.estado-btn .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.listado-wrap { padding: var(--sp-3) var(--content-pad-x); max-width: var(--content-max-pc); margin-inline: auto; }
.listado-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.muted { color: var(--texto-muted); font-size: .9rem; }
.listado { display: block; }

/* ---------- Listado en 2 columnas (Mostrador | Delivery) con FILAS (estilo Datalive) ---------- */
.listado-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); align-items: start; }
.lst-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lst-col-h {
  padding: 10px 14px; font-weight: var(--fw-bold); font-size: .95rem; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.lst-col-h.mostrador { background: var(--color-principal); }
.lst-col-h.delivery  { background: var(--est-encamino-ink); }
.lst-col-h .lst-col-n { background: rgba(255,255,255,.25); border-radius: var(--radius-pill); padding: 1px 9px; font-size: .82rem; }
.lst-col-body { display: flex; flex-direction: column; }
.lst-empty { color: var(--texto-muted); text-align: center; padding: 22px 0; }

/* Una comanda = una FILA ancha. Franja de color por estado a la izquierda. */
.cmd-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "main total" "acc acc";
  align-items: center; column-gap: var(--sp-3); row-gap: 8px;
  padding: var(--cmd-row-gap-y) 14px var(--cmd-row-gap-y) 12px;
  border-left: 6px solid var(--estado-color, var(--color-principal));
  border-bottom: var(--cmd-divider);
}
.cmd-row:last-child { border-bottom: 0; }
.cmd-row.is-anulada { opacity: .72; }
.cmd-row.is-anulada .cmd-num, .cmd-row.is-anulada .row-total { text-decoration: line-through; }
.cmd-row[data-estado="Tomada"]     { --estado-color: var(--est-tomada-ink); }
.cmd-row[data-estado="En cocina"]  { --estado-color: var(--est-cocina-ink); }
.cmd-row[data-estado="Despachado"] { --estado-color: var(--est-despachado-ink); }
.cmd-row[data-estado="En camino"]  { --estado-color: var(--est-encamino-ink); }
.cmd-row[data-estado="Entregada"]  { --estado-color: var(--est-entregada-ink); }
.cmd-row[data-estado="Cobrada"]    { --estado-color: var(--est-cobrada-ink); }
.cmd-row[data-estado="Anulada"]    { --estado-color: var(--est-anulada-ink); }

.row-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--texto-muted); font-size: .9rem; }
.row-sub .cmd-cliente { color: var(--texto); }
.row-zona { color: var(--est-encamino-ink); font-weight: var(--fw-semibold); white-space: nowrap; }
.row-dir { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.row-total { grid-area: total; font-size: 1.35rem; font-weight: var(--fw-bold); color: var(--color-principal); white-space: nowrap; text-align: right; }
.row-acciones { grid-area: acc; display: flex; flex-wrap: wrap; gap: var(--gap-btns); }
/* En TABLET, Anular queda separado a la derecha (dedo). En PC va inline, en una sola
   fila con el resto (fiel a Datalive) — sin margin que lo empuje a otro renglón. */
:root[data-modo="tablet"] .row-acciones .btn-danger-ghost { margin-left: auto; }

@media (max-width: 720px) { .listado-cols { grid-template-columns: 1fr; } }

/* ---------- Pantalla de PRECIOS (cuenta costo + markup) ---------- */
.precio-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.precio-row { display: grid; grid-template-columns: 1fr 160px 120px 120px auto; align-items: center; gap: var(--sp-3);
  padding: var(--cmd-row-gap-y) 14px; border-bottom: var(--cmd-divider); }
.precio-row:last-child { border-bottom: 0; }
.pr-nombre { font-weight: var(--fw-semibold); min-width: 0; }
.pr-cat { color: var(--texto-muted); font-size: .88rem; }
.pr-precio { font-weight: var(--fw-bold); font-size: 1.15rem; color: var(--color-principal); text-align: right; }
.pr-tag { font-size: .72rem; font-weight: var(--fw-bold); padding: 3px 9px; border-radius: var(--radius-pill); text-align: center; }
.pr-tag.propio { background: var(--est-entregada-bg); color: var(--est-entregada-ink); }
.pr-tag.legacy { background: var(--placeholder); color: var(--texto-muted); }
@media (max-width: 820px) { .precio-row { grid-template-columns: 1fr auto; } .pr-cat, .pr-tag { display: none; } }

.precio-form { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 4px; }
.precio-form .pf-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.precio-form .pf-row strong { font-size: 1.2rem; color: var(--color-principal); }
.precio-form .cf { display: flex; flex-direction: column; gap: 4px; font-weight: var(--fw-semibold); font-size: .9rem; }

.cmd-card {
  background: var(--surface);
  /* Borde por ESTADO (color desde theme.css). Cambia solo al avanzar el estado
     porque el JS actualiza data-estado en la tarjeta. Fallback: color de marca. */
  border: 1px solid color-mix(in srgb, var(--estado-color, var(--border)) 40%, var(--surface));
  border-left: 6px solid var(--estado-color, var(--color-principal));
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.cmd-card[data-estado="Tomada"]     { --estado-color: var(--est-tomada-ink); }
.cmd-card[data-estado="En cocina"]  { --estado-color: var(--est-cocina-ink); }
.cmd-card[data-estado="Despachado"] { --estado-color: var(--est-despachado-ink); }
.cmd-card[data-estado="En camino"]  { --estado-color: var(--est-encamino-ink); }
.cmd-card[data-estado="Entregada"]  { --estado-color: var(--est-entregada-ink); }
.cmd-card[data-estado="Cobrada"]    { --estado-color: var(--est-cobrada-ink); }
.cmd-card[data-estado="Anulada"]    { --estado-color: var(--est-anulada-ink); }
.cmd-card.is-anulada { opacity: .72; }
.cmd-card.is-anulada .cmd-num, .cmd-card.is-anulada .cmd-total { text-decoration: line-through; }
.cmd-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmd-num { font-weight: var(--fw-bold); font-size: 1.6rem; line-height: 1.1; color: var(--color-principal); }   /* 19/10: el número de pedido se lee de un vistazo */
/* 19/10 · LA DEMORA CONTRA LA HORA PROMETIDA (src/Demora.php): a tiempo · se acerca · demorado (late) · sin hora. Igual en todas las pantallas. */
.dem { display: inline-block; font-weight: var(--fw-bold); border-radius: 6px; padding: 2px 8px; font-size: .95rem; white-space: nowrap; }
.dem-a_tiempo  { background: var(--rent-verde-bg);   color: var(--rent-verde-ink); }
.dem-se_acerca { background: var(--rent-naranja-bg); color: var(--rent-naranja-ink); }
.dem-demorado  { background: var(--rent-rojo-bg);    color: var(--rent-rojo-ink); animation: dem-late 1.2s ease-in-out infinite; }
.dem-sin_hora  { background: var(--acento-soft);     color: var(--texto); font-weight: 400; }
@keyframes dem-late { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .dem-demorado { animation: none; outline: 2px solid var(--rent-rojo-ink); } }
.num-pedido { font-weight: var(--fw-bold); font-size: 1.4em; color: var(--color-principal); }
.cmd-marca { font-weight: var(--fw-semibold); color: var(--texto-muted); }
.cmd-mid { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cmd-cliente { font-weight: var(--fw-semibold); }
.cmd-local { color: var(--texto-muted); font-size: .9rem; }
.cmd-dir { color: var(--texto-muted); font-size: .85rem; margin-top: -2px; }
.tipo-badge { font-size: .72rem; font-weight: var(--fw-bold); padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }
.tipo-badge.delivery { background: var(--est-encamino-bg); color: var(--est-encamino-ink); }
.tipo-badge.mostrador { background: var(--placeholder); color: var(--texto-muted); }
.cmd-bot { display: flex; justify-content: space-between; align-items: baseline; }
.cmd-tiempo { color: var(--texto-muted); font-size: .88rem; }
.cmd-total { font-size: 1.3rem; font-weight: var(--fw-bold); color: var(--color-principal); }
.cmd-acciones { display: flex; flex-wrap: wrap; gap: var(--gap-btns); border-top: 1px solid var(--border); padding-top: 10px; }
/* Acción destructiva separada de las frecuentes (empujada a la derecha). */
.cmd-acciones .btn-danger-ghost { margin-left: auto; }
.btn-sm { min-height: var(--btn-sm-min); padding: var(--btn-sm-py) var(--btn-sm-px); font-size: var(--btn-sm-fs); }
/* Ícono del botón de acción: se muestra en TABLET (dedo) y se OCULTA en PC
   (texto solo, fiel a Datalive). */
.btn-ico { margin-right: 5px; }
:root[data-modo="pc"] .btn-ico { display: none; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-danger-ghost { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--danger) 8%, #fff); }

/* Chip de estado — color por estado (data-estado) */
.estado-chip {
  padding: 4px 10px; border-radius: var(--radius-pill); font-size: .8rem; font-weight: var(--fw-bold);
  background: var(--placeholder); color: var(--texto);
}
.estado-chip[data-estado="Tomada"],     .dot[data-estado="Tomada"]     { background: var(--est-tomada-bg);     color: var(--est-tomada-ink); }
.estado-chip[data-estado="En cocina"],  .dot[data-estado="En cocina"]  { background: var(--est-cocina-bg);     color: var(--est-cocina-ink); }
.estado-chip[data-estado="Despachado"], .dot[data-estado="Despachado"] { background: var(--est-despachado-bg); color: var(--est-despachado-ink); }
.estado-chip[data-estado="En camino"],  .dot[data-estado="En camino"]  { background: var(--est-encamino-bg);   color: var(--est-encamino-ink); }
.estado-chip[data-estado="Entregada"],  .dot[data-estado="Entregada"]  { background: var(--est-entregada-bg);  color: var(--est-entregada-ink); }
.estado-chip[data-estado="Cobrada"],    .dot[data-estado="Cobrada"]    { background: var(--est-cobrada-bg);    color: var(--est-cobrada-ink); }
.estado-chip[data-estado="Anulada"],    .dot[data-estado="Anulada"]    { background: var(--est-anulada-bg);    color: var(--est-anulada-ink); }

/* Badge de cobro (eje independiente de la entrega) */
.cobro-badge { padding: 3px 9px; border-radius: var(--radius-pill); font-size: .74rem; font-weight: var(--fw-bold); }
.cobro-badge.paid   { background: var(--est-cobrada-bg); color: var(--est-cobrada-ink); }
.cobro-badge.unpaid { background: #f1f3f6; color: var(--texto-muted); border: 1px dashed var(--border); }

/* Modales del listado */
.popup-lg { width: min(560px, 100%); max-height: 88vh; overflow: auto; }
.popup-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.ver-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ver-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ver-row { display: flex; justify-content: space-between; padding: 4px 0; }
.ver-row.tot { font-weight: var(--fw-bold); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
.ver-h3 { margin: 16px 0 8px; font-size: .95rem; }
.ver-hist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ver-hist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ver-hora { color: var(--texto-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ver-motivo { font-style: italic; color: var(--texto); }
/* Historial: HORA prominente + relativo (Hoy/Ayer) + fecha DD/MM/AAAA */
.hist-tiempo { display: inline-flex; align-items: baseline; gap: 6px; }
.hist-hora { font-size: 1.2rem; font-weight: var(--fw-bold); color: var(--texto); font-variant-numeric: tabular-nums; }
.hist-rel { color: var(--texto-muted); font-size: .85rem; }

@media (max-width: 640px) { .listado { grid-template-columns: 1fr; } }

/* ---------- Login (PIN) ---------- */
.login-body { min-height: 100vh; display: flex; }
.login-wrap { margin: auto; width: 100%; display: flex; justify-content: center; padding: 24px; }
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-top: var(--topbar-strip) solid var(--color-principal);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(16,32,58,.18);
  width: min(420px, 100%); padding: 26px;
}
.login-brand { color: var(--color-principal); font-size: 1.3rem; text-align: center; }
.login-sub { color: var(--texto-muted); text-align: center; margin: 10px 0 16px; }

.user-tiles { display: flex; flex-direction: column; gap: 10px; }
.user-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: var(--user-tile-min); padding: 0 18px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--texto); font-weight: var(--fw-semibold); font-size: 1.05rem;
}
.user-tile:hover { border-color: var(--color-acento); }
.ut-nivel { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: var(--fw-bold);
  padding: 3px 10px; border-radius: var(--radius-pill); }
.ut-nivel.nivel-mostrador   { background: var(--est-tomada-bg);    color: var(--est-tomada-ink); }
.ut-nivel.nivel-encargado   { background: var(--est-cocina-bg);    color: var(--est-cocina-ink); }
.ut-nivel.nivel-socio       { background: var(--est-anulada-bg);   color: var(--est-anulada-ink); }
.ut-nivel.nivel-cocina      { background: var(--bg); color: var(--texto-muted); }

/* Puntitos del PIN */
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 8px 0 20px; }
.pin-dots .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: transparent; }
.pin-dots .dot.on { background: var(--color-acento); border-color: var(--color-acento); }

/* Teclado numérico */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key {
  min-height: var(--key-min); font-size: 1.5rem; font-weight: var(--fw-bold);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--texto);
}
.key:active { transform: translateY(1px); background: var(--acento-soft); }
.key:hover { background: color-mix(in srgb, var(--color-acento) 8%, #fff); }
.key:active { background: var(--acento-soft); }
.key-fn { font-size: 1.6rem; color: var(--texto-muted); }
.key-ok { background: var(--color-acento); color: var(--acento-ink); border-color: var(--color-acento); font-size: 1.05rem; }
.key-ok:hover { background: color-mix(in srgb, var(--color-acento) 85%, #000); }

/* ---------- Pantalla PRECIOS MASIVOS (tabla tipo Excel) ---------- */
.pm-wrap { max-width: var(--content-max-pc); margin: 0 auto; padding: 14px var(--content-pad-x) 40px; }
.pm-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); margin-bottom: 12px; }
.pm-toolbar .field { display: flex; flex-direction: column; gap: 4px; }
.pm-toolbar .field > label { font-size: .78rem; font-weight: var(--fw-semibold); color: var(--texto-muted); }
.pm-grow { flex: 1 1 220px; }
.pm-grow input { width: 100%; }
.pm-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pm-toolbar-right .muted { white-space: nowrap; }

.pm-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.pm-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pm-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; padding: 10px 12px;
  border-bottom: 2px solid var(--border); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-muted); }
.pm-c-costo, .pm-c-markup, .pm-c-precio, .pm-c-rent, .pm-c-pya, .pm-c-pyapct { text-align: right; white-space: nowrap; }
.pm-table tbody td { padding: 6px 12px; border-bottom: var(--cmd-divider); vertical-align: middle; }
.pm-row:hover td { background: var(--acento-soft); }
.pm-cat td { background: var(--principal-soft); color: var(--color-principal); font-weight: var(--fw-bold);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 7px 12px; position: sticky; }
.pm-nombre { font-weight: var(--fw-semibold); }
.pm-marca-chip { display: inline-block; font-size: .66rem; font-weight: var(--fw-bold); background: var(--placeholder);
  color: var(--texto-muted); padding: 2px 7px; border-radius: var(--radius-pill); margin-right: 6px; }
.pm-legacy { font-size: .66rem; font-weight: var(--fw-bold); color: var(--texto-muted); background: var(--placeholder); padding: 2px 6px; border-radius: var(--radius-pill); }
.pm-dash { color: var(--texto-muted); }
.pm-table input[type="number"] { width: 92px; text-align: right; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px); background: var(--bg); font-size: .9rem; }
.pm-table input:focus { outline: 2px solid var(--color-acento); outline-offset: -1px; }
.pm-table input:disabled { background: var(--placeholder); color: var(--texto-muted); }
.pm-row.pm-dirty td { background: color-mix(in srgb, var(--color-acento) 10%, var(--surface)); }
.pm-row.pm-dirty .pm-c-precio input, .pm-row.pm-dirty .pm-c-pya input { border-color: var(--color-acento); }
.pm-empty { text-align: center; color: var(--texto-muted); padding: 24px 0; }
/* Rentabilidad (margen $) — semáforo por Food Cost %, hex IDÉNTICOS a Stock. */
.pm-rent { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-weight: var(--fw-bold); font-size: .9rem; }
.rent-verde   { background: var(--rent-verde-bg);   color: var(--rent-verde-ink); }
.rent-naranja { background: var(--rent-naranja-bg); color: var(--rent-naranja-ink); }
.rent-rojo    { background: var(--rent-rojo-bg);    color: var(--rent-rojo-ink); }

/* Precios por APP de delivery — botón por fila + panel desplegable */
.pm-c-apps { text-align: center; white-space: nowrap; }
.pm-apps-btn.active { background: var(--color-acento); color: var(--acento-ink); border-color: var(--color-acento); }
.pm-apps-panel > td { background: var(--acento-soft); padding: 0; border-bottom: var(--cmd-divider); }
.apps-panel { padding: 14px 18px; }
.apps-head { font-size: .95rem; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.apps-mini { border-collapse: collapse; min-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.apps-mini th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-muted);
  padding: 7px 12px; border-bottom: 1px solid var(--border); font-weight: var(--fw-bold); }
.apps-mini td { padding: 6px 12px; border-bottom: var(--cmd-divider); }
.apps-mini tr:last-child td { border-bottom: 0; }
.ap-nombre { font-weight: var(--fw-semibold); }
.ap-rent { text-align: right; white-space: nowrap; }
.apps-mini .ap-sistema td { background: var(--principal-soft); border-bottom: 2px solid var(--border); }
.apps-mini .ap-sistema .ap-precio { font-weight: var(--fw-bold); }
.apps-mini input { width: 92px; text-align: right; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px); background: var(--bg); font-size: .9rem; }
.ap-uni { color: var(--texto-muted); font-size: .85rem; }
.apps-mini input.ap-override { border-color: var(--rent-override-line); background: var(--rent-override-bg); color: var(--rent-naranja-ink); font-weight: var(--fw-bold); }
.ap-badge { display: inline-block; margin-left: 6px; font-size: .64rem; font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: .03em; background: var(--rent-naranja-bg); color: var(--rent-naranja-ink); padding: 2px 7px; border-radius: var(--radius-pill); }
.apps-hint { font-size: .8rem; margin-top: 8px; max-width: 640px; }
.apps-dash { color: var(--texto-muted); padding: 6px 0; font-weight: var(--fw-semibold); }
.apps-msg { margin-top: 6px; }
/* Chips activar/desactivar apps por marca */
.apps-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; font-size: .82rem; color: var(--texto-muted); }
.apps-chip { font: inherit; font-weight: var(--fw-bold); padding: 4px 11px; border-radius: var(--radius-pill); cursor: pointer; }
.apps-chip.on { background: var(--acento-soft); color: var(--color-acento); border: 1px solid color-mix(in srgb, var(--color-acento) 30%, transparent); }
.apps-chip.off { background: var(--surface); color: var(--texto-muted); border: 1px dashed var(--border); }
.apps-chip:hover { filter: brightness(.97); }
.apps-table-wrap { overflow-x: auto; }
/* Columnas de comisión / bruto / neto */
.ap-com { text-align: right; white-space: nowrap; }
.ap-com input { width: 66px; text-align: right; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); background: var(--bg); font-size: .9rem; }
.ap-com-monto { text-align: right; white-space: nowrap; color: var(--texto-muted); }
.ap-bruto-td, .ap-neto-td { text-align: right; white-space: nowrap; }
.ap-bruto { color: var(--texto-muted); }                          /* bruto = dato en gris, engaña */
.apps-mini th.th-neto { color: var(--color-principal); }
.pm-neto { font-size: 1rem; }                                     /* neto destacado */
.apps-mini td.ap-neto-td { border-left: 2px solid var(--border); }

/* ---------- Branding: lockup de MARCA (logo + nombre en color de marca) ---------- */
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.brand-logo { height: 26px; width: auto; display: block; border-radius: 5px; background: #fff; padding: 2px; flex: none; }
.brand-name { font-weight: var(--fw-bold); white-space: nowrap; color: var(--color-principal); }
/* En el botón de marca ACTIVO, el nombre va en la tinta del acento (contraste sobre el relleno). */
.marca-btn.active .brand-name { color: var(--acento-ink) !important; }

/* ---------- Branding: PLATAFORMA (logo; o "hueco" + nombre hasta tener el logo oficial) ---------- */
.plat-lockup { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.plat-logo { height: 22px; width: auto; display: block; flex: none; }
.plat-hueco { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--placeholder);
  color: var(--texto-muted); font-weight: var(--fw-bold); font-size: .82rem; }
.plat-name { font-weight: var(--fw-semibold); white-space: nowrap; }

/* ---------- Buscador dinámico de cliente (Tomar Pedido) ---------- */
.cli-results { display: flex; flex-direction: column; margin-top: 8px; max-height: 46vh; overflow-y: auto;
  border-radius: var(--radius-sm); }
.cli-results:not(:empty) { border: 1px solid var(--border); }
.cli-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); background: var(--surface); }
.cli-pick { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nombre tel" "dir dir";
  gap: 1px 12px; text-align: left; background: transparent; border: 0; padding: 10px 14px; cursor: pointer; font: inherit; }
.cli-pick:hover, .cli-pick:focus-visible { background: var(--acento-soft); outline: none; }
.cli-ficha { flex: none; display: flex; align-items: center; padding: 0 14px; border-left: 1px solid var(--border);
  color: var(--color-acento); font-weight: var(--fw-bold); font-size: .85rem; text-decoration: none; white-space: nowrap; }
.cli-ficha:hover, .cli-ficha:focus-visible { background: var(--acento-soft); outline: none; }
.cli-nombre { grid-area: nombre; font-weight: var(--fw-semibold); color: var(--texto); min-width: 0; }
.cli-tel { grid-area: tel; font-weight: var(--fw-bold); color: var(--color-acento); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cli-dir { grid-area: dir; color: var(--texto-muted); font-size: .86rem; }
.cli-vacio { padding: 12px 14px; color: var(--texto-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.cli-nuevo { text-align: left; background: var(--surface); border: 0; padding: 11px 14px; width: 100%; font: inherit;
  font-weight: var(--fw-bold); color: var(--color-acento); cursor: pointer; }
.cli-nuevo:hover, .cli-nuevo:focus-visible { background: var(--acento-soft); outline: none; }

/* ---------- Ficha de cliente (vista CRM) ---------- */
.ficha-wrap { max-width: 980px; margin: 0 auto; padding: 16px var(--content-pad-x) 48px; display: flex; flex-direction: column; gap: 16px; }
.ficha-wrap .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.ficha-wrap .card h2 { font-size: 1rem; margin: 0 0 12px; color: var(--texto-muted); text-transform: uppercase; letter-spacing: .03em; }
.fic-alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--rent-naranja-bg); color: var(--rent-naranja-ink);
  border: 1px solid color-mix(in srgb, var(--rent-naranja-ink) 30%, transparent); border-radius: var(--radius); padding: 12px 16px; }
.fic-alert .btn { margin-left: auto; }
.fic-head { display: flex; align-items: flex-start; gap: 16px; }
.fic-head-main { flex: 1 1 auto; min-width: 0; }
.fic-head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.fic-sub { color: var(--texto-muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.fic-tel { font-weight: var(--fw-bold); color: var(--color-acento); font-variant-numeric: tabular-nums; }
.fic-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip-marca { border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 5px 12px 5px 8px; background: var(--surface); }
.fic-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 760px) { .fic-cols { grid-template-columns: 1fr; } }
.fic-hist { display: flex; flex-direction: column; }
.hist-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.hist-row:last-child { border-bottom: 0; }
.hist-ped { white-space: nowrap; } .hist-ped strong { font-size: 1.15rem; color: var(--color-principal); }
.hist-ult { color: var(--texto-muted); font-size: .88rem; white-space: nowrap; }
.hist-total { margin-top: 4px; border-top: 2px solid var(--border); font-weight: var(--fw-bold); }
.hist-total .hist-marca { color: var(--texto); }
.fic-nota { font-size: .84rem; color: var(--texto-muted); margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); }
.fic-datos { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.fic-datos dt { color: var(--texto-muted); font-size: .85rem; }
.fic-datos dd { margin: 0; font-weight: var(--fw-semibold); }
.fic-comandas-vacio { padding: 8px 0; }
.cmd-mini-list { display: flex; flex-direction: column; }
.cmd-mini { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cmd-mini:last-child { border-bottom: 0; }
.cmd-mini-id { font-weight: var(--fw-bold); color: var(--color-acento); }
.cmd-mini-marca { font-weight: var(--fw-semibold); }
.cmd-mini-fecha, .cmd-mini-estado { color: var(--texto-muted); font-size: .88rem; }
.cmd-mini-total { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
/* Nombre clickeable → abre modal de receta */
.pm-nombre-btn { font: inherit; font-weight: var(--fw-semibold); color: var(--color-principal); background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.pm-nombre-btn:hover { text-decoration-style: solid; }

/* Modal RECETA (solo lectura) */
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-aviso { font-size: .82rem; color: var(--texto-muted); background: var(--placeholder); display: inline-block;
  padding: 5px 11px; border-radius: var(--radius-pill); margin: 8px 0 14px; }
.rec-table { font-size: .92rem; }
.rec-table th, .rec-table td { padding: 8px 12px; border-bottom: var(--cmd-divider); }
.rec-num { text-align: right; white-space: nowrap; }
.rec-table tfoot .rec-sub td { color: var(--texto-muted); }
.rec-table tfoot .rec-total td { font-weight: var(--fw-bold); font-size: 1.05rem; color: var(--color-principal);
  border-top: 2px solid var(--border); border-bottom: 0; }
.btn.is-disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }

/* ---------- Módulo CONFIGURACIÓN ---------- */
.cfg-wrap { max-width: 900px; margin: 0 auto; padding: 24px var(--content-pad-x); }
.cfg-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; max-width: var(--content-max-pc); margin: 0 auto; padding: 18px var(--content-pad-x) 48px; align-items: start; }
@media (max-width: 820px) { .cfg-layout { grid-template-columns: 1fr; } }
.cfg-menu { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; position: sticky; top: 12px; }
.cfg-item { display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-radius: var(--radius-sm, 8px);
  padding: 10px 12px; font: inherit; font-weight: var(--fw-semibold); color: var(--texto); cursor: pointer; width: 100%; }
.cfg-item:hover { background: var(--acento-soft); }
.cfg-item.active { background: var(--acento-soft); color: var(--color-acento); }
.cfg-item.is-proximo { color: var(--texto-muted); font-weight: var(--fw-normal); }
.cfg-item.is-disabled { color: var(--placeholder-ink, #b6bfcc); cursor: not-allowed; }
.cfg-soon { margin-left: auto; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; background: var(--placeholder); color: var(--texto-muted); padding: 2px 7px; border-radius: var(--radius-pill); }
.cfg-lock { margin-left: auto; font-size: .8rem; }
.cfg-content { min-width: 0; }
.cfg-content h1 { font-size: 1.4rem; margin: 0 0 4px; }
.cfg-sub { color: var(--texto-muted); max-width: 70ch; margin: 0 0 16px; font-size: .95rem; }
.cfg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.cfg-card-h { display: flex; align-items: center; justify-content: space-between; }
.cfg-card-h h2 { margin: 0; font-size: 1.05rem; }
.cfg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.cfg-placeholder { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--texto-muted); }
.cf { display: flex; flex-direction: column; gap: 4px; font-weight: var(--fw-semibold); font-size: .9rem; }
.cf-check { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-semibold); font-size: .9rem; }
.cfg-table-wrap { overflow-x: auto; }
/* Grilla de plataformas */
.cfg-plat { border-collapse: collapse; width: 100%; min-width: 520px; }
.cfg-plat th, .cfg-plat td { border: 1px solid var(--border); padding: 7px 10px; text-align: center; }
.cfg-plat thead th { background: var(--principal-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: var(--texto-muted); }
.cfg-plat .cfg-plat-app-h, .cfg-plat .cfg-plat-app { text-align: left; }
.cfg-plat-marca { background: var(--surface) !important; }
.cfg-plat input[type="number"] { width: 66px; text-align: right; padding: 5px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); background: var(--bg); font-size: .88rem; }
.cfg-cell.cfg-off input { opacity: .45; }
.cfg-toggle { font: inherit; font-size: .78rem; font-weight: var(--fw-bold); border-radius: var(--radius-pill); padding: 4px 10px; cursor: pointer; border: 1px solid transparent; }
.cfg-toggle.on { background: var(--acento-soft); color: var(--color-acento); border-color: color-mix(in srgb, var(--color-acento) 30%, transparent); }
.cfg-toggle.off { background: var(--placeholder); color: var(--texto-muted); border-style: dashed; border-color: var(--border); }
.cfg-plat-toolbar { margin-bottom: 10px; }
/* Listas de marcas/locales */
.cfg-list { border-collapse: collapse; width: 100%; }
.cfg-list th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; color: var(--texto-muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
.cfg-list td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.cfg-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.15); }
.cfg-form { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.cfg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 620px) { .cfg-grid2 { grid-template-columns: 1fr; } }
.cfg-local-block { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.cfg-local-block h3 { margin: 0 0 10px; font-size: 1rem; }
.cfg-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.cfg-tag { font-size: .64rem; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .03em; background: var(--placeholder); color: var(--texto-muted); padding: 2px 7px; border-radius: var(--radius-pill); }
.cfg-sub a { color: var(--color-acento); font-weight: var(--fw-semibold); }
/* Aviso "espejo a la foto" (Plan B: costos de Stock copiados, no en vivo). */
.aviso-espejo { background: #fff8e1; border: 1px solid #f0d98c; color: #7a5b00; border-radius: var(--radius, 8px);
  padding: 8px 14px; margin-bottom: 12px; font-size: .9rem; }
/* El espejo pasado de fecha (mig. 081): el mismo cartel, pero que se note sin leerlo. Se
   refresca a mano, y sin esto la única forma de darse cuenta es hacer la cuenta mentalmente
   todos los días — y nadie la hace. */
.aviso-espejo-viejo { background: #fdecea; border-color: #f5aca6; color: #8a1c13; font-weight: var(--fw-semibold); }
/* ★ EL MISMO CARTEL, PARA CUALQUIER DATO QUE VIENE DEL MUELLE Y PUEDE ENVEJECER. Nace del padrón
   de Personal (05/09): si Personal da de alta a alguien y no vuelve a depositar, el desplegable
   muestra la misma gente para siempre y todo parece normal. Es la misma familia que el espejo de
   Stock, por eso comparte el aspecto: un dato con fecha al lado no puede mentir en silencio. */
.aviso-dato-viejo { background: #fff8e1; border: 1px solid #f0d98c; color: #7a5b00;
  border-radius: var(--radius, 8px); padding: 8px 14px; margin: 8px 0; font-size: .9rem; }
/* ★ «SIN REVISAR» — el nivel lo puso el sistema y todavía no lo confirmó una persona (mig. 109).
   Ámbar y no rojo a propósito: no está roto ni es urgente, es una decisión que falta tomar. Si
   fuera rojo competiría con los avisos que sí frenan algo, y el rojo que no frena nada enseña a
   ignorar el rojo. */
.chip-sinrev { display: inline-block; background: #fff8e1; border: 1px solid #f0d98c;
  color: #7a5b00; border-radius: 999px; padding: 1px 8px; font-size: .6875rem;
  margin-left: 6px; font-weight: var(--fw-semibold); white-space: nowrap; }
/* ★ PADRÓN VENCIDO (27/09) — ROJO, y a propósito: éste SÍ frena algo. Con el padrón viejo se
   asignan personas pausadas y e-mails de hace semanas; el servidor no deja enganchar a nadie sin
   el «lo vi». Si fuera ámbar se confundiría con «sin revisar», que no frena nada. */
.aviso-padron-vencido { background: #fdecea; border: 2px solid #d93025; color: #8a1c13;
  border-radius: var(--radius, 8px); padding: 12px 16px; margin: 8px 0 12px; font-size: 1rem; }
.aviso-padron-vencido b.titulo { display: block; font-size: 1.05rem; font-weight: var(--fw-bold); margin-bottom: 4px; }
.aviso-padron-vencido label { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-weight: var(--fw-semibold); }
/* Acceso cortado por Personal (pausa o baja): rojo en la fila, porque esa persona NO entra. */
.chip-cortado { display: inline-block; background: #fdecea; border: 1px solid #f5aca6;
  color: #8a1c13; border-radius: 999px; padding: 1px 8px; font-size: .6875rem;
  margin-left: 6px; font-weight: var(--fw-semibold); white-space: nowrap; }
.cfg-aviso.cfg-aviso-rojo { border-left-color: #d93025; }
/* Los avisos de «Ventas avisa y no hace»: gente del padrón sin usuario, usuarios que ya no están
   en el padrón, puestos que Personal cambió. Comparten aspecto porque comparten regla — ninguno
   de los tres ejecuta nada solo. */
.cfg-aviso { background: var(--surface, #fff); border: 1px solid var(--border, #dadce0);
  border-left: 4px solid #f0d98c; border-radius: var(--radius, 8px);
  padding: 10px 14px; margin: 8px 0; font-size: .9rem; }
.cfg-aviso-lista { list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px; }
.cfg-aviso-lista li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding-top: 6px; border-top: 1px solid var(--border, #edeef0); }

/* Comportamiento de venta: bloque "otra tanda" + tags de por qué no se construye acá. */
.cfg-otra-tanda { border-style: dashed; background: var(--bg); }
.cfg-nota-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cfg-nota-list li { display: flex; align-items: baseline; gap: 8px; font-size: .92rem; line-height: 1.4; }
.cfg-nota-list .cfg-tag { flex: none; align-self: flex-start; }
.cfg-tag.tag-rojo    { background: #fce8e6; color: #c5221f; }
.cfg-tag.tag-naranja { background: #feefc3; color: #b06000; }
.cfg-tag.tag-stop    { background: #3c4043; color: #fff; }
.cfg-tag.tag-modulo  { background: #e8f0fe; color: #1967d2; }
.toggle.is-fixed { opacity: .8; }
.toggle.is-fixed em { color: var(--color-acento, #1a73e8); font-style: normal; font-weight: var(--fw-bold); }
.cfg-list input[type="time"] { padding: 5px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); background: var(--bg); font-size: .88rem; }
a.sesion-chip { text-decoration: none; cursor: pointer; }
a.sesion-chip:hover { filter: brightness(.97); }

/* Barra de sesión (usuario + Salir) en la topbar */
.sesion-box { display: flex; align-items: center; gap: 8px; }
.sesion-chip { background: var(--principal-soft); color: var(--color-principal); padding: 6px 12px; border-radius: var(--radius-pill); font-size: .82rem; font-weight: var(--fw-bold); }
.sesion-nivel { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; opacity: .8; }

/* ── ZONAS DE ENVÍO · los tres estados del precio se ven distinto ──────────────────────────
   Un número, «sin cargo» (cero decidido) y «sin cargar» (nadie lo decidió) NO son lo mismo.
   Pintarlos iguales fue el bug de origen: «$0» no distingue gratis de no configurado. */
.z-gratis  { color: var(--ok, #137333); font-weight: var(--fw-bold); }
.z-falta   { color: #b06000; background: #feefc3; padding: 2px 8px; border-radius: var(--radius-pill, 999px);
             font-size: .82rem; font-weight: var(--fw-semibold); }
.z-grupo td { background: var(--bg); font-size: .86rem; color: var(--texto-muted, #5f6368); }
.z-sim     { opacity: .75; }
.z-tag     { background: #e8f0fe; color: #1967d2; padding: 1px 7px; border-radius: var(--radius-pill, 999px);
             font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
.msg-warn  { background: #feefc3; border: 1px solid #f0c36d; color: #7a4b00; padding: 10px 14px;
             border-radius: var(--radius-sm, 6px); font-size: .9rem; line-height: 1.45; }
.cf-hint   { font-size: .84rem; color: var(--texto-muted, #5f6368); line-height: 1.45; margin: 6px 0 2px; }

/* ── OPCIONALES OBLIGATORIOS · el popup que obliga a elegir ────────────────────────────────
   La regla se DICE al lado del título («Elegí una», «Hasta 3»): un grupo que no cuenta cuántas
   se piden obliga a probar hasta que el botón se prende, y eso es adivinar la regla. */
.popup-opc { max-width: 560px; }
.opc-grupo { border: 1px solid var(--border); border-radius: var(--radius-sm, 6px); padding: 10px 14px; margin: 0 0 12px; }
.opc-grupo legend { font-weight: var(--fw-bold); padding: 0 6px; }
.opc-regla { font-weight: var(--fw-semibold); font-size: .78rem; color: var(--texto-muted, #5f6368);
             background: var(--bg); padding: 2px 8px; border-radius: var(--radius-pill, 999px); }
.opc-regla.es-obligatorio { background: #feefc3; color: #7a4b00; }
.opc-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; min-height: 44px; cursor: pointer; }
.opc-item span { flex: 1; }
.opc-item b { color: var(--texto-muted, #5f6368); font-weight: var(--fw-semibold); }
.opc-pie { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.opc-extra { margin-right: auto; font-weight: var(--fw-bold); color: var(--texto-muted, #5f6368); }
.l-opc { font-size: .82rem; color: var(--texto-muted, #5f6368); margin-top: 2px; }

/* ── FACTURACIÓN · el subdiario y la cola ──────────────────────────────────────────────────
   Un `fallo` y algo `en cola` NO se pintan igual: el primero no se resuelve solo. */
.fi-alicuotas { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.fi-alicuotas .ali { border: 1px solid var(--border); border-radius: var(--radius-sm, 6px);
                     padding: 8px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.fi-alicuotas .ali span { font-size: .78rem; color: var(--texto-muted, #5f6368); }
.fi-alicuotas .ali b { font-size: 1.1rem; }
.fi-alicuotas .ali small { font-size: .74rem; color: var(--texto-muted, #5f6368); }
.fi-alicuotas .ali.total { background: var(--bg); }
.fi-fallo td { background: #fce8e6; }
.fi-nota td  { color: #b06000; }

/* ── REPARTO PROPUESTO (Salida de Viaje) ───────────────────────────────────────────────────
   El «porqué» se ve distinto del título: es lo que hace que la propuesta se pueda discutir, y
   una sugerencia que no se puede discutir no se puede corregir. */
.vj-porque { color: var(--texto-muted, #5f6368); font-size: .85rem; display: inline-block; margin: 2px 0 4px; }
.vj-sug-linea.espera { opacity: .8; }

/* ★ EL MOTIVO POR EL QUE EL SISTEMA TE SACÓ (mig. 111). Va en el LOGIN y no en un `alert`:
   la persona ya está afuera cuando lo lee, y lo que necesita es saber a quién avisarle.
   Ámbar y no rojo: no está roto, es una baja o una pausa que Personal cargó y que acá se
   obedeció. Rojo diría «se rompió algo» y mandaría a la persona a buscar el problema acá. */
.login-aviso-salida { background: #fff8e1; border: 1px solid #f0d98c; color: #7a5b00;
  border-radius: var(--radius, 8px); padding: 10px 14px; margin: 0 0 14px;
  font-size: .875rem; line-height: 1.45; text-align: left; }
/* 06/10 · Entrar con Personal: el botón va arriba de los usuarios, a lo ancho; el PIN queda abajo como segunda puerta. */
.login-personal { display: block; width: 100%; text-align: center; text-decoration: none; padding: 12px 16px; font-size: 1rem; }

/* ★ LO QUE LE FALTA A LA FICHA DEL CLIENTE (mig. 116) — se pide cuando vuelve, que es el único
   momento en que lo puede decir. Ámbar y no rojo, y sin borde grueso: **no frena nada**. Si se
   viera como un error, el que atiende creería que no puede seguir — y lo que hay que evitar es
   justamente que un control de datos frene una venta. */
.cli-falta { background: #fff8e1; border: 1px solid #f0d98c; color: #7a5b00;
  border-radius: var(--radius, 8px); padding: 8px 12px; margin-top: 8px;
  font-size: .8125rem; line-height: 1.45; }
.cli-falta ul { padding-left: 18px; }
/* 20/10 (H13) · la otra dirección de esta sola entrega: se ve aparte de la ficha para que nadie la confunda con la casa del cliente */
.otra-check { display: block; margin: 8px 0; }
/* 20/10 · «¿Para cuándo lo quiere?»: bien a la vista en el pie del pedido, una sola pregunta */
.para-cuando { border: 2px solid var(--color-acento); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.para-cuando legend { font-weight: var(--fw-bold); padding: 0 4px; }
.para-cuando .pc-op { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.para-cuando .pc-hora { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.cobro-badge.cliente-nuevo { font-weight: var(--fw-bold); }
.otra-block { border-left: 4px solid var(--color-acento); padding-left: 12px; }
.cli-falta .muted { display: block; margin-top: 4px; }

/* 17/10 · «☰ Menú» (menu_link_html): en el celular no se parte en dos renglones. */
[data-menu-principal]{white-space:nowrap}

/* 19/10 · «Confirmá los cambios» (confirmar-cambios.js), copiado del patrón de Personal: renglones «Campo: antes → después» con franja. */
.cc-ov { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.cc-caja { background: var(--surface); color: var(--texto); border-radius: 12px; width: 90%; max-width: 450px; max-height: 90vh; overflow: auto; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.35); text-align: center; }
.cc-caja h2 { margin: 0 0 6px; font-size: 20px; color: #d35400; border-bottom: 2px solid #f8d7da; padding-bottom: 6px; }
.cc-sub { color: var(--texto-muted); margin: 0 0 10px; font-size: 13px; }
.cc-lista { list-style: none; margin: 0; padding: 0; max-height: 38vh; overflow: auto; text-align: left; display: grid; gap: 6px; }
.cc-r { border-left: 4px solid #dee2e6; background: #fafafa; color: #222; border-radius: 4px; padding: 6px 8px; font-size: 13px; }
.cc-n1 { border-left-color: #dc3545; background: #fff5f5; }
.cc-n2 { border-left-color: #ffc107; background: #fffdf3; }
.cc-antes { color: #777; }
.cc-botones { display: flex; gap: 8px; margin-top: 14px; }
.cc-botones .btn { flex: 1; padding: 12px; font-weight: 700; border-radius: 6px; color: #fff; border: 0; }
.cc-no { background: #6c757d; } .cc-si { background: #28a745; }
.imp-avisos { background: var(--rent-rojo-bg); color: var(--rent-rojo-ink); border: 2px solid var(--rent-rojo-ink); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; font-weight: var(--fw-bold); font-size: 1.1rem; }
.chip-atrasada { background: var(--rent-naranja-bg); color: var(--rent-naranja-ink); font-weight: var(--fw-bold); }

/* ═══ 04/11 noche · Chris · NORMA-PANTALLAS EN VENTAS (deploy/pantallas-norma.sh) ═══
   Toques de 44 px en todo lo que se toca (el tema ya da 44 a --touch, --touch-min y --btn-sm-min), letra de 16 px en los campos del teléfono
   (si no, Safari agranda la pantalla), y la barra de arriba envuelve en vez de empujar la página de costado. */
a.btn, .sesion-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; }
.btn { min-width: 44px; box-sizing: border-box; }
summary { min-height: 44px; box-sizing: border-box; padding-block: 10px; cursor: pointer; }
.sesion-box { flex-wrap: wrap; max-width: 100%; row-gap: 6px; }
@media (max-width: 430px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}
label:has(> input[type=radio]), label:has(> input[type=checkbox]) { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; }
[data-visto-todos], .it-lista a { min-height: 44px; box-sizing: border-box; }
/* Despacho: la barra de las otras estaciones envuelve en el teléfono (antes empujaba la página 87 px de costado). */
.otras-est { flex-wrap: wrap; max-width: 100%; }
/* Plata en la calle: en el teléfono cada viaje es una tarjeta (la tabla de 5 columnas no entra y no puede tener scroll de costado). */
@media (max-width: 640px) {
  #pc-detalle table, #pc-detalle tbody, #pc-detalle tr, #pc-detalle td { display: block; width: 100%; box-sizing: border-box; }
  #pc-detalle thead { display: none; }
  #pc-detalle tr { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 10px; }
  #pc-detalle td { border: 0; padding: 3px 0; text-align: left; overflow-wrap: anywhere; }
  #pc-detalle td:nth-child(1)::before { content: "Viaje: "; }
  #pc-detalle td:nth-child(2)::before { content: "Moto: "; }
  #pc-detalle td:nth-child(3)::before { content: "Salió: "; }
  #pc-detalle td:nth-child(4)::before { content: "Por cobrar: "; }
  #pc-detalle td:nth-child(5)::before { content: "Fondo: "; }
  #pc-detalle td::before { color: var(--texto-muted); font-weight: var(--fw-semibold); }
}
/* Safari dibuja el <select> con su propio alto (23 px) y no respeta el mínimo: se dibuja igual en los tres motores, con su flecha, de 44 px. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; min-height: 44px; box-sizing: border-box; padding-right: 32px;
  /* la flecha, dibujada con dos degradados (sin imagen) */
  background-image: linear-gradient(45deg, transparent 50%, var(--texto-muted) 50%), linear-gradient(135deg, var(--texto-muted) 50%, transparent 50%);
  background-repeat: no-repeat; background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px;
}
/* ═══ 05/11 · NORMA-PANTALLAS, las 10 pantallas siguientes (lista «pantallas» de deploy/pantallas/ventas-pantallas.json) ═══
   Desde acá y no adentro de cada pantalla, como el 04/11: tocar la pantalla obliga a completar su ayuda entera (NORMA-AYUDA). */
/* Mis viajes / Lo que me pagaron (la moto, en el teléfono): los enlaces de arriba medían 21 px de alto. */
.mv-nav a { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
/* Mapa del despacho (Leaflet): el zoom medía 30 × 30 y el marcador de cada local 25 × 41. El marcador agranda su zona de toque con
   relleno transparente (44 × 44) y corre su margen lo mismo, así la punta sigue cayendo en el mismo lugar del mapa. */
/* (con más peso que «.leaflet-touch .leaflet-bar a», que viene después en leaflet.css) */
.leaflet-container .leaflet-bar a, .leaflet-container.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
/* El crédito del mapa (Leaflet y el de las calles) se queda a la vista, con sus enlaces de 44 px de alto (medían 14). */
.leaflet-container .leaflet-control-attribution a { display: inline-flex; align-items: center; min-height: 44px; }
/* (con el peso de «.leaflet-container .leaflet-marker-pane img», que en leaflet.css le pone padding 0) */
.leaflet-container .leaflet-marker-pane img.leaflet-marker-icon { box-sizing: content-box; padding: 0 10px 3px 9px; margin-left: -21px !important; }
/* Tiempos: a 360 px la tabla de la demora no entraba (306 en 294) y se desplazaba de costado. Más justa en el teléfono. */
@media (max-width: 420px) {
  .te-card .te-tabla { font-size: .8rem; }
  .te-card .te-tabla th, .te-card .te-tabla td { padding: 6px 2px; overflow-wrap: anywhere; }
}
/* ═══ 05/11 · Chris: la persona con nombres y apellidos completos y su legajo. En un lugar angosto el NOMBRE se corta con «…» y el
   LEGAJO se ve siempre (src/NombreLegajo.php, html()). ═══ */
.kk-persona { display: inline-flex; align-items: baseline; min-width: 0; max-width: 100%; vertical-align: bottom; }
.kk-persona-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kk-persona-l { flex: none; white-space: nowrap; }
.sesion-chip { min-width: 0; max-width: 100%; gap: 6px; }
.sesion-box { min-width: 0; }
/* ═══ 05/11 · NORMA-PANTALLAS, 10 pantallas más (zonas, cuenta corriente, personas, mi perfil, papeles, glosario, panel, fiscal, catálogo,
   categorías). Desde acá, como el 04/11: las cuatro que se arreglan tienen la ayuda pendiente. Con más peso que el estilo de cada pantalla. ═══ */
/* Catálogo: la lista de platos tenía su propio scroll (un segundo scroll vertical) y la tabla no entraba a 360 px. */
body#app .ct-lista { max-height: none; overflow: visible; }
body#app .ct-tabla td, body#app .ct-tabla th { overflow-wrap: anywhere; }
body#app .ct-tabla td.cod { white-space: normal; }
/* Fiscal: las tablas se desplazaban de costado adentro de su recuadro en el teléfono. */
@media (max-width: 640px) {
  body#app .fi-tabla { font-size: .8rem; }
  body#app .fi-tabla th, body#app .fi-tabla td { padding: 4px 3px; overflow-wrap: anywhere; }
}
/* Personas: la tabla y el desplegable «a quién» no entraban a 360 px. */
body#app #pr-usuario { max-width: 100%; }
@media (max-width: 640px) {
  body#app main table { font-size: .8rem; }
  body#app main table th, body#app main table td { overflow-wrap: anywhere; padding-left: 3px; padding-right: 3px; }
}
/* Zonas en el mapa: pestañas, herramientas y filtros a 44 px; los filtros envuelven en el teléfono (antes se desplazaban de costado). */
body.zm .zm-tabs button, body.zm .zm-busca input, body.zm .zm-tools .btn, body.zm .zm-filtros button, body.zm #t-dibujar { min-height: 44px; }
body.zm .zm-filtros { flex-wrap: wrap; overflow-x: visible; }
/* Zonas en el mapa (teléfono y tablet): la manija que agranda o achica el panel medía 28 px de alto. */
body.zm #zm-asa { min-height: 44px; }
