/* Panel de reservas del personal */
body {
  min-height: 100dvh;
}

/* ——— Entrada con PIN ——— */
.login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.25rem;
  background: linear-gradient(rgba(11, 23, 63, 0.55), rgba(11, 23, 63, 0.8)), url('/img/azulejo.svg');
  background-size: auto, 96px;
}
.login[hidden] {
  display: none;
}
.login-caja {
  width: min(24rem, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  background: #fff;
  border: 3px solid var(--azul-950);
  box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 8px var(--azafran), 8px 8px 0 var(--azul-950);
}
.login-logo {
  border-radius: 12px;
}
.login h1 {
  margin-top: 0.75rem;
  font-size: 2.25rem;
  color: var(--azul-900);
}
.login-sub {
  margin-top: 0.25rem;
  color: var(--tinta-2);
}
.pin-puntos {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  min-height: 1.6rem;
  margin: 1.5rem 0 1.25rem;
}
.pin-puntos i {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--azul-700);
  border-radius: 50%;
  transition: background-color 0.1s;
}
.pin-puntos i.lleno {
  background: var(--azul-700);
}
.teclado {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.teclado button {
  min-height: 4rem;
  border: 2px solid var(--azul-200);
  border-radius: 8px;
  background: #fff;
  font-family: var(--f-display);
  font-size: 1.75rem;
  color: var(--azul-900);
  transition: background-color 0.1s;
}
.teclado button:hover {
  background: var(--azul-50);
}
.teclado button:active {
  background: var(--azul-100);
}
.teclado .tecla-aux {
  font-family: var(--f-texto);
  font-size: 1.5rem;
}
.teclado .tecla-entrar {
  background: var(--azafran);
  border-color: var(--azafran);
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--azul-950);
}
.teclado .tecla-entrar:hover {
  background: #ffc13d;
}
#login-error {
  min-height: 1.5rem;
  margin-top: 1rem;
}
.login-pie {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

/* ——— Barra superior ——— */
.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--azul-900);
  border-bottom: 4px solid var(--azafran);
}
.barra-marca {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}
.barra-marca img {
  border-radius: 9px;
}
.barra-titulo {
  font-family: var(--f-display);
  font-size: 1.25rem;
  line-height: 1.1;
}
.barra-estado {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: #c9d6f7;
}
.punto {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #4ade80;
}
.barra-estado.sin-conexion .punto {
  background: #ff7a93;
}
.buscador {
  position: relative;
  flex: 1 1 15rem;
  max-width: 26rem;
  order: 2;
}
.buscador svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tinta-2);
  pointer-events: none;
}
.buscador input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0.9rem 0.5rem 2.6rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
}
.buscador input:focus {
  outline: none;
  border-color: var(--azafran);
}
.barra-acciones {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  order: 3;
}
.icono,
.icono-claro {
  display: inline-grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
}
.icono:hover {
  background: rgba(255, 255, 255, 0.14);
}
.icono[aria-pressed='false'] {
  opacity: 0.55;
}
.icono-claro {
  background: var(--azul-100);
  color: var(--azul-900);
}
.icono-claro:hover {
  background: var(--azul-200);
}
.banner {
  margin: 0.75rem 1rem 0;
  max-width: 1100px;
}

/* ——— Contenido ——— */
.contenido {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.dia-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.dia-titulo {
  flex: 1 1 12rem;
  min-width: 0;
  text-align: center;
}
.dia-titulo h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  color: var(--azul-900);
}
.dia-titulo p {
  color: var(--tinta-2);
  font-weight: 600;
}
.dia-fecha input {
  min-height: 3rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--azul-200);
  border-radius: 10px;
  background: #fff;
}

.tira {
  display: flex;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-bottom: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.dia-chip {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  min-width: 4.4rem;
  padding: 0.45rem 0.4rem 0.5rem;
  border: 2px solid var(--azul-200);
  border-radius: 6px;
  background: #fff;
  color: var(--azul-900);
  line-height: 1.15;
}
.dia-chip:hover:not([aria-pressed='true']) {
  border-color: var(--azul-700);
}
.dia-chip .c-dia {
  font-size: 0.8125rem;
  font-weight: 600;
}
.dia-chip .c-num {
  font-family: var(--f-display);
  font-size: 1.5rem;
}
.dia-chip .c-cuenta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--azul-700);
}
.dia-chip.cerrado .c-cuenta {
  color: #8d97bd;
}
.dia-chip[aria-pressed='true'] {
  background: var(--azul-700);
  border-color: var(--azul-700);
  color: #fff;
  box-shadow: inset 0 0 0 3px var(--azul-700), inset 0 0 0 4px var(--azafran);
}
.dia-chip[aria-pressed='true'] .c-cuenta {
  color: #fff;
}

/* ——— Resumen ——— */
.resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.dato {
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--azul-100);
  border-radius: 6px;
  background: #fff;
}
.dato b {
  font-family: var(--f-display);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1;
  color: var(--azul-900);
}
.dato span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tinta-2);
}
.dato.ancho {
  grid-column: span 2;
}
.medidor {
  height: 0.7rem;
  margin-top: 0.4rem;
  border-radius: 99px;
  background: var(--azul-100);
  overflow: hidden;
}
.medidor i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--azul-500);
}
.medidor i.alto {
  background: var(--azafran-600);
}
.medidor i.lleno {
  background: var(--rojo);
}

/* ——— Filtros ——— */
.lista-zona {
  margin-top: 1.5rem;
}
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.filtro {
  min-height: 2.75rem;
  padding: 0.3rem 1rem;
  border: 2px solid var(--azul-200);
  border-radius: 99px;
  background: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--azul-900);
}
.filtro small {
  margin-left: 0.3rem;
  font-weight: 700;
  color: var(--azul-700);
}
.filtro[aria-pressed='true'] {
  background: var(--azul-900);
  border-color: var(--azul-900);
  color: #fff;
}
.filtro[aria-pressed='true'] small {
  color: var(--azafran);
}

/* ——— Lista de reservas ——— */
.grupo-hora {
  margin-bottom: 1.4rem;
}
.grupo-hora > h2 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--azul-200);
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--azul-900);
}
.grupo-hora > h2 span {
  font-family: var(--f-texto);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tinta-2);
}

.res {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
  padding: 0.8rem 1rem 0.8rem 0.9rem;
  border: 2px solid var(--azul-100);
  border-left: 8px solid var(--azul-500);
  border-radius: 6px 10px 10px 6px;
  background: #fff;
}
.res.e-sentada {
  border-left-color: var(--verde);
  background: #f4fbf8;
}
.res.e-terminada {
  border-left-color: #9aa3c4;
  background: #f5f6fa;
}
.res.e-cancelada,
.res.e-no_vino {
  border-left-color: var(--rojo);
  background: #fdf6f8;
}
.res.e-cancelada .res-nombre,
.res.e-no_vino .res-nombre {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(198, 42, 79, 0.5);
}
.res.tarde {
  border-left-color: var(--azafran-600);
  background: var(--azafran-100);
}
.res.nueva {
  animation: resaltar 2.4s ease-out;
}
@keyframes resaltar {
  0%,
  35% {
    box-shadow: 0 0 0 4px var(--azafran);
  }
  100% {
    box-shadow: 0 0 0 4px transparent;
  }
}
.res-personas {
  display: grid;
  place-items: center;
  align-content: center;
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 6px;
  background: var(--azul-50);
  border: 2px solid var(--azul-100);
  color: var(--azul-900);
  line-height: 1;
}
.res-personas b {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 400;
}
.res-personas small {
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
}
.res-cuerpo {
  min-width: 0;
  cursor: pointer;
}
.res-nombre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.res-linea {
  margin-top: 0.1rem;
  font-size: 0.9375rem;
  color: var(--tinta-2);
}
.res-linea a {
  font-weight: 700;
  color: var(--azul-700);
}
.res-notas {
  margin-top: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-left: 3px solid var(--azafran);
  background: var(--azafran-100);
  font-size: 0.9375rem;
  color: #4a3500;
  overflow-wrap: anywhere;
}
.etiqueta {
  padding: 0.05rem 0.55rem;
  border-radius: 99px;
  background: var(--azafran);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--azul-950);
}
.origen {
  padding: 0.05rem 0.5rem;
  border-radius: 99px;
  background: var(--azul-100);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--azul-700);
}
.res-acciones {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}
.res-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}
.chip {
  padding: 0.1rem 0.7rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--azul-100);
  color: var(--azul-900);
}
.chip.sentada {
  background: var(--verde-100);
  color: #0d4a37;
}
.chip.terminada {
  background: #e6e8f0;
  color: #4b5782;
}
.chip.cancelada,
.chip.no_vino {
  background: var(--rojo-100);
  color: #7d1730;
}
.chip.tarde {
  background: var(--azafran);
  color: var(--azul-950);
}
.btn-texto {
  min-height: 2.5rem;
  padding: 0.3rem 0.8rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--azul-700);
}
.btn-texto:hover {
  background: var(--azul-100);
}
.vacio-lista {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--azul-200);
  border-radius: 12px;
  text-align: center;
  color: var(--tinta-2);
}
.vacio-lista strong {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--azul-900);
}

