/* ============================================================================
   Punto de venta · estilo "kiosco claro": blanco, aireado y verde.
   Solo esta app cambia de tema: los tokens de css/base.css se
   sobrescriben aquí, así cocina, admin y menú siguen como estaban.
   ============================================================================ */

:root {
  color-scheme: light;

  --bg:        #F5F7F9;   /* lienzo */
 /* riel lateral y panel del pedido */
  --surface:   #FFFFFF;   /* tarjetas */
  --surface-2: #F3F5F8;   /* campos y hovers */
  --surface-3: #E9EDF1;

  --line:   #E7EAEE;
  --line-2: #D7DCE2;

  --text:   #17241C;
  --text-2: #4B5560;
  --muted:  #8B959F;

  --accent:        #1BA45B;
  --accent-strong: #15874B;
  --accent-soft:   rgba(27, 164, 91, 0.10);

  --maiz:      #E9A23B;

  --lime:      #1BA45B;

  --ok-text:   #15874B;
  --ok-soft:   rgba(27, 164, 91, 0.12);
  --warn:      #B8791A;
  --warn-soft: rgba(233, 162, 59, 0.16);
  --bad:       #E0575B;
  --bad-text:  #C33B40;

  --radius:    14px;
  --radius-sm: 11px;
  --radius-lg: 20px;

  /* Tipografía moderna: Segoe UI Variable (la de Windows 11) con su corte Display para
     titulares; si el equipo tiene Inter o Manrope, se usan; y si no, las de siempre.
     Nada se descarga de internet: la app tiene que funcionar en la red del local. */
  --font:         "Segoe UI Variable Text", "Segoe UI Variable", "Inter", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Inter", "Manrope", "SF Pro Display", "Segoe UI", system-ui, sans-serif;

  --sh-1: 0 1px 2px rgba(23, 36, 28, 0.06);
  --sh-2: 0 8px 24px rgba(23, 36, 28, 0.10);
  --sh-3: 0 24px 60px rgba(23, 36, 28, 0.18);
}

/* Sobre blanco el grano se notaría como suciedad: casi fuera. */
body::before { opacity: 0.012; }

/* --- Retoques a las piezas de base.css, para el tema claro ------------------ */
h1, h2 { font-family: var(--font-display); text-transform: none; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  text-transform: none; letter-spacing: 0; color: var(--muted);
}
.logo-mark { background: var(--accent); border-radius: 12px; box-shadow: none; font-family: var(--font-display); }
.btn { background: var(--surface); border: 1px solid var(--line-2); font-weight: 600; }
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(27, 164, 91, 0.26); }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); box-shadow: 0 4px 14px rgba(27, 164, 91, 0.3); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.danger { background: transparent; border-color: rgba(224, 87, 91, 0.5); color: var(--bad-text); }
.icon-btn { color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.input { background: var(--surface-2); border-color: transparent; }
.input:hover { background: #EDF0F4; }
.input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip { background: var(--surface); border-color: var(--line-2); color: var(--text-2); font-weight: 600; }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.badge { background: var(--surface-2); color: var(--text-2); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: rgba(224, 87, 91, 0.12); color: var(--bad-text); }
.card { box-shadow: none; }
.modal-back { background: rgba(23, 36, 28, 0.35); }
.toast { background: var(--surface); box-shadow: var(--sh-2); }
.stepper { background: var(--surface-2); border-color: var(--line); }
.stepper button:hover:not(:disabled) { background: #E4E9ED; }
.seg button { background: var(--surface-2); }
.seg button:hover { background: #E9EDF1; }
.keypad button { background: var(--surface); border-color: var(--line); }
.keypad button:hover:not(:disabled) { background: var(--surface-2); }
.keypad .go { background: var(--accent); border-color: transparent; }
.pimg.ph {
  color: #7E8C84;
  background: linear-gradient(145deg, #F1F4F2, #E4EAE6);
  box-shadow: inset 0 0 0 1px rgba(23, 36, 28, 0.05);
}

/* ============================================================================
   Estructura: barra superior · riel · catálogo · panel del pedido
   ============================================================================ */
.shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; background: var(--bg); }
.cuerpo { display: grid; grid-template-columns: 96px minmax(0, 1fr) 350px; min-height: 0; position: relative; }

/* --- Barra superior --------------------------------------------------------- */
.consola {
  position: relative; z-index: 24;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  column-gap: 16px; row-gap: 10px;
  padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
}

/* --- Marca: logo y nombre del negocio, en la esquina ------------------------- */
.consola-marca { display: flex; align-items: center; gap: 11px; min-width: 0; justify-self: start; }
.consola .logo-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; flex: none; }
.marca-txt { display: grid; min-width: 0; }
.marca-nombre {
  font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--accent); line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch;
}
.marca-rol {
  font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch;
}

/* El buscador y el menú de categorías, juntos y centrados en la barra. */
/* El buscador queda centrado en la barra, con sitio igual a cada lado. */
.consola-centro { display: flex; align-items: center; justify-content: center; min-width: 0; }
.buscador { position: relative; flex: 0 1 340px; min-width: 140px; }
.buscador .input {
  min-height: 44px; border-radius: 999px; padding-left: 44px; padding-right: 96px; font-size: 15px;
}
.buscador > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.buscador .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.buscador kbd {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-num); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 7px; padding: 2px 7px; pointer-events: none;
}
.buscador .clear:not(.hidden) ~ kbd { display: none; }

/* --- Acciones (pedidos, caja, salir): centradas, junto al buscador ----------- */
.consola-acc { display: flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 10px; flex-wrap: wrap; }
.acc-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px;
  border-radius: 11px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform 90ms var(--ease-out);
}
.acc-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.acc-btn:active { transform: translateY(1px) scale(0.98); }
.acc-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.acc-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff;
  font-family: var(--font-num); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.acc-count.hidden { display: none; }
