/* RestyBar — estilos base
   Pensado para celular (garzón) y tablet (cocina, bar, caja).
   Botones de al menos 48 px de alto para tocar con el dedo en pleno servicio. */

:root {
  /* Base */
  --tinta: #18181B;
  --fondo: #E6E6E9;
  --superficie: #FFFFFF;
  --linea: #E0E0E5;
  --suave: #63636B;
  /* Color del local: layout.php lo reemplaza por el que eligió cada negocio */
  --acento: #2E7D6B;
  /* Barra lateral y barra superior */
  --panel: #1C1C1F;
  --panel-2: #2B2B30;
  --panel-texto: #C8C8CE;
  --panel-texto-suave: #8E8E96;
  /* Estados */
  --mostaza: #C9973A;
  --mostaza-osc: #8A6420;
  --ok: #2F7A5B;
  --ok-fondo: #E3F1EA;
  --mal: #B5483E;
  --mal-fondo: #F8E6E3;
  --atencion-fondo: #FBF1DC;
  /* Forma */
  --radio: 22px;
  --radio-chico: 12px;
  --sb-ancho: 70px;
  --margen-app: 16px;
  --sombra: 0 18px 36px -26px rgba(24, 24, 27, .55);
  --fuente: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--fondo);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; margin-top: .25rem; }
p { margin: 0 0 .75rem; }
a { color: var(--tinta); text-underline-offset: 3px; }
code { background: var(--fondo); padding: .1em .35em; border-radius: 4px; font-size: .95em; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 55%, transparent); outline-offset: 2px; }

/* ---------- Contenido ---------- */

.contenido {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
}
.encabezado h1 { margin: 0; }

.migas { margin: 0 0 .25rem; font-size: .95rem; }
.migas a { color: var(--suave); }
.migas a::before { content: "‹ "; }
.migas a:hover { color: var(--acento); }

.tarjeta {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: var(--radio);
  padding: 1.25rem 1.35rem;
  margin: 0 0 1rem;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(24, 24, 27, .03), 0 18px 36px -30px rgba(24, 24, 27, .45);
}

.columnas { display: grid; gap: 1rem; align-items: start; }
.columnas > .tarjeta { margin: 0; }
@media (min-width: 760px) {
  .columnas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columnas > .acciones { grid-column: 1 / -1; }
}

.angosto { max-width: 34rem; }

.suave { color: var(--suave); }
.texto-mal { color: var(--mal); }
.texto-bien { color: var(--ok); font-weight: 700; margin: .25rem 0 0; }

/* ---------- Avisos ---------- */

.aviso {
  border-radius: var(--radio-chico);
  padding: .8rem 1rem;
  margin: 0 0 1rem;
  border-left: 5px solid;
}
.aviso-ok { background: var(--ok-fondo); border-color: var(--ok); }
.aviso-error { background: var(--mal-fondo); border-color: var(--mal); }
.aviso-info { background: var(--atencion-fondo); border-color: var(--mostaza); }

/* ---------- Formularios ---------- */

.formulario label,
.formulario legend { display: block; font-weight: 700; margin: 1rem 0 .35rem; }
.formulario legend { font-size: 1.2rem; margin-top: 0; padding: 0; }
.formulario fieldset { border: 1px solid var(--linea); }
.formulario fieldset.tarjeta { margin: 0; }
.formulario h2 + label,
.formulario legend + label,
.formulario input[type="hidden"] + label { margin-top: .5rem; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--tinta);
  background: #fff;
  border: 1px solid #D4D4DA;
  border-radius: var(--radio-chico);
  padding: .7rem .85rem;
  min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--acento); outline: 3px solid color-mix(in srgb, var(--acento) 22%, transparent); outline-offset: 0; }
textarea { resize: vertical; }

.ayuda { display: block; color: var(--suave); font-size: .9rem; margin-top: .3rem; }
.error-campo { display: block; color: var(--mal); font-weight: 700; font-size: .92rem; margin-top: .3rem; }

.campo-clave { display: flex; gap: .4rem; }
.campo-clave input { flex: 1; min-width: 0; }
.ver-clave {
  font: inherit;
  background: var(--fondo);
  border: 1px solid #C3CBD4;
  border-radius: var(--radio-chico);
  padding: 0 .9rem;
  cursor: pointer;
  min-width: 64px;
}

.check { display: flex !important; gap: .6rem; align-items: center; font-weight: 400 !important; }
.check input { width: 22px; height: 22px; accent-color: var(--acento); }

.opciones-rol { border: 0; padding: 0; margin: 1rem 0 0; }
.opciones-rol legend { margin-bottom: .5rem; font-size: 1rem; }
.opcion {
  display: flex !important;
  gap: .75rem;
  align-items: flex-start;
  border: 1px solid var(--linea);
  border-radius: var(--radio-chico);
  padding: .75rem;
  margin: 0 0 .5rem !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.opcion input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--acento); flex: none; }