/* ——— Ventanas (modales) ——— */
dialog.modal {
  width: min(40rem, 94vw);
  max-height: 92dvh;
  padding: 0;
  border: 3px solid var(--azul-950);
  border-radius: 0;
  background: #fff;
  color: var(--tinta);
  box-shadow: 8px 8px 0 var(--azul-950);
  overflow: hidden;
}
dialog.modal[open] {
  display: flex;
  flex-direction: column;
}
dialog.modal.ancho {
  width: min(48rem, 96vw);
}
dialog.modal::backdrop {
  background: rgba(11, 23, 63, 0.62);
}
.modal-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--azul-900);
  color: #fff;
  border-bottom: 4px solid var(--azafran);
}
.modal-cabeza h2 {
  font-size: 1.5rem;
}
.modal-cabeza .icono {
  flex: 0 0 auto;
}
.modal-cuerpo {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  overflow-y: auto;
}
.modal-pie {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  background: var(--azul-50);
  border-top: 2px solid var(--azul-100);
}
.fila2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.paso-personas {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.paso-personas button {
  width: 3.25rem;
  height: 3.25rem;
  border: 2px solid var(--azul-200);
  border-radius: 8px;
  background: #fff;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--azul-900);
}
.paso-personas button:hover {
  background: var(--azul-50);
}
.paso-personas output {
  min-width: 3.5rem;
  text-align: center;
  font-family: var(--f-display);
  font-size: 2.25rem;
  line-height: 1;
}
.meta-reserva {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--tinta-2);
}
.acciones-estado {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--azul-100);
  border-radius: 8px;
  background: var(--azul-50);
}
.acciones-estado > strong {
  flex: 1 0 100%;
  font-size: 0.9375rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid var(--azul-200);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--azul-700);
}

/* Ajustes */
.pestanas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.7rem 1.1rem 0;
  background: var(--azul-50);
  border-bottom: 2px solid var(--azul-100);
}
.pestana {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  border: 2px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font-weight: 700;
  color: var(--tinta-2);
}
.pestana[aria-selected='true'] {
  background: #fff;
  border-color: var(--azul-100);
  color: var(--azul-900);
  margin-bottom: -2px;
  padding-bottom: calc(0.4rem + 2px);
}
.dia-horario {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--azul-100);
  border-radius: 8px;
}
.dia-horario.cerrado {
  background: #f5f6fa;
}
.dia-horario > .check {
  min-height: 2.5rem;
  border: 0;
  padding: 0;
  font-size: 1.0625rem;
}
.turno {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.turno input[type='time'] {
  min-height: 2.75rem;
  padding: 0.3rem 0.5rem;
  border: 2px solid var(--linea);
  border-radius: 8px;
}
.cerrados-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cerrados-lista .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.3rem 0.2rem 0.75rem;
}
.cerrados-lista button {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 32, 74, 0.12);
  font-weight: 700;
  line-height: 1;
}
.ayuda {
  color: var(--tinta-2);
  font-size: 0.9375rem;
}
.enlace-caja {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 2px dashed var(--azul-200);
  border-radius: 8px;
  background: var(--azul-50);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ——— Avisos flotantes ——— */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  gap: 0.5rem;
  width: min(30rem, calc(100vw - 1.5rem));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-left: 6px solid var(--azafran);
  border-radius: 6px;
  background: var(--azul-950);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(11, 23, 63, 0.7);
  pointer-events: auto;
  animation: entra 0.25s ease-out;
}
.toast.error {
  border-left-color: #ff7a93;
}
.toast.ok {
  border-left-color: #4ade80;
}
.toast button {
  min-height: 2.5rem;
  padding: 0.2rem 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-weight: 700;
}
@keyframes entra {
  from {
    transform: translateY(0.8rem);
    opacity: 0;
  }
}

/* ——— Pantallas angostas ——— */
@media (max-width: 720px) {
  .buscador {
    order: 4;
    flex-basis: 100%;
    max-width: none;
  }
  .barra-acciones {
    flex: 1 1 100%;
    order: 3;
  }
  .barra-acciones .btn {
    flex: 1;
    padding-inline: 0.8rem;
    white-space: nowrap;
  }
  .res {
    grid-template-columns: auto 1fr;
  }
  .res-acciones {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
  }
  .res-botones {
    justify-content: flex-start;
  }
  .fila2 {
    grid-template-columns: 1fr;
  }
  .dato.ancho {
    grid-column: 1 / -1;
  }
  .dia-fecha {
    margin-left: auto;
  }
}

/* ——— Impresión: lista para el atril ——— */
.solo-impresion {
  display: none;
}

/* Historial del cliente */
.hist {
  padding: 0.05rem 0.55rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.hist.habitual {
  background: var(--verde-100);
  color: var(--verde);
  border: 1px solid var(--verde);
}
.hist.primera {
  background: var(--azul-50);
  color: var(--tinta-2);
  border: 1px dashed var(--azul-200);
}
.hist.falto {
  background: var(--rojo-100);
  color: var(--rojo);
}
.hist.vip {
  background: #fff4cc;
  color: #7a5200;
  border: 1px solid #e0b100;
}
.vip-resumen { font-weight: 600; }
.meta-hist {
  flex-basis: 100%;
  font-weight: 700;
  color: var(--verde);
}
.aviso-cliente {
  margin-top: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.aviso-cliente.habitual {
  background: var(--verde-100);
  color: var(--verde);
}
.aviso-cliente.primera {
  background: var(--azul-50);
  color: var(--tinta-2);
}

/* Casilla del cartel de "Reservado" */
.cartel {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.25rem 0.75rem 0.25rem 0.55rem;
  border: 2px dashed var(--azafran-600);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #6b4a00;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cartel input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  accent-color: var(--verde);
  cursor: pointer;
}
.cartel.puesto {
  border-style: solid;
  border-color: var(--verde);
  background: var(--verde-100);
  color: var(--verde);
}


/* Número de mesa */
.res-mesa-cartel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}
.mesa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.2rem 0.3rem 0.2rem 0.65rem;
  border: 2px solid var(--azul-200);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--azul-900);
  cursor: text;
  white-space: nowrap;
}
.mesa input {
  width: 3.6rem;
  min-height: 2rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--azul-200);
  border-radius: 6px;
  font: inherit;
  font-size: 1.125rem;
  text-align: center;
  color: var(--azul-950);
  background: var(--azul-50);
}
.mesa input:focus {
  outline: 3px solid var(--azul-500);
  outline-offset: 1px;
  background: #fff;
}
.mesa.puesta {
  border-color: var(--azul-700);
  background: var(--azul-100);
}
.mesa.puesta input {
  background: #fff;
  border-color: var(--azul-700);
}
.mesa-fija {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tinta-2);
}


/* Conectar teléfonos */
.conectar {
  display: grid;
  gap: 0.6rem;
}
.conectar-qr {
  display: grid;
  place-items: center;
  padding: 0.5rem;
}
.qr {
  width: min(16rem, 70vw);
  height: auto;
  image-rendering: pixelated;
  border: 6px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--azul-100);
}
.conectar-url {
  margin: 0;
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--azul-900);
  overflow-wrap: anywhere;
}
.conectar-pasos {
  margin: 0.25rem 0 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.35rem;
}
#hoja-qr {
  display: none;
}


/* ═════════ Pestañas: Reservas / Mesas y meseros ═════════ */
.vistas {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  margin: 0.9rem 0 0.4rem;
  padding: 0.3rem;
  border-radius: 12px;
  background: var(--azul-100);
}
.vistas button {
  min-height: 2.9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul-700);
  cursor: pointer;
}
.vistas button[aria-selected='true'] {
  background: var(--azul-900);
  color: #fff;
  box-shadow: var(--sombra);
}

/* ═════════ Mesas y meseros ═════════ */
#vista-salon {
  display: grid;
  gap: 1rem;
  margin-top: 0.6rem;
}
#vista-salon[hidden] {
  display: none;
}
.salon-cabeza {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.salon-cabeza h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.5rem;
}
.salon-nota {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: var(--azul-50);
  color: var(--tinta-2);
  font-size: 0.9375rem;
}
.punto-mesero {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  vertical-align: -0.05rem;
}
.chip-mesero {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.05rem 0.6rem 0.05rem 0.45rem;
  border: 1px solid var(--azul-200);
  border-radius: 99px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--azul-900);
  white-space: nowrap;
}
.res-mesero {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.salon-meseros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem;
}
.mesero-card {
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--azul-100);
  border-left: 6px solid var(--c, #868e96);
  border-radius: 8px;
  background: #fff;
}
.mesero-card strong {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.0625rem;
}
.mesero-card span {
  font-weight: 600;
  color: var(--azul-900);
}
.mesero-card small {
  color: var(--tinta-2);
  font-weight: 600;
}
.mesero-card.libre {
  opacity: 0.6;
}
.mesero-card.sin {
  border-left-style: dashed;
  border-left-color: #adb5bd;
  background: #f8f9fa;
}

