/* MiMesa · estilos del panel. Guardar/confirmar/aceptar en verde (#1E8E4E), borrar/anular/baja en rojo (#C62828).
   El color del restaurante (--brand) solo va en acciones neutras y detalles. © KREAVANCE · Creación y desarrollo */
:root {
  --ink: #1F2933; --muted: #52606D; --bg: #F4F5F2; --surface: #FFFFFF; --line: #D5DAD9; --soft: #EEF1EF;
  --ok: #1E8E4E; --ok-hover: #187340; --del: #C62828; --del-hover: #A32020;
  --brand: #23395B; --brand-ink: #FFFFFF; --brand-btn: #23395B; --brand-btn-ink: #FFFFFF; --mimesa: #23395B;
  --focus: #1D4ED8; --amber-bg: #FFF4D6; --amber: #8A5A00; --blue-bg: #E6ECFA; --blue: #2C3E8C; --green-bg: #E7F3EA;
  --radius: 12px; --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 .75em; }
a { color: #1F4FA8; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.saltar:focus { left: 8px; }
.sin-js { padding: 24px; text-align: center; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 10px; border: 2px solid transparent;
  font-family: inherit; font-weight: 700; font-size: 1.1875rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; touch-action: manipulation; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.peq { min-height: 44px; padding: 6px 14px; }
.btn.ancho { width: 100%; }
/* Verde: guardar, confirmar, aceptar. Texto grande (19 px en negrita) para cumplir el contraste AA con blanco. */
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ok:hover { background: var(--ok-hover); border-color: var(--ok-hover); }
/* Rojo: borrar, anular, dar de baja. Siempre con confirmación. */
.btn.del { background: var(--del); color: #fff; border-color: var(--del); }
.btn.del:hover { background: var(--del-hover); border-color: var(--del-hover); }
.btn.del.borde { background: var(--del); color: #fff; }   /* borrar siempre relleno de rojo, como guardar va relleno de verde */
.btn.del.borde:hover { background: var(--del-hover); }
.btn.soft { background: var(--surface); color: var(--ink); border-color: #9AA5B1; font-size: 1rem; font-weight: 600; }
.btn.soft:hover { background: var(--soft); }
.btn.soft[aria-pressed="true"] { background: var(--brand-btn); color: var(--brand-btn-ink); border-color: var(--brand-btn); }   /* lo elegido, en el color del restaurante */
.btn.brand { background: var(--brand-btn); color: var(--brand-btn-ink); border-color: var(--brand-btn); }
.btn.brand:hover { filter: brightness(.92); }
.btn.brand.grande { min-height: 56px; padding: 12px 24px; }
.btn.blanco { background: #fff; color: var(--mimesa); border-color: var(--mimesa); }
.enlace { background: none; border: 0; padding: 0 2px; color: #1F4FA8; text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
.botones, .acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.acciones { margin: 8px 0 0; }
.acciones.grandes .btn { min-height: 52px; padding: 10px 22px; flex: 1 1 auto; max-width: 360px; }
@media (min-width: 600px) { .formulario > .btn, .sin-borde + .error-form + .btn { align-self: flex-start; min-width: 220px; } }

/* ---------- Formularios ---------- */
.formulario { display: flex; flex-direction: column; gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.campo label, legend { font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #8C96A3; border-radius: 10px; min-height: 48px; padding: 10px 12px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input[type=color] { width: 72px; height: 48px; border: 1.5px solid #8C96A3; border-radius: 10px; padding: 4px; background: #fff; }
input[type=file] { min-height: 48px; padding: 8px 0; font: inherit; }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted); }
.ayuda { color: var(--muted); font-size: .9375rem; margin: 0; }
.casilla { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; }
.casilla input { width: 24px; height: 24px; margin: 10px 0 0; flex: none; accent-color: var(--ok); }
.casilla label { padding: 9px 0; font-weight: 400; }
.casilla-legal { flex-wrap: wrap; }
.casilla-legal label { flex: 1 1 200px; }
.grupo-casillas { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grupo-casillas.alergenos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.grupo-casillas.alergenos legend, .grupo-casillas.alergenos .ayuda { grid-column: 1 / -1; }
.sin-borde { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.fila-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.fila-campos legend { grid-column: 1 / -1; margin-bottom: 4px; }
.clave { position: relative; }
.clave input { padding-right: 52px; }
.ojo { position: absolute; right: 0; top: 0; width: 48px; height: 48px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ojo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.error-form { color: var(--del); font-weight: 600; margin: 0; }
.error-form:empty { display: none; }
.caja-mensaje { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin: 8px 0; }
.caja-mensaje.bien { background: var(--green-bg); color: #14532D; }
.caja-mensaje.error { background: #FDECEC; color: #8B1A1A; }
.caja-privacidad { background: var(--amber-bg); border-radius: 10px; padding: 12px 14px; }
.caja-privacidad p { margin-bottom: 4px; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.derecha { text-align: right; margin: -6px 0 0; }
.zona-peligro { border-top: 1.5px solid var(--line); margin-top: 18px; padding-top: 14px; }
.plegable { margin: 10px 0; }
.plegable > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.plegable > summary h2 { display: inline; margin: 0; }
blockquote { margin: 8px 0; padding: 10px 14px; border-left: 4px solid var(--line); background: var(--soft); border-radius: 0 10px 10px 0; }

/* ---------- Entrada ---------- */
body.en-entrada { background: var(--surface); }
.entrada { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 0; }
.entrada:focus { outline: none; }
.entrada-cab { background: var(--mimesa); color: #fff; width: 100%; max-width: 560px; padding: 40px 16px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.entrada-cab .sello { width: 110px; height: 110px; border-radius: 26px; border: 3px solid #c2a15e; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); background: #1f3354; }   /* reborde dorado: el logo no se funde con la cabecera azul */
.entrada-cab h1 { font-size: 2.125rem; color: #fff; margin: 6px 0 0; }
.entrada-cab p { margin: 0; opacity: .92; font-size: 1rem; }
.entrada-cuerpo { width: 100%; max-width: 440px; padding: 26px 0 10px; }
.entrada-cuerpo h2 { font-size: 1.125rem; margin: 10px 0 0; }
.entrada-cargando { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.texto-bajo { text-align: center; color: var(--muted); font-size: .9375rem; margin: 4px 0; }
.caja-mensaje + .texto-bajo { margin-top: 10px; }
.demo-entrada:empty { display: none; }

/* ---------- Pie de KREAVANCE ---------- */
.pie { text-align: center; color: var(--muted); font-size: .9375rem; padding: 26px 16px 32px; margin-top: 24px; border-top: 1px solid var(--line); width: 100%; }
.pie p { margin: 2px 0; }
.pie a { color: var(--ink); }
.pie .nota { margin-top: 6px; }
.pie-logo { display: inline-block; margin: 8px 0 6px; }
.pie-logo img { width: 132px; height: auto; display: block; }
.legales { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }
.legales .enlace { color: var(--muted); font-size: .9375rem; }

/* ---------- Marco del panel ---------- */
.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px; min-height: 60px; }
.cabecera .cab-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cabecera .cab-texto b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera .cab-texto span { color: var(--muted); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-rest { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.sello-mini { width: 36px; height: 36px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.sin-red { background: #8B1A1A; color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .875rem; }
.banda-soporte, .banda-baja, .banda-version { background: var(--amber-bg); color: #5C3D00; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-weight: 600; }
.cuerpo { display: flex; align-items: flex-start; }
.vista { flex: 1; min-width: 0; padding: 20px 16px 96px; max-width: 1100px; }
.vista:focus { outline: none; }
.menu-lateral { display: none; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; background: none; border: 0; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer; text-align: left; width: 100%; }
.menu-item:hover { background: var(--soft); }
.menu-item[aria-current="page"] { background: var(--brand-btn); color: var(--brand-btn-ink); }
.contador-avisos { background: var(--del); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; font-size: .8125rem; font-weight: 700; }
.ico-linea { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-item { justify-content: flex-start; }
.menu-item .menu-texto { flex: 1; }
.menu-movil .menu-item .menu-texto { flex: none; }
.btn-salir { flex: none; width: 44px; height: 44px; margin-right: -6px; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; order: 4; }
.btn-salir:hover { background: var(--soft); }
h2 .ico-linea { vertical-align: -4px; margin-right: 8px; color: var(--muted); }
a[href^="tel:"] { white-space: nowrap; }
.cal-mes { background: var(--surface); border-radius: var(--radius); box-shadow: var(--sombra); padding: 12px; margin: 0 0 14px; max-width: 520px; }
.cal-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-cab b { font-size: 1.125rem; }
.cal-cab .btn { min-width: 48px; font-size: 1.25rem; }
.cal-rejilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; }
.cal-sem { text-align: center; color: var(--muted); font-size: .8125rem; font-weight: 700; padding: 2px 0 4px; }
.cal-dia { min-height: 44px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; border-radius: 10px; }
.cal-dia:hover { background: var(--soft); }
.cal-dia.en-semana { background: color-mix(in srgb, var(--brand) 22%, transparent); border-radius: 0; }
.cal-dia.fuera { color: var(--muted); opacity: .6; }
.cal-dia.es-hoy { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-dia[aria-pressed="true"] { background: var(--brand-btn); color: var(--brand-btn-ink); border-radius: 10px; }
.qr-vista { display: grid; place-items: center; }
.qr-vista svg { width: min(280px, 70vw); height: auto; }
.qr-url { word-break: break-all; text-align: center; color: var(--muted); font-size: .875rem; }
.ayuda.centrado { text-align: center; }
.qr-botones { flex-direction: column; align-items: stretch; }
.qr-botones .btn { width: 100%; justify-content: center; text-align: center; }
.hamburguesa { flex: none; width: 48px; height: 48px; margin-left: -8px; display: grid; place-items: center; background: none; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer; }
.hamburguesa:hover { background: var(--soft); }
.hamburguesa svg { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 899px) {   /* móvil: tres rayas a la izquierda, el restaurante a la derecha */
  .cabecera .cab-texto { order: 2; text-align: right; align-items: flex-end; }
  .cabecera .logo-rest, .cabecera .sello-mini { order: 3; }
  .cabecera .sin-red { order: 1; }
}
.velo-menu { display: none; }
body.menu-abierto .velo-menu { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .35); }
.menu-movil { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); }
.menu-movil .menu-item { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; font-size: .8125rem; text-align: center; min-height: 54px; position: relative; }
.menu-movil .contador-avisos { position: absolute; top: 2px; right: 8px; min-width: 20px; height: 20px; font-size: .75rem; }
body.menu-abierto .menu-lateral { display: flex; flex-direction: column; gap: 2px; position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(300px, 85vw); overflow: auto; background: var(--surface); border-right: 1px solid var(--line); box-shadow: 8px 0 24px rgba(0, 0, 0, .18); padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .menu-movil, .hamburguesa, body.menu-abierto .velo-menu { display: none; }
  .menu-lateral, body.menu-abierto .menu-lateral { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 60px; width: 230px; flex: none; padding: 16px 10px; height: calc(100vh - 60px); overflow: auto; border-right: 1px solid var(--line); background: var(--surface); box-shadow: none; max-height: none; }
  .vista { padding: 24px 32px 48px; }
}
.menu-item.salir { margin-top: auto; color: var(--muted); }

/* ---------- Piezas comunes ---------- */
.bloque { background: var(--surface); border-radius: var(--radius); box-shadow: var(--sombra); padding: 16px; margin: 16px 0; }
.bloque .bloque { box-shadow: none; padding: 0; margin: 12px 0; }
.barra, .barra-plano { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 12px; }
.barra .campo { flex: 1 1 220px; }
.filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; margin: 12px 0; }
.cargando, .vacio { color: var(--muted); }
.vacio { padding: 12px 0; }
.error { color: var(--del); }
.resumen { color: var(--muted); font-weight: 600; margin: 8px 0; }
.dia-elegido { font-size: 1.125rem; font-weight: 700; margin: 0; flex: 1 1 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.chip { display: inline-block; background: var(--soft); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: .875rem; font-weight: 600; margin-left: 4px; }
.chips .chip { margin: 0; }
.chip-aviso { background: #FDECEC; color: #8B1A1A; }
.chip-cumple { background: #F3E8FF; color: #5B21B6; }
.lista-simple { list-style: none; padding: 0; margin: 8px 0; }
.lista-simple li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lista-simple li:last-child { border-bottom: 0; }
.lista-puntos { padding-left: 20px; }
.contadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.contador { background: var(--surface); border-radius: var(--radius); box-shadow: var(--sombra); padding: 12px 14px; display: flex; flex-direction: column; }
.contador b { font-size: 1.625rem; line-height: 1.1; }
.contador span { color: var(--muted); font-size: .9375rem; }
.contador.alerta b { color: var(--del); }
.contadores.peq .contador b { font-size: 1.25rem; }
.pestanas { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.paginas { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.aviso-cambios { background: var(--amber-bg); color: #5C3D00; }
.nota { color: var(--muted); font-size: .9375rem; }

/* ---------- Hoy y reservas ---------- */
.hoy-fecha { font-size: 1.125rem; font-weight: 700; margin: 0; }
.botones-hoy { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.caja-nota { background: var(--amber-bg); color: #5C3D00; border-radius: 10px; padding: 10px 14px; font-size: 1.0625rem; }
.caja-cumple { background: #F3E8FF; color: #4C1D95; border-radius: 10px; padding: 10px 14px; }
.bloque-pendientes { border: 2px solid #D69E2E; }
.reserva { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid #9AA5B1; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.bloque .reserva { box-shadow: none; }
.reserva-cab { display: flex; gap: 12px; align-items: flex-start; }
.hora { font-size: 1.375rem; font-weight: 800; min-width: 64px; }
.reserva-quien { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reserva-quien span { color: var(--muted); }
.alergia { background: #FDECEC; color: #8B1A1A; border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; }
.nota-reserva { margin: 6px 0 0; }
.estado { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .875rem; font-weight: 700; white-space: nowrap; background: var(--soft); }
.est-pendiente { background: var(--amber-bg); color: var(--amber); }
.est-confirmada { background: var(--blue-bg); color: var(--blue); }
.est-llego, .est-sentada { background: var(--green-bg); color: #14532D; }
.est-terminada { background: var(--soft); color: var(--muted); }
.est-no_vino, .est-anulada { background: #FDECEC; color: #8B1A1A; }
.est-borde-pendiente { border-left-color: #D69E2E; }
.est-borde-confirmada { border-left-color: #3B5BC4; }
.est-borde-llego, .est-borde-sentada { border-left-color: #2F7D4F; }
.est-borde-no_vino, .est-borde-anulada { border-left-color: #B42318; opacity: .9; }
.semana { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; align-items: stretch; }
.semana .dia { min-width: 56px; min-height: 56px; border: 1.5px solid #9AA5B1; background: #fff; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; cursor: pointer; color: var(--ink); }
.semana .dia span { font-size: .8125rem; color: var(--muted); text-transform: capitalize; }
.semana .dia.es-hoy { border-color: var(--brand); }
.semana .dia[aria-pressed="true"] { background: var(--brand-btn); color: var(--brand-btn-ink); border-color: var(--brand-btn); }
.semana .dia[aria-pressed="true"] span { color: var(--brand-btn-ink); }
.semana .btn { white-space: nowrap; }
.nota-turno textarea { min-height: 70px; }

/* ---------- Mesas ---------- */
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.leyenda > span:not(.ayuda) { border-radius: 8px; padding: 4px 10px; font-weight: 600; border: 2px solid; }
.zona-plano { margin: 16px 0; }
.plano-marco { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--sombra); padding: 10px; }
.plano { position: relative; width: 100%; background-image: linear-gradient(#EDEFF0 1px, transparent 1px), linear-gradient(90deg, #EDEFF0 1px, transparent 1px); background-size: 24px 24px; border-radius: 8px; }
.plano.editando { outline: 2px dashed #9AA5B1; }
.mesa { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2px; border-radius: 10px; border: 2px solid #6B7785; background: #fff; color: var(--ink); font-family: inherit; font-weight: 600; font-size: .8125rem; line-height: 1.15; cursor: pointer; overflow: hidden; min-width: 44px; min-height: 44px; }
.mesa b { font-size: 1rem; }
.mesa span { font-size: .6875rem; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.mesa-libre { background: var(--green-bg); border-color: #2F7D4F; color: #14532D; }
.mesa-reservada { background: var(--amber-bg); border-color: #B7791F; color: #5C3D00; }
.mesa-ocupada { background: var(--blue-bg); border-color: #3B4F9A; color: #1E2A6B; }
.mesa.inactiva { background: #F1F2F3; border-style: dashed; color: var(--muted); }
.plano.editando .mesa { touch-action: none; cursor: grab; background: #fff; }
.mesa.moviendo { cursor: grabbing; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); z-index: 2; }
.estado-mesa { display: inline-block; border-radius: 8px; padding: 6px 12px; font-weight: 700; border: 2px solid; }

/* ---------- Clientes ---------- */
.lista-clientes { list-style: none; padding: 0; margin: 0; }
.fila-cliente { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0; font: inherit; color: var(--ink); cursor: pointer; min-height: 56px; }
.fila-cliente:hover { background: var(--soft); }
.fila-cliente > span { color: var(--muted); }

/* ---------- Carta ---------- */
.cat-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.cat-cab h2 { margin: 0; }
.en { color: var(--muted); font-weight: 400; }
.platos { list-style: none; padding: 0; margin: 10px 0; }
.plato { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plato:last-child { border-bottom: 0; }
.plato img, .sin-foto { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--soft); display: block; }
.plato-texto p { margin: 0 0 2px; }
.plato .acciones { grid-column: 1 / -1; margin: 4px 0 0; }
.plato.oculto .plato-texto { opacity: .75; }
.interruptor[aria-pressed="true"] { background: #8B1A1A; border-color: #8B1A1A; color: #fff; }
.foto-plato img, .foto-marca img { border-radius: 10px; object-fit: cover; display: block; margin: 6px 0; }
.traduccion { border-bottom: 1px solid var(--line); padding-bottom: 12px; }

/* ---------- Opiniones y números ---------- */
.opinion { border-top: 1px solid var(--line); padding: 12px 0; }
.opinion.baja { border-left: 4px solid var(--del); padding-left: 12px; }
.opinion-cab { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.respuesta { background: var(--soft); border-radius: 8px; padding: 8px 12px; }
.lista-avisos { list-style: none; padding: 0; margin: 0; }
.aviso-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.aviso-item > div:first-child { flex: 1 1 260px; }
.aviso-item p { margin: 2px 0 0; }
.aviso-item.hecho { opacity: .75; }
.aviso-item.nota-baja { border-left: 4px solid var(--del); padding-left: 12px; }
.barras { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.barra-fila { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; }
.barra-fondo { background: var(--soft); border-radius: 999px; height: 14px; overflow: hidden; }
.barra-valor { display: block; height: 100%; background: var(--brand); border-radius: 999px; min-width: 2px; }
.tabla-marco { overflow-x: auto; }
.tabla { border-collapse: collapse; width: 100%; min-width: 560px; }
.tabla th, .tabla td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla thead th { color: var(--muted); font-size: .875rem; }

/* ---------- Ajustes ---------- */
.lista-secciones { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.texto-seccion { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.icono-seccion { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 20%, #fff); color: var(--ink); }
.icono-seccion svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tarjeta-seccion { display: flex; flex-direction: row; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--sombra); padding: 14px 16px; color: var(--ink); text-decoration: none; min-height: 88px; border: 1px solid transparent; }
.tarjeta-seccion:hover { border-color: #9AA5B1; }
.tarjeta-seccion span { color: var(--muted); font-size: .9375rem; }
.fila-dia { border-bottom: 1px solid var(--line); padding: 8px 0; }
.turno { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.turno input[type=time] { width: 130px; }
.turno input[type=number] { width: 96px; }
.cerrado { font-weight: 600; }
.texto-legal { white-space: pre-line; line-height: 1.6; }

/* ---------- Ventanas y avisos ---------- */
.ventana { border: 0; border-radius: 16px; padding: 0; width: calc(100% - 24px); max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.ventana.ancha { max-width: 820px; }
.ventana::backdrop { background: rgba(17, 24, 39, .5); }
.ventana-cab { position: sticky; top: 0; background: var(--surface); z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ventana-cab h2 { margin: 0; font-size: 1.1875rem; }
.ventana-cuerpo { padding: 16px; }
.ventana .pregunta { font-size: 1.125rem; font-weight: 600; }
.avisos { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 60; width: min(560px, calc(100% - 24px)); pointer-events: none; }
.aviso { background: #1F2933; color: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-weight: 600; pointer-events: auto; }
.aviso-error { background: #8B1A1A; }
@media (min-width: 900px) { .avisos { bottom: 24px; } }

/* ---------- Impresión ---------- */
.impresion { display: none; }
@media print {
  body > *:not(#impresion) { display: none !important; }
  body { background: #fff; }
  .impresion { display: block !important; color: #000; font-size: 12pt; }
  .impresion table { border-collapse: collapse; width: 100%; }
  .impresion th, .impresion td { border: 1px solid #000; padding: 4pt 6pt; text-align: left; vertical-align: top; }
  .hoja-qr { text-align: center; padding-top: 2cm; }
  .hoja-qr .qr svg { width: 9cm; height: 9cm; }
  .hoja-qr .qr-titulo { font-size: 24pt; font-weight: 700; }
  .qr-url { font-size: 10pt; }
}

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

/* ---------- Demostración ---------- */
.banda-demo { background: var(--amber-bg); color: #5C3D00; padding: 6px 16px; font-size: .875rem; font-weight: 600; text-align: center; border-bottom: 1px solid #ecd9a2; }
.demo-entrada { display: grid; gap: 10px; margin: 18px 0 6px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); }
.demo-entrada h2 { margin: 0; font-size: 1.0625rem; }
.demo-entrada p { margin: 0; color: var(--muted); font-size: .9375rem; }
.demo-entrada .btn { min-height: 48px; }
.mail-demo { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0 0; max-height: 50vh; overflow: auto; }
.mail-demo-cab { margin: 0; color: var(--muted); font-size: .9375rem; }

/* Carta: «Traducir la carta» con sus tres idiomas (inglés, francés y alemán) */
.menu-idiomas { display: inline-block; }
.menu-idiomas > summary { list-style: none; cursor: pointer; }
.menu-idiomas > summary::-webkit-details-marker { display: none; }
.menu-idiomas > summary::after { content: " ▾"; }
.menu-idiomas[open] > summary::after { content: " ▴"; }
.menu-idiomas-lista { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.menu-idiomas-lista .ayuda { flex-basis: 100%; margin: 0; }
.progreso-traduccion { margin: 0 0 12px; }

/* Alérgenos y dietas con su icono propio (r/alergenos_svg.php, dibujado con createElementNS en js/vistas/carta.js) */
.ico-panel { display: inline-block; flex: none; width: 22px; height: 22px; vertical-align: middle; }
.casilla label .ico-panel { margin-right: 6px; vertical-align: -6px; }
.con-icono { display: inline-flex; align-items: center; gap: 4px; margin: 0 10px 4px 0; }
.iconos-plato { display: flex; flex-wrap: wrap; align-items: center; }
.iconos-plato > span:not(.con-icono) { margin-right: 6px; }
.grupo-casillas.dietas .confirma-gluten { grid-column: 1 / -1; background: #fff7e0; border: 1px solid #ecd9a0; border-radius: 8px; padding: 0 10px; margin-top: 6px; }
.grupo-casillas.dietas .confirma-gluten label { font-weight: 600; }
/* botones en el color del restaurante: filo fino en crema por dentro (como el aro del logo) */
.btn.brand, .btn.soft[aria-pressed="true"], .menu-item[aria-current="page"], .cal-dia[aria-pressed="true"], .semana .dia[aria-pressed="true"] { box-shadow: inset 0 0 0 2px rgba(255, 248, 236, .85); }

/* ---------- Panel con el mismo aire que la web del restaurante (Kike, 28-11-2026) ----------
   Fondo crema, cabecera en el color del restaurante, títulos con letra de libro, botones en píldora,
   salir en verde y reservas con un toque de color según su estado. */
:root { --bg: #F8F5EF; --line: #E4DDD1; --soft: #F2EDE4; --radius: 14px; --sombra: 0 1px 2px rgba(29, 27, 24, .06), 0 6px 24px rgba(29, 27, 24, .06); }
h1 { font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: 2rem; letter-spacing: -.01em; }
.btn { border-radius: 999px; }
.cabecera { background: var(--brand); color: var(--brand-ink); border-bottom: 0; box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .08); }
.cabecera .cab-texto b { font-size: 1.0625rem; }
.cabecera .cab-texto span { color: inherit; opacity: .82; }
.cabecera .hamburguesa { color: var(--brand-ink); }
.cabecera .hamburguesa:hover { background: rgba(255, 255, 255, .18); }
.cabecera .logo-rest { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #fff8ec; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 3px 10px rgba(0, 0, 0, .18); }
.cabecera .sello-mini { border: 2px solid #fff8ec; }
.btn-salir { background: var(--ok); color: #fff; border: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.btn-salir:hover { background: var(--ok-hover); }
.menu-movil { box-shadow: 0 -4px 16px rgba(29, 27, 24, .08); border-top: 0; }
.reserva { border: 0; border-left: 6px solid #9AA5B1; box-shadow: var(--sombra); border-radius: 14px; }
.reserva .hora { background: var(--soft); border-radius: 10px; padding: 4px 8px; text-align: center; font-size: 1.25rem; }
.reserva.est-borde-pendiente { background: #FFFBF1; }
.reserva.est-borde-confirmada { background: #F6F8FE; }
.reserva.est-borde-llego, .reserva.est-borde-sentada { background: #F3FAF5; }
.reserva.est-borde-terminada { background: #FBFAF7; }
/* paletas de colores en Ajustes → Marca */
.muestra-marca { display: flex; flex-direction: column; width: 180px; border-radius: 12px; overflow: hidden; box-shadow: var(--sombra); margin: 8px 0 12px; border: 1px solid var(--line); }
.muestra-cab { height: 34px; }
.muestra-btn { height: 18px; margin: 10px 30px 12px; border-radius: 999px; }
.muestra-marca { background: var(--surface); }
.lista-paletas { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.paleta { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; min-height: 44px; }
.paleta:hover, .paleta:focus-visible { border-color: var(--ink); }
.paleta-muestra { display: grid; grid-template-columns: 2fr 1fr; height: 36px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
.paleta-nombre { font-size: .875rem; font-weight: 600; }
.semana .dia.es-hoy, .cal-dia.es-hoy { border-color: var(--brand-btn); }
.cal-dia.es-hoy { box-shadow: inset 0 0 0 2px var(--brand-btn); }
.barra-valor { background: var(--brand-btn); }
/* «Agotado hoy: sí» en rojo clarito con el texto en rojo intenso, como la etiqueta «Agotado hoy» (Kike); «no» sigue como está */
.btn.soft.interruptor[aria-pressed="true"] { background: #FDECEC; color: #8B1A1A; border-color: #E8A5A5; box-shadow: none; }
/* pie más aireado */
.pie .legales { margin-bottom: 14px; }
.pie-logo { margin: 6px 0 12px; }
.pie p { margin: 6px 0; }
/* flecha de salir un poco más pequeña (Kike) */
.btn-salir { width: 36px; height: 36px; border-radius: 9px; margin-right: 0; }
.btn-salir svg { width: 19px; height: 19px; }
.fila-muestra { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fila-muestra .muestra-marca { margin: 8px 0; }
.paletas h4 { margin: 14px 0 0; font-size: 1rem; }
/* «Guardar colores»: pequeño y a la derecha de la muestra, con aire entre los dos (Kike) */
.fila-muestra { flex-wrap: nowrap; justify-content: space-between; gap: 18px; }
.fila-muestra .muestra-marca { width: 150px; flex: none; }
.fila-muestra .btn { font-size: .9375rem; min-height: 40px; padding: 6px 14px; }
/* menú del día: cada día con su cuadradito de fecha a la izquierda (Kike) */
.lista-menus li { align-items: flex-start; }
.menu-dia-fila { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; }
.sello-dia { flex: none; width: 62px; border-radius: 12px; overflow: hidden; text-align: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra); display: flex; flex-direction: column; }
.sello-dia-sem { background: var(--brand-btn); color: var(--brand-btn-ink); font-size: .75rem; font-weight: 800; letter-spacing: .06em; padding: 3px 0; }
.sello-dia b { font-size: 1.6rem; line-height: 1.1; padding-top: 4px; }
.sello-dia-mes { font-size: .75rem; font-weight: 700; color: var(--muted); padding-bottom: 5px; letter-spacing: .06em; }
.sello-dia.es-hoy { border: 2px solid var(--brand-btn); }
.menu-dia-texto { flex: 1; min-width: 0; }
.menu-dia-cab { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.menu-precio { font-size: 1.0625rem; }
.menu-linea { margin: 0 0 2px; color: var(--ink); }
.menu-linea b { color: var(--muted); font-weight: 700; }
.chip-hoy { background: var(--brand-btn); color: var(--brand-btn-ink); }