.opcion span { display: flex; flex-direction: column; }
.opcion small { color: var(--suave); }
.opcion:has(input:checked) { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); background: color-mix(in srgb, var(--acento) 6%, #fff); }

.acciones { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.25rem; }
.botonera { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.botonera form { margin: 0; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: .6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #D4D4DA;
  background: var(--superficie);
  color: var(--tinta);
  text-decoration: none;
  cursor: pointer;
  margin-top: .25rem;
  gap: .5rem;
  transition: border-color .15s, background .15s, filter .15s, transform .15s, box-shadow .2s;
}
.btn:hover { border-color: var(--tinta); }
.btn:active { transform: scale(.97); }
.btn-principal { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--acento) 85%, transparent); }
.btn-principal:hover { background: var(--acento); border-color: var(--acento); filter: brightness(1.08); }
.btn-oscuro { background: var(--panel); border-color: var(--panel); color: #fff; }
.btn-oscuro:hover { background: var(--panel-2); border-color: var(--panel-2); }
.btn-peligro { background: var(--mal); border-color: var(--mal); color: #fff; }
.btn-peligro:hover { background: var(--mal); border-color: var(--mal); filter: brightness(.9); }
.btn-ancho { width: 100%; margin-top: 1.5rem; }
.btn-chico { min-height: 40px; padding: .35rem .8rem; font-size: .95rem; margin: 0; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Resumen y listas ---------- */

.resumen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 760px) { .resumen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.resumen > div {
  --tono: var(--panel);
  border-radius: var(--radio);
  padding: 1rem 1.15rem;
  color: #fff;
  background: var(--tono);
  box-shadow: 0 18px 36px -28px rgba(24, 24, 27, .8);
}
.resumen dt { font-size: .88rem; color: var(--panel-texto); }
.resumen dd { margin: .1rem 0 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.resumen dd small, .resumen dd span { color: #fff !important; opacity: .85; }
.resumen dd, .resumen dd.texto-mal, .resumen dd.texto-bien { color: #fff; margin: .1rem 0 0; }
.resumen > div:has(dd.texto-mal) { --tono: #9E3B33; }
.resumen > div:has(dd.texto-bien) { --tono: #24624A; }

.lista { list-style: none; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .95); border-radius: var(--radio); background: rgba(255, 255, 255, .78); overflow: hidden; }
.lista > li + li { border-top: 1px solid var(--linea); }
.lista-fila {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  padding: .9rem 1rem;
  text-decoration: none;
  color: inherit;
}
a.lista-fila:hover { background: rgba(24, 24, 27, .03); }
.lista-principal { display: flex; flex-direction: column; min-width: 0; flex: 1 1 16rem; }
.lista-lateral { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }
.lista-compacta { border: 0; border-radius: 0; background: transparent; }
.lista-compacta .lista-fila { padding: .6rem 0; }
.inactivo { background: #F2F4F6; }
.inactivo strong { color: var(--suave); }

.estado, .pago {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
}
.estado-activo { background: var(--ok-fondo); color: var(--ok); }
.estado-suspendido { background: var(--mal-fondo); color: var(--mal); }
.estado-baja { background: #E6EAEE; color: var(--suave); }
.pago-bien { color: var(--ok); padding: 0; }
.pago-mal { background: var(--mal-fondo); color: var(--mal); }
.pago-atencion { background: var(--atencion-fondo); color: #7A5600; }
.pago-neutro { color: var(--suave); padding: 0; }

/* ---------- Pasos de configuración ---------- */

.pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; }
.pasos li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: .25rem .75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--linea);
}
.pasos li:first-child { border-top: 0; padding-top: .25rem; }
.pasos li::before {
  content: counter(paso);
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--tinta);
  display: grid; place-items: center;
  font-weight: 700;
}
.pasos li.hecho::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.pasos li > a, .pasos li > span { grid-column: 2; justify-self: start; }
.pasos p { margin: 0; }
@media (min-width: 640px) {
  .pasos li { grid-template-columns: 2.25rem 1fr auto; align-items: center; }
  .pasos li > a, .pasos li > span { grid-column: 3; }
}

/* ---------- Estados vacíos ---------- */

.vacio {
  background: var(--superficie);
  border: 2px dashed var(--linea);
  border-radius: var(--radio);
  padding: 2rem 1.25rem;
  max-width: 40rem;
}

/* ---------- Acceso (login / instalación) ---------- */

.pagina-acceso { background: var(--panel); }
.pagina-acceso .contenido { padding-top: 0; }
.acceso { max-width: 26rem; margin: 0 auto; padding: max(2.5rem, env(safe-area-inset-top)) 0 2rem; }
.acceso-ancho { max-width: 36rem; }
.acceso-marca { color: #fff; margin-bottom: 1.5rem; }
.marca {
  display: inline-block;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  padding-bottom: .4rem;
  border-bottom: 6px solid var(--acento);
}
.acceso-marca p { color: #C4D0D6; margin: .75rem 0 0; font-size: 1.05rem; }
.acceso .tarjeta { padding: 1.5rem; }
.acceso .formulario > label:first-of-type { margin-top: 0; }
.acceso-pie { color: #C4D0D6; margin-top: 1rem; font-size: .95rem; }
.pagina-acceso .contenido > .aviso { max-width: 26rem; margin: 1rem auto 0; }

.chequeos { list-style: none; margin: 0; padding: 0; }
.chequeos li { display: flex; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--linea); }
.chequeos li:first-child { border-top: 0; }
.chequeos li > span { flex: none; width: 5.5rem; font-weight: 700; font-size: .9rem; }
.chequeos .bien > span { color: var(--ok); }
.chequeos .mal > span { color: var(--mal); }
.chequeos small { display: block; color: var(--suave); }

/* ---------- Bloques (categorías de la carta, zonas del salón) ---------- */

.bloque {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  margin: 0 0 1.25rem;
  scroll-margin-top: 7rem;
}
.bloque-cabeza {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--linea);
}
.bloque-cabeza h2 { margin: 0; }
.bloque .lista { border: 0; border-radius: 0; }
.bloque .lista-fila { scroll-margin-top: 7rem; }
.bloque-pie { padding: .75rem 1rem; margin: 0; border-top: 1px solid var(--linea); }
.bloque.inactivo .bloque-cabeza { background: #F2F4F6; }

.flechas { display: inline-flex; gap: .25rem; }
.btn-icono { min-width: 40px; padding: .35rem .5rem; font-size: 1.1rem; }
.btn-icono[disabled] { opacity: .3; cursor: default; }

.destino {
  display: inline-block;
  margin-left: .35rem;
  font-size: .82rem;
  font-weight: 700;
  padding: .05rem .5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.destino-cocina { color: #8A4B12; }
.destino-bar { color: #2D5C8A; }
.destino-ninguno { color: var(--suave); }

/* Mesas como fichas */
.mesas {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: .6rem;
}
.mesa {
  transition: transform .12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 2px solid var(--tinta);
  border-radius: var(--radio);
  text-decoration: none;
  color: var(--tinta);
  background: var(--superficie);
  line-height: 1.15;
}
.mesa strong { font-size: 1.6rem; }
.mesa span { font-size: .82rem; color: var(--suave); }
.mesa:hover { transform: translateY(-2px); }
.mesa-ocupada { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 11%, #fff); }
.mesa-inactiva { border-style: dashed; border-color: #C3CBD4; color: var(--suave); }

.oculto-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Selección de varias mesas */
.mesa-elegible { cursor: pointer; position: relative; user-select: none; }
.mesa-elegible input {
  position: absolute;
  top: .4rem; right: .4rem;
  width: 22px; height: 22px;
  margin: 0;
  accent-color: var(--tinta);
}
.mesa-elegible.marcada,
.mesa-elegible:has(input:checked) { background: var(--acento); color: #fff; border-color: var(--acento); }
.mesa-elegible.marcada span,
.mesa-elegible:has(input:checked) span { color: #C4D0D6; }
.mesa-elegible:has(input:focus-visible) { outline: 3px solid var(--acento); outline-offset: 2px; }
.marcar-todas { margin: 0 !important; }

.barra-lote {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-top: 3px solid var(--acento);
  border-radius: var(--radio);
  box-shadow: 0 -6px 22px -10px rgba(29, 43, 54, .3);
}
.barra-lote-acciones { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1 1 22rem; justify-content: flex-end; }
.barra-lote-acciones select { width: auto; flex: 1 1 10rem; }
.barra-lote-acciones .btn { margin: 0; }

.dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }


/* =========================================================
   Garzón
   ========================================================= */

.filtro { display: inline-flex; border: 1px solid #C3CBD4; background: var(--superficie); border-radius: var(--radio-chico); overflow: hidden; }
.filtro a { padding: .55rem 1rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.filtro a[aria-current="page"] { background: var(--acento); color: #fff; font-weight: 700; }

.zona-plano h2 { margin: 1.25rem 0 .6rem; font-size: 1.1rem; color: var(--suave); }
.zona-plano:first-child h2 { margin-top: 0; }
.mesas-plano { padding: 0; grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr)); }
.mesas-plano .mesa { aspect-ratio: auto; min-height: 7rem; padding: .5rem .35rem; gap: .1rem; text-align: center; position: relative; }
.mesa-libre { border-style: dashed; border-color: #B4BEC8; }
.mesa-libre strong { color: var(--suave); }
.mesas-plano .mesa-ocupada { border-style: solid; border-color: var(--acento); background: color-mix(in srgb, var(--acento) 11%, #fff); }
.mesas-plano .mesa-mia { border-color: var(--tinta); border-width: 3px; }
.mesa-total { font-weight: 700; color: var(--tinta) !important; font-size: .95rem !important; }
.insignia-listos {
  position: absolute; top: -.55rem; right: -.4rem;
  background: var(--ok); color: #fff !important; font-weight: 700;
  border-radius: 999px; padding: .1rem .5rem; font-size: .8rem !important;
  box-shadow: 0 0 0 3px var(--fondo);
}
.sin-conexion { opacity: .55; }
.sin-conexion::before { content: "Sin conexión. Reintentando…"; display: block; color: var(--mal); font-weight: 700; margin-bottom: .5rem; }

.contador-grande { display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; gap: .5rem; max-width: 16rem; }
.contador-grande .btn { margin: 0; font-size: 1.5rem; padding: 0; }
.contador-grande input { text-align: center; font-size: 1.4rem !important; font-weight: 700; }
.opcion-destacada { margin-top: 1.25rem !important; }

.btn-grande { min-height: 56px; font-size: 1.1rem; padding: .7rem 1.4rem; }
.encabezado-mesa { align-items: flex-start; }
.encabezado-mesa p { margin: .25rem 0 0; }

.aviso-accion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }

/* Cuenta de la mesa */
.items { list-style: none; margin: 0; padding: 0; }
.tarjeta.items { padding: 0 1rem; }
.item { padding: .75rem 0; border-top: 1px solid var(--linea); }
.items > .item:first-child { border-top: 0; }
.item-linea { display: flex; gap: .5rem; align-items: baseline; }
.item-cant { font-weight: 700; min-width: 2rem; }
.item-nombre { flex: 1; }
.item-monto { font-weight: 700; white-space: nowrap; }
.item-meta { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: .25rem 0 0 2.5rem; font-size: .92rem; align-items: center; }
.item-nota { font-style: italic; }
.item-nota::before { content: "Nota: "; font-style: normal; color: var(--suave); }
.item-acciones { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0 2.5rem; align-items: flex-start; }
.item-acciones form { margin: 0; }
.item-anulado .item-nombre, .item-anulado .item-monto { text-decoration: line-through; color: var(--suave); }

.estado-item { font-size: .8rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.est-pendiente { background: #E6EAEE; color: var(--suave); }
.est-preparando { background: var(--atencion-fondo); color: #7A5600; }
.est-listo { background: var(--ok); color: #fff; }
.est-entregado { color: var(--ok); padding-left: 0; }
.est-anulado { background: var(--mal-fondo); color: var(--mal); }

.reasignar summary { list-style: none; }
.reasignar summary::-webkit-details-marker { display: none; }
.reasignar[open] { flex-basis: 100%; }
.reasignar-form { margin-top: .5rem; padding: .75rem; background: var(--fondo); border-radius: var(--radio-chico); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 .6rem; }
.chip {
  display: inline-flex !important; align-items: center; gap: .35rem;
  border: 1px solid #C3CBD4; border-radius: 999px;
  padding: .45rem .85rem; min-height: 44px; margin: 0 !important;
  background: var(--superficie); font-weight: 400 !important; cursor: pointer; user-select: none;
}
.chip input { width: 18px; height: 18px; accent-color: var(--tinta); margin: 0; }
.chip:has(input:checked) { background: var(--acento); color: #fff; border-color: var(--acento); }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 3px solid var(--acento); outline-offset: 2px; }

.comensal { padding: .25rem 1rem .75rem; }
.comensal-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .75rem 0 .25rem; border-bottom: 2px solid var(--tinta); margin-bottom: .25rem; }
.comensal-cabeza h2 { margin: 0; font-size: 1.15rem; }
.comensal > p { margin: .6rem 0; }
.comensal-alerta { border-color: var(--mal); background: var(--mal-fondo); }
.comensal-alerta .comensal-cabeza { border-color: var(--mal); color: var(--mal); }
.renombrar { margin-top: .5rem; font-size: .92rem; }
.renombrar summary { cursor: pointer; color: var(--suave); padding: .35rem 0; }
.fila-form { display: flex; gap: .5rem; margin-top: .4rem; }
.fila-form input { flex: 1; min-width: 0; }

.cuadre-lista { margin: 0 0 .5rem; }
.cuadre-lista > div { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dashed var(--linea); }
.cuadre-lista dd { margin: 0; font-weight: 700; }
.cuadre-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: .4rem; }
.cuadre-total strong { font-size: 1.5rem; }
.cuadre-estado { margin: .5rem 0 0; }
.cuadre-pagos { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .4rem; padding-top: .4rem; border-top: 1px dashed var(--linea); }
.cuadre-lista dt small { margin-left: .4rem; font-weight: 700; }

.quitados { margin: 0 0 1rem; }
.quitados summary { cursor: pointer; color: var(--suave); padding: .5rem 0; }
.pie-mesa { margin-top: .5rem; }

/* Toma de pedido */
.pantalla-pedido .contenido { padding-bottom: 7rem; }
.para-quien {
  position: sticky; top: var(--alto-barra, 5.5rem); z-index: 4;
  background: var(--fondo); padding: .5rem 0 .25rem; margin: 0 0 .5rem;
  border-bottom: 1px solid var(--linea);
}
.para-quien h2 { font-size: 1rem; margin: 0 0 .25rem; }
.para-quien .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.compartido-entre .ayuda { margin: 0; }
.buscador { margin: .5rem 0; }
.categorias-nav { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem 0 .75rem; scrollbar-width: none; }
.categorias-nav a {
  flex: none; padding: .45rem .9rem; border: 1px solid var(--linea); border-radius: 999px;
  background: var(--superficie); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center;
}
.categoria-pedido { scroll-margin-top: 11rem; }
.categoria-pedido h2 { margin: 1rem 0 .5rem; }
.productos { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--superficie); overflow: hidden; }
.productos > li + li { border-top: 1px solid var(--linea); }
.producto {
  display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 1rem; min-height: 56px; background: none; border: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.producto:active { background: var(--atencion-fondo); }
.producto[disabled] { cursor: not-allowed; color: var(--suave); }
.producto-nombre { display: flex; flex-direction: column; font-weight: 700; }
.producto-nombre small { font-weight: 400; color: var(--suave); }
.producto-precio { white-space: nowrap; font-weight: 700; }
.producto[disabled] .producto-precio { color: var(--mal); }

.aviso-agregado {
  position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 1rem);
  background: var(--tinta); color: #fff; padding: .6rem 1rem; border-radius: var(--radio-chico);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20; max-width: 90vw; text-align: center;
}
.aviso-agregado.visible { opacity: 1; transform: translate(-50%, 0); }

.barra-pedido {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--superficie); border-top: 3px solid var(--acento);
  box-shadow: 0 -8px 24px -14px rgba(29, 43, 54, .35);
}
.barra-pedido .btn { margin: 0; max-width: 40rem; display: flex; margin-inline: auto; min-height: 56px; font-size: 1.05rem; }

.carrito { position: fixed; inset: 0; z-index: 30; background: rgba(29, 43, 54, .55); display: flex; align-items: flex-end; justify-content: center; }
.carrito[hidden] { display: none; }
.carrito-panel {
  background: var(--superficie); width: 100%; max-width: 40rem; max-height: 88vh;
  border-radius: var(--radio) var(--radio) 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.carrito-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--linea); }
.carrito-cabeza h2 { margin: 0; font-size: 1.15rem; }
.carrito-lineas { list-style: none; margin: 0; padding: 0 1rem; overflow-y: auto; flex: 1; }
.linea { display: grid; grid-template-columns: 1fr auto; gap: .4rem .75rem; padding: .85rem 0; border-bottom: 1px solid var(--linea); }
.linea-principal { display: flex; flex-direction: column; }
.linea-para { font-size: .88rem; font-weight: 700; color: #2D5C8A; }
.linea-controles { display: flex; align-items: center; gap: .4rem; }
.linea-cant { min-width: 1.75rem; text-align: center; font-weight: 700; font-size: 1.15rem; }
.linea-nota { grid-column: 1 / -1; min-height: 42px !important; font-size: .95rem !important; padding: .45rem .7rem !important; }
.carrito-pie { padding: .75rem 1rem 1rem; border-top: 1px solid var(--linea); }
.carrito-pie .btn-ancho { margin-top: .75rem; min-height: 56px; }
body.carrito-abierto { overflow: hidden; }


/* =========================================================
   Avisos (barra superior y banda del garzón)
   ========================================================= */

.banda-avisos {
  position: sticky; top: var(--alto-barra, 4.5rem); z-index: 9;
  display: flex; align-items: center; gap: .75rem; justify-content: space-between;
  padding: .7rem 1rem; background: var(--ok); color: #fff;
  border-radius: var(--radio);
  box-shadow: 0 10px 24px -12px rgba(29, 43, 54, .5);
}
.banda-avisos[hidden] { display: none; }
.banda-texto { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.banda-avisos a { color: #fff; font-weight: 700; background: rgba(255, 255, 255, .18); padding: .3rem .6rem; border-radius: var(--radio-chico); text-decoration: none; }
.banda-cerrar { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; min-width: 44px; min-height: 44px; cursor: pointer; }

/* =========================================================
   Cocina y bar (tablet)
   ========================================================= */

.pantalla-cocina .contenido { max-width: none; padding-left: 1.25rem; padding-right: 1.25rem; }
.reloj { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: .5rem; }
.tablero-resumen { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: 1.05rem; margin: 0 0 1rem; color: var(--suave); }
.tablero-resumen strong { color: var(--tinta); font-size: 1.3rem; }
.tablero-vacio { max-width: none; text-align: center; padding: 3rem 1rem; }

.comandas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); align-items: start; }
.comanda {
  background: var(--superficie); border: 2px solid var(--linea); border-radius: var(--radio);
  display: flex; flex-direction: column; overflow: hidden;
}
.comanda-nueva { border-color: var(--tinta); box-shadow: inset 6px 0 0 var(--mostaza); }
.comanda-cabeza {
  display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem;
  padding: .75rem 1rem; background: var(--panel); color: #fff;
}
.comanda-cabeza h2 { margin: 0; font-size: 1.45rem; }
.comanda-cabeza span { color: #C4D0D6; font-size: .92rem; }
.comanda-tiempo { font-size: 1.15rem !important; font-weight: 700; color: #fff !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.comanda-atencion .comanda-cabeza { background: #8A5D00; }
.comanda-atrasada .comanda-cabeza { background: var(--mal); }
.comanda-atrasada { border-color: var(--mal); }

.comanda-items { list-style: none; margin: 0; padding: 0 1rem; }
.comanda-item { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--linea); }
.comanda-item:first-child { border-top: 0; }
.comanda-item form { margin: 0; flex: none; }
.ci-texto { display: flex; gap: .6rem; align-items: flex-start; min-width: 0; }
.ci-cant {
  flex: none; min-width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  font-size: 1.2rem; font-weight: 700; border: 2px solid var(--tinta); border-radius: var(--radio-chico);
}
.ci-nombre { font-size: 1.15rem; font-weight: 700; display: flex; flex-direction: column; gap: .2rem; line-height: 1.25; }
.ci-comensal { font-size: .85rem; font-weight: 700; color: #2D5C8A; }
.ci-nota { font-size: .95rem; font-weight: 700; background: var(--atencion-fondo); color: #6B4A00; padding: .15rem .45rem; border-radius: 4px; border-left: 4px solid var(--mostaza); }
.ci-quitado { font-size: .85rem; font-weight: 700; color: var(--mal); }
.ci-anulado .ci-nombre { text-decoration: line-through; color: var(--suave); }
.ci-anulado .ci-cant { border-color: var(--suave); color: var(--suave); }
.ci-preparando .ci-cant { background: var(--mostaza); border-color: var(--mostaza); }
.ci-listo { min-width: 4.5rem; }

.comanda-pie { display: flex; gap: .5rem; padding: .75rem 1rem 1rem; margin-top: auto; border-top: 1px solid var(--linea); }
.comanda-pie form { flex: 1; margin: 0; }
.comanda-pie .btn { width: 100%; margin: 0; min-height: 52px; }

.listos-recientes { margin-top: 1.5rem; }
.listos-recientes h2 { font-size: 1.05rem; color: var(--suave); }
.listos-recientes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); }
.listos-recientes li {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  background: var(--ok-fondo); border: 1px solid #B7D9C6; border-radius: var(--radio-chico); padding: .4rem .5rem .4rem .8rem;
}
.listos-recientes form { margin: 0; }


/* =========================================================
   Caja
   ========================================================= */

details > summary.btn { list-style: none; }
details > summary.btn::-webkit-details-marker { display: none; }

.nueva-llevar { position: relative; }
.nueva-llevar[open] > form { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 6; width: min(22rem, 90vw); box-shadow: 0 10px 24px rgba(29, 43, 54, .18); }
.nueva-llevar > form { margin: 0; }

.caja-montos { display: flex; flex-direction: column; align-items: flex-end; }
.caja-montos strong { font-size: 1.15rem; }
.caja-montos small { color: var(--suave); }
.pago-bien-fondo { background: var(--ok-fondo); color: var(--ok); }

.cobros { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); align-items: start; margin-bottom: 1rem; }
.cobros .tarjeta { margin: 0; }
.cobro-comensal { padding: .25rem 1rem 1rem; }
.cobro-pagado { border-color: var(--ok); background: #F3FAF6; }
.cobro-pagado .comensal-cabeza { border-color: var(--ok); }
.lineas-consumo { list-style: none; margin: .4rem 0; padding: 0; font-size: .95rem; }
.lineas-consumo li { display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0; }
.lineas-consumo li span:last-child { white-space: nowrap; }
.cobro-estado { margin: .5rem 0 .75rem; }
.cobro { width: 100%; }
.cobro[open] { flex-basis: 100%; }
.cobro-form { margin-top: .75rem; padding: .9rem; background: var(--fondo); border-radius: var(--radio-chico); }
.chips-medio { border: 0; padding: 0; margin: 0; }
.chips-medio legend { margin: 0 0 .25rem !important; font-size: 1rem !important; }
.cobro-form .dos-campos label { margin-top: .5rem; }
.cobro-efectivo[hidden] { display: none; }
.cobro-total { margin: 1rem 0 0; font-size: 1.05rem; }
.cobro-total strong { font-size: 1.35rem; }
.cobro-vuelto { display: block; font-weight: 700; margin-top: .2rem; }
.cobrar-todo { margin: 0 0 1.25rem; max-width: 32rem; }
.cobrar-todo .cobro > summary { width: 100%; min-height: 56px; }

.anular[open] { flex-basis: 100%; }
.anular .reasignar-form label { margin-top: .5rem; }

.cerrar-cuenta { margin: 1.5rem 0; }
.cerrar-cuenta .btn[disabled] { opacity: .45; cursor: not-allowed; }
.historial summary { cursor: pointer; }
.historial-lista { margin: .75rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: .95rem; }
.historial-lista time { font-variant-numeric: tabular-nums; color: var(--suave); }

.comanda-llevar .comanda-cabeza { background: #2D5C8A; }


/* =========================================================
   Fotos de productos (administración)
   ========================================================= */

.campo-foto { display: flex; gap: .9rem; align-items: flex-start; }
.campo-foto > div { flex: 1; min-width: 0; }
.campo-foto input[type=file] { padding: .5rem; font-size: .95rem !important; }
.foto-vista { width: 128px; height: 96px; object-fit: cover; border-radius: var(--radio-chico); border: 1px solid var(--linea); flex: none; }
.foto-mini { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radio-chico); flex: none; }
.campo-unidad { display: flex; gap: .6rem; align-items: center; max-width: 14rem; }
.campo-unidad input { flex: 1; }

/* =========================================================
   Llamados de clientes (garzón y administrador)
   ========================================================= */

.banda-llamados { background: var(--panel); border-left: 5px solid var(--mal); flex-direction: column; align-items: stretch; gap: .5rem; padding: .6rem 1rem; }
.llamado-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem; }
.llamado-fila + .llamado-fila { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: .5rem; }
.llamado-texto { font-size: 1.02rem; }
.llamado-cuenta .llamado-texto strong::after { content: " 💳"; }
.llamado-botones { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.llamado-botones .btn { margin: 0; min-height: 40px; }
.banda-llamados .btn:not(.btn-principal) { background: transparent; color: #fff; border-color: #8FA1AD; }
.llamado-min { color: #C4D0D6; font-size: .9rem; }
.llamado-escalado { background: var(--mal); color: #fff; font-weight: 700; font-size: .8rem; padding: .1rem .45rem; border-radius: 999px; }
.llamado-voy { color: var(--mostaza); font-weight: 700; font-size: .9rem; }
.insignia-llamado {
  position: absolute; top: -.55rem; left: -.4rem;
  background: var(--mal); color: #fff !important; font-weight: 700;
  border-radius: 999px; padding: .1rem .5rem; font-size: .8rem !important;
  box-shadow: 0 0 0 3px var(--fondo);
}
.mesas-plano .mesa-llama { border-color: var(--mal); border-width: 3px; }
@keyframes latido { 50% { transform: scale(1.08); } }
.insignia-llamado { animation: latido 1.2s ease-in-out infinite; }

/* =========================================================
   Página pública (QR de la mesa y carta)
   ========================================================= */

.pagina-publica { background: #F7F5F0; }
.pagina-publica .contenido { max-width: 44rem; padding-top: 0; }
.publica-cabeza {
  border-radius: 0 0 var(--radio) var(--radio);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin: 0 -1rem 1rem; padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem;
  background: var(--panel); color: #fff; border-bottom: 5px solid var(--acento);
}
.publica-local { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.publica-mesa { font-weight: 700; color: var(--mostaza); white-space: nowrap; font-size: 1.1rem; }
.publica-vacio { margin: 3rem auto; }
.publica-pie { text-align: center; font-size: .9rem; margin-top: 2rem; }

.llamar {
  position: sticky; top: 0; z-index: 5;
  background: #F7F5F0; padding: .5rem 0 .6rem; margin-bottom: .5rem;
  border-bottom: 1px solid var(--linea);
}
.llamar-botones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.llamar-botones .btn { margin: 0; min-height: 56px; padding: .4rem; font-size: .95rem; line-height: 1.2; text-align: center; }
.llamar-botones .llamado-activo { background: var(--ok); border-color: var(--ok); color: #fff; }
.llamar-estado p { margin: .5rem 0 0; font-weight: 700; }
.llamar-confirmado { color: var(--ok); }
.llamar-en_camino { color: var(--ok); }
.llamar-pendiente { color: #7A5600; }
.llamar-atendido { color: var(--suave); }

.carta-nav { padding-top: .5rem; }
.carta-categoria { scroll-margin-top: 9rem; }
.carta-categoria h2 { margin: 1.25rem 0 .6rem; font-size: 1.3rem; }
.carta-productos { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.carta-producto {
  display: flex; gap: .85rem; align-items: stretch;
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden;
}
.carta-foto { flex: none; position: relative; width: 7.5rem; min-height: 7.5rem; padding: 0; border: 0; background: var(--fondo); cursor: zoom-in; overflow: hidden; }
/* La foto llena su cuadro sin estirar la tarjeta, sea vertical u horizontal. */
.carta-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.carta-texto { padding: .7rem .85rem .7rem 0; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sin-foto .carta-texto { padding-left: .9rem; }
.carta-texto h3 { margin: 0; font-size: 1.05rem; }
.carta-texto p { margin: 0; color: var(--suave); font-size: .93rem; }
.carta-precio { margin-top: auto; font-weight: 700; font-size: 1.05rem; }
.carta-producto.agotado { opacity: .55; }
.carta-producto.agotado .carta-precio { color: var(--mal); }

.foto-dialogo { border: 0; padding: 0; border-radius: var(--radio); max-width: min(92vw, 44rem); background: var(--superficie); }
.foto-dialogo::backdrop { background: rgba(29, 43, 54, .75); }
.foto-dialogo img { display: block; width: 100%; height: auto; }
.foto-dialogo p { margin: 0; padding: .75rem 1rem; font-weight: 700; }
.foto-dialogo form { position: absolute; top: .4rem; right: .4rem; margin: 0; }
.foto-cerrar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.6rem; cursor: pointer; }

/* =========================================================
   Hoja de códigos QR
   ========================================================= */

.hoja-qr { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tarjeta-qr {
  background: var(--superficie); border: 2px solid var(--tinta); border-radius: var(--radio);
  padding: 1rem; text-align: center; break-inside: avoid; page-break-inside: avoid;
}
.qr-local { margin: 0; font-weight: 700; font-size: 1.05rem; }
.qr-mesa { margin: .1rem 0 .5rem; font-size: 1.6rem; font-weight: 700; }
.qr-codigo { width: 12rem; height: 12rem; margin: 0 auto; }
.qr-codigo svg { width: 100%; height: 100%; }
.qr-texto { margin: .5rem 0 0; font-size: .95rem; }
.qr-acciones { display: flex; justify-content: center; gap: .4rem; margin-top: .6rem; }
.qr-acciones form { margin: 0; }

@media print {
  .barra, .rb-sidebar, .rb-dock, .rb-overlay, .no-imprimir, .aviso, .banda-avisos { display: none !important; }
  .rb-app { display: block !important; padding: 0 !important; }
  body, .pagina-qr { background: #fff; }
  .contenido { max-width: none; padding: 0; }
  .hoja-qr { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  .tarjeta-qr { border: 1.5px dashed #000; padding: 6mm; }
  .qr-codigo { width: 55mm; height: 55mm; }
}


/* =========================================================
   Pedido del cliente desde el QR
   ========================================================= */

.carta-pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.carta-pie .carta-precio { margin-top: 0; }
.carta-agregar { margin: 0; min-height: 40px; }
.con-pedidos .carta-texto { flex: 1; }
.cliente-nombre { margin: 0 0 .75rem; }
.cliente-nombre form { flex-direction: column; align-items: stretch; }
.cliente-nombre label { font-weight: 700; display: flex; flex-direction: column; gap: .1rem; }
.cliente-saludo { margin: 0 0 .5rem; }
.enlace-boton { background: none; border: 0; padding: .4rem 0; color: var(--suave); text-decoration: underline; font: inherit; cursor: pointer; align-self: flex-start; }
.mi-cuenta { margin-top: 1.25rem; scroll-margin-top: 9rem; }
.mi-cuenta h2 { margin-bottom: .5rem; }
.lineas-consumo { list-style: none; margin: 0 0 .75rem; padding: 0; }
.lineas-consumo li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--linea); }
body.con-barra-cliente .contenido { padding-bottom: 7rem; }
.linea-para-elegir, .linea-con { grid-column: 1 / -1; margin: 0; }
.linea-para-elegir .chip, .linea-con .chip { min-height: 38px; padding: .3rem .7rem; font-size: .92rem; }
.pedido-pendiente { color: #7A5600; }
.pedido-rechazada { color: var(--mal); }
.llamado-pedido-qr .llamado-texto strong { color: var(--mostaza); }
.cant-confirmar { width: 4.2rem !important; min-height: 44px !important; padding: .4rem !important; text-align: center; font-weight: 700; flex: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Estructura del panel (2026): barra superior con pestañas,
   riel de íconos a la izquierda y tarjetas claras y oscuras.
   En celular: cajón lateral y barra inferior.
   El logo y el color de cada local se cargan desde app/layout.php.
   ========================================================= */
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.con-shell { background: radial-gradient(900px 420px at 78% -120px, color-mix(in srgb, var(--acento) 16%, transparent), transparent 70%), radial-gradient(700px 380px at -10% 110%, rgba(255, 255, 255, .7), transparent 70%), var(--fondo); background-attachment: fixed; }
.rb-app { display: flex; flex-direction: column; gap: 14px; padding: var(--margen-app); min-height: 100vh; min-height: 100dvh; }
.rb-cuerpo { display: grid; grid-template-columns: var(--sb-ancho) minmax(0, 1fr); gap: var(--margen-app); flex: 1; align-items: start; }
.sin-menu .rb-cuerpo, .rb-cuerpo.sin-riel { grid-template-columns: minmax(0, 1fr); }
.rb-cuerpo.sin-riel .rb-sidebar { display: none; }
.rb-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* Barra superior (conserva la clase .barra que usan app.js y avisos.js) */
.rb-topbar {
  position: sticky; top: var(--margen-app); z-index: 20;
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 10px 8px 12px;
  background: rgba(250, 250, 251, .82); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(24, 24, 27, .04), 0 18px 36px -28px rgba(24, 24, 27, .5);
}
.rb-topbar form { margin: 0; }
.rb-topbar-marca { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; text-decoration: none; color: var(--tinta); padding-right: 6px; }
.rb-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; object-fit: contain; padding: 4px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(24, 24, 27, .06); }
.rb-logo-iniciales { display: grid; place-items: center; padding: 0; background: var(--acento); color: #fff; font-weight: 700; font-size: 16px; box-shadow: none; }
.rb-topbar-marca .rb-logo { width: 42px; height: 42px; border-radius: 13px; padding: 3px; }
.rb-topbar-marca .rb-logo-iniciales { font-size: 15px; padding: 0; }
.rb-topbar-textos { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rb-topbar-textos strong { font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.rb-topbar-textos span { color: var(--suave); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }

.rb-pestanas { display: flex; align-items: center; gap: 2px; padding: 4px; margin: 0 auto; border-radius: 999px; background: rgba(24, 24, 27, .05); }
.rb-pestanas a { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: #4B4B53; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.rb-pestanas a:hover { background: rgba(255, 255, 255, .85); color: var(--tinta); }
.rb-pestanas a[aria-current="page"] { background: var(--acento); color: #fff; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--acento) 80%, transparent); }

.rb-top-der { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.rb-fecha { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(24, 24, 27, .05); font-weight: 600; font-size: 14px; color: var(--tinta); white-space: nowrap; }
.rb-fecha::first-letter { text-transform: uppercase; }
.rb-hora { margin-left: .55rem; padding-left: .55rem; border-left: 1px solid rgba(24, 24, 27, .15); font-variant-numeric: tabular-nums; color: var(--suave); }
.rb-icono-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; color: inherit; cursor: pointer; transition: background .15s, color .15s; flex-shrink: 0; }
.rb-icono-btn:hover { background: rgba(24, 24, 27, .07); }
.rb-salir { background: rgba(24, 24, 27, .05); }
.rb-pildora { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--panel); border: 0; color: #fff; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.rb-pildora:hover { background: var(--panel-2); }
.rb-pildora[hidden] { display: none; }
.btn-avisos .ico { width: 18px; height: 18px; color: var(--mostaza); }
.rb-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; flex-shrink: 0; }
.rb-avatar-enlace { display: block; border-radius: 50%; text-decoration: none; transition: transform .2s; }
.rb-avatar-enlace:hover { transform: scale(1.06); }
.rb-avatar-enlace[aria-current="page"] .rb-avatar { background: var(--acento); }
.rb-boton-menu { background: rgba(24, 24, 27, .05); }

/* Riel de íconos (PC) / cajón (celular) */
.rb-sidebar {
  position: sticky; top: calc(var(--margen-app) + 78px);
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0;
  background: rgba(250, 250, 251, .7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9); border-radius: 24px;
  box-shadow: 0 18px 36px -30px rgba(24, 24, 27, .55);
}
.rb-marca, .rb-usuario, .rb-nav-grupo, .rb-nav a.rb-op { display: none; }
.rb-nav { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rb-nav a { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #4B4B53; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.rb-nav a:hover { background: #fff; color: var(--tinta); }
.rb-nav a[aria-current="page"] { background: var(--panel); color: #fff; box-shadow: 0 10px 20px -10px rgba(24, 24, 27, .7); }
.rb-nav a .ico { width: 21px; height: 21px; }
/* Nombre de la pantalla: aparece al pasar el mouse o con el teclado */
.rb-nav a span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-6px, -50%); padding: 7px 12px; border-radius: 10px; background: var(--panel); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .2s; z-index: 30; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); }
.rb-nav a:hover span, .rb-nav a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

/* Contenido dentro del panel */
.con-shell .contenido { max-width: none; margin: 0; padding: 6px 4px 2rem; }
.con-shell .contenido > h1:first-child, .con-shell .encabezado h1 { font-size: 2rem; font-weight: 600; letter-spacing: -.025em; }
.con-shell .banda-avisos { position: sticky; }

/* Tarjetas de resumen (otras pantallas) */
.rb-tarjetas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 1.25rem; }
@media (min-width: 1280px) { .rb-tarjetas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rb-tarjeta { --tono: var(--panel); display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 18px 20px; border-radius: 22px; color: #fff; text-decoration: none; background: var(--panel); box-shadow: 0 18px 36px -28px rgba(24, 24, 27, .8); }
a.rb-tarjeta:hover { background: var(--panel-2); }
.rb-tarjeta-icono { width: 50px; height: 50px; border-radius: 15px; background: rgba(255, 255, 255, .08); color: var(--tono-ico, #fff); display: grid; place-items: center; flex-shrink: 0; }
.rb-tarjeta-icono .ico { width: 23px; height: 23px; }
.rb-tarjeta-label { display: block; font-size: 13.5px; color: var(--panel-texto); }
.rb-tarjeta-valor { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rb-tarjeta-detalle { display: block; margin-top: 2px; font-size: 12.5px; color: var(--panel-texto-suave); }
.tono-salvia { --tono-ico: #7FD3AE; }
.tono-pizarra { --tono-ico: #9DB8E8; }
.tono-ambar { --tono-ico: #F3C267; }
.tono-ciruela { --tono-ico: #C9A8E0; }
.tono-alerta { --tono-ico: #FF8A80; }
.rb-tarjeta.tono-alerta { background: linear-gradient(150deg, #B5483E, #7E2B24); }

/* Ajustes: logo y color del local */
.marca-vista { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: var(--radio-chico); background: var(--panel); color: #fff; margin: .25rem 0 .5rem; }
.marca-vista .rb-logo { width: 56px; height: 56px; border-radius: 14px; }
.marca-vista .rb-logo-iniciales { font-size: 20px; }
.formulario fieldset.colores { display: flex; flex-wrap: wrap; gap: .75rem; border: 0; padding: .35rem .3rem; margin: 0; }
.form-marca { max-width: 46rem; margin-bottom: 1rem; }
.color-opcion { position: relative; display: inline-flex !important; margin: 0 !important; cursor: pointer; }
.color-opcion input { position: absolute; opacity: 0; pointer-events: none; }
.color-opcion .muestra { width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--linea); }
.color-opcion input:checked + .muestra { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.color-opcion input:focus-visible + .muestra { outline: 3px solid var(--tinta); outline-offset: 6px; }

/* Barra inferior (solo celular) y fondo del menú */
.rb-dock, .rb-overlay, .rb-cerrar-menu, .rb-boton-menu { display: none; }

/* PC: la barra de pedido queda a la derecha del riel */
@media (min-width: 992px) {
  .con-shell .barra-pedido { left: calc(var(--margen-app) * 2 + var(--sb-ancho)); right: var(--margen-app); bottom: var(--margen-app); border: 1px solid var(--linea); border-top: 3px solid var(--acento); border-radius: 20px; }
  .con-shell.sin-menu .barra-pedido { left: var(--margen-app); }
}
@media (min-width: 992px) and (max-width: 1240px) {
  .rb-fecha { display: none; }
  .rb-topbar-textos span { display: none; }
  .rb-pestanas a { padding: 8px 12px; }
}

/* Tablet y celular */
@media (max-width: 991.98px) {
  :root { --margen-app: 10px; }
  .rb-app { gap: 12px; padding-top: calc(var(--margen-app) + env(safe-area-inset-top, 0px)); }
  .rb-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .con-dock .rb-app { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .rb-main { gap: 12px; }
  .rb-boton-menu { display: grid; }
  .rb-pestanas, .rb-fecha { display: none; }

  .rb-topbar { top: calc(var(--margen-app) + env(safe-area-inset-top, 0px)); min-height: 58px; padding: 7px 8px; gap: 8px; border-radius: 20px; }
  .rb-topbar-marca { flex: 1; }
  .rb-pildora { padding: 0; width: 42px; justify-content: center; }
  .rb-pildora span { display: none; }

  /* Cajón con todas las pantallas */
  .rb-sidebar, .rb-cuerpo.sin-riel .rb-sidebar {
    position: fixed; top: 10px; left: 10px; bottom: 10px; z-index: 60; width: min(300px, 86vw);
    display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden;
    background: var(--panel); color: var(--panel-texto); border: 0; border-radius: 22px;
    transform: translateX(calc(-100% - 24px)); transition: transform .28s cubic-bezier(.22, .9, .24, 1);
  }
  .menu-abierto .rb-sidebar { transform: none; }
  .rb-marca { display: flex; align-items: center; gap: 12px; padding: 16px 12px 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .rb-marca-texto { min-width: 0; flex: 1; }
  .rb-marca-nombre { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; color: #fff; font-size: 15.5px; line-height: 1.25; }
  .rb-marca-sub { display: block; font-size: 12px; color: var(--panel-texto-suave); }
  .rb-cerrar-menu { display: grid; color: #fff; background: rgba(255, 255, 255, .08); }
  .rb-nav { flex: 1; overflow-y: auto; align-items: stretch; gap: 0; padding: 10px 12px; }
  .rb-nav-grupo, .rb-nav-grupo.rb-op { display: block; font-size: 12px; font-weight: 700; color: var(--panel-texto-suave); padding: 14px 12px 6px; }
  .rb-nav-grupo:first-child { padding-top: 4px; }
  .rb-nav a, .rb-nav a.rb-op { display: flex; align-items: center; gap: 12px; width: auto; height: auto; padding: 11px 12px; margin-bottom: 2px; border-radius: 13px; color: var(--panel-texto); font-weight: 600; font-size: 15px; }
  .rb-nav a:hover { background: var(--panel-2); color: #fff; }
  .rb-nav a[aria-current="page"] { background: var(--acento); color: #fff; box-shadow: none; }
  .rb-nav a span { position: static; transform: none; opacity: 1; padding: 0; background: none; box-shadow: none; font-size: inherit; color: inherit; }
  .rb-usuario { display: flex; margin: 10px; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, .06); }
  .rb-usuario-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
  .rb-usuario .rb-avatar { background: #fff; color: var(--panel); }
  .rb-usuario-datos { min-width: 0; }
  .rb-usuario-nombre { display: block; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rb-usuario-rol { display: block; font-size: 12px; color: var(--panel-texto-suave); }
  .rb-overlay { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(18, 18, 20, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .menu-abierto .rb-overlay { opacity: 1; pointer-events: auto; }
  body.menu-abierto { overflow: hidden; }

  .con-shell .contenido { padding: 4px 2px 1.5rem; }
  .con-shell .contenido > h1:first-child, .con-shell .encabezado h1 { font-size: 1.55rem; }

  .rb-tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .rb-tarjeta { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 14px; border-radius: 18px; }
  .rb-tarjeta-icono { width: 40px; height: 40px; border-radius: 12px; }
  .rb-tarjeta-icono .ico { width: 20px; height: 20px; }
  .rb-tarjeta-valor { font-size: 1.3rem; }

  .rb-dock {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
    position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 20px); max-width: 460px; padding: 7px;
    background: var(--panel); border-radius: 24px;
    box-shadow: 0 18px 34px -14px rgba(18, 18, 20, .6);
  }
  .rb-dock a, .rb-dock button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
    padding: 7px 2px; border-radius: 17px; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 600; color: var(--panel-texto); text-decoration: none;
  }
  .rb-dock a span, .rb-dock button span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rb-dock [aria-current="page"] { color: #fff; background: var(--acento); }
  .con-dock .barra-lote { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .con-dock .aviso-agregado { bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 380px) {
  .rb-tarjeta { padding: 12px; }
  .rb-tarjeta-valor { font-size: 1.15rem; }
  .rb-topbar-textos span { display: none; }
}
.con-shell.pantalla-pedido .contenido { padding-bottom: 8rem; }
@media (min-width: 992px) { .rb-solo-movil { display: none; } }

/* Mi cuenta */
.perfil-cabeza { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; margin: 0 0 1rem; border-radius: var(--radio); background: var(--panel); color: #fff; }
.perfil-cabeza > div { display: flex; flex-direction: column; min-width: 0; }
.perfil-cabeza strong { font-size: 1.2rem; }
.perfil-cabeza span { color: var(--panel-texto); font-size: .93rem; }
.perfil-cabeza b { color: #fff; }
.perfil-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--acento); color: #fff; font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; flex: none; }
input[readonly] { background: var(--fondo); color: var(--suave); }

/* Carta pública con el logo y color del local */
.publica-cabeza { align-items: center !important; }
.publica-marca { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.publica-marca .rb-logo { width: 52px; height: 52px; border-radius: 14px; }
.publica-marca .rb-logo-iniciales { font-size: 18px; }
.publica-mesa { background: var(--acento); color: #fff !important; padding: .3rem .85rem; border-radius: 999px; font-size: 1rem !important; }
.pagina-publica .categorias-nav a:hover { border-color: var(--acento); color: var(--acento); }
.pagina-publica .carta-precio { color: var(--acento); }
.pagina-publica .carta-producto.agotado .carta-precio { color: var(--mal); }

/* Vista del cliente (admin/vista_carta.php) */
.previa-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .9rem 1rem; }
.previa-barra label { font-weight: 700; }
.previa-barra select { flex: 1 1 18rem; width: auto; min-width: 0; }
.previa-equipos { display: flex; gap: .4rem; flex-wrap: wrap; }
.previa-equipos .btn { margin: 0; }
.previa-equipos .btn[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: #fff; }
.previa-nota { margin: 0 0 1rem; }
.previa-escenario { display: flex; justify-content: center; padding: 1.5rem 0 1rem; border-radius: var(--radio); background: repeating-linear-gradient(45deg, #E4E8EC 0 10px, #E9EDF0 10px 20px); overflow-x: auto; }
.previa-marco { background: var(--panel); flex: none; max-width: calc(100% - 1rem); box-shadow: 0 24px 50px -24px rgba(28, 39, 51, .6); }
.previa-marco iframe { display: block; width: 100%; height: 100%; border: 0; background: #F7F5F0; border-radius: inherit; }
.previa-celular { width: 390px; height: 780px; padding: 12px; border-radius: 44px; }
.previa-celular iframe { border-radius: 32px; }
.previa-tablet { width: 780px; height: 1000px; max-height: 85vh; padding: 16px; border-radius: 30px; }
.previa-tablet iframe { border-radius: 16px; }
.previa-pc { width: 100%; max-width: 1200px; height: 78vh; padding: 28px 8px 8px; border-radius: 14px; position: relative; }
.previa-pc::before { content: ""; position: absolute; top: 10px; left: 14px; width: 42px; height: 9px; background: radial-gradient(circle, #B5483E 4px, transparent 4.5px) 0 0 / 14px 9px repeat-x; opacity: .8; }
.previa-pc iframe { border-radius: 6px; }
@media (max-width: 600px) {
  .previa-escenario { padding: .75rem 0; background: none; }
  .previa-celular { width: 100%; height: 75vh; padding: 8px; border-radius: 30px; }
  .previa-celular iframe { border-radius: 22px; }
}
.previa-aviso { margin-top: .5rem; }

/* Inicio del administrador: paneles */
.inicio-paneles { margin-bottom: 1rem; }
.panel-cabeza { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.panel-cabeza h2 { margin: 0; }
.inicio-paneles .lista-compacta .lista-fila { padding: .65rem 0; }
.inicio-paneles .lista-principal small { display: block; }
.ranking { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ranking li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; align-items: baseline; }
.ranking b { font-variant-numeric: tabular-nums; }
.ranking i { grid-column: 1 / -1; display: block; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--acento) 70%, #fff); }


/* =========================================================
   Paso 8: hoja del cliente (medio de pago, reseña) e informe
   "Carta y atención"
   ========================================================= */

.hoja-cuerpo { padding: 1rem 1rem 1.25rem; overflow-y: auto; }
.hoja-cuerpo > p:first-child { margin-top: 0; color: var(--suave); }
.hoja-cuerpo textarea { width: 100%; min-height: 110px; resize: vertical; }
.hoja-cuerpo input { width: 100%; }
.hoja-cuerpo .btn-ancho { margin-top: .75rem; min-height: 56px; }
.hoja-opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.hoja-opciones .btn { margin: 0; min-height: 56px; font-size: 1.02rem; }
.hoja-enlaces { text-align: center; margin: 1rem 0 0; }

.informe-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.informe-fechas { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
.informe-fechas input[type="date"] { width: auto; min-height: 44px; margin: 0; }
.informe-fechas .btn { margin: 0; }
.informe-subtitulo { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.informe-columnas { margin-bottom: 1rem; }

.tabla-envoltura { overflow-x: auto; margin: 0 -.25rem; }
.tabla-informe { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .95rem; }
.tabla-informe th, .tabla-informe td { padding: .65rem .5rem; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: middle; }
.tabla-informe th { font-size: .82rem; font-weight: 600; color: var(--suave); white-space: nowrap; cursor: pointer; user-select: none; }
.tabla-informe th[aria-sort="ascending"]::after { content: " \2191"; }
.tabla-informe th[aria-sort="descending"]::after { content: " \2193"; }
.tabla-informe .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla-informe tbody tr:hover { background: #F7F9FA; }
.tabla-sub { display: block; font-size: .82rem; }
.barrita { display: inline-block; height: 6px; margin-left: .45rem; border-radius: 3px; background: #4A6890; opacity: .75; vertical-align: middle; }
.barrita-venta { background: var(--ok); }

.obs { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.obs-mal { background: var(--mal-fondo); color: var(--mal); }
.obs-bien { background: var(--ok-fondo); color: var(--ok); }
.obs-neutra { background: #E6EAEE; color: var(--suave); }
.informe-leyenda { display: grid; gap: .4rem; margin: 1rem 0 .25rem; font-size: .9rem; }
.informe-leyenda div { display: flex; gap: .6rem; align-items: baseline; }
.informe-leyenda dt { flex: 0 0 auto; }
.informe-leyenda dd { margin: 0; color: var(--suave); }

.comentario { padding: .75rem 0; border-bottom: 1px solid var(--linea); }
.comentario:last-child { border-bottom: 0; }
.comentario p { margin: 0; }
.comentario-meta { font-size: .82rem; margin-bottom: .2rem !important; }

.ayuda-pasos { margin: .75rem 0; }
.ayuda-pasos summary { cursor: pointer; color: var(--acento); font-weight: 600; padding: .3rem 0; }
.ayuda-pasos ol { margin: .4rem 0 0; padding-left: 1.25rem; color: var(--suave); }
.ayuda-pasos li { margin-bottom: .25rem; }

@media (max-width: 640px) {
  .informe-fechas { margin-left: 0; }
  .informe-leyenda div { flex-direction: column; gap: .15rem; }
}


/* =========================================================
   Inicio del administrador (2026): tarjetas claras y oscuras
   ========================================================= */
.dash-cabeza { align-items: flex-end; }
.dash-cabeza .botonera .btn { margin: 0; }
.dash-cabeza .btn .ico { width: 18px; height: 18px; }
.dash { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
.dash-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-izq { grid-column: span 4; }
.dash-salon { grid-column: span 5; }
.dash-top { grid-column: span 3; }
.dash-abiertas { grid-column: span 7; }
.dash-horas { grid-column: span 5; }
.dash-banda { grid-column: 1 / -1; }

.dash-tarjeta { position: relative; min-width: 0; border-radius: 24px; padding: 18px 20px; text-decoration: none; color: inherit; }
.dash-clara { background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(24, 24, 27, .03), 0 22px 40px -32px rgba(24, 24, 27, .5); }
.dash-oscura { background: var(--panel); color: #fff; box-shadow: 0 22px 40px -28px rgba(18, 18, 20, .85); }
a.dash-oscura:hover { background: var(--panel-2); }
.dash-tit { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 12px; }
.dash-tit h2 { margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.dash-oscura .dash-tit, .dash-oscura .dash-tit span { color: var(--panel-texto); font-size: .95rem; }
.dash-oscura .dash-tit h2 { color: #fff; }
.dash-ir { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--panel); color: #fff; transition: transform .2s; }
.dash-ir:hover { transform: rotate(-12deg) scale(1.06); }
.dash-ir .ico { width: 16px; height: 16px; }
.dash-pildora { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dash-pildora:hover { background: rgba(255, 255, 255, .18); }
.dash-pildora.clara { background: #fff; color: var(--tinta); }
.dash-valor { display: block; font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-valor small { font-size: .95rem; font-weight: 500; color: var(--panel-texto-suave); letter-spacing: 0; }
.dash-etq { display: block; margin-top: 4px; font-size: .85rem; color: var(--suave); }
.dash-oscura .dash-etq, .dash-tenue { color: var(--panel-texto-suave); }
.dash-sub { margin: -6px 0 10px; font-size: .85rem; color: var(--suave); }
.dash-nota { margin: 12px 0 0; font-size: .8rem; color: var(--suave); }

.dash-metricas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dash-metricas > div { min-width: 0; }
.dash-resumen .dash-valor { font-size: clamp(1.2rem, 1.75vw, 1.75rem); white-space: nowrap; }
.grafico-horas.muchas .gh-col:nth-child(even) small { visibility: hidden; }
.dash-var { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.dash-var.sube { background: #DDF3E7; color: #1F7A50; }
.dash-var.baja { background: #FBE2DF; color: #A8322D; }

.dash-par { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; flex: 1; }
.dash-mini { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 140px; }
.dash-mini .dash-tit { margin: 0; }
.dash-mini .dash-tit .ico { width: 18px; height: 18px; color: var(--panel-texto-suave); }
.dash-barra { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.dash-barra i { display: block; height: 100%; border-radius: inherit; background: var(--acento); }
.dash-alerta { background: linear-gradient(150deg, #A8322D, #6E1D18); }
.dash-alerta .dash-tit span, .dash-alerta .dash-etq, .dash-alerta .dash-tit .ico { color: rgba(255, 255, 255, .8); }

/* Salón ahora */
.salon-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.salon-mesa { display: grid; place-items: center; aspect-ratio: 1; border-radius: 15px; font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--tinta); background: rgba(255, 255, 255, .9); border: 1px solid #E4E4E8; transition: transform .2s; }
.salon-mesa:hover { transform: translateY(-2px); }
.salon-ocupada { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--acento) 90%, transparent); }
.salon-llama { background: var(--panel); border-color: var(--panel); color: #fff; position: relative; }
.salon-llama::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #FF6B5E; box-shadow: 0 0 0 0 rgba(255, 107, 94, .7); animation: latido 1.6s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 9px rgba(255, 107, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 94, 0); } }
.salon-leyenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: .8rem; color: var(--suave); }
.salon-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.salon-leyenda i { width: 11px; height: 11px; border-radius: 4px; }
.salon-leyenda .libre { background: #fff; border: 1px solid #D4D4DA; }
.salon-leyenda .ocupada { background: var(--acento); }
.salon-leyenda .llama { background: var(--panel); }

/* Lo más pedido: columnas con porcentaje */
.columnas-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; height: 190px; }
.col-top { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.col-top b { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
.col-top-barra { display: block; height: var(--alto); margin: 6px 0 8px; border-radius: 12px 12px 6px 6px; background: repeating-linear-gradient(135deg, #D9D9DE 0 6px, #E7E7EB 6px 12px); }
.col-top.primero .col-top-barra { background: linear-gradient(180deg, color-mix(in srgb, var(--acento) 70%, #fff), var(--acento)); }
.col-top small { font-size: .78rem; color: var(--suave); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }

/* Abiertas ahora: tabla oscura */
.dash-tabla-env { overflow-x: auto; }
.dash-tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dash-tabla th { text-align: left; font-weight: 500; font-size: .78rem; color: var(--panel-texto-suave); padding: 0 8px 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.dash-tabla td { padding: 10px 8px 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--panel-texto); white-space: nowrap; }
.dash-tabla tr:last-child td { border-bottom: 0; }
.dash-tabla td a { color: #fff; font-weight: 600; text-decoration: none; }
.dash-tabla td a:hover { text-decoration: underline; }
.dash-tabla .num { text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
.dash-chip { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--mostaza) 25%, transparent); color: #F3C267; font-weight: 700; font-size: .8rem; text-align: center; }

/* Ventas por hora */
.grafico-horas { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 22px; }
.gh-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.gh-barra { position: relative; display: block; width: 100%; max-width: 38px; height: var(--alto); min-height: 3px; border-radius: 10px 10px 4px 4px; background: rgba(255, 255, 255, .14); transition: height .6s cubic-bezier(.22, .9, .24, 1); }
.gh-col.mejor .gh-barra { background: linear-gradient(180deg, color-mix(in srgb, var(--acento) 55%, #fff), var(--acento)); }
.gh-col.ahora .gh-barra { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.gh-barra em { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--tinta); font-style: normal; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.gh-col small { margin-top: 6px; font-size: .72rem; color: var(--panel-texto-suave); font-variant-numeric: tabular-nums; }

/* Banda inferior */
.dash-banda { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 14px 14px 22px; border-radius: 20px; text-decoration: none; color: #fff; background: linear-gradient(100deg, var(--panel) 40%, color-mix(in srgb, var(--acento) 70%, var(--panel))); box-shadow: 0 22px 40px -30px rgba(18, 18, 20, .9); }
.dash-banda span:first-child { font-weight: 500; }
.dash-banda:hover .dash-pildora { background: var(--mostaza); }
.dash-pie { margin-top: 1.25rem; font-size: .9rem; }

@media (max-width: 1279.98px) {
  .dash-izq { grid-column: span 6; }
  .dash-salon { grid-column: span 6; }
  .dash-top { grid-column: span 5; }
  .dash-horas { grid-column: span 7; }
  .dash-abiertas { grid-column: 1 / -1; order: 5; }
  .dash-banda { order: 6; }
}
@media (max-width: 760px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dash > * { grid-column: 1 / -1 !important; }
  .dash-tarjeta { padding: 16px; border-radius: 20px; }
  .dash-resumen .dash-valor { font-size: 1.35rem; }
  .dash-mini { min-height: 118px; }
  .dash-mini .dash-valor { font-size: 1.5rem; }
  .dash-banda { flex-direction: column; align-items: flex-start; }
  .columnas-top { height: 160px; }
  .grafico-horas { height: 170px; gap: 4px; }
  .dash-tabla th:nth-child(4), .dash-tabla td:nth-child(4) { display: none; }
}


/* =========================================================
   Encuadre de fotos y logos (assets/js/recorte.js)
   ========================================================= */
.recorte { width: min(780px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px); padding: 0; border: 0; border-radius: 26px; background: var(--panel); color: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); overflow: hidden; }
.recorte::backdrop { background: rgba(14, 14, 16, .7); backdrop-filter: blur(4px); }
.recorte.sin-modal { position: fixed; inset: 10px; margin: auto; z-index: 100; }
body.recorte-abierto { overflow: hidden; }
.recorte-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 20px); }
.recorte-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 18px 20px 12px; }
.recorte-cabeza h2 { margin: 0 0 .2rem; font-size: 1.15rem; font-weight: 600; color: #fff; }
.recorte-ayuda { margin: 0; font-size: .9rem; color: var(--panel-texto); }
.recorte-x { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.recorte-x:hover { background: rgba(255, 255, 255, .18); }
.recorte-escenario { display: flex; justify-content: center; padding: 6px 20px; min-height: 0; }
.recorte-zona { position: relative; overflow: hidden; border-radius: 16px; background: #0E0E10; touch-action: none; cursor: grab; user-select: none; outline-offset: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.recorte-zona.moviendo { cursor: grabbing; }
.recorte-zona.transparente { background: repeating-conic-gradient(#3A3A40 0 25%, #2C2C31 0 50%) 0 0 / 18px 18px; }
.recorte-zona canvas { display: block; }
/* Cuadrícula de tercios para encuadrar mejor */
.recorte-zona::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .45) calc(33.33% - .5px), rgba(255, 255, 255, .45) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255, 255, 255, .45) calc(66.66% - .5px), rgba(255, 255, 255, .45) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
  linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .45) calc(33.33% - .5px), rgba(255, 255, 255, .45) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255, 255, 255, .45) calc(66.66% - .5px), rgba(255, 255, 255, .45) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.recorte-zona.moviendo::before, .recorte-zona:focus-visible::before { opacity: 1; }
.recorte-guia { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 2px dashed rgba(255, 255, 255, .8); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28); pointer-events: none; }
.recorte-guia span { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.recorte-controles { display: flex; align-items: center; gap: 8px; padding: 14px 20px 4px; }
.recorte-controles input[type="range"] { flex: 1; min-width: 80px; min-height: 0; padding: 0; border: 0; background: transparent; accent-color: var(--acento); }
.recorte-btn { flex: none; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 1.2rem; font-weight: 600; cursor: pointer; }
.recorte-btn.ancho { font-size: .9rem; padding: 0 14px; }
.recorte-btn:hover { background: rgba(255, 255, 255, .18); }
.recorte-pie { display: flex; align-items: center; gap: 8px; padding: 12px 20px 18px; }
.recorte-pie .btn { margin: 0; }
.recorte-pie .btn:not(.btn-principal) { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.recorte-datos { margin-right: auto; font-size: .85rem; color: #F3C267; }
.recorte-reabrir { margin-top: .5rem !important; }
@media (max-width: 600px) {
  .recorte { border-radius: 22px; }
  .recorte-cabeza, .recorte-escenario, .recorte-controles, .recorte-pie { padding-left: 14px; padding-right: 14px; }
  .recorte-btn.ancho { padding: 0 11px; }
  .recorte-pie { flex-wrap: wrap; }
  .recorte-datos { flex-basis: 100%; }
  .recorte-pie .btn { flex: 1; }
}
.pagina-acceso .tarjeta { background: #fff; border-color: #fff; }