.mapa {
  display: grid;
  gap: 1rem;
}
.rango {
  padding: 0.8rem;
  border: 2px solid var(--azul-100);
  border-radius: 12px;
  background: #fff;
}
.rango-cabeza {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.7rem;
}
.rango-cabeza h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.3rem;
}
.rango-meseros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 1 1 auto;
}
.sin-asignar {
  font-size: 0.875rem;
  font-weight: 600;
  color: #868e96;
}
.mesas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}
.ficha-mesa {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.15rem;
  min-height: 7.2rem;
  padding: 0.85rem 0.6rem 0.55rem;
  overflow: hidden;
  border: 2px solid var(--azul-200);
  border-radius: 10px;
  background: var(--papel);
  font: inherit;
  text-align: left;
  color: var(--tinta);
  cursor: pointer;
}
.ficha-mesa:hover {
  border-color: var(--azul-500);
}
.ficha-mesa.reservada {
  background: var(--azafran-100);
  border-color: var(--azafran-600);
}
.ficha-mesa.ocupada {
  background: var(--verde-100);
  border-color: var(--verde);
}
.ficha-franja {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.45rem;
}
.ficha-num {
  font-family: var(--f-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--azul-950);
}
.ficha-meseros {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tinta-2);
}
.ficha-libre {
  font-size: 0.8125rem;
  color: #868e96;
}
.mesa-reservas {
  display: grid;
  gap: 0.2rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}
.mesa-reservas li.terminada {
  opacity: 0.5;
  text-decoration: line-through;
}
.mini-cartel {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 4px;
  background: #fff;
  border: 1px dashed var(--azafran-600);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b4a00;
}
.mini-cartel.ok {
  border: 1px solid var(--verde);
  color: var(--verde);
}
.mini-cartel.enmesa {
  border: 1px solid var(--verde);
  background: var(--verde);
  color: #fff;
}
.lista-meseros {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.4rem;
}
.modo-rango {
  display: grid;
  gap: 0.4rem;
}
.modo-rango[hidden] {
  display: none;
}
.vista-previa {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: var(--azul-50);
}
.vista-previa p {
  margin: 0.15rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.mesa-detalle {
  display: grid;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.editar-bloque {
  display: grid;
  gap: 0.5rem;
}
.editar-bloque h3 {
  margin: 0;
  font-size: 1.1rem;
}
.filas-editables {
  display: grid;
  gap: 0.4rem;
}
.fila-editable {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
}
.fila-editable.rango-edit {
  grid-template-columns: minmax(6rem, 10rem) 1fr auto;
}
.fila-editable input {
  min-height: 2.8rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--azul-200);
  border-radius: 8px;
  font: inherit;
}
@media (max-width: 480px) {
  .mesas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fila-editable.rango-edit {
    grid-template-columns: 1fr auto;
  }
  .fila-editable.rango-edit input:nth-child(2) {
    grid-column: 1;
  }
}


/* Repartir mesas: editor sencillo por rango */
.salon-cabeza p {
  flex-basis: 100%;
  margin: 0;
  color: var(--tinta-2);
}
.rango-mesas {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tinta-2);
}
.rango-cuerpo {
  display: grid;
  gap: 0.9rem;
}
.rango-meseros-edit {
  display: grid;
  gap: 0.5rem;
}
.fila-mesero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.fila-mesero > span {
  min-width: 4.6rem;
  font-weight: 700;
  color: var(--azul-900);
}
.sel-mesero {
  flex: 1 1 9rem;
  max-width: 22rem;
  min-height: 3rem;
  padding: 0.4rem 0.7rem;
  border: 3px solid var(--azul-200);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--azul-950);
}
.fila-mesero.compartir .btn {
  margin-left: 0;
}
.reparto {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--azul-50);
}
.reparto-fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}
.reparto-mesa {
  min-width: 5.5rem;
  font-weight: 700;
}
.reparto-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.opcion {
  min-height: 2.6rem;
  padding: 0.3rem 0.9rem;
  border: 2px solid var(--c, var(--azul-200));
  border-radius: 99px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--azul-900);
  cursor: pointer;
}
.opcion.juntos {
  --c: #868e96;
  border-style: dashed;
}
.opcion.activa {
  background: var(--c, var(--azul-700));
  color: #fff;
}
.salon-editar {
  justify-self: start;
}


.tab-cuenta {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.2rem;
  padding: 0 0.35rem;
  border-radius: 99px;
  background: var(--azafran);
  font-size: 0.8125rem;
  color: var(--azul-950);
}
.tab-cuenta.rojo {
  background: var(--rojo);
  color: #fff;
}
.tab-cuenta[hidden] {
  display: none;
}
#vista-pizarra,
#vista-platos {
  display: grid;
  gap: 1rem;
  margin-top: 0.6rem;
}
#vista-pizarra[hidden],
#vista-platos[hidden] {
  display: none;
}

/* ═════════ Pizarra ═════════ */
.piz-agregar {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border: 2px solid var(--azul-100);
  border-radius: 12px;
  background: #fff;
}
.piz-agregar input {
  min-height: 3rem;
  padding: 0.45rem 0.75rem;
  border: 2px solid var(--azul-200);
  border-radius: 10px;
  font: inherit;
  font-size: 1.0625rem;
}
.piz-agregar input:first-child {
  font-weight: 700;
}
.piz-botones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.piz-btn {
  min-height: 3rem;
  border: 0;
  font-weight: 800;
}
.piz-btn.pocos {
  background: var(--azafran);
  color: var(--azul-950);
}
.piz-btn.agotado {
  background: var(--rojo);
  color: #fff;
}
.pizarra {
  display: grid;
  gap: 1.1rem;
  padding: 1.1rem;
  border: 10px solid #8a5a2b;
  border-radius: 10px;
  background: radial-gradient(ellipse at 30% 20%, #34473c 0%, #263a2f 55%, #1f3027 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45), 0 6px 16px -6px rgba(0, 0, 0, 0.4);
  color: #f3f1e7;
}
.piz-vacia {
  display: grid;
  gap: 0.2rem;
  padding: 1.2rem 0.5rem;
  text-align: center;
}
.piz-vacia strong {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 400;
}
.piz-grupo h3 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px dashed rgba(243, 241, 231, 0.35);
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.piz-grupo.agotado h3 {
  color: #ff9fb2;
}
.piz-grupo.pocos h3 {
  color: #ffd66b;
}
.piz-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(243, 241, 231, 0.12);
}
.piz-texto {
  display: grid;
  gap: 0.05rem;
}
.piz-texto strong {
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.15;
}
.piz-grupo.agotado .piz-texto strong {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 159, 178, 0.8);
  text-decoration-thickness: 3px;
}
.piz-texto span {
  font-size: 1rem;
  color: #fff6d6;
}
.piz-texto small {
  font-size: 0.8125rem;
  color: rgba(243, 241, 231, 0.6);
}
.piz-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.piz-mini {
  border: 2px solid rgba(243, 241, 231, 0.6);
  background: transparent;
  color: #f3f1e7;
}
.piz-mini.agotado {
  border-color: #ff9fb2;
  color: #ffd1db;
}

/* ═════════ Platos ═════════ */
.platos-filtros {
  display: grid;
  gap: 0.5rem;
}
.platos-filtros input {
  min-height: 3rem;
  padding: 0.45rem 0.8rem;
  border: 2px solid var(--azul-200);
  border-radius: 10px;
  font: inherit;
  font-size: 1.0625rem;
}
.platos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.8rem;
}
.plato-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--azul-100);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  text-align: left;
  color: var(--tinta);
  cursor: pointer;
}
.plato-card:hover {
  border-color: var(--azul-500);
}
.plato-card.agotado .plato-foto img {
  filter: grayscale(0.85);
  opacity: 0.6;
}
.plato-foto {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--azul-50);
}
.plato-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sin-foto {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tinta-2);
}
.piz-sello {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.piz-sello.agotado {
  background: var(--rojo);
  color: #fff;
}
.piz-sello.pocos {
  background: var(--azafran);
  color: var(--azul-950);
}
.plato-info {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem 0.8rem;
}
.plato-info strong {
  font-size: 1.125rem;
}
.plato-info small {
  font-weight: 700;
  color: var(--tinta-2);
}
.plato-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9375rem;
  color: var(--tinta-2);
}
.plato-foto-grande {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 10px;
}
.plato-meta {
  margin: 0;
  font-weight: 700;
  color: var(--tinta-2);
}
.plato-bloque h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--azul-700);
}
.plato-texto {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  white-space: pre-line;
}
.plato-lista {
  margin: 0;
  padding-left: 1.3rem;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.plato-piz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--linea);
}
.foto-editar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.foto-vista {
  display: grid;
  place-items: center;
  width: 9rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px dashed var(--azul-200);
  border-radius: 10px;
  background: var(--azul-50);
}
.foto-vista img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.foto-botones {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}
.btn-texto.peligro {
  margin-right: auto;
  color: var(--rojo);
}
@media (max-width: 480px) {
  .vistas button {
    font-size: 0.875rem;
    padding: 0 0.15rem;
  }
  .platos-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .plato-info strong {
    font-size: 1rem;
  }
  .piz-texto strong {
    font-size: 1.3rem;
  }
}