.acc-count.pop { animation: pop 320ms var(--ease-out); }
.reloj { font-family: var(--font-num); font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* --- Riel lateral: el menú de la carta y, abajo, "Salir" --------------------- */
.crail {
  display: flex; flex-direction: column; padding: 12px 10px;
  background: var(--surface); border-right: 1px solid var(--line);
  overflow: hidden;
}
.crail-lista {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.crail-lista::-webkit-scrollbar { display: none; }
/* Esquina de abajo a la izquierda: salir, siempre a la vista. */
.crail-pie { flex: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.crail-pie .reloj { display: block; text-align: center; margin-bottom: 8px; }
.crail-pie .crail-btn { color: var(--muted); }
.crail-pie .crail-btn:hover { background: rgba(224, 87, 91, 0.10); color: var(--bad-text); }
.crail-titulo { margin: 2px 8px 8px; }
.crail-btn {
  position: relative; display: grid; justify-items: center; gap: 7px; padding: 13px 6px; min-height: 76px;
  border-radius: 12px; color: var(--muted); text-align: center;
  font-size: 11px; font-weight: 600; line-height: 1.15;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform 90ms var(--ease-out);
}
.crail-btn .ico { display: grid; place-items: center; }
.crail-btn::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 0; width: 3px; border-radius: 3px;
  background: var(--accent); transform: translateY(-50%); transition: height 240ms var(--ease-out);
}
.crail-btn:hover { background: var(--surface-2); color: var(--text-2); }
.crail-btn:active { transform: scale(0.97); }
.crail-btn.active { background: var(--accent-soft); color: var(--accent-strong); }
.crail-btn.active::before { height: 52%; }

/* ============================================================================
   Catálogo
   ============================================================================ */
.contenido { min-height: 0; overflow-y: auto; padding: 16px 20px 100px; overscroll-behavior: contain; }

/* Fila de "rápidos": lo que más se vende aquí, a un toque. */
.rapidos { display: grid; gap: 10px; margin-bottom: 8px; }
.rapidos-h { display: flex; align-items: center; gap: 8px; }
.rapidos-h b { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.rapidos-h .rayo { display: grid; place-items: center; color: var(--accent); }
.rapidos-fila { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rapidos-fila::-webkit-scrollbar { display: none; }
.rapido {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center;
  flex: none; padding: 7px 12px 7px 7px; min-width: 178px; text-align: left;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 130ms var(--ease-out);
}
.rapido:hover { border-color: var(--line-2); box-shadow: var(--sh-1); transform: translateY(-2px); }
.rapido:active { transform: scale(0.98); }
.rapido .thumb { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; background: var(--surface-2); font-size: 14px; }
.rapido .txt { display: grid; gap: 1px; min-width: 0; }
.rapido .txt strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rapido .txt span { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Secciones por subcategoría: el título se queda pegado al hacer scroll. */
.sec { margin-top: 22px; }
.sec-h {
  position: sticky; top: -16px; z-index: 6; display: flex; align-items: center; gap: 10px;
  margin: 0 -20px 12px; padding: 10px 20px 8px;
  background: linear-gradient(180deg, var(--bg) 78%, rgba(245, 247, 249, 0));
  font-family: var(--font); font-size: 15.5px; font-weight: 700; color: var(--text);
  text-transform: none; letter-spacing: 0;
}
.sec-h b { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 14px; }

/* --- Tarjeta de producto ----------------------------------------------------- */
.prod {
  position: relative; display: grid; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 140ms var(--ease-out);
  animation: entrarTarjeta 380ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 16ms);
}
.prod:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-2px); }
.prod-open { display: grid; width: 100%; text-align: left; }
.prod .tile { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); font-size: 26px; }
.prod .tile .pimg { transition: transform 460ms var(--ease-out); }
.prod:hover .tile .pimg { transform: scale(1.05); }
.prod .pname {
  padding: 10px 12px 2px; font-size: 14.5px; font-weight: 600; line-height: 1.25; color: var(--text);
  min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prod .prow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 52px 11px 12px; }
.prod .price { font-size: 15.5px; font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prod .price.desde { font-size: 13px; font-weight: 600; color: var(--text-2); }
.prod .opts { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.prod .sold { font-size: 12.5px; font-weight: 700; color: var(--bad-text); }

/* Cuántas unidades de este producto ya van en el pedido. */
.prod .en-ticket {
  position: absolute; top: 8px; left: 8px; z-index: 2; min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-family: var(--font-num); font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(23, 36, 28, 0.25); animation: pop 300ms var(--ease-out);
}
/* El botón redondo de "agregar", como en la referencia. */
.prod-add {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 3px 10px rgba(27, 164, 91, 0.32);
  transition: background var(--dur) var(--ease), transform 90ms var(--ease-out);
}
.prod-add:hover { background: var(--accent-strong); }
.prod-add:active { transform: scale(0.9); }
.prod.agotado .tile .pimg { filter: grayscale(1); }
.prod.agotado .pname { color: var(--muted); }

/* --- Estados de espera ------------------------------------------------------- */
.esqueleto { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 14px; }
.esq { height: 172px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.esq::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 15%, rgba(23, 36, 28, 0.05) 45%, transparent 75%);
  animation: brillo 1.5s var(--ease) infinite;
}
@keyframes brillo { to { transform: translateX(100%); } }
.empty { color: var(--muted); text-align: center; padding: 46px 14px; }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }

/* --- Animaciones propias ----------------------------------------------------- */
@keyframes entrarTarjeta { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes nueva { 0% { background: var(--accent-soft); transform: translateX(10px); opacity: 0.35; } 55% { background: var(--accent-soft); } 100% { background: transparent; transform: none; opacity: 1; } }
/* Lo que vuela del catálogo al pedido. */
.fly { position: fixed; z-index: 90; pointer-events: none; border-radius: 12px; overflow: hidden; box-shadow: var(--sh-3); }

/* ============================================================================
   Order Details (panel del pedido)
   ============================================================================ */
.ticket {
  display: flex; flex-direction: column; min-height: 0; background: var(--surface);
  border-left: 1px solid var(--line); transition: box-shadow 300ms var(--ease);
}
.ticket.hit { box-shadow: inset 0 0 0 2px var(--accent); }

.ticket-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.ticket-head h2 { font-size: 17px; flex: 1; }

.ticket-lista {
  flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px;
  display: grid; gap: 8px; align-content: start; grid-auto-rows: max-content; overscroll-behavior: contain;
}
.ticket-drop { height: 1px; }
.ticket-vacio { display: grid; gap: 10px; justify-items: center; align-content: center; text-align: center; color: var(--muted); padding: 34px 22px; }
.ticket-vacio .ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.ticket-vacio strong { color: var(--text); font-size: 15px; }

.tgrupo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.tgrupo.entra { animation: entrarTarjeta 340ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 22ms); }
.tgrupo.mal { border-color: rgba(224, 87, 91, 0.5); }
.tg-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 4px; }
.tg-head strong { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-head .u { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tg-head .imp { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.tline { padding: 4px 12px 10px; }
.tline.nueva { animation: nueva 900ms var(--ease-out); border-radius: 10px; }
.tline .tl-txt { display: grid; gap: 2px; min-width: 0; }
.tline .op { font-size: 13px; color: var(--text-2); }
.tline .ex { font-size: 12.5px; color: var(--muted); }
.tline .ex::before { content: "· "; }
.tline .nt { font-size: 12.5px; color: var(--warn); font-weight: 600; }
.tline .warn { font-size: 12.5px; color: var(--bad-text); font-weight: 600; }
.tline .tl-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.tline .tl-unit { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tline .tl-imp { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tline .tl-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.tline .tl-ctl .stepper { background: var(--surface-2); }
.tline .tl-ctl .stepper button { width: 30px; height: 30px; }
.tline .tl-ctl .stepper output { min-width: 26px; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* Vaciar: enlace discreto a la derecha, como "Clear All Order". */
.link-vaciar { margin: 0 16px 4px; justify-self: end; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.link-vaciar:hover { color: var(--bad-text); text-decoration: underline; }
.link-vaciar.hidden { display: none; }

.ticket-pie { display: grid; gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.trow { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13.5px; }
.trow .num { font-variant-numeric: tabular-nums; }
.total { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.total .lbl { font-size: 14px; font-weight: 700; color: var(--text); }
.total .num { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.total .num.bump { animation: bump 380ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); color: var(--accent); } 100% { transform: scale(1); } }
.ticket-acc .btn.primary { min-height: 54px; font-size: 15.5px; }

/* ============================================================================
   Pedidos: sección completa (como en Administración), con las acciones del punto de venta
   ============================================================================ */
.pv {
  position: absolute; inset: 0; z-index: 31; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg); animation: pvEntra 180ms var(--ease-out);
}
@keyframes pvEntra { from { opacity: 0; transform: translateY(8px); } }
.pv-head {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.pv-title { display: grid; gap: 1px; min-width: 150px; }
.pv-title h2 { font-size: 22px; text-transform: none; letter-spacing: -0.02em; }
.pv-sub { font-size: 12.5px; color: var(--muted); }
.pv-search { position: relative; flex: 1 1 260px; max-width: 460px; margin-left: auto; }
.pv-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pv-search .input { padding-left: 42px; border-radius: 999px; min-height: 44px; }
.pv-tools { display: flex; align-items: center; gap: 8px; }
.pv-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; padding: 16px 24px 40px;
}
.pv-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-tabs .chip { min-height: 42px; }
.pv-tabs .chip .muted { font-family: var(--font-num); font-size: 12.5px; }

/* Resumen de la lista */
.pd-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-stat {
  display: grid; gap: 1px; min-width: 112px; padding: 9px 14px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line);
}
.pd-stat .label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pd-stat strong { font-size: 18px; font-family: var(--font-display); letter-spacing: -0.01em; }
.pd-stat.warn strong { color: var(--warn); }
.pd-stat.bad strong { color: var(--bad-text); }

.pd-alert {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; border-radius: 14px;
  background: var(--warn-soft); border: 1px solid rgba(184, 121, 26, 0.3); color: var(--warn);
}
.pd-alert .muted { color: var(--text-2); }
.pd-alert .chip.sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }

/* Cuadrícula: tarjetas de la misma altura por renglón, con el cobro y las acciones siempre abajo. */
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: stretch; }
.pd {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; border-left: 4px solid var(--warn);
}
.pd.entra { animation: entrarTarjeta 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
.pd.listo { border-left-color: var(--accent); }
.pd.cancelado { border-left-color: var(--line-2); background: var(--surface-2); }
.pd.cancelado .pd-items, .pd.cancelado .pd-cliente { opacity: 0.6; }
.pd.viejo { border-color: rgba(184, 121, 26, 0.45); }
.pd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.pd-folio { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; color: var(--accent); }
.pd-cliente { flex: 1; min-width: 80px; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.pd-t.alerta { color: var(--warn); font-weight: 700; }
.pd-tipo { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.pd-tipo.llevar { background: var(--accent-soft); color: var(--accent-strong); }
.pd-nota { padding: 8px 12px; border-radius: 11px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }

/* Productos del pedido: se tocan para marcarlos como "salió". */
.pd-items { list-style: none; margin: 0; padding: 4px 0 0; display: grid; border-top: 1px dashed var(--line-2); }
.pd-items li { border-bottom: 1px dashed var(--line); }
.pd-items li:last-child { border-bottom: 0; }
.pd-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; gap: 10px; width: 100%;
  padding: 9px 6px; border-radius: 10px; text-align: left; transition: background 140ms var(--ease);
}
.pd-item:hover:not(:disabled) { background: var(--surface-2); }
.pd-item:disabled { cursor: default; }
.pd-chk {
  width: 26px; height: 26px; margin-top: 0; display: grid; place-items: center; border-radius: 8px;
  border: 2px solid var(--line-2); color: #fff;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease-out);
}
.pd-item.sal .pd-chk { background: var(--accent); border-color: var(--accent); transform: scale(0.95); }
.pd-item.sal .pd-it-n { color: var(--muted); text-decoration: line-through; }
.pd-it { min-width: 0; display: grid; gap: 2px; }
.pd-it-n { font-weight: 600; overflow-wrap: anywhere; }
.pd-qty { margin-right: 6px; color: var(--accent-strong); font-family: var(--font-num); font-weight: 700; }
.pd-ex { font-size: 13px; color: var(--text-2); }
.pd-itnota { font-size: 13px; color: var(--warn); font-style: italic; }
.pd-sub { font-weight: 700; font-variant-numeric: tabular-nums; }

.pd-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.pd-prog { font-size: 12.5px; color: var(--muted); }
.pd-tot { display: grid; gap: 3px; }
.pd-tot .r { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.pd-tot .r.t { font-size: 17px; font-weight: 800; color: var(--text); }
.pd-tot .num { font-variant-numeric: tabular-nums; }
.pd.cancelado .pd-tot .r.t { text-decoration: line-through; color: var(--muted); }
.pd-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 6px; }

@media (max-width: 900px) {
  .pv-head { padding: 10px 14px; }
  .pv-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .pv-tools { margin-left: auto; }
  .pv-body { padding: 12px 14px 90px; }
}
@media (max-width: 620px) {
  /* Dentro de Pedidos el buscador del menú sobra: se gana espacio para ver más pedidos. */
  .shell.en-pedidos .consola-centro { display: none; }
}
@media (max-width: 560px) {
  /* Los filtros van en un solo renglón que se desliza, en vez de ocupar dos. */
  .pv-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .pv-tabs::-webkit-scrollbar { display: none; }
  .pv-tabs .chip { flex: none; }
  .pd-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-stats { gap: 8px; }
  .pd-stat { min-width: 0; flex: 1 1 28%; padding: 8px 10px; }
  .pd-stat strong { font-size: 16px; }
}
@media (pointer: coarse) {
  .pd-acts .btn.sm { min-height: 42px; }
  .pd-item { padding: 11px 6px; }
  .pv-tabs .chip { min-height: 44px; }
}

/* ============================================================================
   Modal de producto
   ============================================================================ */
.pm-hero { position: relative; height: 0; padding-bottom: 44%; border-radius: 12px; overflow: hidden; background: var(--surface-2); font-size: 40px; }
.pm-hero > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.pm-cat { font-size: 12.5px; color: var(--muted); }
.bloque { display: grid; gap: 9px; }
.bloque-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bloque-h .muted { font-size: 12px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-grid .chip { min-height: 44px; padding: 0 16px; font-size: 14px; }
.xrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 10px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.xrow.on { border-color: var(--accent); background: var(--accent-soft); }
.xrow .nm { font-weight: 600; }
.xrow .pr { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.xrow .stepper { grid-column: 1 / -1; justify-self: end; background: var(--surface); }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qty-row .stepper output { min-width: 44px; font-size: 17px; }

/* ============================================================================
   Cobro
   ============================================================================ */
/* --- Bloque de pago: Resumen + Método (como en la referencia) ---------------- */
.panel-pago {
  display: grid; gap: 14px; padding: 16px;
  border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--surface);
}
.panel-pago h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.resumen-pago { display: grid; gap: 8px; }
.resumen-pago .rp { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--text-2); font-size: 14px; }
.resumen-pago .rp .num { font-variant-numeric: tabular-nums; }
.resumen-pago .rp.hidden { display: none; }
.resumen-pago .rp.total {
  border-top: 1px solid var(--line); padding-top: 11px; margin-top: 3px;
  color: var(--text); font-weight: 700; font-size: 15.5px;
}
.resumen-pago .rp.total .num { font-family: var(--font-display); font-size: 24px; }
.metodos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metodo {
  display: grid; justify-items: center; gap: 8px; padding: 16px 10px; min-height: 84px;
  border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line);
  color: var(--text-2); font-weight: 600; font-size: 13px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), transform 90ms var(--ease-out);
}
.metodo svg { color: var(--muted); transition: color var(--dur) var(--ease); }
.metodo:hover { background: var(--surface-2); color: var(--text); }
.metodo:hover svg { color: var(--text-2); }
.metodo:active { transform: scale(0.98); }
.metodo.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.metodo.on svg { color: var(--accent); }
.propinas { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.propinas .chip { min-height: 38px; padding: 0 14px; font-size: 13px; }
.billetes { display: flex; flex-wrap: wrap; gap: 7px; }
.billetes .chip { min-height: 38px; padding: 0 13px; font-size: 13px; font-variant-numeric: tabular-nums; }
/* La opción elegida (propina o billete) se ve en verde sólido, no solo con un borde. */
.propinas .chip.active, .billetes .chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(27, 164, 91, 0.28);
}
.propinas .chip.active:hover, .billetes .chip.active:hover { background: var(--accent-strong); color: #fff; }
/* Propina en monto: caja gris a la derecha de los porcentajes; se pone verde cuando es la elegida. */
.propina-otro {
  margin-left: auto; display: grid; gap: 1px; padding: 6px 14px 7px; border-radius: 13px; cursor: text;
  background: var(--surface-2); border: 2px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.propina-otro:hover { border-color: var(--line-2); }
.propina-otro:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.propina-otro.on { border-color: var(--accent); background: var(--accent-soft); }
.po-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.propina-otro.on .po-lbl, .propina-otro.on .po-sig { color: var(--accent-strong); }
.po-campo { display: flex; align-items: baseline; gap: 4px; }
.po-sig { font-size: 20px; font-weight: 700; color: var(--text-2); }
.po-input {
  width: 92px; min-width: 0; padding: 0; border: 0; background: transparent; outline: none; -moz-appearance: textfield;
  font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
}
.po-input:focus-visible { outline: none; }
.po-input::-webkit-outer-spin-button, .po-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 620px) {
  .propina-otro { flex: 1 1 100%; margin-left: 0; }
  .po-input { width: 100%; }
}
.cambio-box {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 9px; padding: 12px 15px; border-radius: 12px; background: var(--ok-soft);
}
.cambio-box .lbl { font-size: 12.5px; font-weight: 600; color: var(--ok-text); }
.cambio-box .num { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ok-text); font-variant-numeric: tabular-nums; }
.pay-rows { display: grid; gap: 2px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-radius: 10px; }
.pay-row:nth-child(odd) { background: var(--surface-2); }
.pay-row.strong { background: var(--accent-soft); font-weight: 700; }
.pay-row .num { font-variant-numeric: tabular-nums; }
.caja-body { display: grid; gap: 14px; }
/* Dos campos lado a lado (fondo/efectivo contado, observaciones). */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 620px) { .pay-grid { grid-template-columns: minmax(0, 1fr); } }
.warn-note { margin: 0; padding: 11px 13px; border-radius: 11px; font-size: 13px; background: var(--warn-soft); color: var(--warn); }
hr.thin { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.done-box { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 12px 0; }
.done-box .done-ok {
  width: 78px; height: 78px; border-radius: 50%; background: var(--ok-soft); color: var(--ok-text);
  display: grid; place-items: center; animation: pop 340ms var(--ease-out);
}
.done-box .folio { font-family: var(--font-display); font-size: 46px; font-weight: 700; color: var(--accent); line-height: 1; }

/* Modo mesero: el pedido queda «pendiente por pagar». */
.aviso-pago {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 12px;
  background: var(--warn-soft); color: var(--warn); font-size: 13.5px; line-height: 1.4;
}
.aviso-pago svg { margin-top: 1px; }
.aviso-pago strong { color: var(--warn); }
/* Con tres botones (volver · pendiente por pagar · cobrar) en un celular, pasan a un segundo renglón. */
.modal-actions { flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 150px; }
.modal-actions .btn.lg { padding-left: 14px; padding-right: 14px; }

/* ============================================================================
   Ajustes de pantalla
   ============================================================================ */
.cart-fab { display: none; }
.close-cart { display: none; }

@media (max-width: 1280px) {
  .cuerpo { grid-template-columns: 92px minmax(0, 1fr) 322px; }
  .consola { column-gap: 12px; row-gap: 10px; }
  .buscador { flex-basis: 260px; }
}
@media (max-width: 1080px) {
  .cuerpo { grid-template-columns: 88px minmax(0, 1fr) 300px; }
  .marca-rol, .reloj { display: none; }
  .acc-btn .txt { display: none; }
  .acc-btn { padding: 0 11px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }
}
@media (max-width: 900px) {
  .cuerpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .crail {
    flex-direction: row; align-items: center; gap: 8px; overflow: hidden;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px;
  }
  .crail-lista { flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; }
  .crail-pie {
    flex: none; display: flex; align-items: center;
    margin: 0 0 0 4px; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line);
  }
  .crail-titulo { display: none; }
  .crail-btn { flex: none; min-width: 92px; min-height: 0; padding: 10px 8px; }
  .crail-btn::before { left: 50%; top: auto; bottom: 3px; width: 0; height: 3px; transform: translateX(-50%); transition: width 240ms var(--ease-out); }
  .crail-btn.active::before { width: 46%; height: 3px; }
  /* El carrito (fuera de pantalla hasta abrirlo) no debe ensanchar la página en celular. */
  .cuerpo { overflow: hidden; }
  .contenido { padding-bottom: 104px; }
  .ticket {
    position: absolute; z-index: 40; inset: 0 0 0 auto; width: min(400px, 100%);
    transform: translateX(101%); box-shadow: var(--sh-3); visibility: hidden;
    transition: transform 240ms var(--ease-out), visibility 0s linear 240ms;
  }
  .ticket.abierto { transform: none; visibility: visible; transition-delay: 0s; }
  .close-cart { display: inline-grid; }
  .cart-fab {
    display: flex; position: absolute; z-index: 20; left: 12px; right: 12px; bottom: 14px; min-height: 56px;
    border-radius: 14px; padding: 0 18px; align-items: center; justify-content: space-between;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
    box-shadow: 0 8px 22px rgba(27, 164, 91, 0.32);
  }
  .cart-fab.hidden { display: none; }
}
@media (max-width: 620px) {
  .consola { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .consola-centro { grid-column: 1 / -1; flex-direction: column; align-items: stretch; }
  .consola-acc { grid-column: 1 / -1; justify-content: flex-end; }
  .buscador { flex: none; }
  .marca-nombre { font-size: 16px; max-width: 14ch; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .contenido { padding: 12px 12px 104px; }
  .sec-h { margin: 0 -12px 10px; padding: 10px 12px 8px; }
  .buscador kbd { display: none; }
  .buscador .input { padding-right: 48px; }
  .panel-pago { padding: 13px; }
}

/* ============================================================================
   Pantallas táctiles (celular / tablet): letra de 16 px en campos y toques de 40 px o más
   ============================================================================ */
@media (pointer: coarse) {
  .buscador .input { font-size: 16px; }
  .btn.sm { min-height: 40px; }
  .prod-add { width: 44px; height: 44px; right: 8px; bottom: 8px; }
  .tline .tl-ctl .stepper button { width: 40px; height: 40px; }
  .link-vaciar { min-height: 40px; padding: 0 6px; }
  .propinas .chip, .billetes .chip { min-height: 44px; }
}

/* ============================================================================
   Modo mesero: solo lo necesario para tomar el pedido
   ============================================================================ */
.shell.mesero .reloj { display: none; }
.shell.mesero .marca-rol { color: var(--accent-strong); font-weight: 700; }
.shell.mesero .acc-btn.on { border-style: solid; }

/* ============================================================================
   Modo cocina: el tablero de pedidos por preparar (leerse de lejos y con prisa)
   Usa la barra superior del POS (.consola); lo demás lleva el prefijo kc-.
   ============================================================================ */
.shell.cocina { position: relative; }
.shell.cocina .reloj { font-size: 15px; padding: 0 4px; }

.kc-tabs { display: flex; align-items: center; justify-content: center; gap: 8px; }
.kc-tabs .chip { min-height: 46px; padding: 0 18px; font-size: 15px; }
.kc-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2);
  font-family: var(--font-num); font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}
.chip.active .kc-count { background: var(--accent); color: #fff; }
/* Sonido apagado: se resalta en ámbar para que no pase desapercibido que no va a sonar. */
.acc-btn.apagado { background: var(--warn-soft); border-color: rgba(184, 121, 26, 0.45); color: var(--warn); }

.kc-board {
  min-height: 0; overflow: auto; padding: 16px 24px 96px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-content: start;
  /* Cada fila mide lo que su pedido: sin esto, con varios pedidos la cuadrícula los aprieta y se recortan. */
  grid-auto-rows: max-content;
  overscroll-behavior: contain;
}

/* Resumen del tablero (como el de Pedidos) */
.kc-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.kc-stat {
  display: grid; gap: 1px; min-width: 112px; padding: 9px 14px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line);
}
.kc-stat .label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kc-stat strong { font-size: 20px; font-family: var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Pedido */
.kc-ticket {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 16px 18px 14px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 18px;
}
.kc-ticket.listo { border-left-color: var(--accent); }
/* Solo el pedido que acaba de aparecer se anima: al refrescar, los demás se quedan quietos. */
.kc-ticket.entra { animation: entrarTarjeta 400ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
/* Pedido nuevo: aro verde mientras se resalta. */
.kc-ticket.fresh { border-color: var(--accent); border-left-color: var(--warn); box-shadow: 0 0 0 3px var(--accent-soft), var(--sh-2); }
.kc-ticket.fresh.listo { border-left-color: var(--accent); }

.kc-head { display: flex; align-items: center; gap: 10px; }
.kc-folio {
  font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--accent);
  line-height: 1; letter-spacing: -0.01em;
}
.kc-who { flex: 1; min-width: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-head .icon-btn { width: 38px; height: 38px; }
.kc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.kc-tipo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.kc-tipo.llevar { background: var(--accent-soft); color: var(--accent-strong); }
/* Tiempo transcurrido: neutro, sin colores de urgencia (hay pedidos para una hora o por teléfono). */
.kc-mins { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* Productos: se tocan para marcarlos como "salió". */
.kc-items { display: grid; border-top: 1px dashed var(--line-2); padding-top: 4px; }
.kc-item {
  display: grid; grid-template-columns: 32px auto minmax(0, 1fr); gap: 12px; align-items: start;
  width: 100%; text-align: left; padding: 11px 6px; min-height: 58px; border-radius: 10px;
  border-bottom: 1px dashed var(--line);
  transition: background 140ms var(--ease);
}
.kc-item:last-child { border-bottom: 0; }
.kc-item:hover:not(:disabled) { background: var(--surface-2); }
.kc-item:active:not(:disabled) { background: var(--surface-3); }
.kc-item:disabled { cursor: default; }
.kc-box {
  width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--line-2);
  display: grid; place-items: center; color: transparent;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease-out);
}
.kc-item.done .kc-box { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(0.95); }
.kc-qty { font-family: var(--font-num); font-size: 19px; font-weight: 700; color: var(--accent-strong); min-width: 32px; line-height: 32px; }
.kc-txt { display: grid; gap: 2px; padding-top: 3px; min-width: 0; }
.kc-nm { font-size: 18px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.kc-ex { font-size: 14.5px; color: var(--text-2); }
.kc-ex::before { content: "• "; color: var(--maiz); }
.kc-ex.note { color: var(--warn); font-style: italic; }
.kc-ex.note::before { content: ""; }
.kc-item.done .kc-qty, .kc-item.done .kc-nm, .kc-item.done .kc-ex { color: var(--muted); text-decoration: line-through; }

.kc-note { padding: 9px 12px; border-radius: 11px; background: var(--warn-soft); color: var(--warn); font-size: 14.5px; font-weight: 600; }

.kc-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.kc-prog { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.kc-acts { display: flex; gap: 8px; justify-content: space-between; }
.kc-acts .btn { flex: 1; min-height: 52px; font-size: 16px; }
.kc-acts .icon-btn { width: 52px; height: 52px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.kc-acts .icon-btn.danger { color: var(--bad-text); border-color: rgba(224, 87, 91, 0.45); }

/* Progreso: se anima con transform (no con width) para no reacomodar el layout. */
.kc-bar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.kc-bar > i {
  display: block; height: 100%; width: 100%; background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 260ms var(--ease-out);
}

.kc-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 13vh 16px; }
.kc-empty .big { color: var(--muted); opacity: 0.55; }
.kc-empty h2 { font-size: 22px; }

.kc-undo {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--sh-3); font-weight: 600; animation: pop 200ms var(--ease-out);
  max-width: calc(100% - 24px);
}

@media (max-width: 620px) {
  /* En celular: marca y botones en una fila; las pestañas, debajo y a lo ancho. */
  .shell.cocina .consola { grid-template-columns: minmax(0, 1fr) auto; }
  .shell.cocina .consola-acc { grid-column: 2; grid-row: 1; }
  .shell.cocina .consola-centro { grid-column: 1 / -1; grid-row: 2; flex-direction: row; }
  .kc-tabs { width: 100%; }
  .kc-tabs .chip { flex: 1; justify-content: center; padding: 0 12px; }
  .kc-board { padding: 12px 12px 96px; grid-template-columns: minmax(0, 1fr); }
  .kc-stats { gap: 8px; }
  .kc-stat { min-width: 0; flex: 1 1 28%; padding: 8px 10px; }
  .kc-stat strong { font-size: 17px; }
  .kc-stat.opc { display: none; } /* en celular se prioriza lo que falta por salir */
}
@media (pointer: coarse) {
  .kc-item { padding: 12px 6px; }
}