/* Elegir mesas por mesero */
.bloque-titulo h3 {
  margin: 0.3rem 0 0;
  font-size: 1.15rem;
}
.bloque-titulo p {
  margin: 0.1rem 0 0;
  color: var(--tinta-2);
  font-size: 0.9375rem;
}
button.mesero-card {
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
button.mesero-card:hover {
  border-color: var(--azul-500);
}
.mesero-card em {
  margin-top: 0.2rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--azul-700);
}
.mesero-card.nuevo {
  border-style: dashed;
  border-left-width: 2px;
  align-content: center;
  justify-items: center;
  color: var(--azul-700);
}
.mesas-elegidas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-left: 6px solid var(--c);
  border-radius: 8px;
  background: var(--azul-50);
  font-size: 1.0625rem;
}
.elegir-rango h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--azul-700);
}
.elegir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: 0.45rem;
}
.elegir-mesa {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  min-height: 4.4rem;
  padding: 0.4rem 0.3rem;
  border: 3px solid var(--azul-200);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--azul-950);
  cursor: pointer;
}
.em-num {
  font-family: var(--f-display);
  font-size: 1.6rem;
  line-height: 1.1;
}
.em-otros {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tinta-2);
}
.elegir-mesa.activa {
  border-color: var(--c);
  background: var(--c);
  color: #fff;
}
.elegir-mesa.activa .em-otros {
  color: rgba(255, 255, 255, 0.85);
}


.copia-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Grupos por confirmar */
.res.e-pendiente {
  border-left-color: #e8590c;
  border-style: dashed;
  border-left-style: solid;
  background: #fff6ec;
}
.chip.pendiente {
  background: #ffe3cc;
  color: #a33d00;
}
.filtro.filtro-pendiente {
  border-color: #e8590c;
  color: #a33d00;
}
.dato.dato-pendiente {
  border-color: #e8590c;
  background: #fff6ec;
  cursor: pointer;
}
.dato.dato-pendiente b {
  color: #a33d00;
}
.btn-texto.peligro {
  color: var(--rojo);
}
.banner-rafaga {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-radius: 0;
  background: #fff3bf;
  color: #5c3c00;
}
.banner-rafaga[hidden] {
  display: none;
}
.lista-bloqueados {
  display: grid;
  gap: 0.3rem;
}

/* Acceso de meseros: solo ver */
.chip-rol {
  display: inline-block;
  margin: 0.1rem 0;
  padding: 0 0.5rem;
  border-radius: 99px;
  background: var(--azafran);
  color: var(--azul-950);
  font-size: 0.75rem;
  font-weight: 800;
}
.chip-rol[hidden] {
  display: none;
}
.solo-ver #btn-nueva,
.solo-ver #btn-ajustes,
.solo-ver .res-botones,
.solo-ver .solo-encargado,
.solo-ver .mesero-card.nuevo,
.solo-ver .mesero-card em,
.solo-ver .bloque-titulo p,
.solo-ver #vista-salon .salon-cabeza p {
  display: none !important;
}
.solo-ver .res-cuerpo,
.solo-ver button.mesero-card {
  cursor: default;
}
.mesa-ver {
  min-width: 2.5rem;
  font-size: 1.125rem;
  text-align: center;
}
.rango-quien {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

/* ═════════ Vinos ═════════ */
#vista-vinos {
  display: grid;
  gap: 1rem;
  margin-top: 0.6rem;
}
#vista-vinos[hidden] {
  display: none;
}
.vino-seccion h3 {
  margin: 0.4rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #c4943a;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: #7a1f2b;
}
.vinos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.7rem;
}
.vino-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--azul-100);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  text-align: left;
  color: var(--tinta);
  cursor: pointer;
}
.vino-card:hover {
  border-color: #7a1f2b;
}
.vino-card.agotado .vino-foto img {
  filter: grayscale(0.85);
  opacity: 0.6;
}
.vino-foto {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 8.5rem;
  background: #fff;
  border-right: 1px solid var(--azul-100);
}
.vino-foto img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.3rem;
}
.vino-foto .sin-foto {
  font-size: 2rem;
}
.vino-foto .piz-sello {
  top: auto;
  bottom: 0.3rem;
  left: 0.3rem;
  font-size: 0.625rem;
  padding: 0.1rem 0.35rem;
}
.vino-uva {
  font-size: 0.875rem;
  font-style: italic;
  color: #7a1f2b;
}
.vino-precio {
  margin-top: 0.2rem;
  font-weight: 800;
  color: var(--azul-900);
}
.vino-foto-grande {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 20rem;
  margin: 0 auto;
  border-radius: 10px;
  background: #fff;
}
.vino-datos {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 1.0625rem;
}
.vino-datos dt {
  font-weight: 700;
  color: var(--tinta-2);
}
.vino-datos dd {
  margin: 0;
}
.foto-vista.vino {
  width: 6rem;
  aspect-ratio: 3 / 4;
  background: #fff;
}
.foto-vista.vino img {
  object-fit: contain;
}

/* Para estudiar */
.estudio {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border: 2px dashed var(--azul-200);
  border-radius: 12px;
  background: var(--azul-50);
}
.docs-lista {
  display: grid;
  gap: 0.5rem;
}
.doc-card {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border: 1px solid var(--azul-100);
  border-radius: 10px;
  background: #fff;
}
.doc-icono {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  overflow: hidden;
  border-radius: 8px;
  background: #c62a4f;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.doc-icono img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doc-info {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.doc-info span {
  font-size: 0.9375rem;
  color: var(--tinta-2);
}
.doc-info small {
  color: var(--tinta-2);
}
.doc-acciones {
  display: grid;
  gap: 0.3rem;
  justify-items: end;
}
@media (max-width: 480px) {
  .vistas button {
    font-size: 0.8125rem;
  }
  .vinos-grid {
    grid-template-columns: 1fr;
  }
  .doc-card {
    grid-template-columns: 3.2rem 1fr;
  }
  .doc-icono {
    width: 3.2rem;
    height: 3.2rem;
  }
  .doc-acciones {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: end;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 12pt;
  }
  .barra,
  .banner,
  .dia-nav,
  .tira,
  .filtros,
  .toasts,
  .res-botones,
  .resumen .medidor,
  dialog {
    display: none !important;
  }
  .solo-impresion {
    display: block;
    margin-bottom: 0.5rem;
  }
  .contenido {
    max-width: none;
    padding: 0;
  }
  .resumen {
    grid-template-columns: repeat(4, 1fr);
    margin: 0 0 0.75rem;
  }
  .dato {
    padding: 0.3rem 0.5rem;
    border-color: #999;
  }
  .dato b {
    font-size: 1.3rem;
  }
  .dato.ancho {
    display: none;
  }
  .res {
    break-inside: avoid;
    margin-bottom: 0.25rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #999;
    border-left: 5px solid #333;
    background: #fff !important;
  }
  .res-personas {
    width: 2.6rem;
    height: 2.6rem;
  }
  .res-personas b {
    font-size: 1.3rem;
  }
  .res-acciones {
    grid-template-columns: auto;
  }
  .mesa input {
    border: none;
    background: none;
  }
  .grupo-hora > h2 {
    font-size: 1.1rem;
    break-after: avoid;
  }
}

/* Teléfonos angostos: que quepan todos los íconos de la barra */
@media (max-width: 480px) {
  .barra-acciones {
    gap: 0.1rem;
  }
  .barra-acciones .icono {
    width: 2.45rem;
  }
  .barra-acciones .btn {
    min-width: 0;
    padding-inline: 0.55rem;
  }
}

/* Imprimir el mapa de mesas */
@media print {
  .vistas,
  .salon-cabeza button,
  .rango-cabeza button {
    display: none !important;
  }
  .ficha-mesa {
    min-height: 0;
    break-inside: avoid;
  }
  .ficha-franja {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rango {
    break-inside: avoid;
  }
}

/* Hoja impresa con el código QR para el personal */
@media print {
  body.imprimir-qr > *:not(#hoja-qr) {
    display: none !important;
  }
  body.imprimir-qr #hoja-qr {
    display: block;
    text-align: center;
    padding-top: 1.5cm;
  }
  #hoja-qr h1 {
    font-size: 22pt;
    margin: 0 0 0.2cm;
  }
  #hoja-qr .hoja-sub {
    font-size: 14pt;
    margin: 0 0 0.6cm;
  }
  #hoja-qr .qr {
    width: 9cm;
    border: none;
    box-shadow: none;
  }
  #hoja-qr .conectar-url {
    margin: 0.4cm 0 0.8cm;
    font-size: 14pt;
  }
  #hoja-qr ol {
    display: inline-block;
    max-width: 15cm;
    text-align: left;
    font-size: 13pt;
    line-height: 1.5;
  }
}

/* ——— Botón de idioma ES | EN ——— */
.btn-idioma {
  display: inline-flex;
  align-items: stretch;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  color: #fff;
  font: 700 0.8125rem/1 var(--fuente, inherit);
  cursor: pointer;
  min-height: 2.25rem;
}
.btn-idioma span {
  display: grid;
  place-items: center;
  padding: 0 0.6rem;
  opacity: 0.75;
}
.btn-idioma span.activo {
  background: var(--azafran, #f4b400);
  color: var(--azul-950, #0f1f52);
  opacity: 1;
}
.btn-idioma:focus-visible { outline: 3px solid var(--azafran, #f4b400); outline-offset: 2px; }
.login-caja { position: relative; }
.login-idioma {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: var(--azul-950, #0f1f52);
}
@media print { .btn-idioma { display: none !important; } }
@media (max-width: 480px) {
  .barra { position: relative; }
  .barra-acciones .btn-idioma {
    position: absolute;
    top: 0.7rem;
    right: 0.75rem;
    min-height: 1.9rem;
    font-size: 0.75rem;
  }
}

/* ═════════ Horarios del equipo ═════════ */
#vista-horarios { display: grid; gap: 1rem; margin-top: 0.6rem; }
#vista-horarios[hidden] { display: none; }
@media (max-width: 560px) { .vistas { grid-template-columns: repeat(4, 1fr); } .vistas button { font-size: 0.9rem; padding: 0 0.15rem; } }
.hor-semana {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem; background: #fff; border: 1px solid var(--linea); border-radius: 14px;
}
.hor-semana-txt { flex: 1; text-align: center; display: grid; }
.hor-semana-txt strong { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; color: var(--azul-900); }
.hor-semana-txt span { color: var(--tinta-2); font-weight: 600; }
.hor-semana .btn { width: 100%; }
.hor-acciones { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.btn-texto.peligro { color: var(--rojo); }

.hor-marco {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: #fff; border: 3px solid var(--azul-950); border-radius: 4px;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--azafran), 6px 6px 0 var(--azul-950);
  padding: 8px;
}
.hor-tabla { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 640px; }
.hor-tabla thead th {
  background: var(--azul-900); color: #fff; padding: 0.45rem 0.2rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; line-height: 1.1;
}
.hor-tabla thead th small { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; }
.hor-tabla thead th.hoy { background: var(--azafran); color: var(--azul-950); }
.hor-tabla .hor-nombre {
  position: sticky; left: 0; z-index: 1; text-align: left; min-width: 7.5rem; background: #fff;
}
.hor-tabla thead .hor-nombre { background: var(--azul-950); padding-left: 0.6rem; }
.hor-tabla tbody th.hor-nombre { padding: 0; }
.hor-tabla tbody th.hor-nombre > div, .hor-persona {
  display: grid; width: 100%; min-height: 3.4rem; align-content: center; text-align: left;
  padding: 0.35rem 0.55rem; border-radius: 8px; background: var(--azul-50); border: 1px solid var(--linea);
  font: inherit; color: var(--tinta); cursor: default;
}
.hor-persona { cursor: pointer; }
.hor-persona:hover { border-color: var(--azul-500); }
.hor-nombre strong { font-size: 0.95rem; }
.hor-nombre small { color: var(--tinta-2); font-size: 0.78rem; font-weight: 600; }
.hor-tabla tbody tr.yo th.hor-nombre > *, .hor-tabla tbody tr.yo .hor-persona { background: var(--azafran-100); border-color: var(--azafran); }
.hor-tabla td { padding: 0; }
.hor-celda {
  display: grid; place-content: center; gap: 1px; width: 100%; min-height: 3.4rem; padding: 0.25rem;
  border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 0.82rem; font-weight: 700;
  text-align: center; line-height: 1.15; color: var(--tinta);
}
button.hor-celda { cursor: pointer; }
button.hor-celda:hover { outline: 2px solid var(--azul-500); outline-offset: -1px; }
.hor-celda.trabaja { background: var(--azul-100); color: var(--azul-900); border-color: var(--azul-200); }
.hor-celda.trabaja span:first-child::after { content: ''; }
.hor-celda.trabaja em { font-style: normal; font-size: 0.7rem; color: var(--azul-700); }
.hor-celda.descansa {
  background: var(--verde-100); color: var(--verde); border-color: #b5e3cf; font-size: 0.78rem;
}
.hor-celda.vacia { background: var(--papel); color: #9aa3c0; border: 1px dashed var(--linea); font-size: 1.1rem; }
.hor-celda.hoy { box-shadow: 0 0 0 2px var(--azafran); }
.hor-tabla .hor-total { font-weight: 800; color: var(--azul-900); text-align: center; white-space: nowrap; font-size: 0.9rem; min-width: 3.4rem; }
.hor-tabla thead .hor-total { font-size: 0.85rem; }
.hor-tabla tfoot th, .hor-tabla tfoot td { font-size: 0.8rem; color: var(--tinta-2); font-weight: 700; text-align: center; padding-top: 0.3rem; }
.hor-tabla tfoot th.hor-nombre { text-align: left; padding-left: 0.55rem; }
.hor-leyenda { display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; margin: 0; }
.hor-leyenda .ley { padding: 0.2rem 0.6rem; border-radius: 999px; font-weight: 700; }
.ley.trabaja { background: var(--azul-100); color: var(--azul-900); }
.ley.descansa { background: var(--verde-100); color: var(--verde); }
.ley.vacia { background: var(--papel); color: var(--tinta-2); border: 1px dashed var(--linea); }

/* Mi horario */
.mi-horario {
  background: #fff; border: 1px solid var(--linea); border-left: 6px solid var(--azafran);
  border-radius: 14px; padding: 0.9rem 1rem; box-shadow: var(--sombra);
}
.mi-horario:empty { display: none; }
.mi-horario h3 { margin: 0 0 0.2rem; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; color: var(--azul-900); }
.mi-horario p { margin: 0 0 0.6rem; color: var(--tinta-2); }
.mi-horario select { width: 100%; min-height: 2.8rem; font: inherit; padding: 0 0.6rem; border-radius: 10px; border: 1px solid var(--linea); }
.mi-cabeza { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: flex-start; }
.mi-cabeza select { width: auto; min-height: 2.3rem; font-size: 0.85rem; }
.mi-dias { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.mi-dias li {
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: 10px; font-size: 0.95rem;
}
.mi-dias li.trabaja { background: var(--azul-100); color: var(--azul-900); }
.mi-dias li.descansa { background: var(--verde-100); color: var(--verde); }
.mi-dias li.vacia { background: var(--papel); color: var(--tinta-2); }
.mi-dias li.hoy { outline: 3px solid var(--azafran); }
.mi-dias li.pasado { opacity: 0.55; }
.mi-dia { font-weight: 600; }
.mi-dias strong { text-align: right; }

/* Ventana para editar una casilla */
.hor-modo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; padding: 0.3rem; background: var(--azul-100); border-radius: 12px; margin-bottom: 0.9rem; }
.hor-modo button { min-height: 2.7rem; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 700; color: var(--azul-700); cursor: pointer; }
.hor-modo button[aria-pressed='true'] { background: var(--azul-900); color: #fff; }
.hor-modo button[data-m='descansa'][aria-pressed='true'] { background: var(--verde); }
.hor-horas[hidden] { display: none; }
.hor-sub { margin: 0.4rem 0 0.4rem; font-weight: 700; color: var(--tinta-2); font-size: 0.9rem; }
.hor-rapidos { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.hor-par { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.hor-par[hidden] { display: none; }
.hor-otros { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hor-otro { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.6rem; border: 1px solid var(--linea); border-radius: 999px; font-weight: 600; cursor: pointer; }
.hor-otro:has(input:checked) { background: var(--azul-100); border-color: var(--azul-500); }
.hor-mover { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }

@media print {
  .hor-noimprimir { display: none !important; }
  .hor-marco { overflow: visible; box-shadow: none; border-width: 2px; }
  .hor-tabla { min-width: 0; }
  .hor-celda, .hor-tabla thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hor-titulo-imp { font-size: 16pt; font-weight: 700; }
}
.hor-persona > div, .hor-tabla tbody th.hor-nombre > div { display: grid; }
.hor-tabla thead th.hor-total { color: #fff; }

/* ═════════ Chat del equipo ═════════ */
#vista-chat { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.6rem; }
#vista-chat[hidden] { display: none; }
.chat-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; flex-wrap: wrap; }
.chat-cabeza h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; color: var(--azul-900); }
.chat-cabeza p { margin: 0.15rem 0 0; color: var(--tinta-2); }
.chat-lista {
  height: max(320px, calc(100dvh - 420px));
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.8rem 0.7rem; border-radius: 16px; border: 1px solid var(--linea);
  background: #eef2fb url('/img/azulejo.svg') repeat; background-size: 120px; background-blend-mode: soft-light;
}
.chat-dia { align-self: center; margin: 0.5rem 0 0.2rem; }
.chat-dia span { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: #fff; color: var(--tinta-2); font-size: 0.78rem; font-weight: 700; box-shadow: 0 1px 2px rgba(15,31,82,.12); }
.chat-msg {
  position: relative; max-width: min(78%, 460px); padding: 0.45rem 0.7rem 0.35rem; border-radius: 14px;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 31, 82, 0.14); line-height: 1.35;
}
.chat-msg.otro { align-self: flex-start; border-top-left-radius: 4px; }
.chat-msg.mio { align-self: flex-end; background: #dbe5ff; border-top-right-radius: 4px; }
.chat-de { display: block; font-size: 0.82rem; margin-bottom: 0.1rem; }
.chat-texto { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.98rem; }
.chat-hora { display: block; text-align: right; font-size: 0.7rem; color: var(--tinta-2); margin-top: 0.15rem; }
.chat-foto { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; margin: 0.15rem 0; }
.chat-foto img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; }
.chat-msg video { display: block; width: 100%; max-width: 360px; max-height: 360px; border-radius: 10px; background: #000; margin: 0.15rem 0; }
.chat-msg audio { display: block; width: min(260px, 64vw); height: 40px; margin: 0.2rem 0; }
.chat-msg.tipo-imagen, .chat-msg.tipo-video { padding: 0.3rem 0.3rem 0.3rem; }
.chat-msg.tipo-imagen .chat-de, .chat-msg.tipo-video .chat-de, .chat-msg.tipo-imagen .chat-texto, .chat-msg.tipo-video .chat-texto, .chat-msg.tipo-imagen .chat-hora, .chat-msg.tipo-video .chat-hora { padding: 0 0.4rem; }
.chat-vencido { margin: 0; font-style: italic; color: var(--tinta-2); font-size: 0.88rem; }
.chat-borrar {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--linea); background: #fff; color: var(--rojo); font-size: 1rem; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity 0.15s;
}
.chat-msg:hover .chat-borrar, .chat-borrar:focus-visible { opacity: 1; }
@media (hover: none) { .chat-borrar { opacity: 0.55; } }
.chat-vacio { margin: auto; text-align: center; color: var(--tinta-2); background: #fff; padding: 1rem 1.2rem; border-radius: 14px; }
.chat-vacio p { margin: 0.2rem 0 0; }
.chat-foto-grande { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; border-radius: 8px; }
.chat-nombres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }

.chat-pie { display: grid; gap: 0.4rem; }
.chat-componer { display: flex; align-items: flex-end; gap: 0.4rem; padding: 0.4rem; background: #fff; border: 1px solid var(--linea); border-radius: 16px; box-shadow: var(--sombra); }
.chat-componer[hidden], .chat-grabando[hidden], .chat-progreso[hidden], .chat-icono[hidden], .chat-enviar[hidden] { display: none; }
.chat-componer textarea {
  flex: 1; min-width: 0; min-height: 2.75rem; max-height: 140px; resize: none; border: 0; padding: 0.65rem 0.4rem;
  font: inherit; font-size: 1rem; background: transparent; color: var(--tinta); outline: none;
}
.chat-icono, .chat-enviar {
  flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--azul-50); color: var(--azul-700); cursor: pointer;
}
.chat-enviar, .chat-mic { background: var(--azul-900); color: #fff; }
.chat-icono:focus-visible, .chat-enviar:focus-visible { outline: 3px solid var(--azafran); outline-offset: 2px; }
.chat-grabando { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.55rem 0.8rem; background: #fff; border: 2px solid var(--rojo); border-radius: 16px; }
.chat-grabando strong { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.chat-grabando em { flex: 1; color: var(--tinta-2); font-style: normal; }
.chat-punto-rojo { width: 12px; height: 12px; border-radius: 50%; background: var(--rojo); animation: chat-latido 1s infinite; }
@keyframes chat-latido { 50% { opacity: 0.3; } }
.chat-progreso { position: relative; height: 1.8rem; border-radius: 999px; background: var(--azul-100); overflow: hidden; }
.chat-progreso span { position: absolute; inset: 0 auto 0 0; background: var(--azul-500); transition: width 0.2s; }
.chat-progreso em { position: relative; display: block; text-align: center; line-height: 1.8rem; font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--azul-950); }
@media (max-width: 560px) {
  body.en-chat .chat-lista { height: max(300px, calc(100dvh - 380px)); }
}

/* ═════════ Chat estilo WhatsApp ═════════ */
#vista-chat { display: block; margin-top: 0.6rem; }
#vista-chat[hidden] { display: none; }
.wa {
  --wa-fondo: #efeae2; --wa-mio: #d9fdd3; --wa-otro: #ffffff; --wa-verde: #00a884; --wa-gris: #667781;
  display: flex; flex-direction: column;
  height: calc(100dvh - 240px); min-height: 480px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--linea); box-shadow: var(--sombra);
  background: var(--wa-fondo);
}
.wa-cabeza {
  flex: none; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.6rem; padding-top: max(0.45rem, env(safe-area-inset-top));
  background: var(--azul-900); color: #fff; min-height: 3.6rem;
}
.wa-atras { display: none; width: 2.4rem; height: 2.4rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.wa-atras:active { background: rgba(255,255,255,.15); }
.wa-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: none; }
.wa-titulo { flex: 1; min-width: 0; display: grid; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; padding: 0.15rem 0.2rem; cursor: pointer; border-radius: 8px; }
.wa-titulo strong { font-size: 1.05rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-titulo small { font-size: 0.8rem; color: #c9d6f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-lista {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 2px; padding: 0.6rem 0.75rem 0.8rem;
  background-color: var(--wa-fondo);
  background-image: url('/img/azulejo.svg'); background-size: 150px; background-blend-mode: multiply;
}
.wa-lista > :first-child { margin-top: auto; }
.wa-aviso {
  align-self: center; max-width: 92%; margin: 0.3rem 0 0.4rem; padding: 0.4rem 0.75rem; border-radius: 8px;
  background: #ffeecd; color: #54656f; font-size: 0.78rem; text-align: center; line-height: 1.35; box-shadow: 0 1px 0.5px rgba(11,20,26,.13);
}
.wa-dia { align-self: center; margin: 0.55rem 0 0.35rem; position: sticky; top: 0.3rem; z-index: 2; }
.wa-dia span { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 8px; background: #fff; color: #54656f; font-size: 0.78rem; font-weight: 600; box-shadow: 0 1px 0.5px rgba(11,20,26,.13); }

.wa-msg {
  position: relative; max-width: min(80%, 480px); margin-top: 0.4rem;
  padding: 0.32rem 0.5rem 0.25rem 0.55rem; border-radius: 8px; font-size: 0.97rem; line-height: 1.35;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); color: #111b21;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.wa-msg.seguido { margin-top: 2px; }
.wa-msg.otro { align-self: flex-start; background: var(--wa-otro); }
.wa-msg.mio { align-self: flex-end; background: var(--wa-mio); }
/* Colita de la burbuja (solo en la primera de cada grupo) */
.wa-msg:not(.seguido).otro { border-top-left-radius: 0; }
.wa-msg:not(.seguido).mio { border-top-right-radius: 0; }
.wa-msg:not(.seguido)::before {
  content: ''; position: absolute; top: 0; width: 8px; height: 13px;
}
.wa-msg:not(.seguido).otro::before { left: -8px; background: var(--wa-otro); clip-path: polygon(100% 0, 0 0, 100% 100%); }
.wa-msg:not(.seguido).mio::before { right: -8px; background: var(--wa-mio); clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-msg.elegido { filter: brightness(0.9); }
.wa-de { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 1px; }
.wa-texto { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-espacio { display: inline-block; width: 4.6rem; }
.wa-msg.otro .wa-espacio { width: 3.6rem; }
.wa-hora {
  position: absolute; right: 0.45rem; bottom: 0.2rem; display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.69rem; color: var(--wa-gris); white-space: nowrap;
}
.wa-check { color: #53bdeb; font-size: 0.72rem; letter-spacing: -3px; margin-right: 3px; }
.wa-msg.tipo-imagen, .wa-msg.tipo-video { padding: 3px; }
.wa-msg.tipo-imagen .wa-de, .wa-msg.tipo-video .wa-de { padding: 0.15rem 0.4rem 0.1rem; }
.wa-msg.tipo-imagen .wa-texto, .wa-msg.tipo-video .wa-texto { padding: 0.25rem 0.45rem 0.2rem; }
.wa-msg.solo-media .wa-hora { right: 0.6rem; bottom: 0.5rem; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.7); background: linear-gradient(transparent, rgba(0,0,0,.25)); padding: 0 0.2rem; border-radius: 6px; }
.wa-msg.solo-media.tipo-video .wa-hora { bottom: auto; top: 0.5rem; }
.wa-msg:not(.solo-media).tipo-imagen .wa-hora, .wa-msg:not(.solo-media).tipo-video .wa-hora { bottom: 0.3rem; }
.wa-foto { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.wa-foto img { display: block; width: min(300px, 66vw); max-height: 340px; object-fit: cover; border-radius: 6px; }
.wa-video { display: block; width: min(300px, 66vw); max-height: 360px; border-radius: 6px; background: #000; }
.wa-vencido { margin: 0; padding: 0.2rem 3.8rem 0.25rem 0.1rem; font-style: italic; color: var(--wa-gris); font-size: 0.88rem; }

/* Audio */
.wa-msg.tipo-audio { padding: 0.35rem 0.5rem 1.05rem; min-width: min(270px, 72vw); }
.wa-audio { display: flex; align-items: center; gap: 0.45rem; }
.wa-audio-cara { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; }
.wa-audio-mic { position: absolute; right: -4px; bottom: -2px; width: 18px; height: 18px; color: var(--wa-verde); background: transparent; }
.wa-audio.mio .wa-audio-mic { left: -4px; right: auto; color: #53bdeb; }
.wa-play { flex: none; width: 36px; height: 36px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: #54656f; }
.wa-triangulo { width: 0; height: 0; border-left: 15px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.wa-pausa { display: flex; gap: 4px; }
.wa-pausa i { width: 4px; height: 17px; background: currentColor; border-radius: 1px; }
.wa-audio-medio { flex: 1; min-width: 0; display: grid; gap: 4px; padding-top: 10px; }
.wa-barra-audio { position: relative; height: 4px; border-radius: 4px; background: #c5cdd2; cursor: pointer; }
.wa-barra-audio::after { content: ''; position: absolute; inset: -10px 0; }
.wa-relleno { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: #8696a0; }
.wa-audio.mio .wa-relleno, .wa-msg.mio .wa-relleno { background: #4fae93; }
.wa-bolita { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #53bdeb; }
.wa-msg.otro .wa-bolita { background: #30b0c7; }
.wa-audio-tiempo { font-size: 0.72rem; color: var(--wa-gris); }

/* Casilla de escribir */
.wa-pie { flex: none; padding: 0.35rem 0.4rem; padding-bottom: max(0.35rem, env(safe-area-inset-bottom)); background: transparent; display: grid; gap: 0.35rem; }
.wa-componer { display: flex; align-items: flex-end; gap: 0.35rem; }
.wa-componer[hidden], .wa-grabando[hidden], .wa-progreso[hidden], .wa-ic[hidden], .wa-redondo[hidden] { display: none; }
.wa-pastilla {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0.1rem;
  background: #fff; border-radius: 24px; padding: 0.2rem 0.3rem; box-shadow: 0 1px 1px rgba(11,20,26,.12);
}
.wa-pastilla textarea {
  flex: 1; min-width: 0; min-height: 2.6rem; max-height: 132px; resize: none; border: 0; outline: none;
  padding: 0.62rem 0.25rem; font: inherit; font-size: 1.02rem; line-height: 1.35; background: transparent; color: #111b21;
}
.wa-ic { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #54656f; cursor: pointer; }
.wa-ic svg { width: 23px; height: 23px; }
.wa-redondo {
  flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--wa-verde); color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(11,20,26,.25);
}
.wa-redondo:active { filter: brightness(0.92); }
.wa-enviar-ic { width: 0; height: 0; border-left: 18px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.wa-ic:focus-visible, .wa-redondo:focus-visible, .wa-titulo:focus-visible, .wa-atras:focus-visible { outline: 3px solid var(--azafran); outline-offset: 1px; }
.wa-grabando { display: flex; align-items: center; gap: 0.35rem; background: #fff; border-radius: 26px; padding: 0.2rem 0.25rem 0.2rem 0.3rem; box-shadow: 0 1px 1px rgba(11,20,26,.12); }
.wa-grabando-medio { flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.wa-grabando-medio strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; color: #111b21; }
.wa-grabando-medio em { font-style: normal; color: var(--wa-gris); }
.wa-borrar-audio { color: #ea0038; }
.wa-progreso { position: relative; height: 1.8rem; border-radius: 999px; background: #fff; overflow: hidden; box-shadow: 0 1px 1px rgba(11,20,26,.12); }
.wa-progreso span { position: absolute; inset: 0 auto 0 0; background: #b7ecd9; transition: width 0.2s; }
.wa-progreso em { position: relative; display: block; text-align: center; line-height: 1.8rem; font-style: normal; font-weight: 700; font-size: 0.85rem; color: #0b4d3c; }

/* En el teléfono: pantalla completa, como una app de chat */
@media (max-width: 820px) {
  body.en-chat { overflow: hidden; }
  body.en-chat .wa {
    position: fixed; left: 0; right: 0; top: 0; z-index: 90;
    height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none;
  }
  body.en-chat .wa-atras { display: grid; }
  body.en-chat .toasts { bottom: 5rem; }
}
.wa-pastilla textarea:focus, .wa-pastilla textarea:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; }
.wa-pastilla:focus-within { box-shadow: 0 1px 1px rgba(11,20,26,.12), 0 0 0 2px rgba(0,168,132,.35); }
.wa-lista {
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d9d0c3' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='20' cy='22' r='7'/%3E%3Cpath d='M58 14c4 6 10 6 14 0M88 30l8 8M96 30l-8 8M18 70c6-6 12 6 18 0M70 64a8 8 0 1 0 16 0 8 8 0 1 0-16 0M100 80l6 10h-12zM30 100l8-6 8 6M62 96h14M69 89v14'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px; background-blend-mode: normal;
}

/* ═════════ Ventura (asistente de voz) ═════════ */
.btn-ventura {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 70;
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 5px 16px 5px 5px;
  border: 2px solid var(--azafran); border-radius: 999px; background: var(--azul-900); color: #fff;
  font: 700 1rem var(--f-texto); box-shadow: 0 10px 26px -8px rgba(11, 23, 63, 0.7); cursor: pointer;
}
.btn-ventura img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.btn-ventura:focus-visible { outline: 3px solid var(--azafran); outline-offset: 3px; }
.btn-ventura[hidden], .ven-panel[hidden], .ven-callar[hidden] { display: none; }
body.en-chat .btn-ventura { display: none; }
@media print { .btn-ventura, .ven-panel { display: none !important; } }

.ven-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 95; width: min(400px, calc(100vw - 32px)); height: min(680px, calc(100dvh - 32px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #0f1f52 0%, #1b3a8c 46%, #f2f5fe 46.1%);
  box-shadow: 0 30px 70px -20px rgba(11, 23, 63, 0.8); border: 2px solid var(--azul-950);
}
.ven-cabeza { position: relative; flex: none; display: grid; justify-items: center; gap: 0.25rem; padding: 1.2rem 1rem 0.8rem; color: #fff; text-align: center; }
.ven-x { position: absolute; top: 0.5rem; right: 0.5rem; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.ven-nombre { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0.02em; }
.ven-estado { margin: 0; min-height: 1.4em; color: #dfe7ff; font-size: 0.98rem; max-width: 90%; }
.ven-cara { position: relative; width: 132px; height: 132px; margin-top: 0.2rem; }
.ven-cara img { position: relative; z-index: 2; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--azafran); background: #fff; transition: transform 0.2s; }
.ven-onda { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--azafran); opacity: 0; z-index: 1; }
.ven-cara.escuchando img { border-color: #ff5a6e; }
.ven-cara.escuchando .ven-onda { border-color: #ff5a6e; animation: ven-onda 1.4s ease-out infinite; }
.ven-cara.escuchando .o2 { animation-delay: 0.7s; }
.ven-cara.hablando .ven-onda { animation: ven-onda 1.1s ease-out infinite; }
.ven-cara.hablando .o2 { animation-delay: 0.55s; }
.ven-cara.hablando img { animation: ven-habla 0.42s ease-in-out infinite alternate; }
.ven-cara.pensando img { animation: ven-piensa 1.2s ease-in-out infinite; }
@keyframes ven-onda { 0% { transform: scale(1); opacity: 0.85; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes ven-habla { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes ven-piensa { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(0.82); } }
@media (prefers-reduced-motion: reduce) { .ven-cara * { animation: none !important; } }

.ven-lista { flex: 1; min-height: 0; overflow-y: auto; padding: 0.9rem 0.9rem 0.4rem; display: flex; flex-direction: column; gap: 0.5rem; background: #f2f5fe; }
.ven-hola { margin: 0; color: var(--tinta-2); text-align: center; }
.ven-sugs { display: grid; gap: 0.4rem; }
.ven-sugs button { padding: 0.6rem 0.8rem; border: 1.5px solid var(--azul-200); border-radius: 12px; background: #fff; color: var(--azul-900); font: 600 0.95rem var(--f-texto); text-align: left; cursor: pointer; }
.ven-msg { max-width: 88%; padding: 0.55rem 0.75rem; border-radius: 14px; line-height: 1.38; box-shadow: 0 1px 1px rgba(11,20,26,.1); }
.ven-msg p { margin: 0; }
.ven-msg.mesero { align-self: flex-end; background: var(--azul-900); color: #fff; border-bottom-right-radius: 4px; }
.ven-msg.ventura { align-self: flex-start; background: #fff; color: var(--tinta); border-bottom-left-radius: 4px; }
.ven-repetir { margin-top: 0.35rem; padding: 0.2rem 0.55rem; border: 1px solid var(--azul-200); border-radius: 999px; background: var(--azul-50); color: var(--azul-700); font: 600 0.8rem var(--f-texto); cursor: pointer; }
.ven-pie { flex: none; display: grid; justify-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem; padding-bottom: max(0.8rem, env(safe-area-inset-bottom)); background: #f2f5fe; border-top: 1px solid var(--linea); }
.ven-mic {
  width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--azafran); color: var(--azul-950); box-shadow: 0 8px 20px -6px rgba(217, 151, 11, 0.8);
}
.ven-mic.activo { background: #e03150; color: #fff; box-shadow: 0 0 0 8px rgba(224, 49, 80, 0.2); }
.ven-mic:focus-visible { outline: 3px solid var(--azul-500); outline-offset: 3px; }
.ven-form { display: flex; gap: 0.4rem; width: 100%; }
.ven-form input { flex: 1; min-width: 0; min-height: 2.7rem; padding: 0 0.9rem; border: 1.5px solid var(--linea); border-radius: 999px; font: 1rem var(--f-texto); background: #fff; }
.ven-enviar { flex: none; width: 2.7rem; height: 2.7rem; border: 0; border-radius: 50%; background: var(--azul-900); display: grid; place-items: center; cursor: pointer; }
@media (max-width: 560px) {
  .ven-panel { inset: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  body.ven-abierto { overflow: hidden; }
  .btn-ventura span { display: none; }
  .btn-ventura { padding: 4px; }
}
.ven-idioma { display: inline-flex; margin: 0.15rem 0 0.1rem; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.14); }
.ven-idioma button { min-height: 2.2rem; padding: 0 0.95rem; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 0.9rem var(--f-texto); cursor: pointer; }
.ven-idioma button[aria-pressed='true'] { background: var(--azafran); color: var(--azul-950); }
.ven-idioma button:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.btn-ventura-hor { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--azul-900); color: #fff; border: 2px solid var(--azafran); }
.btn-ventura-hor img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.hor-faltan { background: #fff4e5; border: 1px solid #f5c98b; border-left: 6px solid #e8890c; border-radius: 12px; padding: 0.8rem 1rem; }
.hor-faltan p { margin: 0.25rem 0 0.4rem; color: var(--tinta-2); }
.hor-faltan ul { margin: 0; padding-left: 1.1rem; }
.hor-libres { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 0.9rem 1rem; }
.hor-libres h3 { margin: 0 0 0.2rem; font-family: var(--f-display); font-weight: 400; color: var(--azul-900); }
.hor-libres > p { margin: 0 0 0.5rem; color: var(--tinta-2); }
.hor-libres ul { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.3rem; }
.hor-libres li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.4rem 0.6rem; background: var(--azul-50); border-radius: 8px; }
.hor-libre-nuevo { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.hor-libre-nuevo select, .hor-libre-nuevo input { min-height: 2.5rem; padding: 0 0.6rem; border: 1px solid var(--linea); border-radius: 10px; font: inherit; }
.hor-reglas { width: 100%; border-collapse: collapse; }
.hor-reglas th, .hor-reglas td { padding: 0.3rem; text-align: left; border-bottom: 1px solid var(--linea); }
.hor-num { width: 4.5rem; min-height: 2.4rem; padding: 0 0.4rem; border: 1px solid var(--linea); border-radius: 8px; font: inherit; }
/* Sillas de cada mesa */
.ficha-sillas { font-size: 0.72em; font-weight: 600; color: var(--tinta-2); }
.sillas-resumen { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; padding: 0.9rem 1rem; background: #fff; border: 1px solid var(--linea); border-left: 6px solid var(--azafran); border-radius: 14px; }
.sillas-resumen h3 { margin: 0 0 0.2rem; font-family: var(--f-display); font-weight: 400; color: var(--azul-900); }
.sillas-resumen p { margin: 0; color: var(--tinta-2); max-width: 60ch; }
.sillas-todas { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; font-weight: 600; }
.sillas-lista { display: grid; gap: 0.8rem; max-height: 52vh; overflow: auto; padding-right: 0.2rem; }
.sillas-rango h4 { margin: 0 0 0.3rem; color: var(--azul-900); }
.sillas-fila { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.sillas-opc { display: flex; gap: 0.3rem; align-items: center; }
.sillas-opc button { min-width: 2.6rem; min-height: 2.4rem; border: 1.5px solid var(--azul-200); border-radius: 10px; background: #fff; font: 700 0.95rem var(--f-texto); color: var(--azul-900); cursor: pointer; }
.sillas-opc button[aria-pressed='true'] { background: var(--azul-900); color: #fff; border-color: var(--azul-900); }
.sillas-opc input { width: 4.2rem; min-height: 2.4rem; padding: 0 0.4rem; border: 1.5px solid var(--azul-200); border-radius: 10px; font: inherit; }
.sillas-total { margin: 0.6rem 0 0; font-weight: 700; color: var(--azul-900); }

.ven-fuentes { margin-top: 0.35rem; font-size: 0.75rem; opacity: 0.85; }
.ven-fuentes a { color: inherit; text-decoration: underline; }

/* Lista de espera */
.esp-barra { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0.5rem 0 1rem; }
.esp-nuevo { font-size: 1.05rem; padding: 0.75rem 1.2rem; }
.esp-resumen { margin: 0; color: var(--tinta-suave, #6b5a48); font-weight: 600; }
.esp-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.esp-item { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem 0.75rem; align-items: start; background: #fff; border: 1px solid var(--linea, #e3d6bf); border-radius: 14px; padding: 0.8rem; }
.esp-pos { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--espresso, #22160f); color: #fff; display: grid; place-items: center; font-weight: 700; }
.esp-nombre { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 1.05rem; }
.esp-pers { background: #f3ead8; border-radius: 999px; padding: 0.1rem 0.55rem; font-weight: 700; font-size: 0.9rem; }
.esp-avisado { background: #e6f4ea; color: #1e6b34; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.8rem; font-weight: 600; }
.esp-tiempos { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 0.3rem; font-size: 0.9rem; color: #5a4a3a; }
.esp-espera { font-weight: 700; }
.esp-espera.cerca { color: #9a6b00; }
.esp-espera.tarde { color: #b3261e; }
.esp-libre { color: #1e6b34; font-weight: 700; }
.esp-estimado { color: #5a4a3a; }
.esp-nota { margin-top: 0.25rem; font-size: 0.85rem; color: #6b5a48; }
.esp-botones { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.esp-hechos { margin-top: 1.2rem; }
.esp-hechos summary { cursor: pointer; font-weight: 700; padding: 0.4rem 0; }
.esp-fila { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.esp-num { width: 5.5rem; }
.esp-rapidos { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.esp-rapidos .chip { border: 1px solid var(--linea, #ddcca8); background: #fff8e8; border-radius: 999px; padding: 0.3rem 0.7rem; font-weight: 600; cursor: pointer; }

/* WhatsApp */
.aviso-wa { background: #effaf3; border: 1px solid #b7e8c8; border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.5rem 0; font-size: 0.92rem; }
.aviso-wa.rojo { background: #fdecea; border-color: #f2b8b5; color: #8c1d18; font-weight: 600; }
.wa-convs { display: grid; gap: 0.4rem; }
.wa-conv { text-align: left; background: #fff; border: 1px solid var(--linea, #e3d6bf); border-radius: 12px; padding: 0.7rem 0.85rem; cursor: pointer; font: inherit; color: inherit; }
.wa-conv.necesita { border-color: #d93025; box-shadow: 0 0 0 2px #fdecea; }
.wa-conv-arriba, .wa-conv-abajo { display: flex; gap: 0.5rem; align-items: center; }
.wa-conv-arriba strong { flex: 1; }
.wa-conv-hora { font-size: 0.78rem; color: #7a6a58; }
.wa-conv-abajo { margin-top: 0.2rem; }
.wa-conv-ult { flex: 1; font-size: 0.86rem; color: #6b5a48; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-etq { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.5rem; background: #f3ead8; white-space: nowrap; }
.wa-etq.rojo { background: #d93025; color: #fff; }
.wa-etq.verde { background: #e6f4ea; color: #1e6b34; }
.wa-hilo { display: flex; flex-direction: column; gap: 0.5rem; }
.wa-hilo-cabeza { display: flex; align-items: center; gap: 0.6rem; }
.wa-hilo-cabeza > div { flex: 1; }
.wa-tel a { font-size: 0.85rem; color: inherit; }
.wa-msgs { background: #efe7dc; border-radius: 12px; padding: 0.75rem; max-height: 58vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; }
.wa-burbuja { max-width: 85%; padding: 0.45rem 0.65rem; border-radius: 10px; background: #fff; align-self: flex-start; white-space: pre-wrap; font-size: 0.93rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-burbuja.bot, .wa-burbuja.personal { align-self: flex-end; background: #d9fdd3; }
.wa-burbuja.personal { background: #cfe9ff; }
.wa-quien { font-size: 0.72rem; font-weight: 700; color: #1e6b34; margin-bottom: 0.1rem; }
.wa-burbuja.personal .wa-quien { color: #0b57d0; }
.wa-hora { font-size: 0.68rem; color: #7a6a58; text-align: right; margin-top: 0.15rem; }
.wa-escribir { display: flex; gap: 0.5rem; align-items: flex-end; }
.wa-escribir textarea { flex: 1; resize: vertical; min-height: 2.8rem; font: inherit; padding: 0.55rem; border-radius: 10px; border: 1px solid var(--linea, #ccc); }

.hor-rol { display: block; font-size: 0.62rem; font-weight: 700; background: #fff4cc; color: #7a5200; border-radius: 6px; padding: 0 0.25rem; margin-top: 0.1rem; }
.hor-tambien { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }

/* Coberturas */
.aviso-cob { display: grid; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.cob-item { background: #fff8dc; border: 1px solid #e0b100; border-radius: 12px; padding: 0.7rem 0.9rem; }
.cob-item.rojo { background: #fdecea; border-color: #f2b8b5; }
.cob-item p { margin: 0 0 0.45rem; }
.cob-botones { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hor-disp { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.35rem 0.75rem; }
.hor-disp label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.15rem; }

.aviso-push { background: #e8f0fe; border: 1px solid #aecbfa; border-radius: 12px; padding: 0.7rem 0.9rem; }
.aviso-push p { margin: 0 0 0.45rem; }
.wa-campana { font-size: 1.2rem; margin-left: auto; }
