/* ==========================================================================
   MesaViva · Estilo profesional (rama disenio2)
   Lienzo gris neutro, superficies blancas con bordes finos y un único acento:
   un rojo sobrio de la marca, reservado a la acción principal. Pizarra para los
   detalles y los gráficos; los colores de estado solo aparecen donde informan.
   Una sola familia, Geist, en titulares, texto y cifras (con números tabulares).
   */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Neutros: una sola familia de grises. Contraste sobre blanco: ink 17:1, ink-2 9:1, ink-3 5,7:1. */
  --ground: #f6f7f9;
  --surface: #fff;
  --surface-2: #f9fafb;
  --sunk: #f1f3f6;
  --ink: #15171c;
  --ink-2: #454b56;
  --ink-3: #5f6672;
  --line: #e4e7ec;
  --line-2: #d0d5dd;

  /* Acento de la marca: un rojo sobrio solo para la acción principal (blanco sobre rojo 6,6:1).
     «gold» queda como nombre del acento secundario, ahora pizarra. */
  --tomato: #b42318;
  --tomato-hover: #912018;
  --tomato-tint: #fdf0ee;
  --tomato-ink: #912018;
  --gold: #344054;
  --gold-tint: #eef1f6;
  --gold-ink: #1d2939;
  --focus: #2563eb;   /* anillo de foco azul, el estándar que todo el mundo reconoce */

  /* Estados e información */
  --saffron: #f59e0b;
  --saffron-tint: #fef5e3;
  --saffron-ink: #92580a;
  --olive: #16a34a;
  --olive-deep: #15803d;
  --olive-tint: #eaf7ef;
  --olive-ink: #166534;
  --tile: #2563eb;
  --tile-tint: #eef3fe;
  --tile-ink: #1d4ed8;
  --plum-tint: #f7eef4;
  --plum-ink: #86325f;
  --stone-tint: #f2f4f7;
  --stone-ink: #454b56;
  --lemon: #fde68a;

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;

  /* Escala única de tamaños: el mismo tipo de elemento mide igual en todas las vistas. */
  --control-h: 38px;      /* campos y botones normales */
  --control-h-sm: 32px;   /* botones pequeños, iconos, pestañas y menús */
  --control-fs: 14px;
  --control-fs-sm: 13px;
  --control-px: 14px;
  --control-px-sm: 10px;
  --pill-h: 22px;         /* etiquetas de estado */
  --card-pad: 20px;       /* relleno de todas las tarjetas */
  --page-gap: 24px;       /* hueco bajo la cabecera de cada página */
  --bar-h: 56px;          /* barra superior (panel y web pública) */

  --shadow-1: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-2: 0 4px 12px -2px rgb(16 24 40 / .08), 0 2px 4px -2px rgb(16 24 40 / .04);
  --shadow-3: 0 24px 48px -12px rgb(16 24 40 / .18), 0 4px 12px -4px rgb(16 24 40 / .06);
  --ring: 0 0 0 3px rgb(37 99 235 / .16);

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.22, 1, .36, 1);
  --ease-spring-soft: cubic-bezier(.22, 1, .36, 1);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font);
  --font-num: var(--font);
  --h1-size: clamp(22px, .5vw + 19px, 28px);
  --gutter: clamp(16px, 2.4vw, 32px);

  color-scheme: light;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--ground);
  scrollbar-color: var(--line-2) transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --state-pending: #3f6fd8;
  --state-pending-tint: #edf2fd;
  --state-pending-ink: #2a55b0;
  --state-arrived: #dd6f9f;
  --state-arrived-tint: #fceff5;
  --state-arrived-ink: #9b2a5e;
  --state-bar: #dd6f9f;
  --state-bar-tint: #fceff5;
  --state-bar-ink: #9b2a5e;
  --state-dessert: #7a9a2e;
  --state-dessert-tint: #f2f7e4;
  --state-dessert-ink: #4d651a;
  --state-bill: #7a5fd3;
  --state-bill-tint: #f1eefc;
  --state-bill-ink: #5239a8;
  --state-cleaning: #2493b3;
  --state-cleaning-tint: #e5f5f9;
  --state-cleaning-ink: #14677f;
}
/* Pantallas táctiles: los controles crecen hasta un tamaño cómodo para el dedo. */
@media (pointer: coarse) {
  :root { --control-h: 44px; --control-h-sm: 40px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--ground); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, p, ol, ul, figure { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-family: var(--font-display); font-size: var(--h1-size); font-weight: 650; line-height: 1.2; letter-spacing: -.026em; }
h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -.014em; line-height: 1.3; }
h3 { font-size: 14px; font-weight: 600; letter-spacing: -.006em; }
strong { font-weight: 600; }
small { font-size: 12.5px; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .5; }
::selection { background: #dbe6fd; color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img, svg { display: block; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.muted, .field-hint { color: var(--ink-2); }
.field-hint { font-size: 12.5px; line-height: 1.55; margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); transition: top 200ms var(--ease-out); }
.skip-link:focus { top: 12px; }
html:not(.js) .js-only { display: none !important; }
.js .no-js { display: none !important; }
kbd { font: 500 11px/1 var(--font); padding: 3px 5px; border-radius: 4px; background: var(--surface); color: var(--ink-3); border: 1px solid var(--line-2); border-bottom-width: 2px; }

/* ---------- Form fields ---------- */
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: 8px 12px;
  font-size: var(--control-fs);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
:where(input:not([type=checkbox], [type=radio], [type=range]), select) { height: var(--control-h); }
input::placeholder, textarea::placeholder { color: #98a0ab; }
input:hover, select:hover, textarea:hover { border-color: #b4bac4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tile); box-shadow: var(--ring); }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--tomato); box-shadow: none; }
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select::-ms-expand { display: none; }
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
input[type=date], input[type=time] { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--tomato-ink); font-size: 12.5px; font-weight: 500; }
.errorlist.nonfield { margin: 0; }
.helptext { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
form p { margin: 0 0 16px; }
form p:last-of-type { margin-bottom: 20px; }
.form-errors { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px #f5c9c4; margin-bottom: 20px; font-size: 13.5px; }
.form-errors .errorlist { margin: 0; }

/* ---------- Buttons ---------- */
.button {
  --bg: var(--tomato);
  --bg-hover: var(--tomato-hover);
  --fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--control-h);
  padding: 0 var(--control-px);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  font-weight: 550;
  font-size: var(--control-fs);
  letter-spacing: -.003em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(16 24 40 / .1), inset 0 1px 0 rgb(255 255 255 / .14);
  transition: transform 120ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button .icon { width: 16px; height: 16px; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.secondary { --bg: var(--surface); --bg-hover: var(--surface-2); --fg: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.button.olive { --bg: var(--olive-deep); --bg-hover: #166534; }
.button.danger { --bg: #b42318; --bg-hover: #912018; }
.button.small { min-height: var(--control-h-sm); padding: 0 var(--control-px-sm); font-size: var(--control-fs-sm); gap: 6px; }
.button.small .icon { width: 15px; height: 15px; }
.button.wide { width: 100%; }
.button[data-pending]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 600ms linear infinite; }
.link-button, .text-danger { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 2px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); border-radius: var(--r-xs); transition: color 150ms ease; }
.text-danger { color: var(--tomato-ink); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--tile-ink); font-weight: 500; font-size: 13.5px; }
.text-link .icon { width: 15px; height: 15px; transition: transform 200ms var(--ease-out); }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--control-h-sm);
  height: var(--control-h-sm);
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 120ms var(--ease-out);
}
.icon-button .icon { width: 17px; height: 17px; }
.icon-button:active { transform: translateY(1px); }
.icon-button.plain { border-color: transparent; background: transparent; box-shadow: none; }
.ghost-link { display: inline-flex; align-items: center; gap: 7px; min-height: var(--control-h-sm); padding: 0 var(--control-px-sm); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-weight: 500; font-size: var(--control-fs-sm); transition: background-color 150ms ease, color 150ms ease; }
.ghost-link .icon { width: 16px; height: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.back .icon { width: 16px; transition: transform 200ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled) { background: var(--bg-hover); }
  .button.secondary:hover:not(:disabled) { border-color: #b4bac4; }
  .link-button:hover { color: var(--ink); }
  .text-danger:hover { color: #7f1d10; }
  .text-link:hover { text-decoration: underline; }
  .text-link:hover .icon { transform: translateX(2px); }
  .icon-button:hover { background: var(--surface-2); color: var(--ink); border-color: #b4bac4; }
  .icon-button.plain:hover { background: var(--sunk); }
  .ghost-link:hover { background: var(--sunk); color: var(--ink); }
  .back:hover { color: var(--ink); }
  .back:hover .icon { transform: translateX(-2px); }
}

/* ---------- Status pills ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--pill-h);
  padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--stone-tint);
  color: var(--stone-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-confirmed { background: var(--saffron-tint); color: var(--saffron-ink); }
.status-confirmed::before { background: var(--saffron); }
.status-seated { background: var(--olive-tint); color: var(--olive-ink); }
.status-seated::before { background: var(--olive); }
.status-completed { background: var(--stone-tint); color: var(--stone-ink); }
.status-completed::before { background: #98a0ab; }
.status-no_show { background: var(--plum-tint); color: var(--plum-ink); }
.status-cancelled { background: var(--tomato-tint); color: var(--tomato-ink); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 650; letter-spacing: -.025em; line-height: 1; color: var(--ink); }
.brand-mark { width: 24px; height: 24px; }
.brand b { font-weight: inherit; }      /* «Viva»: only coloured where the page dresses like the home page */

/* ==========================================================================
   Panel del restaurante
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 12px; height: var(--bar-h); padding: 0 var(--gutter); margin: 0 auto; }
.topbar .brand { flex-shrink: 0; }
.venue-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 4px; border-radius: var(--r-sm); color: var(--ink); font-size: 13.5px; font-weight: 550; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.venue-chip .restaurant-mini { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.venue-chip .venue-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.venue-chip > .icon { color: var(--ink-3); }
/* Barra inclinada entre la marca y el restaurante, como una ruta: MesaViva / Restaurante */
.topbar .brand + .venue-switch, .topbar .brand + .venue-chip { position: relative; margin-left: 14px; }
.topbar .brand + .venue-switch::before, .topbar .brand + .venue-chip::before { content: ""; position: absolute; left: -14px; top: 50%; width: 1px; height: 20px; background: var(--line-2); transform: translateY(-50%) rotate(20deg); }
.main-nav { display: flex; align-items: stretch; gap: 2px; align-self: stretch; margin-left: 10px; }
.main-nav a { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: color 150ms ease; }
.main-nav a::before { content: ""; position: absolute; z-index: -1; inset: 11px 1px; border-radius: var(--r-sm); background: transparent; transition: background-color 150ms ease; }
.main-nav a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.main-nav a .icon { width: 16px; height: 16px; }
.main-nav a[aria-current=page] { color: var(--ink); }
.main-nav a[aria-current=page]::after { background: var(--tomato); }
@media (hover: hover) and (pointer: fine) {
  .main-nav a:not([aria-current=page]):hover { color: var(--ink); }
  .main-nav a:not([aria-current=page]):hover::before { background: var(--sunk); }
}
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; border-radius: 50%; }
.account summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e8ebf0; color: var(--ink-2); font-weight: 600; font-size: 13px; box-shadow: inset 0 0 0 1px rgb(16 24 40 / .06); transition: box-shadow 150ms ease; }
.account summary:hover .avatar, .account[open] .avatar { box-shadow: inset 0 0 0 1px rgb(16 24 40 / .06), 0 0 0 3px var(--sunk); }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  width: 256px;
  padding: 6px;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-3), 0 0 0 1px var(--line);
  transform-origin: top right;
}
.account[open] .account-menu { animation: pop-in 160ms var(--ease-out); }
.account-name { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-name strong { font-size: 13.5px; }
.account-name span { font-size: 12.5px; color: var(--ink-3); }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--control-h-sm); padding: 0 10px; border: 0; border-radius: var(--r-xs); background: none; font-weight: 500; font-size: 13.5px; text-align: left; color: var(--ink); }
.account-menu .icon { width: 16px; height: 16px; color: var(--ink-3); }
.account-menu form { margin: 0; }
.account-menu .menu-danger { color: var(--tomato-ink); }
.account-menu .menu-danger .icon { color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .account-menu a:hover, .account-menu button:hover { background: var(--sunk); }
}

.app-main { margin: 0 auto; padding: 24px var(--gutter) 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: var(--page-gap); flex-wrap: wrap; }
.page-heading .muted { margin-top: 6px; font-size: 14px; max-width: 64ch; }
.page-heading > .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; max-width: 100%; }
.count-label { display: inline-flex; align-items: center; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); background: var(--sunk); color: var(--ink-2); font-size: 12.5px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* Mobile tab bar */
.tabbar { display: none; }
.account-menu .show-sm { display: none; }

/* ---------- Agenda: day hero ---------- */
.day-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; margin-bottom: 20px; }
.day-nav { display: flex; align-items: center; gap: 12px; min-width: 0; }
.day-title { min-width: 0; }
.day-title h1 { display: inline; }
.day-title h1 .weekday { color: var(--tomato); }
.day-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; color: var(--ink-3); font-size: 13.5px; font-weight: 400; }
.day-sub strong { color: var(--ink); font-weight: 600; }
.today-badge { display: inline-flex; align-items: center; gap: 5px; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .14); font-size: 12px; font-weight: 600; }
.today-badge .icon { display: none; }
.day-actions { display: flex; align-items: center; gap: 8px; }

/* Service meter: el día de un vistazo */
.service-meter { grid-column: 1 / -1; display: grid; gap: 10px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.meter-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.meter-bar span { flex-basis: 0; min-width: 0; border-radius: 0; transform-origin: left center; }
.meter-bar .seg-confirmed { background: var(--saffron); }
.meter-bar .seg-seated { background: var(--olive); }
.meter-bar .seg-completed { background: #c4c9d1; }
.intro .meter-bar span { animation: grow-x 700ms var(--ease-out) both; }
.meter-bar span:nth-child(2) { animation-delay: 60ms; }
.meter-bar span:nth-child(3) { animation-delay: 120ms; }
.meter-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.meter-legend a, .meter-legend > span { display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink-3); font-size: 13px; font-weight: 450; border-radius: var(--r-xs); }
.meter-legend b { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); line-height: 1; }
.meter-legend i { align-self: center; width: 8px; height: 8px; border-radius: 2px; }
.meter-legend .dot-confirmed { background: var(--saffron); }
.meter-legend .dot-seated { background: var(--olive); }
.meter-legend .dot-completed { background: #c4c9d1; }
.meter-legend .covers { margin-left: auto; padding-left: 18px; border-left: 1px solid var(--line); }
.meter-legend .covers .icon { align-self: center; width: 16px; height: 16px; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) {
  .meter-legend a:hover { color: var(--ink); }
}

/* Toolbar + filtros */
.agenda-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; }
.filters label { margin: 0; }
.search-box { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.search-box .icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search-box input { padding-left: 36px; padding-right: 40px; background: var(--surface); }
.search-box kbd { position: absolute; right: 10px; pointer-events: none; transition: opacity 150ms ease; }
.search-box input:focus ~ kbd, .search-box input:not(:placeholder-shown) ~ kbd { opacity: 0; }
.filter-date { position: relative; }
.filter-date > .icon { display: none; }
.filter-date input { width: 160px; }
.segmented { position: relative; isolation: isolate; display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); border: 0; margin: 0; min-width: 0; }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: calc(var(--control-h) - 6px); padding: 0 12px; margin: 0; border-radius: var(--r-xs); color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: color 150ms ease; }
.segmented label .icon { width: 15px; height: 15px; }
.segmented input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; box-shadow: none; }
.segmented label:has(input:checked) { color: var(--ink); }
/* Sin animación propia: al deslizarse en su propia capa quedaba por encima del texto y lo tapaba. */
.seg-pill { position: absolute; inset: 0; z-index: -1; border-radius: var(--r-xs); background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.filter-submit { min-height: var(--control-h); }
.js .filter-submit { display: none; }

/* Status tabs */
.status-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 2px; margin: 0 0 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
/* Las fases a la izquierda y «Cerrar caja» siempre al final de la misma barra: no se mueve al cambiar de día */
.status-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.status-bar .status-tabs { flex: 1; min-width: 0; margin: 0; border-bottom: 0; }
.status-bar .cash-link, .agenda-toolbar .cash-link { flex: none; margin-left: auto; }
.cash-link.is-future { opacity: .55; cursor: not-allowed; }
.status-tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; height: 38px; padding: 0 10px; color: var(--ink-3); font-size: 13.5px; font-weight: 500; isolation: isolate; transition: color 150ms ease; }
.status-tabs a > i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.status-tabs .tab-confirmed > i { background: var(--saffron); }
.status-tabs .tab-seated > i { background: var(--olive); }
.status-tabs .tab-completed > i { background: #98a0ab; }
.status-tabs .tab-no_show > i { background: #b4588d; }
.status-tabs .tab-cancelled > i { background: var(--tomato); }
.status-tabs a > span { min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 9px; background: var(--sunk); color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.status-tabs a[aria-current=true] { color: var(--ink); }
.tab-pill { position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; z-index: 1; border-radius: 2px 2px 0 0; background: var(--ink); view-transition-name: status-pill; }
.status-tabs a[aria-current=true] > span { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .status-tabs a:not([aria-current=true]):hover { color: var(--ink); }
}

/* Layout */
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.reservations { min-width: 0; }

/* Lista de reservas: una sola tabla con separadores finos */
.reservation-list { display: grid; gap: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: clip; }
.reservation-list > * + * { border-top: 1px solid var(--line); }
.reservation-list > .now-line, .reservation-list > .now-line + * { border-top: 0; }
.service-heading { display: flex; align-items: center; gap: 7px; margin: 0; padding: 7px 16px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.service-heading .icon { width: 15px; height: 15px; color: var(--ink-3); }
/* Comida y cena llevan en toda la app el mismo par que en los informes: azul claro de día, marino de noche. */
.service-heading.dinner .icon { color: var(--chart-dinner); }
.service-heading.lunch .icon { color: var(--chart-lunch); }
.service-heading + .res-row { border-top-color: var(--line); }
.res-row {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px 10px 16px;
  background: var(--surface);
  transition: background-color 150ms ease;
}
.res-time { display: grid; justify-items: start; gap: 2px; }
.res-time strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.res-time span { font-size: 12px; font-weight: 450; color: var(--ink-3); max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-main { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.res-main::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.res-main:focus-visible { outline: none; }
.res-main:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.res-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--sunk); color: var(--ink-2); font-weight: 600; font-size: 13px; }
.state-confirmed .res-avatar { background: var(--saffron-tint); color: var(--saffron-ink); }
.state-seated .res-avatar { background: var(--olive-deep); color: #fff; }
.state-no_show .res-avatar { background: var(--plum-tint); color: var(--plum-ink); }
.state-cancelled .res-avatar { background: var(--tomato-tint); color: var(--tomato-ink); }
.res-name { display: grid; gap: 3px; min-width: 0; }
.res-name strong { font-size: 14.5px; font-weight: 600; letter-spacing: -.008em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 10px; color: var(--ink-3); font-size: 12.5px; }
.res-meta .icon { width: 14px; height: 14px; }
.note-indicator { display: inline-flex; align-items: center; gap: 4px; color: var(--saffron-ink); font-weight: 500; }
.late-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--tomato-ink); font-weight: 550; }
.late-badge .icon { color: var(--tomato); }
.res-guests { display: inline-flex; align-items: center; gap: 6px; min-width: 46px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.res-guests .icon { width: 16px; height: 16px; color: var(--ink-3); }
.res-state { display: flex; justify-content: flex-start; min-width: 112px; }
.res-actions { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 140px; }
.res-actions form { margin: 0; }
.res-actions .icon-button { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-3); }
.state-cancelled .res-name strong, .state-no_show .res-name strong { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgb(16 24 40 / .35); color: var(--ink-2); }
.state-completed, .state-cancelled, .state-no_show { background: var(--surface-2); }
.state-completed .res-time, .state-cancelled .res-time, .state-no_show .res-time { opacity: .6; }
.res-row.is-late { box-shadow: inset 3px 0 0 var(--tomato); }
.res-row.flash { animation: row-flash 1400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .res-row:hover { background: #fafbfc; }
  .res-row:hover .res-actions .icon-button { color: var(--ink); background: var(--sunk); }
}

.pending-banner { display: flex; align-items: center; gap: 12px; margin: -4px 0 18px; padding: 12px 16px; border-radius: var(--r); background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .35); transition: box-shadow 150ms ease; }
.pending-banner > .icon { width: 18px; height: 18px; color: var(--saffron); }
.pending-banner > .icon:last-child { margin-left: auto; color: var(--saffron-ink); transition: transform 200ms var(--ease-out); }
.pending-banner span { display: grid; gap: 2px; font-size: 13px; }
.pending-banner strong { font-size: 14px; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .pending-banner:hover { box-shadow: inset 0 0 0 1px var(--saffron); }
  .pending-banner:hover > .icon:last-child { transform: translateX(2px); }
}
.now-line { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 16px 0 12px; height: 24px; color: var(--tomato-ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); background: var(--surface); }
.now-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tomato); box-shadow: 0 0 0 3px rgb(180 35 24 / .16); animation: live 2.4s ease-in-out infinite; }
.now-line::after { content: ""; flex: 1; height: 1px; background: var(--tomato); opacity: .55; }

.list-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 4px; font-size: 12.5px; color: var(--ink-3); }
.list-footer kbd { margin: 0 2px; }

.empty-state { display: grid; justify-items: center; text-align: center; padding: 44px 24px 48px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.reservation-list > .empty-state { border-radius: 0; box-shadow: none; }
.empty-state .plate { width: 72px; height: 72px; margin-bottom: 16px; }
.empty-state > .icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--ink-3); }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; }
.empty-state p { max-width: 44ch; margin: 0 auto 18px; color: var(--ink-2); line-height: 1.55; }
.plate .plate-rim { transform-origin: 56px 56px; }

/* Sala ahora */
.room { position: sticky; top: 96px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: hidden; }
.room > * { position: relative; }
.room-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.room-heading h2 { font-size: 15px; }
.room-heading p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.live-pill { flex-shrink: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .18); font-size: 12px; font-weight: 550; }
.live-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--olive); animation: live 2.4s ease-in-out infinite; }
.room-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.room-legend span { display: inline-flex; align-items: center; gap: 6px; }
.room-legend i { width: 12px; height: 12px; border-radius: 3px; }
.room-legend .l-occupied { background: var(--olive-deep); }
.room-legend .l-upcoming { background: #fffaeb; box-shadow: inset 0 0 0 1.5px #dc6803; }
.room-legend .l-free { background: #fff; box-shadow: inset 0 0 0 1.5px #98a2b3; }
.room-help { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin-bottom: 12px; }

/* ---------- Drawer de detalle ---------- */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(500px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-3), 0 0 0 1px var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(0);
  transition: transform 420ms var(--ease-drawer), overlay 420ms allow-discrete, display 420ms allow-discrete;
}
.drawer:not([open]) { transform: translateX(104%); transition-duration: 240ms; transition-timing-function: var(--ease-out); }
@starting-style { .drawer[open] { transform: translateX(104%); } }
.drawer::backdrop, .confirm-dialog::backdrop { background: rgb(16 24 40 / 0); transition: background-color 260ms ease, overlay 260ms allow-discrete, display 260ms allow-discrete; }
.drawer[open]::backdrop { background: rgb(16 24 40 / .28); }
.confirm-dialog[open]::backdrop { background: rgb(16 24 40 / .36); }
@starting-style {
  .drawer[open]::backdrop, .confirm-dialog[open]::backdrop { background: rgb(16 24 40 / 0); }
}
.drawer-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0 12px 0 24px; background: rgb(255 255 255 / .96); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.drawer-grabber { display: none; }
#drawer-content { transition: opacity 160ms ease, filter 160ms ease; }
#drawer-content[aria-busy=true] { opacity: .55; filter: blur(1px); pointer-events: none; }
.loading-line { display: grid; place-items: center; gap: 12px; min-height: 220px; color: var(--ink-3); font-size: 13.5px; }
.loading-line .spinner { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink-2); animation: spin 700ms linear infinite; }

.reservation-detail, .table-panel { padding: 22px 24px 30px; --detail-gap: 18px; }
.detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; }
.detail-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sunk); color: var(--ink-2); font-size: 17px; font-weight: 600; }
.detail-avatar.state-confirmed { background: var(--saffron-tint); color: var(--saffron-ink); }
.detail-avatar.state-seated { background: var(--olive-deep); color: #fff; }
.detail-avatar.state-no_show { background: var(--plum-tint); color: var(--plum-ink); }
.detail-avatar.state-cancelled { background: var(--tomato-tint); color: var(--tomato-ink); }
.detail-head h2 { font-size: 20px; letter-spacing: -.02em; overflow-wrap: anywhere; outline: none; }
.detail-head p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.detail-head .status { grid-column: 1 / -1; justify-self: start; }

.lifecycle-closed { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sunk); color: var(--ink-2); font-size: 13.5px; }
.lifecycle-closed .icon { color: var(--ink-3); }

/* Datos de la reserva: tres columnas con separadores */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  padding: 14px 4px;
  background: var(--surface-2);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ticket > div { display: grid; gap: 3px; padding: 0 14px; min-width: 0; }
.ticket > div + div { border-left: 1px solid var(--line); }
.ticket span { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.ticket > div:first-child strong { white-space: nowrap; }
.ticket strong { font-size: 16px; font-weight: 600; letter-spacing: -.012em; font-variant-numeric: tabular-nums; font-family: var(--font-num); overflow-wrap: anywhere; }

.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.contact-actions a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); min-width: 0; transition: background-color 150ms ease, box-shadow 150ms ease; }
.contact-actions .icon { width: 17px; height: 17px; color: var(--ink-3); }
.contact-actions span { display: grid; min-width: 0; font-size: 12px; color: var(--ink-3); font-weight: 450; }
.contact-actions strong { font-size: 13.5px; font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .contact-actions a:hover { background: var(--surface-2); box-shadow: var(--shadow-1), inset 0 0 0 1px #b4bac4; }
}
.guest-note { position: relative; padding: 12px 14px 12px 16px; margin-bottom: 18px; border-radius: var(--r-sm); background: var(--saffron-tint); box-shadow: inset 3px 0 0 var(--saffron), inset 0 0 0 1px rgb(245 158 11 / .25); }
.guest-note h3 { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--saffron-ink); margin-bottom: 4px; }
.guest-note h3 .icon { width: 15px; height: 15px; }
.guest-note p { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.55; }
.service-actions { display: grid; gap: 10px; padding: 16px; margin: 4px 0 18px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.service-actions h3 { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.service-actions form { margin: 0; }
.service-actions .button { width: 100%; }
.service-actions p { font-size: 13.5px; color: var(--ink-2); }
.service-actions .seat-later { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--saffron-tint); color: var(--saffron-ink); font-weight: 500; }
.seat-later .icon { width: 16px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.internal-note { padding-top: 18px; border-top: 1px solid var(--line); }
.internal-note label { display: flex; align-items: center; gap: 7px; }
.internal-note label::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; color: var(--ink-3); }
.internal-note p { margin-bottom: 10px; }
.internal-note .field-hint { margin: 0 0 12px; }
.detail-page { max-width: 640px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

/* ---------- Confirm dialog ---------- */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-3), 0 0 0 1px var(--line);
  opacity: 1;
  transform: none;
  transition: opacity 180ms ease, transform 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete;
}
.confirm-dialog:not([open]) { opacity: 0; transform: scale(.98) translateY(4px); transition-duration: 140ms; }
@starting-style { .confirm-dialog[open] { opacity: 0; transform: scale(.98) translateY(6px); } }
.confirm-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: var(--r); background: var(--tomato-tint); color: var(--tomato); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .14); }
.confirm-icon .icon { width: 20px; height: 20px; }
.dialog-header { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.dialog-header .icon-button { margin: -6px -6px 0 0; }
.confirm-dialog h2 { font-size: 17px; margin-bottom: 6px; }
.confirm-dialog p { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ---------- Notices & toasts ---------- */
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.notice { position: relative; padding: 11px 44px 11px 14px; border-radius: var(--r-sm); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .22); font-weight: 500; font-size: 13.5px; }
.notice.error { background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .22); }
.dismiss { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--r-xs); background: none; color: inherit; }
.dismiss .icon { width: 16px; }
.toast-region { position: fixed; z-index: 300; inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible; translate: -50% 0; display: grid; justify-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--r);
  background: #15171c;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-3);
  cursor: pointer;
  opacity: 1;
  transform: none;
  transition: transform 300ms var(--ease-out), opacity 200ms ease;
}
@starting-style { .toast { opacity: 0; transform: translateY(12px); } }
.toast.leaving { opacity: 0; transform: translateY(8px); transition-duration: 180ms; }
.toast-icon { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--olive); }
.toast-icon .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.toast.error { background: #7a1d10; }
.toast.error .toast-icon { background: var(--tomato); }

/* ==========================================================================
   Público
   ========================================================================== */
.public-header { position: relative; }
.public-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; height: var(--bar-h); margin: 0 auto; padding: 0 var(--gutter); }
.public-header nav { display: flex; align-items: center; gap: 4px; }
.public-header form { margin: 0; }
.public-main { max-width: 1180px; margin: 0 auto; padding: 40px var(--gutter) 72px; min-height: calc(100vh - 230px); }
.public-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 22px var(--gutter) 30px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.public-footer a { font-weight: 500; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .public-footer a:hover { color: var(--ink); text-decoration: underline; }
}

/* Home */
.restaurant-initial { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .14); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.address { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 450; }
.address .icon { width: 15px; color: var(--ink-3); }

/* Booking */
.booking-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: start; }
.booking-intro { position: sticky; top: 28px; }
.workspace .booking-intro { top: 96px; }
.booking-intro h1 { margin-bottom: 6px; }
.booking-intro > .muted { font-size: 14px; line-height: 1.6; }
.booking-recap { display: grid; gap: 12px; margin: 22px 0 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.booking-recap > span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.recap-row { display: flex; align-items: center; gap: 10px; }
.recap-row .icon { width: 16px; color: var(--ink-3); }
.recap-row strong { font-size: 14.5px; font-weight: 600; }
.recap-row strong::first-letter { text-transform: uppercase; }
.recap-row.bump strong { animation: bump 360ms var(--ease-out); }
.recap-row.is-empty strong { color: var(--ink-3); font-weight: 450; }
.booking-recap small { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; }
.booking-recap small .icon { width: 15px; }
.booking-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; min-width: 0; }
.booking-section { min-width: 0; padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.step-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-heading > span { position: relative; display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-size: 12px; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.step-heading > span .icon { position: absolute; width: 14px; height: 14px; stroke-width: 2.8; opacity: 0; transform: scale(.5); transition: opacity 180ms ease, transform 260ms var(--ease-out); }
.step-heading > span b { font-weight: 600; transition: opacity 150ms ease, transform 200ms var(--ease-out); }
.booking-section.complete .step-heading > span { background: var(--olive); color: #fff; box-shadow: none; }
.booking-section.complete .step-heading > span .icon { opacity: 1; transform: none; }
.booking-section.complete .step-heading > span b { opacity: 0; transform: scale(.5); }
.step-heading h2 { font-size: 15px; }
.booking-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.booking-controls .seats-hint { grid-column: 1 / -1; margin: -8px 0 0; }
.field { position: relative; min-width: 0; }
.guest-stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: var(--r-sm); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.guest-stepper input { width: 56px; height: calc(var(--control-h) - 6px); min-height: 0; padding: 0; border: 0; background: transparent; text-align: center; font-size: 16px; font-weight: 600; appearance: textfield; -moz-appearance: textfield; font-variant-numeric: tabular-nums; font-family: var(--font-num); box-shadow: none; }
.guest-stepper input:focus { box-shadow: none; }
.guest-stepper input::-webkit-inner-spin-button, .guest-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.guest-stepper input.bump { animation: bump 320ms var(--ease-out); }
.guest-stepper button { display: grid; place-items: center; width: calc(var(--control-h) - 6px); height: calc(var(--control-h) - 6px); border: 0; border-radius: var(--r-xs); background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); color: var(--ink); transition: transform 120ms var(--ease-out), background-color 150ms ease; }
.guest-stepper button .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.guest-stepper button:active:not(:disabled) { transform: translateY(1px); }
.guest-stepper button:disabled { opacity: .35; }
.day-shortcuts { display: flex; gap: 6px; margin: 0 0 8px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.day-shortcuts::-webkit-scrollbar { display: none; }
.day-shortcuts button { display: grid; justify-items: center; gap: 1px; flex: 1 0 60px; min-height: 60px; padding: 8px 4px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); scroll-snap-align: start; transition: transform 120ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.day-shortcuts span { font-size: 12px; font-weight: 500; color: var(--ink-3); text-transform: capitalize; }
.day-shortcuts strong { font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.day-shortcuts button:active { transform: translateY(1px); }
.day-shortcuts button[aria-pressed=true] { background: var(--ink); box-shadow: none; color: #fff; }
.day-shortcuts button[aria-pressed=true] span { color: rgb(255 255 255 / .72); }
/* Debajo del número, qué abre ese día: la mitad izquierda es la comida (ámbar) y la derecha la cena (añil) */
.day-service { display: flex; gap: 3px; width: 28px; margin-top: 4px; }
.day-service b { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.day-shortcuts .is-lunch .day-service b:first-child, .day-shortcuts .is-both .day-service b:first-child { background: var(--chart-lunch); }
.day-shortcuts .is-dinner .day-service b:last-child, .day-shortcuts .is-both .day-service b:last-child { background: var(--chart-dinner); }
.day-shortcuts button[aria-pressed=true] .day-service b { box-shadow: 0 0 0 1px rgb(255 255 255 / .35); }
.day-shortcuts button.is-closed:not([aria-pressed=true]) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.day-shortcuts button.is-closed strong { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.day-shortcuts button.is-closed[aria-pressed=true] strong { color: rgb(255 255 255 / .7); }
.day-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 12px; color: var(--ink-3); font-size: 12px; }
.day-legend span { display: inline-flex; align-items: center; gap: 6px; }
.day-legend i { width: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.day-legend i.is-lunch { background: var(--chart-lunch); }
.day-legend i.is-dinner { background: var(--chart-dinner); }
.day-legend i.is-closed { height: 1.5px; background: var(--ink-3); }
@media (hover: hover) and (pointer: fine) {
  .day-shortcuts button:not([aria-pressed=true]):hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #b4bac4; background: var(--surface-2); }
  .guest-stepper button:hover:not(:disabled) { background: var(--surface-2); }
}
.timeslot-area { display: grid; gap: 14px; }
.timeslot-area:empty { display: none; }
.slot-group h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.slot-group h3 .icon { width: 15px; height: 15px; }
.slot-group.lunch h3 .icon { color: var(--chart-lunch); }
.slot-group.dinner h3 .icon { color: var(--chart-dinner); }
.timeslot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.timeslot { position: relative; min-height: var(--control-h); padding: 0 8px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); transition: transform 120ms var(--ease-out), background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.timeslot.enter { animation: slot-in 320ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 16ms); }
.timeslot:active { transform: translateY(1px); }
.timeslot[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.timeslot.skeleton { pointer-events: none; color: transparent; background: linear-gradient(90deg, var(--sunk) 0 40%, #fdf6ee 50%, var(--sunk) 60% 100%) 0 0 / 300% 100%; box-shadow: none; animation: shimmer 1.2s linear infinite; }
@media (hover: hover) and (pointer: fine) {
  .timeslot:not([aria-pressed=true]):hover { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--ink); }
}
.availability-hint { display: flex; align-items: center; gap: 8px; min-height: 0; margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.availability-hint:empty { display: none; }
.table-picker { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Propuesta para un grupo: qué mesas se juntan y qué reservas cambian de mesa, para aceptarla o no */
.proposal { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--tile-tint); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .2); }
.proposal.is-blocked { background: var(--saffron-tint); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); }
.proposal h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 650; }
.proposal h3 .icon { width: 16px; height: 16px; color: var(--tile); }
.proposal p { margin: 0; font-size: 13.5px; }
.proposal-moves, .proposal-problems { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.proposal-moves li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.proposal-who { display: grid; }
.proposal-who strong { font-size: 13.5px; }
.proposal-who small { color: var(--ink-3); font-size: 12px; }
.proposal-move { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.proposal-move .icon { width: 14px; height: 14px; color: var(--ink-3); }
.proposal-problems li { padding-left: 14px; position: relative; font-size: 13.5px; }
.proposal-problems li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--saffron); }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.timeslot.is-moves { border: 1.5px dashed var(--tile); box-shadow: none; background: var(--tile-tint); color: var(--tile-ink); }
.timeslot.is-moves[aria-pressed=true] { border-style: solid; background: var(--tile); color: #fff; }
.table-preview.is-moves { color: var(--tile-ink); }
.table-preview.is-moves::before { background: var(--tile); }
/* Juntar mesas a mano: casillas con las mesas de la misma sala y lo que suman */
.join-picker { margin-top: 10px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.join-picker[hidden] { display: none; }
.join-picker summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.join-picker summary::-webkit-details-marker { display: none; }
.join-picker summary .icon { width: 15px; height: 15px; color: var(--tile); }
.join-picker[open] summary { border-bottom: 1px solid var(--line); }
.join-picker > .field-hint { margin: 10px 12px 0; }
.join-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 10px 12px; }
.join-options label { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 0 10px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; font-weight: 550; cursor: pointer; }
.join-options label[hidden] { display: none; }
.join-options label:has(input:checked) { background: var(--tile-tint); box-shadow: inset 0 0 0 1.5px var(--tile); color: var(--tile-ink); }
.join-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--tile); }
.join-options small { margin-left: auto; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.join-sum { margin: 0; padding: 0 12px 12px; color: var(--tile-ink); font-size: 13px; font-weight: 600; }
.join-sum:empty { display: none; }
/* Reservas de una mesa: el día con flechas y cada reserva en una fila (hora, quién, cuántos y estado) */
.table-avatar { font-size: 15px; letter-spacing: -.02em; }
.table-panel .detail-head { margin-bottom: 12px; }
.detail-page .table-panel { padding: 0; }
.table-days { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.table-days strong { flex: 1; min-width: 0; text-align: center; font-size: 14px; font-weight: 600; }
.table-panel > .schedule-chip { margin: 0 0 12px; }
.table-bookings { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.table-bookings a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); transition: background-color 150ms ease, box-shadow 150ms ease; }
.table-bookings a.is-here { box-shadow: inset 3px 0 0 var(--olive), inset 0 0 0 1px var(--line); }
.table-bookings a.state-completed, .table-bookings a.state-no_show { opacity: .65; }
.tb-time { display: grid; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tb-time strong { font-size: 15px; font-weight: 650; }
.tb-time small, .tb-name small { color: var(--ink-3); font-size: 12px; }
.tb-name { display: grid; min-width: 0; }
.tb-name strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.table-empty { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 14px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; }
.table-empty .icon { width: 16px; height: 16px; color: var(--ink-3); }
.table-panel-actions .button { width: 100%; justify-content: center; }
.table-panel .walkin-card { margin: 0 0 14px; }
/* «Sin reserva» y «Cambiar de mesa»: cuántos son y, en una lista, cada mesa libre con hasta cuándo; un toque basta */
.walkin-panel { padding: 22px 24px 30px; }
.detail-page .walkin-panel { padding: 0; }
.walkin-avatar .icon { width: 20px; height: 20px; color: var(--olive); }
.walkin-setup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 18px; }
.walkin-count { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.walkin-count .guest-stepper a { display: grid; place-items: center; width: 44px; height: 40px; border-radius: var(--r-xs); background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); color: var(--ink); }
.walkin-count .guest-stepper a[aria-disabled=true] { opacity: .35; pointer-events: none; }
.walkin-count .guest-stepper a .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.walkin-count .guest-stepper strong { min-width: 44px; text-align: center; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); color: var(--ink); }
.walkin-name-field { display: grid; flex: 1; gap: 6px; min-width: 180px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.walkin-name-field small { color: var(--ink-3); font-weight: 500; }
.walkin-list-title { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.walkin-tables { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.walkin-tables form { margin: 0; }
.walkin-table { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 10px 9px 14px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); text-align: left; cursor: pointer; transition: box-shadow 150ms ease, background-color 150ms ease; }
.walkin-table-name { display: grid; min-width: 0; }
.walkin-table-name strong { font-size: 15px; font-weight: 650; }
.walkin-table-name small { color: var(--ink-3); font-size: 12px; }
.walkin-until { color: var(--olive-ink); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.walkin-until.is-limited { color: var(--saffron-ink); }
.walkin-go { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-sm); background: var(--olive); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.walkin-go .icon { width: 15px; height: 15px; }
.move-panel .walkin-go { background: var(--ink); }
.walkin-table:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) {
  .walkin-table:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
}
@media (max-width: 520px) {
  .walkin-table { grid-template-columns: minmax(0, 1fr) auto; }
  .walkin-until { grid-column: 1; grid-row: 2; }
  .walkin-go { grid-column: 2; grid-row: 1 / span 2; }
}
/* Se liberan pronto: las mesas que antes quedan libres, para quien espera en la puerta */
.freeing { margin: 12px 0 0; }
.freeing h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.freeing h3 .icon { width: 15px; height: 15px; }
.freeing ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.freeing a { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 6px; min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 13px; }
.freeing a strong { font-weight: 650; }
.freeing a small { color: var(--ink-3); font-size: 11.5px; }
.freeing a span { grid-column: 1 / -1; color: var(--ink-2); font-size: 12px; }
.freeing a.freeing-bill { box-shadow: inset 3px 0 0 var(--state-bill), inset 0 0 0 1px var(--line-2); }
.freeing a.freeing-bill span { color: var(--state-bill-ink); font-weight: 600; }
.freeing a.freeing-cleaning { box-shadow: inset 3px 0 0 var(--state-cleaning), inset 0 0 0 1px var(--line-2); }
.table-tag.tag-waiting.is-long { background: var(--tomato); color: #fff; }
.wait-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--state-arrived-ink, var(--ink-2)); font-weight: 600; }
.wait-badge .icon { width: 12px; height: 12px; }
.wait-badge.is-long { color: var(--tomato-ink); }
/* Llegan tarde: el teléfono a la vista en la fila y, en el panel, una franja con Llamar y No vino */
.late-phone { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.late-phone .icon { width: 12px; height: 12px; }
.late-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 var(--detail-gap, 16px); padding: 10px 12px; border-radius: var(--r); background: var(--tomato-tint); box-shadow: inset 3px 0 0 var(--tomato); color: var(--tomato-ink); font-size: 13.5px; }
.late-banner > .icon { width: 18px; height: 18px; flex-shrink: 0; }
.late-banner > span { display: grid; flex: 1; min-width: 160px; }
.late-banner strong { font-size: 14px; }
.late-banner form { margin: 0; }
.button.danger-soft { background: var(--surface); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .35); }
.move-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--saffron-tint); color: var(--saffron-ink); font-size: 13.5px; }
.move-note .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.move-back { width: 100%; justify-content: center; }
.ticket-link { margin-left: 8px; color: var(--tile); font-size: 12px; font-weight: 600; }
.ticket-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.walkin-button.is-off { opacity: .45; cursor: not-allowed; }
.walkin-button .icon { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .day-actions .walkin-button.is-off { display: none; }
}
.table-bookings li.has-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.table-bookings a.is-waiting { box-shadow: inset 3px 0 0 var(--state-arrived), inset 0 0 0 1px var(--line); }
@media (hover: hover) {
  .table-bookings a:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
}
/* Un servicio sin horas dice por qué («Los martes no hay cena») y la asignación automática dice qué mesa dará */
.slot-note { margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; }
.table-preview { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--olive-ink); font-size: 13px; font-weight: 550; }
.table-preview::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.table-preview[hidden] { display: none; }
.table-preview.is-joined { color: var(--tile-ink); }
.table-preview.is-joined::before { background: var(--tile); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field.full { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.optional { position: absolute; right: 0; top: 1px; font-size: 12px; font-weight: 450; color: var(--ink-3); }
.booking-submit { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px; border-radius: var(--r-lg); background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); box-shadow: var(--shadow-3), 0 0 0 1px var(--line); }
.booking-submit .submit-recap { display: grid; min-width: 0; flex: 1; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.booking-submit .submit-recap .is-missing { color: var(--tomato-ink); font-weight: 600; }
.booking-submit .submit-recap strong { color: var(--ink); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-submit .button .icon { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .booking-submit .button:hover .icon { transform: translateX(2px); }
}

/* Confirmation */
.confirmation-page { position: relative; display: grid; justify-items: center; text-align: center; max-width: 600px; margin: 0 auto; }
.confirmation-badge { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 50%; background: var(--olive); color: #fff; box-shadow: 0 0 0 8px var(--olive-tint); animation: badge-pop 420ms var(--ease-out) both; }
.confirmation-badge::after { display: none; }
.confirmation-badge svg { width: 32px; height: 32px; }
.confirmation-badge .check-path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 420ms var(--ease-out) 200ms forwards; }
.confirmation-badge.closed { background: var(--stone-tint); color: var(--stone-ink); box-shadow: 0 0 0 8px var(--surface-2); }
.confirmation-badge.cancelled { background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: 0 0 0 8px #fef4f2; }
.confirmation-page h1 { font-size: clamp(26px, 5vw, 34px); margin-bottom: 8px; }
.confirmation-page > .muted { font-size: 15px; }
.confirmation-ticket {
  width: 100%;
  margin: 28px 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: left;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
}
.ticket-shadow { width: 100%; margin: 28px 0 16px; animation: ticket-in 500ms var(--ease-out) 80ms both; }
.ticket-shadow .confirmation-ticket { margin: 0; }
.confirmation-ticket > div { display: grid; gap: 3px; padding: 20px 22px; }
.confirmation-ticket > div + div { border-left: 1px solid var(--line); }
.confirmation-ticket span { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.confirmation-ticket strong { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.confirmation-ticket strong::first-letter { text-transform: uppercase; }
.confirmation-ticket em { font-style: normal; font-size: 13.5px; color: var(--ink-2); font-weight: 450; }
.confirmation-page .address { justify-content: center; margin: 0 0 20px; }
.confirmation-page .field-hint { margin-top: 10px; }
.confirmation-page form { margin: 24px 0 0; }
.confirmation-page .back { margin: 28px 0 0; }
.confetti-layer { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.confetti-layer i { position: absolute; display: block; will-change: transform, opacity; }

/* Login */
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 64px; align-items: center; min-height: 520px; }
.login-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
.login-card h2 { font-size: 18px; }
.login-card > .muted { margin: 4px 0 20px; }

/* Acceso denegado */
.denied-card { display: grid; justify-items: center; gap: 10px; max-width: 520px; margin: 20px auto; padding: 36px 28px; text-align: center; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.denied-card .plate { width: 72px; height: 72px; }
.denied-card p { color: var(--ink-2); max-width: 46ch; margin-bottom: 8px; }

/* ---------- Configuración ---------- */
.settings-nav { position: sticky; top: 72px; z-index: 10; display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; margin-bottom: 22px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.settings-nav a { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; height: var(--control-h-sm); padding: 0 10px; border-radius: var(--r-xs); color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: background-color 150ms ease, color 150ms ease; }
.settings-nav a .icon { width: 16px; height: 16px; color: var(--ink-3); }
.settings-nav a.active { background: var(--sunk); color: var(--ink); }
.settings-nav a.active .icon { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .settings-nav a:not(.active):hover { background: var(--surface-2); color: var(--ink); }
}
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-section { padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); scroll-margin-top: 140px; }
.settings-section.wide { grid-column: 1 / -1; }
.settings-heading { display: flex; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.settings-heading .section-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.settings-heading .section-icon .icon { width: 17px; height: 17px; }
.settings-heading .section-icon.olive, .settings-heading .section-icon.tile, .settings-heading .section-icon.saffron { background: var(--surface-2); color: var(--ink-2); }
.settings-heading h2 { margin-bottom: 2px; font-size: 15px; }
.settings-heading p { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); }
.table-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.table-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 4px 4px 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); }
.table-chip strong { font-size: 13.5px; }
.capacity-badge { display: inline-flex; align-items: center; height: var(--pill-h); padding: 0 7px; border-radius: var(--r-xs); background: var(--olive-tint); color: var(--olive-ink); font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
.capacity-badge.unlimited { background: var(--sunk); color: var(--ink-2); }
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.capacity-field { display: grid; gap: 6px; margin: 0; }
.capacity-field span { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capacity-field input { font-weight: 550; }
.table-chip form { margin: 0; }
.table-chip.inactive { opacity: .7; }
.table-chip.inactive strong { color: var(--ink-2); }
.switch { position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: var(--line-2); transition: background-color 180ms ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(16 24 40 / .2); transition: transform 220ms var(--ease-out); }
.switch[aria-checked=true] { background: var(--olive); }
.switch[aria-checked=true]::after { transform: translateX(16px); }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.weekday-col { display: grid; align-content: start; gap: 6px; min-height: 116px; padding: 10px 8px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.weekday-col h3 { font-size: 12.5px; font-weight: 600; text-align: center; color: var(--ink-2); margin-bottom: 4px; }
.weekday-col.closed-day { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 7px, var(--sunk) 7px 14px); }
.weekday-col .closed-label { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.period-chip { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 5px 4px 5px 8px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--chart-lunch) 10%, #fff); color: #1c5cab; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chart-lunch) 24%, transparent); font-size: 12.5px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.period-chip.dinner { background: color-mix(in srgb, var(--chart-dinner) 9%, #fff); color: var(--chart-dinner); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chart-dinner) 22%, transparent); }
.period-chip form { margin: 0; }
.period-chip button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; opacity: .55; transition: opacity 150ms ease, background-color 150ms ease; }
.period-chip button .icon { width: 13px; height: 13px; }
@media (hover: hover) and (pointer: fine) {
  .period-chip button:hover { opacity: 1; background: rgb(255 255 255 / .7); }
}
.period-chip span { white-space: nowrap; }
.closure-list { display: grid; gap: 8px; }
.closure { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cal-page { display: grid; justify-items: center; width: 46px; flex-shrink: 0; overflow: hidden; border-radius: var(--r-xs); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.cal-page small { display: block; width: 100%; padding: 2px 0; background: var(--tomato); color: #fff; font-size: 10px; font-weight: 600; text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.cal-page strong { font-size: 17px; font-weight: 600; padding: 2px 0 4px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.closure-info { flex: 1; min-width: 0; display: grid; }
.closure-info strong { font-size: 14px; }
.closure-info span { font-size: 13px; color: var(--ink-3); }
.closure form { margin: 0; }
.add-setting { margin-top: 16px; border-radius: var(--r); }
/* What the closing time of the services means, under the week of opening hours. */
.closing-rule { display: grid; gap: 8px; justify-items: start; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.closing-rule .field-hint { margin: 0; max-width: 72ch; }
.add-setting summary { display: inline-flex; align-items: center; gap: 7px; min-height: var(--control-h-sm); padding: 0 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); color: var(--ink); font-weight: 500; font-size: 13.5px; cursor: pointer; list-style: none; transition: border-color 150ms ease, background-color 150ms ease; }
.add-setting summary::-webkit-details-marker { display: none; }
.add-setting summary .icon { width: 16px; color: var(--ink-3); transition: transform 220ms var(--ease-out); }
.add-setting[open] summary { border-style: solid; background: var(--sunk); }
.add-setting[open] summary .icon { transform: rotate(45deg); }
.capacity-setting[open] summary .icon { transform: none; }
.add-setting form { margin-top: 14px; padding: 16px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); animation: drop-in 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .add-setting summary:hover { border-color: var(--ink-3); background: var(--surface-2); }
}
.settings-section form > .button { margin-top: 4px; }

/* ---------- Correos ---------- */
.mail-list { display: grid; gap: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: clip; }
.mail-item { background: var(--surface); transition: background-color 150ms ease; }
.mail-item + .mail-item { border-top: 1px solid var(--line); }
.mail-item summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 16px 12px 14px; cursor: pointer; list-style: none; }
.mail-item summary::-webkit-details-marker { display: none; }
.mail-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--olive-tint); color: var(--olive-deep); }
.mail-icon .icon { width: 17px; height: 17px; }
.mail-icon.pending { background: var(--saffron-tint); color: var(--saffron-ink); }
.mail-icon.failed { background: var(--tomato-tint); color: var(--tomato); }
.mail-icon.local { background: var(--tile-tint); color: var(--tile); }
.mail-title { min-width: 0; }
.mail-title strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-title > span { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item time { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.mail-chevron { color: var(--ink-3); transition: transform 240ms var(--ease-out); }
.mail-item[open] .mail-chevron { transform: rotate(90deg); }
.mail-item[open] { background: var(--surface-2); }
.mail-body { margin: 0 16px 16px 62px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; animation: drop-in 240ms var(--ease-out); }
.mail-body a { color: var(--tile-ink); text-decoration: underline; }
.mail-body > .text-link { display: flex; width: fit-content; margin-top: 12px; text-decoration: none; }
.mail-body .notice { margin-top: 12px; }
.retry-form { margin: 12px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .mail-item:not([open]):hover { background: #fafbfc; }
}
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 0 0; font-size: 13.5px; font-weight: 500; }
.pagination a { display: inline-flex; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
.pagination span { color: var(--ink-3); padding: 0 8px; }

/* Standalone form (correo) */
.standalone-form { max-width: 680px; padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.recipient-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 4px; margin-top: 10px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); font-weight: 500; font-size: 13px; }
.recipient-chip .icon { width: 22px; height: 22px; padding: 4px; border-radius: var(--r-xs); background: var(--tile-tint); color: var(--tile); }

/* ==========================================================================
   View transitions (la agenda se recoloca con fluidez)
   ========================================================================== */
:root[data-vt=morph] .res-row { view-transition-name: var(--vt); }
::view-transition-group(*) { animation-duration: 340ms; animation-timing-function: var(--ease-spring); }
/* While the screen animates, taps go through to the page underneath (an arrow tapped again moves on again) instead of
   landing on the animation layer, where they did nothing or selected text. */
::view-transition { pointer-events: none; }
/* La versión vieja y la nueva se funden a la vez: si una se va antes, la pantalla se ve lavada un instante. */
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 220ms; }
::view-transition-group(status-pill) { animation-duration: 280ms; animation-timing-function: var(--ease-out); }
:root[data-vt=next] .day-title, :root[data-vt=prev] .day-title { view-transition-name: day-title; }
:root[data-vt=next] [data-agenda-body], :root[data-vt=prev] [data-agenda-body] { view-transition-name: agenda-day; }
/* While a whole view slides, the line under the chosen phase travels with it instead of on its own. */
:root[data-vt=next] .tab-pill, :root[data-vt=prev] .tab-pill, :root[data-vt^=view] .tab-pill { view-transition-name: none; }
:root[data-vt=next]::view-transition-group(agenda-day), :root[data-vt=prev]::view-transition-group(agenda-day),
:root[data-vt=next]::view-transition-group(day-title), :root[data-vt=prev]::view-transition-group(day-title) { animation: none; }
:root[data-vt=next]::view-transition-old(agenda-day), :root[data-vt=next]::view-transition-old(day-title) { animation: 180ms var(--ease-out) both vt-out-left; }
:root[data-vt=next]::view-transition-new(agenda-day), :root[data-vt=next]::view-transition-new(day-title) { animation: 340ms var(--ease-out) both vt-in-right; }
:root[data-vt=prev]::view-transition-old(agenda-day), :root[data-vt=prev]::view-transition-old(day-title) { animation: 180ms var(--ease-out) both vt-out-right; }
:root[data-vt=prev]::view-transition-new(agenda-day), :root[data-vt=prev]::view-transition-new(day-title) { animation: 340ms var(--ease-out) both vt-in-left; }
/* Lista → Barras → Mes: the header and the filters stay or settle in place, and the content slides towards the side
   of the view chosen (forwards to the right, back to the left) while the new one comes in from the other side. */
/* Phase tabs and Todo el día / Comida / Cena on the list: the rows that stay glide to their new place; those that go
   fade at once instead of lingering under the others; those that come appear a moment later, rising a little. */
:root[data-vt=morph]::view-transition-old(*):only-child { animation: 150ms var(--ease-out) both vt-exit; }
:root[data-vt=morph]::view-transition-new(*):only-child { animation: 320ms var(--ease-spring) 90ms both vt-enter; }
/* The same filters on the bars: the timeline fades and settles, and the bars draw themselves again. */
:root[data-vt=fade] [data-agenda-body] { view-transition-name: agenda-body; }
:root[data-vt=fade]::view-transition-group(agenda-body) { animation-duration: 380ms; }
:root[data-vt=fade]::view-transition-old(agenda-body) { animation: 170ms var(--ease-out) both fade-out; }
:root[data-vt=fade]::view-transition-new(agenda-body) { animation: 360ms var(--ease-spring) 40ms both view-in-up; }

/* The top bar and the phone's bottom bar stay on top and still: the content slides under them, never over them. */
:root[data-vt] .topbar { view-transition-name: topbar; }
:root[data-vt] .tabbar { view-transition-name: tabbar; }
:root:active-view-transition .topbar { view-transition-name: topbar; }
:root:active-view-transition .tabbar { view-transition-name: tabbar; }
/* Pieces that only exist after the change (rows coming in) are layered after the rest: the bars go above them all. */
::view-transition-group(topbar), ::view-transition-group(tabbar) { z-index: 100; animation: none; }
::view-transition-old(topbar), ::view-transition-old(tabbar) { display: none; }
::view-transition-new(topbar), ::view-transition-new(tabbar) { animation: none; }
/* Lista → Barras → Mes no longer use a view transition: snapshotting the hero, the filters and a large agenda made
   every frame of the slide a full repaint. The new view is put in at once and only its body slides (app.js, swap()). */
/* While anything animates, the blurred bars are drawn without their blur: it is the costliest thing to repaint. */
:root:active-view-transition .topbar, :root:active-view-transition .tabbar, :root[data-sliding] .topbar, :root[data-sliding] .tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* The new view arrives with a little life: bars slide in row after row; the month's figures come in as a wave from
   the top left; the list's rows rise one after another. Only when changing view, short, and transform/opacity only
   (they run on the compositor, never repainting). Only the first rows wait their turn: the rest come with them. */
@media (prefers-reduced-motion: no-preference) {
  [data-entering=timeline] .tl-bar { animation: bar-in 260ms var(--ease-out) both; animation-delay: calc(min(var(--row, 0), 10) * 14ms + 30ms); }
  [data-entering=timeline] .tl-now { animation: fade-in 260ms ease 160ms both; }
  [data-entering=month] .month-chip { animation: chip-in 260ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 14ms + 30ms); }
  [data-entering=list] .res-row { animation: rise 260ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 14ms + 30ms); }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.97) translateY(-2px); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes slot-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes chosen { 0% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes row-flash { from { background-color: color-mix(in srgb, var(--flash, var(--olive)) 14%, #fff); } }
@keyframes disc-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
@keyframes badge-pop { from { opacity: 0; transform: scale(.8); } }
@keyframes ring { 0% { opacity: .6; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ticket-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(24px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-28px); } }
@keyframes bar-in { from { opacity: 0; transform: translateX(-10px); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(5px) scale(.94); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes view-in-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-exit { to { opacity: 0; transform: scale(.98); } }
@keyframes vt-enter { from { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* En el móvil los campos usan 16 px: así iOS no amplía la página al escribir. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  /* Con el dedo: ningún botón del servicio por debajo de 42 px de alto */
  .res-actions .button.small, .detail-actions .button.small, .quick-states .button, .attendance-actions .button.small, .table-bookings .button.small,
  .late-banner .button.small, .more-states summary { min-height: 42px; }
  .guest-stepper button { width: 42px; height: 42px; }
}

/* Tableta y móvil: «Reservas | Sala ahora» arriba, una cosa cada vez */
.pane-switch { display: none; }
@media (max-width: 1240px) {
  .js .pane-switch { position: sticky; top: calc(var(--bar-h) + 6px); z-index: 6; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: var(--r); background: rgb(255 255 255 / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
  .pane-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
  .pane-switch button .icon { width: 17px; height: 17px; }
  .pane-switch button small { padding: 1px 7px; border-radius: 999px; background: var(--state-bill-tint, var(--sunk)); color: var(--state-bill-ink, var(--ink-2)); font-size: 11.5px; font-weight: 600; }
  .pane-switch button[aria-pressed=true] { background: var(--ink); color: #fff; }
  .pane-switch button[aria-pressed=true] small { background: rgb(255 255 255 / .2); color: #fff; }
  .js .agenda-layout[data-pane=room] .reservations, .js .agenda-layout[data-pane=room] .agenda-splitter { display: none; }
  .js .agenda-layout:not([data-pane=room]) .agenda-side .room { display: none; }
}
@media (max-width: 1240px) {
  .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .room { position: static; }
  .res-actions { min-width: 0; }
  .booking-layout { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; }
}

.topbar-end .ghost-link { white-space: nowrap; }
@media (max-width: 1180px) {
  /* Por debajo de escritorio ancho no cabe todo: «Página de reservas» se queda en su icono; el texto sigue ahí para los lectores de pantalla. */
  .topbar-end .ghost-link { padding: 0; width: var(--control-h-sm); justify-content: center; }
  .topbar-end .ghost-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1240px) {
  /* Hasta escritorio ancho: cada icono con su nombre debajo, para que quepan todas las secciones */
  .main-nav { gap: 0; margin-left: 2px; }
  .main-nav a { flex-direction: column; justify-content: center; gap: 4px; padding: 0 7px; font-size: 11px; font-weight: 550; line-height: 1; }
  .main-nav a::before { inset: 5px 0; }
  .main-nav a::after { left: 9px; right: 9px; }
}
@media (max-width: 1060px) {
  .venue-chip { max-width: 200px; }
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .res-row { grid-template-columns: 58px minmax(0, 1fr) auto auto; }
  .res-state { display: none; }
  .res-name .status-inline { display: inline-flex; }
}
.status-inline { display: none; }

@media (max-width: 900px) {
  .booking-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .booking-intro, .workspace .booking-intro { position: static; }
  .booking-recap { display: none; }
  .login-layout { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { font-size: 15px; --gutter: 16px; --card-pad: 16px; --page-gap: 18px; --h1-size: 22px; }
  .main-nav, .topbar-end .ghost-link { display: none; }
  .topbar-inner { gap: 8px; }
  .venue-chip { max-width: 56vw; }
  .app-main { padding-top: 18px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed;
    z-index: 45;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    height: calc(62px + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgb(255 255 255 / .96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 500; transition: color 150ms ease; }
  .tabbar a .icon { width: 21px; height: 21px; }
  .tabbar a[aria-current=page] { color: var(--ink); }
  .tabbar a[aria-current=page] .icon { color: var(--tomato); }
  .tabbar a:active { transform: translateY(1px); }
  .tabbar .tabbar-new { width: 44px; height: 44px; margin: 0 auto; place-items: center; align-content: center; gap: 0; border-radius: var(--r); background: var(--tomato); color: #fff; box-shadow: 0 1px 2px rgb(16 24 40 / .14), inset 0 1px 0 rgb(255 255 255 / .14); }
  .tabbar .tabbar-new span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabbar .tabbar-new .icon { width: 22px; height: 22px; stroke-width: 2.2; color: #fff; }
  .account-menu .show-sm { display: flex; }
  /* La fecha siempre ocupa dos líneas: lo de debajo no sube ni baja al cambiar de día. */
  .day-title h1 { display: block; min-height: 2.4em; }
  .day-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 10px; }
  .day-actions [data-new-booking] { display: none; }
  .day-year { display: none; }
  .day-sub { font-size: 13px; }
  .meter-legend { gap: 6px 16px; }
  .meter-legend b { font-size: 18px; }
  .meter-legend .covers { margin-left: 0; padding-left: 0; border-left: 0; }
  .filters { gap: 8px; }
  .search-box { flex-basis: 100%; }
  .search-box kbd { display: none; }
  .filter-date { flex: 0 0 var(--control-h); display: grid; place-items: center; width: var(--control-h); height: var(--control-h); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); }
  .filter-date > .icon { display: block; color: var(--ink-2); }
  .filter-date input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: var(--r-sm); opacity: 0; cursor: pointer; }
  .segmented { flex: 1 1 0; }
  .segmented label { padding: 0 8px; flex: 1; justify-content: center; }
  .status-tabs { padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .res-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; min-height: 0; }
  .res-time strong { font-size: 14.5px; }
  .res-avatar { display: none; }
  .res-guests { min-width: 0; font-size: 13.5px; }
  .res-actions { grid-column: 1 / -1; justify-content: flex-start; gap: 8px; }
  .res-actions:not(:has(form)) { display: none; }
  .res-actions .icon-button { display: none; }
  .res-actions form { flex: 1; }
  .res-actions form .button { width: 100%; }
  .list-footer .shortcuts { display: none; }

  .drawer {
    inset: auto 0 0 0;
    width: 100vw;
    height: auto;
    max-height: 92dvh;
    margin: auto 0 0 0;
    border-radius: 16px 16px 0 0;
  }
  .drawer:not([open]) { transform: translateY(102%); }
  @starting-style { .drawer[open] { transform: translateY(102%); } }
  .drawer-top { height: auto; padding: 20px 12px 10px 18px; touch-action: none; cursor: grab; }
  .drawer-grabber { display: block; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); }
  .reservation-detail, .table-panel { padding: 16px 16px calc(26px + env(safe-area-inset-bottom)); }
  .ticket strong { font-size: 15px; }
  .ticket > div { padding: 0 10px; }
  .contact-actions { grid-template-columns: 1fr; }

  .public-main { padding-top: 26px; }
  .restaurant-initial { width: 48px; height: 48px; font-size: 20px; }
  .booking-section { padding: 16px; }
  .booking-controls { grid-template-columns: minmax(0, 1fr); }
  .guest-stepper { justify-content: space-between; }
  .guest-stepper input { flex: 1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .booking-submit { bottom: max(10px, env(safe-area-inset-bottom)); gap: 10px; padding: 8px 8px 8px 12px; }
  .booking-submit .submit-recap strong { font-size: 13px; }
  .booking-submit .button { padding: 0 12px; font-size: 13.5px; gap: 5px; }
  .workspace .booking-submit { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .confirmation-ticket { grid-template-columns: 1fr; }
  .confirmation-ticket > div { padding: 16px 18px; }
  .confirmation-ticket > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .settings-nav { top: 64px; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-item summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .mail-item summary .status { grid-column: 2; justify-self: start; }
  .mail-item time { grid-column: 2; grid-row: 3; }
  .mail-chevron { grid-column: 3; grid-row: 1; }
  .mail-body { margin: 0 12px 12px; }
}

@media (max-width: 900px) and (min-width: 761px) {
  /* Tableta: el logo sin el nombre deja sitio a todas las secciones del menú */
  .topbar .brand span { display: none; }
}
@media (max-width: 420px) {
  .topbar .brand span { display: none; }
  .topbar .brand + .venue-switch, .topbar .brand + .venue-chip { margin-left: 10px; }
  .topbar .brand + .venue-switch::before, .topbar .brand + .venue-chip::before { left: -10px; }
  .segmented label .icon { display: none; }
}

/* ==========================================================================
   Accesibilidad y movimiento reducido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; scroll-behavior: auto !important; }
  .button, .icon-button, .res-row, .timeslot, .switch::after, .drawer, .confirm-dialog, .toast { transition-property: opacity, background-color, color, border-color, box-shadow !important; }
  .drawer:not([open]), .confirm-dialog:not([open]), .toast.leaving { transform: none; }
  @starting-style { .drawer[open], .confirm-dialog[open], .toast { transform: none; } }
  .confetti-layer { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ==========================================================================
   Impresión
   ========================================================================== */
@media print {
  :root, body { background: #fff; color: #111; font-size: 11px; }
  .topbar, .tabbar, .public-header, .public-footer, .agenda-toolbar, .status-tabs, .cash-link, .res-actions, .room, .day-actions, .day-arrows, .toast-region, dialog, .messages, .list-footer .shortcuts { display: none !important; }
  .app-main { padding: 0; max-width: none; }
  .agenda-layout { display: block; }
  .service-meter, .reservation-list { box-shadow: none; border: 1px solid #ccc; }
  .res-row { grid-template-columns: 70px minmax(0, 1fr) 60px 120px; break-inside: avoid; min-height: 0; padding: 6px 8px; }
  .res-avatar { display: none; }
  .now-line { display: none; }
}

/* Detalles de interacción añadidos por app.js */
.res-row.flash.state-confirmed { --flash: var(--saffron); }
.res-row.flash.state-seated { --flash: var(--olive); }
.res-row.flash.state-completed { --flash: #98a0ab; }
.res-row.flash.state-no_show { --flash: #b4588d; }
.res-row.flash.state-cancelled { --flash: var(--tomato); }
.timeslot.skeleton { display: grid; place-items: center; }
.ghost-link.spinning .icon { animation: spin 640ms var(--ease-out); }
.button.copied { --bg: var(--olive-tint); --bg-hover: var(--olive-tint); --fg: var(--olive-ink); border-color: rgb(22 163 74 / .25); box-shadow: none; }
.recap-row.bump .icon { animation: bump 360ms var(--ease-out); }
.plate .plate-rim { animation: plate-in 900ms var(--ease-out) both; }
@keyframes plate-in { from { transform: rotate(-60deg); opacity: .4; } }

/* ==========================================================================
   Sala: plano de mesas
   ========================================================================== */
.floor-layout { display: grid; gap: 20px; align-items: start; }
.floor-stage { min-width: 0; }
.floor-scroll { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); scrollbar-width: thin; }
.floor {
  --gx: 2.5%;          /* grid step across, as in floor.js */
  --gy: 4%;            /* grid step down: square cells in a 16:10 room */
  --tile-y: 8%;
  position: relative;
  container-type: inline-size;
  width: 100%;
  min-width: 620px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  /* Plano técnico: fondo liso con una retícula muy fina; el suelo no compite con las mesas. */
  --grid-line: rgb(16 24 40 / .045);
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 5% 100%,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% var(--tile-y),
    #fbfcfd;
  box-shadow: inset 0 0 0 1px var(--line-2);
  user-select: none;
  -webkit-user-select: none;
  transition: aspect-ratio 260ms var(--ease-out);
}
.floor.layout-long { aspect-ratio: 2 / 1; --gy: 5%; --tile-y: 10%; }
.floor.layout-square { aspect-ratio: 1; --gy: 2.5%; --tile-y: 5%; margin-inline: auto; }
.floor.editing::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle, rgb(16 24 40 / .22) 1.1px, transparent 1.7px) calc(var(--gx) / -2) calc(var(--gy) / -2) / var(--gx) var(--gy); }
/* Cada suelo se distingue por su trama, no por su color: lamas (madera), losas grandes (piedra) o liso con un
   matiz apenas visible (moqueta, césped). */
.floor.floor-wood { background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% calc(var(--tile-y) / 2),
    #fcfbf9; }
.floor.floor-stone { background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 12.5% 100%,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% calc(var(--tile-y) * 2.5),
    #f8f9fb; }
.floor.floor-carpet { background: #f9f8fa; }
.floor.floor-garden { background: #f7faf7; }
.floor-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink-2); }

.floor-table {
  position: absolute;
  z-index: 2;
  isolation: isolate;
  display: grid;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  color: var(--ink);
  -webkit-user-drag: none;
  transition: transform 200ms var(--ease-out), width 240ms var(--ease-out), height 240ms var(--ease-out);
  /* Compact plan: every table at 85% of the sizes below. Joined tables are saved touching at this scale
     (migration 0022 moved the older ones closer), so changing it means moving them again. */
  --ts: calc(.85 * var(--rs, 1));
  width: calc(var(--tw, calc(10 * var(--cq, 1cqw))) * var(--ts));
  height: calc(var(--th, calc(10 * var(--cq, 1cqw))) * var(--ts));
}
/* Sizes grow with the seats; the smallest still fits its number and "2 pers." inside. */
.floor-table.shape-round { --tw: calc(9.6 * var(--cq, 1cqw)); --th: calc(9.6 * var(--cq, 1cqw)); }
.floor-table.shape-round.size-s { --tw: calc(8.8 * var(--cq, 1cqw)); --th: calc(8.8 * var(--cq, 1cqw)); }
.floor-table.shape-round.size-l { --tw: calc(10.8 * var(--cq, 1cqw)); --th: calc(10.8 * var(--cq, 1cqw)); }
.floor-table.shape-round.size-xl { --tw: calc(12 * var(--cq, 1cqw)); --th: calc(12 * var(--cq, 1cqw)); }
.floor-table.shape-square { --tw: calc(10 * var(--cq, 1cqw)); --th: calc(10 * var(--cq, 1cqw)); }
.floor-table.shape-square.size-s { --tw: calc(9 * var(--cq, 1cqw)); --th: calc(9 * var(--cq, 1cqw)); }
.floor-table.shape-square.size-l { --tw: calc(11.2 * var(--cq, 1cqw)); --th: calc(11.2 * var(--cq, 1cqw)); }
.floor-table.shape-square.size-xl { --tw: calc(12.6 * var(--cq, 1cqw)); --th: calc(12.6 * var(--cq, 1cqw)); }
.floor-table.shape-wide { --tw: calc(15 * var(--cq, 1cqw)); --th: calc(9 * var(--cq, 1cqw)); }
.floor-table.shape-wide.size-s { --tw: calc(12.5 * var(--cq, 1cqw)); --th: calc(8.6 * var(--cq, 1cqw)); }
.floor-table.shape-wide.size-l { --tw: calc(17 * var(--cq, 1cqw)); --th: calc(9.2 * var(--cq, 1cqw)); }
.floor-table.shape-wide.size-xl { --tw: calc(20.5 * var(--cq, 1cqw)); --th: calc(9.8 * var(--cq, 1cqw)); }
.floor-table.shape-tall { --tw: calc(9 * var(--cq, 1cqw)); --th: calc(15 * var(--cq, 1cqw)); }
.floor-table.shape-tall.size-s { --tw: calc(8.6 * var(--cq, 1cqw)); --th: calc(12.5 * var(--cq, 1cqw)); }
.floor-table.shape-tall.size-l { --tw: calc(9.2 * var(--cq, 1cqw)); --th: calc(17 * var(--cq, 1cqw)); }
.floor-table.shape-tall.size-xl { --tw: calc(9.8 * var(--cq, 1cqw)); --th: calc(20.5 * var(--cq, 1cqw)); }
.size-s .table-top small { font-size: max(8px, calc(calc(1 * var(--cq, 1cqw)) * var(--rs, 1))); letter-spacing: -.01em; }
.floor-table[hidden], .landmark[hidden], .zone-tab[hidden] { display: none !important; }
.table-top {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: calc(.2 * var(--cq, 1cqw));
  width: 100%;
  height: 100%;
  border-radius: calc(.9 * var(--cq, 1cqw));
  background: var(--surface);
  /* Plano y sin sombra: el estado lo dicen el relleno y el borde, nunca un brillo. */
  border: max(1.5px, calc(.16 * var(--cq, 1cqw))) solid #98a2b3;
  text-align: center;
  line-height: 1;
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.shape-round .table-top { border-radius: 50%; }
.table-top strong { font-size: calc(calc(2.3 * var(--cq, 1cqw)) * var(--rs, 1)); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.long-label .table-top strong { font-size: calc(calc(1.55 * var(--cq, 1cqw)) * var(--rs, 1)); letter-spacing: -.01em; padding: 0 calc(.5 * var(--cq, 1cqw)); overflow-wrap: anywhere; }
.table-top small { font-size: max(8px, calc(calc(1.05 * var(--cq, 1cqw)) * var(--rs, 1))); font-weight: 500; color: var(--ink-3); white-space: nowrap; }
/* Chairs seen from above, pushed in against the table: the seat tucks under its edge and the backrest faces out.
   floor.js puts each one on the edge and turns it (--a); here it slides out just enough to show. */
.chair { --cs: var(--rs, 1); position: absolute; z-index: -1; width: calc(calc(2.2 * var(--cq, 1cqw)) * var(--cs)); height: calc(calc(1.45 * var(--cq, 1cqw)) * var(--cs)); border-radius: calc(calc(.45 * var(--cq, 1cqw)) * var(--cs)); background: #d0d5dd; transform: translate(-50%, -50%) rotate(var(--a, 0deg)) translateY(calc(calc(-.6 * var(--cq, 1cqw)) * var(--cs))); transition: background-color 200ms ease; }
.table-tag { position: absolute; left: 50%; top: calc(100% + calc(1.9 * var(--cq, 1cqw)) * var(--rs, 1)); translate: -50% 0; max-width: calc(100% + .8 * var(--cq, 1cqw)); padding: calc(.3 * var(--cq, 1cqw)) calc(.7 * var(--cq, 1cqw)); border-radius: calc(.4 * var(--cq, 1cqw)); background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: max(10px, calc(1.1 * var(--cq, 1cqw))); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
/* Libre: blanca y neutra, sin color. El color queda para las mesas donde pasa algo. */
.floor-table.is-free .table-top { background: #fff; border-color: #98a2b3; }
.floor-table.is-free .table-top small { color: var(--ink-3); }
.floor .floor-table.is-free .chair { background: #d0d5dd; }
.floor-table.is-occupied .table-top { background: var(--olive-deep); border-color: var(--olive-deep); color: #fff; }
.floor-table.is-occupied .table-top small { color: rgb(255 255 255 / .88); }
.floor .floor-table.is-occupied .chair { background: #7cc79a; }
.floor-table.is-occupied .table-tag { color: var(--olive-ink); }
.floor-table.is-overrun .table-tag { background: var(--saffron-tint); color: var(--saffron-ink); }
/* Llegan pronto: tinte ámbar y borde firme, quieto (antes latía con un halo). */
.floor-table.is-soon .table-top { background: #fffaeb; border-color: #dc6803; color: #7a2e0e; }
.floor-table.is-soon .table-top small { color: #93370d; font-weight: 550; }
.floor .floor-table.is-soon .chair { background: #fbe2a4; }
.floor-table.is-soon .table-tag { color: #93370d; box-shadow: 0 0 0 1px #fedf89; }
.floor-table:focus-visible { outline: none; }
.floor-table:focus-visible .table-top { outline: 2px solid var(--focus); outline-offset: calc(.5 * var(--cq, 1cqw)); }
@media (hover: hover) and (pointer: fine) {
  /* Al pasar por encima no crece ni salta: un anillo fino indica que se puede pulsar. */
  .floor:not(.editing) .floor-table:hover { z-index: 3; }
  .floor:not(.editing) .floor-table:hover .table-top { box-shadow: 0 0 0 calc(.35 * var(--cq, 1cqw)) rgb(16 24 40 / .1); }
  .floor:not(.editing) .floor-table.is-free:hover .table-top { border-color: var(--ink-2); }
}
.floor:not(.editing) .floor-table:active .table-top { box-shadow: 0 0 0 calc(.2 * var(--cq, 1cqw)) rgb(16 24 40 / .16); }

/* Rótulos del plano (barra, cocina, entrada…): un solo gris pizarra para todos, como en un plano técnico */
.landmark {
  --lm: #667085;
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: calc(.6 * var(--cq, 1cqw));
  padding: calc(.7 * var(--cq, 1cqw)) calc(1.3 * var(--cq, 1cqw)) calc(.7 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw));
  border-radius: calc(.8 * var(--cq, 1cqw));
  background: var(--surface);
  color: var(--ink);
  font-size: max(10px, calc(1.2 * var(--cq, 1cqw)));
  font-weight: 500;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  box-shadow: 0 0 0 1px var(--line-2);
  transition: transform 200ms var(--ease-out);
}
.landmark .icon { width: max(13px, calc(1.7 * var(--cq, 1cqw))); height: max(13px, calc(1.7 * var(--cq, 1cqw))); color: var(--lm); }
/* Texto libre («Escenario», «Pantalla»): una etiqueta discreta, en mayúsculas pequeñas */
.landmark-texto { padding: calc(.45 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw)); border-radius: calc(.4 * var(--cq, 1cqw)); color: var(--ink-2); font-size: max(9px, calc(1.05 * var(--cq, 1cqw))); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.landmark-texto span { max-width: calc(22 * var(--cq, 1cqw)); overflow: hidden; text-overflow: ellipsis; }

/* Guías de alineación al arrastrar */
.guide { position: absolute; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 120ms ease; }
.guide-x { top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--tile); }
.guide-y { left: 0; right: 0; height: 0; border-top: 1px dashed var(--tile); }
.guide.show { opacity: .9; }

/* Edit mode */
.floor.editing .floor-table, .floor.editing .landmark { cursor: grab; touch-action: none; transition: left 90ms var(--ease-out), top 90ms var(--ease-out), transform 180ms var(--ease-out), width 240ms var(--ease-out), height 240ms var(--ease-out); }
.floor.editing .floor-table .table-top { background: var(--surface); border-style: solid; border-color: #98a2b3; color: var(--ink); box-shadow: none; }
.floor.editing .floor-table .table-top small { color: var(--ink-3); }
.floor.editing .floor-table .chair { background: #d0d5dd; }
.floor.editing .table-tag { display: none; }
.floor.editing .selected .table-top, .floor.editing .landmark.selected { outline-offset: calc(.6 * var(--cq, 1cqw)); }
.floor.editing .dragging { z-index: 6; cursor: grabbing; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.05); filter: drop-shadow(0 calc(1 * var(--cq, 1cqw)) calc(1 * var(--cq, 1cqw)) rgb(16 24 40 / .22)); }
.floor.editing .landmark:focus-visible { outline: 2px solid var(--focus); outline-offset: calc(.6 * var(--cq, 1cqw)); }

/* Side panel */
.floor-side { position: sticky; display: grid; gap: 12px; }
.floor-editor[hidden] { display: none; }
.floor-editor { display: grid; gap: 12px; margin: 0; animation: drop-in 240ms var(--ease-out); }
.swatch { flex-shrink: 0; border: 1.5px solid currentColor; }
.swatch.round { width: 15px; height: 15px; border-radius: 50%; }
.swatch.square { width: 14px; height: 14px; border-radius: 3px; }
.swatch.wide { width: 19px; height: 11px; border-radius: 3px; }
.swatch.tall { width: 11px; height: 19px; border-radius: 3px; }
.landmark-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.palette-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h-sm); padding: 0 10px 0 8px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 500; transition: background-color 150ms ease, box-shadow 150ms ease; }
.palette-chip .icon { width: 15px; height: 15px; color: var(--ink-3); }
.palette-chip:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .palette-chip:hover { background: var(--surface-2); box-shadow: var(--shadow-1), inset 0 0 0 1px #b4bac4; }
  .shape-picker button:not([aria-pressed=true]):hover { box-shadow: inset 0 0 0 1px #b4bac4; }
}
:root[data-vt=morph] .floor-table { view-transition-name: var(--vt); }

@media (max-width: 1060px) {
  .floor-layout { grid-template-columns: minmax(0, 1fr); }
  .floor-side { position: static; }
}
@media (max-width: 760px) {
  .floor-scroll { padding: 8px 8px 20px; margin: 0 calc(var(--gutter) * -1); border-radius: 0; box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }
  .floor { min-width: 600px; }
  .floor .table-tag { top: calc(100% + calc(1.1 * var(--cq, 1cqw)) * var(--rs, 1)); max-width: 100%; padding: 1px 4px; font-size: max(8.5px, calc(.96 * var(--cq, 1cqw))); }
  .editor-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .floor-table, .landmark, .floor.editing .floor-table, .floor.editing .landmark { transition: none !important; }
}

/* ---------- Zonas: interior y terraza ---------- */
.zone-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.zone-tab { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 48px; padding: 6px 14px 6px 6px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); color: var(--ink-3); transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.zone-tab span { display: grid; line-height: 1.25; }
.zone-tab strong { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.zone-tab small { font-size: 12px; font-weight: 450; }
.zone-tab:active { transform: translateY(1px); }
.zone-tab[aria-selected=true] { box-shadow: var(--shadow-1), 0 0 0 1.5px var(--ink); color: var(--ink-2); }
.tab-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--sunk); color: var(--ink-2); transition: background-color 150ms ease, color 150ms ease; }
.tab-icon .floor-swatch { width: 20px; height: 20px; border-radius: 5px; }
.tab-text { min-width: 0; }
.tab-text strong { display: block; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-tab[aria-selected=true] .tab-icon { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) {
  .zone-tab:not([aria-selected=true]):hover { box-shadow: var(--shadow-1), 0 0 0 1px #b4bac4; color: var(--ink-2); }
}
.floor-scroll[hidden] { display: none; }
.floor-scroll { animation: drop-in 240ms var(--ease-out); }

.floor-empty { pointer-events: none; text-align: center; }
.floor-empty a { pointer-events: auto; }
.floor-empty small { color: var(--ink-3); font-size: 13px; }
.floor:has(.floor-table:not([hidden])) .floor-empty { display: none; }

/* Etiquetas de zona en agenda, detalle y configuración */
.zone-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 5px; border-radius: 5px; background: var(--tile-tint); color: var(--tile-ink); font-size: 11.5px; font-style: normal; font-weight: 550; white-space: nowrap; }
.zone-tag .icon { width: 12px; height: 12px; }

.ticket .zone-tag { margin-top: 4px; justify-self: start; }
@media (max-width: 760px) {
  .zone-tabs { margin-bottom: 10px; }
  .zone-tab { flex: 1; min-height: 46px; padding: 5px 12px 5px 5px; }
  .tab-icon { width: 32px; height: 32px; }
}


/* ---------- Demo pública ---------- */
.demo-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 9px 14px; border-radius: var(--r-sm); background: var(--tile-tint); color: #1e3a8a; box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); font-size: 13px; }
.demo-banner .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--tile); }
.demo-banner strong { color: #1e3a8a; }
.demo-credentials { display: grid; gap: 6px; justify-items: start; margin: 0 0 20px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.demo-credentials strong { color: var(--ink); }
.demo-credentials code { padding: 1px 6px; border-radius: 4px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-family: var(--font); font-weight: 600; }
.demo-credentials .button { margin-top: 4px; }

/* ---------- Añadir mesas desde el plano ---------- */
/* (estilos del editor de salas al final del archivo) */
.floor-summary-actions { display: grid; gap: 8px; }
.floor-summary-actions[hidden] { display: none; }

/* ==========================================================================
   Reserva directa (enlace para la ficha de Google)
   ========================================================================== */
body.direct { position: relative; }
body.direct::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 420px;
  background:
    radial-gradient(70% 90% at 80% -10%, rgb(255 255 255 / .08), transparent 60%),
    linear-gradient(180deg, #15171c 0%, #232733 100%);
  pointer-events: none;
  transition: height 380ms var(--ease-out);
}
.direct-main { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 36px 16px 40px; }
.direct-footer { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 16px max(32px, env(safe-area-inset-bottom)); color: var(--ink-3); font-size: 12.5px; }
.direct-made { display: flex; align-items: center; gap: 8px; margin: 0; }
/* Discreet way in for the restaurant's staff. */
.staff-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h-sm); padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-3); font-size: 12.5px; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.staff-link .icon { width: 14px; height: 14px; }
.staff-link strong { color: var(--ink-2); font-weight: 550; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .staff-link:hover { background: var(--sunk); color: var(--ink-2); }
}
.direct-footer .brand { font-size: 14px; gap: 6px; }
.direct-footer .brand-mark { width: 18px; height: 18px; }

.reserve-hero { display: grid; justify-items: center; gap: 10px; padding: 0 8px 24px; text-align: center; color: #fff; transition: padding 340ms var(--ease-out); }
.reserve-logo { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4px; border-radius: 14px; background: #fff; color: var(--tomato); font-size: 26px; font-weight: 650; box-shadow: 0 0 0 1px rgb(255 255 255 / .2), 0 12px 24px -12px rgb(0 0 0 / .6); animation: badge-pop 420ms var(--ease-out) both; transition: width 340ms var(--ease-out), height 340ms var(--ease-out), font-size 340ms var(--ease-out), margin 340ms var(--ease-out), border-radius 340ms var(--ease-out); }
.reserve-hero h1 { font-size: clamp(28px, 6vw, 38px); font-weight: 600; letter-spacing: -.03em; color: #fff; transition: font-size 340ms var(--ease-out); }
.hero-more { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 340ms var(--ease-out), opacity 240ms ease 80ms, visibility 0s; }
.hero-more > div { display: grid; justify-items: center; gap: 10px; min-height: 0; overflow: hidden; }
.js .reserve:not([data-step="1"]) .hero-more { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows 340ms var(--ease-out), opacity 160ms ease, visibility 0s 340ms; }
.js .reserve:not([data-step="1"]) .reserve-hero { gap: 6px; padding-bottom: 18px; }
.js .reserve:not([data-step="1"]) .reserve-logo { width: 40px; height: 40px; margin-bottom: 0; border-radius: 10px; font-size: 18px; }
.js .reserve:not([data-step="1"]) .reserve-hero h1 { font-size: clamp(20px, 4.4vw, 26px); }
.js body.direct:has(.reserve:not([data-step="1"]))::before { height: 240px; }
.reserve-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 6px 0 0; list-style: none; }
.reserve-facts a, .reserve-facts span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: var(--r-sm); background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); color: rgb(255 255 255 / .92); font-size: 13px; font-weight: 500; transition: background-color 150ms ease; }
.reserve-facts .icon { width: 15px; height: 15px; color: rgb(255 255 255 / .7); }
.reserve-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: rgb(255 255 255 / .78); }
.reserve-badges span { display: inline-flex; align-items: center; gap: 5px; }
.reserve-badges .icon { width: 14px; height: 14px; }
.reserve-badges .is-demo { padding: 1px 8px; border-radius: var(--r-xs); background: rgb(255 255 255 / .14); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .reserve-facts a:hover { background: rgb(255 255 255 / .16); }
}

.reserve-card { position: relative; display: grid; gap: 0; padding: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 48px -20px rgb(16 24 40 / .35), 0 0 0 1px rgb(16 24 40 / .06); animation: rise 420ms var(--ease-out) both; }
.reserve-card .form-errors { margin: 16px 20px 0; }

/* Asistente: una pregunta por pantalla */
.wizard-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 16px 20px 0; list-style: none; }
.wizard-progress li { display: grid; gap: 6px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--ink-3); transition: color 200ms ease; }
.wizard-progress li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-progress li::before { content: ""; height: 3px; border-radius: 2px; background: linear-gradient(var(--tomato), var(--tomato)) 0 0 / 0% 100% no-repeat, var(--sunk); transition: background-size 420ms var(--ease-out); }
.wizard-progress li.is-current { color: var(--ink); }
.wizard-progress li.is-done { color: var(--ink-2); }
.wizard-progress li.is-current::before { background-size: 100% 100%; }
.wizard-progress li.is-done::before { background: var(--ink); }
.wizard-panel { padding: 18px 20px 22px; }
.wizard-panel .no-js { display: grid; gap: 6px; }
html:not(.js) .wizard-panel + .wizard-panel { border-top: 1px solid var(--line); }
.js .reserve[data-step="1"] [data-panel]:not([data-panel="1"]),
.js .reserve[data-step="2"] [data-panel]:not([data-panel="2"]),
.js .reserve[data-step="3"] [data-panel]:not([data-panel="3"]) { display: none; }
.wizard-panel.go-next { animation: panel-next 300ms var(--ease-out) backwards; }
.wizard-panel.go-prev { animation: panel-prev 300ms var(--ease-out) backwards; }
@keyframes panel-next { from { opacity: 0; transform: translateX(20px); } }
@keyframes panel-prev { from { opacity: 0; transform: translateX(-20px); } }
.panel-title { display: flex; align-items: center; gap: 10px; min-height: var(--control-h-sm); margin-bottom: 14px; }
.panel-title h2 { flex: 1; min-width: 0; font-size: 19px; letter-spacing: -.02em; }
.panel-title h2:focus { outline: none; }
.wizard-back { display: grid; place-items: center; width: var(--control-h-sm); height: var(--control-h-sm); flex-shrink: 0; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); transition: background-color 150ms ease, box-shadow 150ms ease; }
.wizard-back .icon { width: 18px; height: 18px; stroke-width: 2.1; }
.wizard-back:active { transform: translateY(1px); }
.picked-chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: var(--control-h-sm); padding: 0 10px; border: 0; border-radius: var(--r-sm); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 13px; font-weight: 550; transition: background-color 150ms ease; }
.picked-chip .icon { width: 15px; height: 15px; color: var(--ink-3); }
.picked-chip .icon:last-child { width: 13px; height: 13px; opacity: .7; }
.picked-chip:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .wizard-back:hover { background: var(--surface-2); box-shadow: var(--shadow-1), inset 0 0 0 1px #b4bac4; }
  .picked-chip:hover { background: var(--line); }
  .picked-chip:hover .icon:last-child { opacity: 1; }
}

/* Comensales */
.guest-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.guest-chips button { display: grid; place-content: center; justify-items: center; gap: 1px; min-height: 60px; padding: 6px 4px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); font-variant-numeric: tabular-nums; font-family: var(--font-num); transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.guest-chips strong { font-size: 20px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.guest-chips small { font-size: 11.5px; font-weight: 450; color: var(--ink-3); transition: color 150ms ease; }
.guest-chips button:active { transform: translateY(1px); }
.guest-chips button[aria-pressed=true], .guest-chips .more-guests[aria-expanded=true] { background: var(--ink); color: #fff; box-shadow: none; }
.guest-chips button[aria-pressed=true] small, .guest-chips .more-guests[aria-expanded=true] small { color: rgb(255 255 255 / .7); }
.guest-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding: 10px 10px 10px 14px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.guest-more[hidden] { display: none; }
.guest-more label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.guest-more input { width: 86px; text-align: center; font-weight: 600; }
.reserve-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.reserve-note .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--ink-3); }
.reserve-note a { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* Calendario */
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-head strong { font-size: 15px; }
.calendar-head .icon-button:disabled { opacity: .3; cursor: default; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-week span { padding: 4px 0; text-align: center; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.calendar-grid { min-height: 280px; transition: opacity 150ms ease; }
.calendar-grid[aria-busy=true] { opacity: .45; }
.calendar-day { position: relative; display: grid; place-content: center; justify-items: center; gap: 3px; aspect-ratio: 1; min-height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.calendar-day i { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.calendar-day.state-open { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.calendar-day.state-open i { background: var(--olive); }
.calendar-day.state-full { background: repeating-linear-gradient(-45deg, #fdf0ee 0 5px, #fff 5px 10px); box-shadow: inset 0 0 0 1px #f5d0cc; color: var(--tomato-ink); }
.calendar-day.state-full i { background: var(--tomato); }
.calendar-day.state-full span { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.calendar-day.state-closed, .calendar-day.state-out { color: #b4bac4; font-weight: 450; cursor: default; }
.calendar-day.state-closed span { text-decoration: line-through; }
.calendar-day.is-today::after { content: ""; position: absolute; left: 50%; top: 5px; width: 14px; height: 2px; border-radius: 1px; background: var(--tile); translate: -50% 0; pointer-events: none; }
.calendar-day[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.calendar-day[aria-pressed=true] i { background: #fff; }
.calendar-day[aria-pressed=true]::after { background: #fff; }
.calendar-day[aria-pressed=true] span { text-decoration: none; }
.calendar-day:not(:disabled):active { transform: translateY(1px); }
.calendar-blank { aspect-ratio: 1; }
/* On wide screens the days are flatter, so the times fit on screen right under the calendar. */
@media (min-width: 761px) {
  .calendar-day, .calendar-blank { aspect-ratio: auto; height: 42px; }
  .calendar-grid { min-height: 230px; }
}
.calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 50%; }
.calendar-legend .lg-open { background: var(--olive); }
.calendar-legend .lg-full { background: var(--tomato); }
.calendar-legend .lg-closed { background: #e4cdbb; }
@media (hover: hover) and (pointer: fine) {
  .calendar-day.state-open:not([aria-pressed=true]):hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
  .guest-chips button:not([aria-pressed=true]):hover { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--ink); }
}

/* Horas */
.hours-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; }
.hour-day { color: var(--ink-3); font-size: 13px; font-weight: 450; letter-spacing: 0; }
.hour-board { display: grid; gap: 14px; min-height: 60px; }
.hour-board.is-loading { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
.hour-board[aria-busy=true] { opacity: .5; }
.hour-group h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.hour-group h4 .icon { width: 15px; height: 15px; }
.hour-group.lunch h4 .icon { color: var(--chart-lunch); }
.hour-group.dinner h4 .icon { color: var(--chart-dinner); }
.hour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
.hour { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 48px; padding: 5px 4px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease; }
.hour small { font-size: 11px; font-weight: 500; color: var(--olive-ink); }
.hour.enter { animation: slot-in 300ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 14ms); }
.hour:not(:disabled):active { transform: translateY(1px); }
.hour[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.hour[aria-pressed=true] small { color: rgb(255 255 255 / .8); }
.hour.is-taken { cursor: not-allowed; background: repeating-linear-gradient(-45deg, var(--sunk) 0 6px, #fdf6ee 6px 12px); box-shadow: none; color: #98a0ab; }
.hour.is-taken strong { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.hour.is-taken small { color: #98a0ab; }
.hour-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-3); }
.hour-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hour-legend i { width: 14px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line-2); }
.hour-legend .lg-taken { background: repeating-linear-gradient(-45deg, var(--sunk) 0 3px, #fdf6ee 3px 6px); box-shadow: none; }
.hour-empty { display: grid; justify-items: start; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13.5px; }
.hour-empty strong { color: var(--ink); font-size: 14.5px; }
.hour-skeleton { min-height: 48px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--sunk) 0 40%, #fdf6ee 50%, var(--sunk) 60% 100%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
@media (hover: hover) and (pointer: fine) {
  .hour:not(:disabled):not([aria-pressed=true]):hover { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--ink); }
}

/* Datos */
.summary-box { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; padding: 10px 14px 10px 10px; border: 0; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-align: left; transition: box-shadow 150ms ease, background-color 150ms ease; }
.summary-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--tomato); color: #fff; }
.summary-icon .icon { width: 18px; height: 18px; }
.summary-text { display: grid; flex: 1; min-width: 0; gap: 1px; line-height: 1.3; }
.summary-text strong { font-size: 14.5px; }
.summary-text span { color: var(--ink-3); font-size: 13px; font-weight: 450; }
.summary-change { flex-shrink: 0; color: var(--ink); font-size: 13px; font-weight: 550; text-decoration: underline; text-underline-offset: 3px; }
.summary-box:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .summary-box:hover { box-shadow: inset 0 0 0 1px #b4bac4; background: var(--surface); }
}
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; transition: opacity 200ms ease; }
.details-grid .full { grid-column: 1 / -1; }
.note-toggle summary { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; list-style: none; }
.note-toggle summary::-webkit-details-marker { display: none; }
.note-toggle summary .icon { width: 16px; height: 16px; }
.note-toggle[open] summary { margin-bottom: 8px; color: var(--ink); }
.note-toggle textarea { min-height: 84px; }

/* Confirmar */
.confirm-button { margin-top: 22px; }
.confirm-button .icon { transition: transform 200ms var(--ease-out); }
.reserve-trust { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0 0; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.reserve-trust .icon { width: 14px; height: 14px; flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .confirm-button:hover .icon { transform: translateX(2px); }
}

@media (max-width: 760px) {
  body.direct::before { height: 380px; }
  .direct-main { padding: 28px var(--gutter) 24px; }
  .reserve-hero { padding: 0 6px 20px; }
  .wizard-panel { padding: 16px 16px 20px; }
  .wizard-progress { padding: 14px 16px 0; }
  .js body.direct:has(.reserve:not([data-step="1"]))::before { height: 210px; }
  .details-grid { grid-template-columns: 1fr; }
  .calendar-week, .calendar-grid { gap: 3px; }
  .calendar-day { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .reserve-logo, .reserve-card, .wizard-panel.go-next, .wizard-panel.go-prev { animation: none; }
  .reserve-hero, .reserve-logo, .reserve-hero h1, .hero-more, body.direct::before { transition: none; }
}

/* Configuración: enlace para Google */
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.share-box code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; font: 500 13.5px/1.4 var(--font); color: var(--ink); }
.share-steps { display: grid; gap: 6px; margin: 14px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
/* Páginas de una reserva o de la lista de espera: franja corta, el icono dentro y el título debajo. */
body.direct.compact-band::before { height: 104px; }

/* ---------- Desplazamiento fluido ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body.public, body.direct { scroll-padding-top: 24px; }
/* Fixed and sticky bars get their own layer, so scrolling never repaints them. */
.topbar, .tabbar, .booking-submit, .settings-nav { transform: translateZ(0); backface-visibility: hidden; }
.drawer, .floor-scroll, .status-tabs, .day-shortcuts { overscroll-behavior-x: contain; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Configuración: agente de voz (claves de la API) */
.key-reveal { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px; border-radius: var(--r); background: var(--saffron-tint); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .35); animation: rise 300ms var(--ease-out) both; }
.key-reveal > strong { display: flex; align-items: center; gap: 8px; color: var(--saffron-ink); font-size: 14px; }
.key-reveal .icon { width: 16px; height: 16px; }
.key-reveal .share-box { background: #fff; }
.key-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: clip; }
.key-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 10px 10px 14px; background: var(--surface); }
.key-list li + li { border-top: 1px solid var(--line); }
.key-name { display: flex; align-items: baseline; gap: 8px; flex: 1 1 200px; min-width: 0; }
.key-name code { color: var(--ink-3); font: 500 12.5px/1.4 var(--font); }
.key-meta { flex: 1 1 220px; color: var(--ink-3); font-size: 12.5px; }
.key-form { display: grid; gap: 6px; margin-top: 14px; }
.key-form label { font-size: 13px; font-weight: 550; }
.key-form-row { display: flex; flex-wrap: wrap; gap: 8px; }
.key-form-row input { flex: 1 1 200px; min-width: 0; }

/* ==========================================================================
   Gestión (solo desarrolladores): clientes, cuentas, claves y sistema
   ========================================================================== */
.venue-chip.admin-chip { height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.admin-stats li { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.admin-stats strong { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.admin-stats span { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.admin-search { position: relative; max-width: 440px; margin-bottom: 16px; }
.admin-search .icon { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--ink-3); transform: translateY(-50%); pointer-events: none; }
.admin-search input { padding-left: 36px; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.client-grid .empty-state { grid-column: 1 / -1; }
.client-card { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); color: var(--ink); transition: box-shadow 150ms ease; }
.client-card.is-off { opacity: .7; }
.client-card:active { transform: translateY(1px); }
.client-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-top .restaurant-initial { width: 40px; height: 40px; border-radius: var(--r); font-size: 17px; }
.client-name { display: grid; flex: 1; min-width: 0; }
.client-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.client-name code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font: 500 12px/1.4 var(--font); }
.client-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.client-metrics span { display: grid; gap: 1px; padding: 8px 6px; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; font-weight: 450; line-height: 1.25; text-align: center; }
.client-metrics span + span { box-shadow: -1px 0 0 var(--line); }
.client-metrics strong { color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.client-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 12.5px; }
.client-foot .icon { width: 16px; height: 16px; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .client-card:hover { box-shadow: var(--shadow-2), 0 0 0 1px #b4bac4; }
  .client-card:hover .client-foot .icon { transform: translateX(2px); color: var(--ink); }
}
.client-heading { display: flex; align-items: center; gap: 14px; }
.client-heading .muted { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.page-heading > .actions form { margin: 0; }
.key-reveal p { margin: 0; color: var(--saffron-ink); font-size: 13px; }
.key-reveal .share-box span, .api-base span { color: var(--ink-3); font-size: 12.5px; font-weight: 550; }
.key-list li.is-off { opacity: .65; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.admin-form { max-width: 720px; }
.admin-form fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.admin-form legend { margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.admin-form .field label { margin: 0; }
.field-error { color: var(--tomato-ink); font-size: 12.5px; font-weight: 500; }
.has-error input { border-color: var(--tomato); }
.check-field { display: flex; align-items: center; gap: 10px; }
.check-field label { margin: 0; }
.tech-list { display: grid; gap: 0; margin: 0; }
.tech-list > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.tech-list > div:first-child { border-top: 0; }
.tech-list dt { display: grid; gap: 2px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.tech-list dt small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.tech-list dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; text-align: right; }
.tech-list code { font: 500 12.5px/1.4 var(--font); color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .admin-area .main-nav.admin-nav { display: flex; margin-left: auto; }
  .admin-area .main-nav.admin-nav a span { display: none; }
  .admin-area .admin-chip { display: none; }
  .admin-area .app-main { padding-bottom: 48px; }
  .client-grid { grid-template-columns: 1fr; }
  .client-heading .restaurant-initial { display: none; }
}

/* ==========================================================================
   Claridad: menú «Más», primeros pasos, registro y accesos para restaurantes
   ========================================================================== */
.more-menu { margin-left: auto; }
.more-menu summary { display: inline-flex; border-radius: var(--r-sm); }
.more-menu summary .icon { width: 16px; height: 16px; }
.more-menu .account-menu { min-width: 240px; }
.first-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px 28px; align-items: center; margin-bottom: var(--page-gap); padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); animation: rise 360ms var(--ease-out) both; }
.first-steps h2 { margin-bottom: 4px; font-size: 16px; }
.first-steps p { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.first-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.first-steps a { display: flex; align-items: flex-start; gap: 10px; height: 100%; padding: 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); transition: box-shadow 150ms ease, background-color 150ms ease; }
.first-steps a:active { transform: translateY(1px); }
.first-steps a > span:last-child { display: grid; gap: 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.first-steps strong { color: var(--ink); font-size: 13.5px; }
.first-steps .step-dot, .register-steps .step-dot { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .first-steps a:hover { background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px #b4bac4; }
}
.share-help { margin-top: 12px; }
.share-help summary { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; list-style: none; }
.share-help summary::-webkit-details-marker { display: none; }
.share-help summary .icon { width: 16px; height: 16px; }
.share-help .share-steps { margin-top: 10px; }
.register-steps { display: grid; gap: 14px; max-width: 440px; margin: 28px 0 0; padding: 0; list-style: none; }
.register-steps li { display: flex; align-items: flex-start; gap: 12px; }
.register-steps p { display: grid; gap: 2px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.register-steps strong { color: var(--ink); font-size: 14.5px; }
.register-form legend { color: var(--ink-2); font-weight: 600; }
.register-form .field, .admin-form .field { display: grid; gap: 6px; margin-bottom: 14px; }
.register-form .field label { margin: 0; }
.login-switch { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; }
.public-header nav .button.small { margin-left: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 960px) {
  .first-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .first-steps ol { grid-template-columns: 1fr; }
  .public-header nav .login-link { display: none; }
  .owner-actions, .owner-actions .button { width: 100%; }
}

/* Cabeceras: blancas y lisas, con un borde fino */
.public-header { border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .85); }
.topbar { background: rgb(255 255 255 / .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }

/* Filas con campos: todo lo que va en la misma fila mide lo mismo que un campo */
.agenda-toolbar .more-menu summary { min-height: var(--control-h); padding: 0 var(--control-px-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.key-form-row .button, .guest-more .button { flex-shrink: 0; }

/* Agenda en el móvil: buscador + «Más» en una fila; fecha + comida/cena en la otra */
@media (max-width: 760px) {
  .agenda-toolbar { display: grid; grid-template-columns: var(--control-h) minmax(0, 1fr) var(--control-h); gap: 8px; }
  .agenda-toolbar #agenda-filters { display: contents; }
  .agenda-toolbar .search-box { grid-column: 1 / 3; grid-row: 1; }
  .agenda-toolbar .more-menu { grid-column: 3; grid-row: 1; margin: 0; }
  .agenda-toolbar .filter-date { grid-column: 1; grid-row: 2; }
  .agenda-toolbar .segmented { grid-row: 2; }
  .agenda-toolbar .more-menu summary { justify-content: center; width: var(--control-h); padding: 0; border-radius: var(--r-sm); }
  .agenda-toolbar .more-menu summary span { display: none; }
}
/* Casillas: la casilla a la izquierda, su texto al lado y la ayuda debajo del texto. */
form p:has(> input[type=checkbox]) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
form p:has(> input[type=checkbox]) > input { grid-row: 1; grid-column: 1; width: 18px; height: 18px; margin: 0; }
form p:has(> input[type=checkbox]) > label { grid-row: 1; grid-column: 2; margin: 0; }
form p:has(> input[type=checkbox]) > .helptext { grid-column: 2; margin-top: 2px; }


/* ==========================================================================
   Clientes, riesgo de no-show, lista de espera, recordatorios e informes
   ========================================================================== */

/* Etiquetas de cliente y de asistencia */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 5px; background: var(--sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.tag .icon { width: 12px; height: 12px; }
.tag-vip { background: #fef6dd; color: #8a4b04; }
.tag-vip .icon { color: #d97706; fill: currentColor; }
.tag-regular { background: var(--olive-tint); color: var(--olive-ink); }
.tag-new { background: var(--tile-tint); color: var(--tile-ink); }
.tag-noshow { background: var(--plum-tint); color: var(--plum-ink); }
.guest-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.vip-badge, .risk-badge, .attending-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 550; }
.vip-badge { color: #8a4b04; }
.vip-badge .icon { color: #d97706; fill: currentColor; }
.risk-badge.risk-high { color: var(--tomato-ink); }
.risk-badge.risk-high .icon { color: var(--tomato); }
.risk-badge.risk-medium { color: var(--saffron-ink); }
.risk-badge.risk-medium .icon { color: var(--saffron); }
.attending-badge { color: var(--olive-ink); }
.risk-chip { display: inline-flex; align-items: center; gap: 5px; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .16); font-size: 12px; font-weight: 550; }
/* El horario del día cuando no es el de siempre: cerrado (ámbar) o solo comida / solo cena */
.schedule-chip { display: inline-flex; align-items: center; gap: 5px; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); background: var(--sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12px; font-weight: 550; white-space: nowrap; }
.schedule-chip .icon { width: 13px; height: 13px; }
.schedule-chip.is-closed { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .25); }
.schedule-short { display: none; }
/* With the day's hours beside it, the risk says it short: both fit on one line and the header keeps its height */
.risk-chip.with-schedule .risk-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.risk-chip.with-schedule .risk-short { display: inline; }
.risk-chip .icon { width: 13px; height: 13px; }

/* Detalle de la reserva: ficha del cliente y asistencia */
.guest-card { display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.guest-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guest-card-head h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.guest-card-head h3 .icon { width: 16px; }
.guest-prefs { padding: 10px 12px; border-radius: var(--r-sm); background: var(--saffron-tint); box-shadow: inset 3px 0 0 var(--saffron); color: var(--ink); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.attendance { display: grid; gap: 10px; padding: 14px 16px; margin: 0 0 18px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.attendance.risk-high:not(.is-confirmed) { background: #fef4f2; box-shadow: inset 0 0 0 1px #f5d0cc; }
.attendance.risk-medium:not(.is-confirmed) { background: #fffaf0; box-shadow: inset 0 0 0 1px #f8dfa8; }
.attendance.is-confirmed { background: var(--olive-tint); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); }
.attendance-ok { display: flex; align-items: center; gap: 10px; color: var(--olive-ink); }
.attendance-ok .icon { width: 20px; height: 20px; }
.attendance-ok span { display: grid; font-size: 13px; }
.attendance-ok strong { font-size: 14px; }
.risk-pill { display: inline-flex; align-items: center; gap: 5px; height: var(--pill-h); padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 550; background: var(--sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }
.risk-pill .icon { width: 14px; height: 14px; }
.risk-pill.risk-high { background: var(--tomato-tint); color: var(--tomato-ink); }
.risk-pill.risk-medium { background: var(--saffron-tint); color: var(--saffron-ink); }
.risk-pill.risk-low { background: var(--olive-tint); color: var(--olive-ink); }
.risk-reasons { display: grid; gap: 4px; margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; }
.attendance-state { color: var(--ink-2); font-size: 13.5px; }
.attendance-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.attendance-actions form { margin: 0; }

/* Agenda: lista de espera del día */
.waitlist-box { margin-top: 16px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.waitlist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.waitlist-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.waitlist-head h2 .icon { width: 16px; height: 16px; color: var(--ink-3); }
.waitlist-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--sunk); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.waitlist-help { margin: 6px 0 12px; color: var(--ink-3); font-size: 12.5px; }
.waitlist-items { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: clip; }
.waitlist-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: var(--surface); }
.waitlist-item + .waitlist-item { border-top: 1px solid var(--line); }
.waitlist-item.has-room { background: #f3fbf6; box-shadow: inset 3px 0 0 var(--olive); }
.waitlist-guests { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.waitlist-guests .icon { width: 14px; height: 14px; color: var(--ink-3); }
.waitlist-main { display: grid; gap: 2px; min-width: 0; }
.waitlist-main > strong { font-size: 13.5px; }
.waitlist-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; color: var(--ink-3); font-size: 12.5px; }
.waitlist-meta a { color: var(--tile-ink); font-weight: 500; }
.waitlist-sent { display: inline-flex; align-items: center; gap: 4px; color: var(--tile-ink); font-weight: 500; }
.waitlist-sent .icon { width: 13px; height: 13px; }
.waitlist-note { color: var(--ink-2); font-size: 12.5px; font-style: italic; overflow-wrap: anywhere; }
.waitlist-room { display: inline-flex; align-items: center; gap: 5px; color: var(--olive-ink); font-size: 12.5px; font-weight: 550; }
.waitlist-room .icon { width: 14px; height: 14px; }
.waitlist-actions { display: flex; align-items: center; gap: 6px; }
.waitlist-actions form { margin: 0; }

/* Clientes */
.guest-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.guest-toolbar .search-box { max-width: 520px; }
.order-select select { width: auto; min-width: 210px; padding: 0 36px 0 12px; background-color: var(--surface); }
.guest-list { display: grid; gap: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: clip; }
.guest-list > * + * { border-top: 1px solid var(--line); }
.guest-list > .empty-state { border-radius: 0; box-shadow: none; }
.guest-row { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) 72px minmax(0, 150px) 20px; align-items: center; gap: 16px; min-height: 60px; padding: 10px 16px; background: var(--surface); transition: background-color 150ms ease; }
.guest-row:active { background: var(--surface-2); }
.res-avatar.is-vip, .restaurant-initial.is-vip { background: #fef6dd; color: #8a4b04; box-shadow: inset 0 0 0 1.5px #f2c94c; }
.guest-name { display: grid; gap: 4px; min-width: 0; }
.guest-name strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-name .guest-tags { gap: 4px; font-size: 12.5px; }
.guest-contact { display: grid; gap: 1px; min-width: 0; color: var(--ink-3); font-size: 12.5px; }
.guest-contact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-figure { display: grid; justify-items: center; line-height: 1.2; }
.guest-figure strong { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.guest-figure span { color: var(--ink-3); font-size: 11.5px; font-weight: 450; }
.guest-when { display: grid; gap: 1px; color: var(--ink-3); font-size: 12px; font-weight: 450; }
.guest-when strong { color: var(--ink); font-size: 13px; font-weight: 550; }
.guest-next { display: inline-flex; align-items: center; gap: 5px; color: var(--olive-ink); font-size: 12.5px; font-weight: 550; }
.guest-next .icon { width: 14px; height: 14px; }
.guest-go .icon { width: 16px; height: 16px; color: var(--ink-3); }
.guest-privacy { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.guest-privacy .icon { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .guest-row:hover { background: #fafbfc; }
  .guest-row:hover .guest-go .icon { color: var(--ink); }
}
.next-visit { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--r); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); }
.next-visit > .icon { width: 18px; height: 18px; }
.next-visit span { display: grid; flex: 1; font-size: 13px; }
.next-visit strong { font-size: 14px; color: var(--ink); }
.waiting-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-right: 16px; background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); }
.guest-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.guest-facts div { display: grid; gap: 2px; }
.guest-facts dt { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.guest-facts dd { margin: 0; font-weight: 550; }
.guest-facts a { color: var(--tile-ink); }
.history-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: clip; }
.history-list li + li { border-top: 1px solid var(--line); }
.history-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 12px 8px 14px; background: var(--surface); transition: background-color 150ms ease; }
.history-date { display: grid; min-width: 0; }
.history-date strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-date span { color: var(--ink-3); font-size: 12.5px; }
.history-list .icon { width: 16px; height: 16px; color: var(--ink-3); }
.history-sub { margin: 20px 0 10px; font-size: 13px; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .history-list a:hover { background: #fafbfc; }
}

/* Lista de espera (cliente) */
.waitlist-card { padding: var(--card-pad); }
.waitlist-intro { display: flex; gap: 12px; margin-bottom: 18px; }
.waitlist-intro .section-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.waitlist-intro h2 { font-size: 19px; margin-bottom: 4px; }
.waitlist-intro p { color: var(--ink-2); font-size: 13.5px; }
.waitlist-card .form-errors { margin: 0 0 16px; }
.waitlist-form .details-grid, .standalone-form .details-grid { margin-bottom: 16px; }
.waitlist-form .field, .standalone-form .details-grid .field { display: grid; align-content: start; gap: 0; margin: 0; }
.service-choice { margin: 0; padding: 0; border: 0; min-width: 0; }
.service-choice legend, .register-form .service-choice legend { margin-bottom: 6px; padding: 0; color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.service-choice > div { display: flex; flex-wrap: wrap; gap: 6px; }
.service-choice label { position: relative; display: inline-flex; align-items: center; height: var(--control-h-sm); padding: 0 12px; margin: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.service-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.service-choice label:has(input:checked) { background: var(--ink); color: #fff; box-shadow: none; }
.service-choice label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.check-field { margin: 0; }
.check-field label { font-size: 13.5px; color: var(--ink-2); font-weight: 450; }
.room-now { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 12px 16px; margin: 0 0 18px; border-radius: var(--r); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); text-align: left; }
.room-now span { display: grid; font-size: 13px; }
.room-now strong { font-size: 14px; color: var(--ink); }
.panel-room { max-width: 680px; }
.waitlist-back { margin: 18px 0 0; }
.confirmation-badge.waiting { background: var(--tile); box-shadow: 0 0 0 8px var(--tile-tint); }
.confirmation-badge .icon { width: 30px; height: 30px; }
.waitlist-explain { max-width: 46ch; margin: 16px 0; color: var(--ink-2); line-height: 1.6; }
.waitlist-status .room-now { margin-top: 16px; width: 100%; }
.waitlist-status form { margin: 6px 0 14px; }

/* Página de reservas: enlace a la lista de espera */
.waitlist-link { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); font-size: 13.5px; line-height: 1.45; transition: background-color 150ms ease; }
.waitlist-link span { flex: 1; }
.waitlist-link strong { color: var(--tile-ink); }
.waitlist-link .icon { width: 18px; height: 18px; }
.hour-empty a.button { justify-self: center; }
.reserve-card .check-field { margin-top: 4px; }

/* Página del cliente: confirmar asistencia */
.attend-form { display: grid; justify-items: center; gap: 0; width: min(100%, 360px); margin: 20px 0 6px; }
.attend-done { display: inline-flex; align-items: center; gap: 8px; margin: 20px 0 6px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); font-weight: 550; }

/* Informes */
.period-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.period-switch a { display: inline-flex; align-items: center; height: calc(var(--control-h) - 6px); padding: 0 12px; border-radius: var(--r-xs); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.period-switch a[aria-current=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; padding: 0; list-style: none; }
.kpi { display: grid; align-content: start; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.kpi-label { color: var(--ink-3); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.kpi-delta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--ink-3); font-weight: 550; }
.kpi-delta .icon { width: 14px; height: 14px; }
.kpi-delta > span { color: var(--ink-3); font-weight: 450; }
.kpi-delta.is-better { color: var(--olive-ink); }
.kpi-delta.is-worse { color: var(--tomato-ink); }
.kpi-hint { color: var(--ink-3); }
.report-grid { display: grid; }
.report-card { min-width: 0; padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.report-head p { margin-top: 2px; color: var(--ink-3); }
.report-head .text-link { flex-shrink: 0; margin-top: 2px; }

/* Columnas: una serie, un color; barras finas con extremo redondeado y base recta. */
.column-chart { position: relative; display: grid; grid-template-rows: 200px auto; padding-left: 34px; }
.chart-grid { position: absolute; inset: 0 0 auto 34px; height: 200px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { position: relative; border-top: 1px dashed var(--line); }
.chart-grid span[data-value]::before { content: attr(data-value); position: absolute; right: calc(100% + 8px); top: -8px; color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.columns { position: relative; display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); align-items: end; gap: 2px; height: 200px; margin: 0; padding: 0; list-style: none; }
.columns li { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; outline: none; cursor: default; }
.column { position: relative; width: min(100%, 22px); height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--gold); transition: background-color 120ms ease; }
.column b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: var(--ink); font-size: 11.5px; font-weight: 600; }
.columns li:hover .column, .columns li:focus-visible .column { background: var(--tile-ink); }
.columns li:focus-visible { box-shadow: inset 0 0 0 2px var(--tile); border-radius: 4px; }
.chart-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 5; transform: translateX(-50%); padding: 5px 9px; border-radius: var(--r-xs); background: #15171c; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 120ms ease; }
.columns li:first-child .chart-tip, .columns li:nth-child(2) .chart-tip { left: 0; transform: none; }
.columns li:last-child .chart-tip, .columns li:nth-last-child(2) .chart-tip { left: auto; right: 0; transform: none; }
.columns li:hover .chart-tip, .columns li:focus-visible .chart-tip { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 12px; }
.chart-table { margin-top: 12px; font-size: 13.5px; }
.chart-table summary { cursor: pointer; color: var(--tile-ink); font-weight: 500; width: fit-content; }
.chart-table table { width: 100%; max-width: 360px; margin-top: 10px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.chart-table th, .chart-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.chart-table th { color: var(--ink-3); font-weight: 500; }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; }

/* Barras horizontales: etiqueta, barra y valor en la punta. */
.bar-list { display: grid; margin: 0; padding: 0; list-style: none; }
.bar-list li { display: grid; align-items: center; gap: 12px; }
.bar-label { color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; border-radius: 0 3px 3px 0; background: var(--surface-2); }
.bar { display: block; width: var(--w); min-width: 2px; height: 100%; border-radius: 0 3px 3px 0; background: var(--gold); }
.bar-value { justify-items: end; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); line-height: 1.2; }
.bar-value small { color: var(--ink-3); font-weight: 450; }
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.fact-grid div { display: grid; gap: 2px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.fact-grid dt { color: var(--ink-3); font-weight: 500; }
.fact-grid dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 0; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.fact-grid dd small { color: var(--ink-3); font-weight: 450; letter-spacing: 0; }
.top-guests { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); overflow: clip; }
.top-guests li + li { border-top: 1px solid var(--line); }
.top-guests a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px 8px 10px; background: var(--surface); transition: background-color 150ms ease; }
.top-guests strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.top-guests span:last-child { color: var(--ink-3); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .top-guests a:hover { background: #fafbfc; }
}
.meter-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; border-top: 1px solid var(--line); }
.meter-block:first-of-type { border-top: 0; padding-top: 0; }
.meter-block p { grid-column: 1 / -1; color: var(--ink-2); }
.meter-block p strong { color: var(--ink); }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.meter span { display: block; width: var(--w); height: 100%; border-radius: 3px; background: var(--gold); }
.meter-caption { color: var(--ink-2); font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

@media (max-width: 1060px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guest-row { grid-template-columns: 32px minmax(0, 1.4fr) 72px minmax(0, 150px) 20px; }
  .guest-contact { display: none; }
}
@media (max-width: 900px) {
  .report-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 24px; }
  .kpi-delta > span { display: none; }
  .page-heading > .actions { width: 100%; }
  .page-heading > .actions .period-switch { flex: 1 0 100%; }
  .period-switch { display: flex; width: 100%; min-width: 0; }
  .period-switch a { flex: 1; justify-content: center; min-width: 0; padding: 0 8px; }
  .guest-row { grid-template-columns: minmax(0, 1fr) 60px 18px; gap: 10px; min-height: 58px; padding: 10px 12px 10px 14px; }
  .guest-row .res-avatar, .guest-when { display: none; }
  .order-select, .order-select select { width: 100%; }
  .guest-toolbar .search-box { flex-basis: 100%; max-width: none; }
  .waitlist-item { grid-template-columns: 46px minmax(0, 1fr); }
  .waitlist-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .column-chart { grid-template-rows: 160px auto; }
  .chart-grid, .columns { height: 160px; }
  .bar-list li { grid-template-columns: 76px minmax(0, 1fr) 48px; gap: 10px; }
  .bar-list.wide-label li { grid-template-columns: 112px minmax(0, 1fr) 52px; }
  .guest-facts { grid-template-columns: minmax(0, 1fr); }
  .fact-grid dd { font-size: 20px; }
}
@media print {
  .waitlist-box { display: none; }
}
.field.check-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
.session-note { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); font-size: 13.5px; }
.session-note .icon { width: 16px; height: 16px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: #fef4f2; box-shadow: inset 0 0 0 1px #f5d0cc; }
.danger-zone > div { flex: 1 1 320px; }
.danger-zone p { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }
.danger-zone form { margin: 0; }

/* ==========================================================================
   Editor del plano: salas, barra de herramientas y panel lateral
   ========================================================================== */
.room-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.room-bar .zone-tabs { margin: 0; min-width: 0; padding: 2px; }
.room-add { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; min-height: 48px; padding: 0 14px 0 12px; border: 1px dashed var(--line-2); border-radius: var(--r); background: transparent; color: var(--ink-2); font-weight: 500; font-size: 13px; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.room-add .icon { width: 16px; height: 16px; }
.room-add:active { transform: translateY(1px); }

.editor-toolbar { position: sticky; top: calc(var(--bar-h) + 10px); z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px; margin-bottom: 12px; border-radius: var(--r); background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); animation: drop-in 200ms var(--ease-out); }
.editor-toolbar[hidden] { display: none; }
.tool-group { display: flex; align-items: center; gap: 2px; }
.tool-group + .tool-group { padding-left: 6px; border-left: 1px solid var(--line); }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: var(--control-h-sm); height: var(--control-h-sm); padding: 0 8px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; transition: background-color 140ms ease, color 140ms ease; }
.tool .icon { width: 16px; height: 16px; }
.tool:active:not(:disabled) { transform: translateY(1px); }
.tool[aria-pressed=true] { background: var(--tile-tint); color: var(--tile-ink); }
.tool:disabled { opacity: .35; }
.tool-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 8px; color: var(--ink-3); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.tool-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.has-changes .tool-status { color: var(--saffron-ink); }
.has-changes .tool-status::before { background: var(--saffron); box-shadow: 0 0 0 3px rgb(245 158 11 / .2); }
.tool-group.tool-end { gap: 6px; padding-left: 0; border-left: 0; }
@media (hover: hover) and (pointer: fine) {
  .tool:not(:disabled):not([aria-pressed=true]):hover { background: var(--sunk); color: var(--ink); }
  .room-add:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface); }
}

.editor-card { padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.editor-card h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.editor-card h3 .icon { width: 16px; height: 16px; color: var(--ink-3); }
.editor-card > .pane-hint:first-of-type { margin: -6px 0 12px; }
.inspector-pane[hidden] { display: none; }
.pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pane-head > div { min-width: 0; flex: 1; }
.pane-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.pane-icon .icon { width: 17px; height: 17px; }
.pane-icon.table { background: var(--tomato-tint); color: var(--tomato); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .14); }
.pane-icon.landmark-icon { background: var(--plum-tint); color: var(--plum-ink); box-shadow: inset 0 0 0 1px rgb(134 50 95 / .12); }
.pane-kicker { color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.pane-head h2 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-head .icon-button { flex-shrink: 0; }
.pane-field { display: grid; gap: 6px; margin: 0 0 12px; }
.pane-field > span { font-size: 13px; font-weight: 500; }
.pane-field input { min-width: 0; }
.pane-pair { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; }
.pane-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pane-actions .text-danger:disabled { opacity: .4; }
.move-pair { display: flex; gap: 4px; }
.move-pair .tool { box-shadow: inset 0 0 0 1px var(--line-2); }
.pane-hint { margin-top: 12px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.picker-label { margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.shape-picker button, .shape-picker label, .floor-swatches button, .floor-swatches label { display: flex; align-items: center; gap: 8px; min-height: var(--control-h-sm); padding: 0 10px; margin: 0; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 150ms ease, box-shadow 150ms ease; }
.floor-swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.shape-picker button:active, .floor-swatches button:active { transform: translateY(1px); }
.shape-picker button[aria-pressed=true], .floor-swatches button[aria-pressed=true], .shape-picker label:has(input:checked), .floor-swatches label:has(input:checked) { background: var(--tile-tint); box-shadow: inset 0 0 0 1.5px var(--tile); color: var(--tile-ink); }
.shape-picker label input, .floor-swatches label input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.shape-picker label:has(input:focus-visible), .floor-swatches label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.room-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-picker button { justify-content: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shape-picker.layout-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-picker button, .layout-picker label { flex-direction: column; justify-content: center; gap: 4px; min-height: 54px; padding: 6px 4px; font-size: 12px; }
.floor-swatch { width: 20px; height: 20px; flex-shrink: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px rgb(16 24 40 / .12); }
/* Muestras de suelo: la misma trama que el plano, algo más marcada para que se lea en 20 px */
.floor-swatch.floor-tiles { background: linear-gradient(90deg, #d0d5dd 1px, transparent 1px) 0 0 / 5px 100%, linear-gradient(#d0d5dd 1px, transparent 1px) 0 0 / 100% 5px, #fff; }
.floor-swatch.floor-wood { background: linear-gradient(#d0d5dd 1px, transparent 1px) 0 0 / 100% 4px, #fcfbf9; }
.floor-swatch.floor-stone { background: linear-gradient(90deg, #d0d5dd 1px, transparent 1px) 0 0 / 10px 100%, linear-gradient(#d0d5dd 1px, transparent 1px) 0 0 / 100% 10px, #f8f9fb; }
.floor-swatch.floor-carpet { background: #ece9f1; }
.floor-swatch.floor-garden { background: #dcebdc; }
.swatch.room-wide { width: 24px; height: 15px; border-radius: 3px; }
.swatch.room-long { width: 28px; height: 13px; border-radius: 3px; }
.swatch.room-square { width: 17px; height: 17px; border-radius: 3px; }
.shape-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.landmark-palette { margin: 0; }
.editor-keys { padding: 0 6px; font-size: 12.5px; color: var(--ink-2); }
.editor-keys summary { display: inline-flex; align-items: center; gap: 7px; min-height: var(--control-h-sm); cursor: pointer; font-weight: 500; color: var(--ink-2); list-style: none; }
.editor-keys summary::-webkit-details-marker { display: none; }
.editor-keys summary .icon { width: 15px; height: 15px; }
.editor-keys dl { display: grid; gap: 8px; margin: 4px 0 0; }
.editor-keys dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.editor-keys dt { white-space: nowrap; }
.editor-keys dd { margin: 0; }
.editor-keys kbd { margin-right: 2px; }
.floor.editing .landmark.selected, .floor.editing .selected .table-top { outline: 2px solid var(--tile); outline-offset: calc(.6 * var(--cq, 1cqw)); }

.room-dialog { width: min(500px, calc(100vw - 32px)); }
.room-dialog form { display: grid; }
.room-dialog-icon { background: var(--tile-tint); color: var(--tile); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .14); }
.room-dialog .muted { margin-bottom: 4px; }
.room-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.dialog-choices { margin: 4px 0 8px; padding: 0; border: 0; min-width: 0; }
.dialog-choices legend { margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.dialog-choices .floor-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.room-dialog .dialog-actions { margin-top: 18px; }

@media (max-width: 1060px) {
  .editor-toolbar { top: calc(var(--bar-h) + 6px); }
}
@media (max-width: 760px) {
  .room-bar { flex-wrap: wrap; }
  .room-bar .zone-tabs { flex-basis: 100%; }
  .room-add { min-height: var(--control-h-sm); }
  .tool.labeled span { display: none; }
  .tool-status { justify-content: center; margin: 0; }
  .tool-group.tool-end { margin-left: auto; }
  .dialog-choices .floor-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .room-bar .zone-tab { flex: 0 0 auto; }
  .editor-toolbar { gap: 4px 6px; }
  .tool-status { order: 0; flex-basis: auto; margin-left: auto; padding: 0 6px; font-size: 12px; }
  .tool-group.tool-end { flex-basis: 100%; margin: 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
  .tool-group.tool-end .button { flex: 1; }
}

/* Mesas unidas: una sola pieza, cada mesa con su número */
.floor-table.is-joined .table-top { box-shadow: none; }
.floor-table.join-r .table-top { border-right-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.floor-table.join-b .table-top { border-bottom-width: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.floor-table.join-l .table-top { border-left: max(1px, calc(.14 * var(--cq, 1cqw))) dashed rgb(16 24 40 / .25); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.floor-table.join-t .table-top { border-top: max(1px, calc(.14 * var(--cq, 1cqw))) dashed rgb(16 24 40 / .25); border-top-left-radius: 0; border-top-right-radius: 0; }
.floor-table.is-occupied.join-l .table-top, .floor-table.is-occupied.join-t .table-top { border-left-color: rgb(255 255 255 / .35); border-top-color: rgb(255 255 255 / .35); }
@media (hover: hover) and (pointer: fine) {
  .floor:not(.editing) .floor-table.is-joined:hover { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); }
}
.join-state { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); font-size: 13px; font-weight: 500; line-height: 1.45; }
.join-state[hidden], [data-join-options][hidden], .join-split[hidden] { display: none; }
.join-hint { margin: 0 0 8px; }
.join-split { margin-top: 8px; }
.joined-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 5px; border-radius: 5px; background: var(--saffron-tint); color: var(--saffron-ink); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.joined-tag .icon { width: 12px; height: 12px; }

/* Varios restaurantes por cuenta: selector en la barra superior */
.venue-switch { position: relative; }
.venue-switch > summary { gap: 8px; border-radius: var(--r-sm); cursor: pointer; list-style: none; transition: background-color 150ms ease, color 150ms ease; }
.venue-switch > summary::-webkit-details-marker { display: none; }
.venue-switch > summary .icon { width: 14px; height: 14px; flex-shrink: 0; transition: transform 200ms var(--ease-out); }
.venue-switch[open] > summary { background: var(--sunk); }
.venue-switch[open] > summary .icon { transform: rotate(180deg); }
.venue-menu { left: 0; right: auto; min-width: 280px; }
.venue-option { justify-content: flex-start; }
.venue-option > span:not(.restaurant-mini) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venue-option[aria-current=true] { background: var(--sunk); }
.venue-option .icon { color: var(--ink); }
.restaurant-mini { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .14); font-size: 12px; font-weight: 600; }
.menu-label { margin: 6px 10px 2px; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.venue-list { display: grid; }
.account-menu .venue-list.show-sm { display: none; }
@media (max-width: 760px) {
  .account-menu .venue-list.show-sm { display: grid; }
  .account-menu .menu-label.show-sm { display: block; }
}
@media (hover: hover) and (pointer: fine) {
  .venue-switch > summary:hover { background: var(--sunk); }
}
.my-restaurants { display: grid; gap: 0; max-width: 360px; margin: 24px 0 0; padding: 0; list-style: none; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); overflow: clip; }
.my-restaurants li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 550; }
.my-restaurants li + li { border-top: 1px solid var(--line); }
.session-alt { margin: -8px 0 18px; }

/* Estados del servicio */
.status-pending { background: var(--state-pending-tint); color: var(--state-pending-ink); }
.status-pending::before { background: var(--state-pending); }
.status-review { background: var(--tile-tint); color: var(--tile-ink); }
.status-review::before { background: var(--tile); }
.status-arrived { background: var(--state-arrived-tint); color: var(--state-arrived-ink); }
.status-arrived::before { background: var(--state-arrived); }
.status-at_bar { background: var(--state-bar-tint); color: var(--state-bar-ink); }
.status-at_bar::before { background: var(--state-bar); }
.status-dessert { background: var(--state-dessert-tint); color: var(--state-dessert-ink); }
.status-dessert::before { background: var(--state-dessert); }
.status-bill { background: var(--state-bill-tint); color: var(--state-bill-ink); }
.status-bill::before { background: var(--state-bill); }
.status-cleaning { background: var(--state-cleaning-tint); color: var(--state-cleaning-ink); }
.status-cleaning::before { background: var(--state-cleaning); }
.status-tabs .tab-pending > i { background: var(--state-pending); }
.status-tabs .tab-review > i { background: var(--tile); }
.status-tabs .tab-arrived > i { background: var(--state-arrived); }
.status-tabs .tab-at_bar > i { background: var(--state-bar); }
.status-tabs .tab-dessert > i { background: var(--state-dessert); }
.status-tabs .tab-bill > i { background: var(--state-bill); }
.status-tabs .tab-cleaning > i { background: var(--state-cleaning); }
.state-pending .res-avatar, .state-review .res-avatar { background: var(--state-pending-tint); color: var(--state-pending-ink); }
.state-arrived .res-avatar, .state-at_bar .res-avatar { background: var(--state-arrived-tint); color: var(--state-arrived-ink); }
.state-dessert .res-avatar, .state-bill .res-avatar, .state-cleaning .res-avatar { background: var(--olive-deep); color: #fff; }

/* Detalle: el siguiente paso y todos los estados agrupados */
.state-panel { gap: 12px; }
.state-panel .next-state { width: 100%; }
.state-group { display: grid; gap: 6px; }
.state-group-label { color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 6px; }
.state-grid form { margin: 0; }
.state-chip { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--control-h-sm); padding: 0 10px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; transition: background-color 140ms ease, box-shadow 140ms ease; }
.state-chip i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--line-2); }
.state-chip:active:not(:disabled) { transform: translateY(1px); }
.state-chip:disabled { opacity: .38; cursor: not-allowed; }
.state-chip[aria-pressed=true] { opacity: 1; background: var(--ink); color: #fff; box-shadow: none; cursor: default; }
.state-pending i { background: var(--state-pending); } .state-review i { background: var(--tile); } .state-confirmed i { background: var(--saffron); }
.state-arrived i { background: var(--state-arrived); } .state-at_bar i { background: var(--state-bar); } .state-seated i { background: var(--olive); }
.state-dessert i { background: var(--state-dessert); } .state-bill i { background: var(--state-bill); } .state-cleaning i { background: var(--state-cleaning); }
.state-completed i { background: #98a0ab; } .state-no_show i { background: #b4588d; } .state-cancelled i { background: var(--tomato); }
@media (hover: hover) and (pointer: fine) {
  .state-chip:not(:disabled):hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px #98a0ab; }
}
.ref-chip { display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 6px; border-radius: 5px; background: var(--sunk); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 11.5px; font-weight: 600; letter-spacing: .05em; font-variant-numeric: tabular-nums; font-family: var(--font-num); vertical-align: middle; }
.reference-line { margin-top: 6px; color: var(--ink-2); }
.reference-line strong { padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); letter-spacing: .06em; }

/* Agenda: botón de un toque para el siguiente paso */
.step-btn.step-dessert { --bg: var(--state-dessert); --bg-hover: var(--state-dessert-ink); }
.step-btn.step-bill { --bg: var(--state-bill); --bg-hover: var(--state-bill-ink); }
.step-btn.step-cleaning { --bg: var(--state-cleaning); --bg-hover: var(--state-cleaning-ink); }
.step-btn.step-seated { --bg: var(--olive-deep); --bg-hover: #166534; }
.step-btn.step-completed { --bg: var(--ink); --bg-hover: #272b35; }

/* Plano: qué pasa en cada mesa ocupada */
.floor-table.cur-dessert .table-top { background: var(--state-dessert); border-color: var(--state-dessert); }
.floor-table.cur-bill .table-top { background: var(--state-bill); border-color: var(--state-bill); }
.floor-table.cur-cleaning .table-top { background: var(--state-cleaning); border-color: var(--state-cleaning); }
.floor .floor-table.cur-dessert .chair, .floor .floor-table.cur-bill .chair, .floor .floor-table.cur-cleaning .chair { background: #d0d5dd; }
.floor .floor-table.cur-dessert .chair { background: #99d8d0; }

/* Exportar datos */
.export-form { display: grid; gap: 16px; }
.export-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 6px 12px; align-items: end; }
.export-dates label { display: grid; gap: 6px; margin: 0; }
.export-dates .field-hint { grid-column: 1 / -1; margin: 0; }
.export-form > .button { justify-self: start; }
@media (max-width: 760px) {
  .export-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Remaquetación: más ancho útil en pantallas grandes
   ========================================================================== */
.topbar-inner, .app-main { max-width: 1920px; }
.app-main { padding-top: 24px; }
.compact-heading { margin-bottom: 18px; }
.compact-heading h1 { font-size: var(--h1-size); }

/* Sala: el plano ocupa todo el ancho y cabe en la pantalla; el panel lateral solo aparece al editar */
.floor-layout { grid-template-columns: minmax(0, 1fr); --floor-chrome: 290px; }
[data-floor-region].is-editing .floor-layout { grid-template-columns: minmax(0, 1fr) 330px; --floor-chrome: 330px; }
[data-floor-region]:not(.is-editing) .floor-side { display: none; }
.room-bar { flex-wrap: wrap; row-gap: 10px; }
.floor-live { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-left: auto; }
.floor-live[hidden] { display: none; }
.live-counts { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.live-counts li { display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 12px; color: var(--ink-3); font-size: 13px; font-weight: 450; white-space: nowrap; }
.live-counts li + li { border-left: 1px solid var(--line); }
.live-counts b { color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.live-counts i { width: 10px; height: 10px; border-radius: 3px; }
.live-counts .l-occupied { background: var(--olive-deep); }
.live-counts .l-upcoming { background: #fffaeb; box-shadow: inset 0 0 0 1.5px #dc6803; }
.live-counts .l-free { background: #fff; box-shadow: inset 0 0 0 1.5px #98a2b3; }
.floor-live .floor-summary-actions { display: flex; gap: 8px; }
.floor-help { margin: 10px 4px 0; color: var(--ink-3); font-size: 12.5px; }
[data-floor-region].is-editing .floor-help, [data-floor-region].is-editing .freeing { display: none; }
/* The biggest plan that still fits the screen height, centred. */
.floor { width: min(100%, calc((100dvh - var(--floor-chrome)) * 1.6)); margin-inline: auto; }
.floor.layout-long { width: min(100%, calc((100dvh - var(--floor-chrome)) * 2)); }
.floor.layout-square { width: min(100%, calc(100dvh - var(--floor-chrome))); max-width: none; min-width: 520px; }
.floor-scroll { padding: 12px; }
.floor-side { top: calc(var(--bar-h) + 16px); align-self: start; padding: 2px 2px 16px; }
@media (max-width: 1060px) {
  [data-floor-region].is-editing .floor-layout { grid-template-columns: minmax(0, 1fr); }
  .floor-side { max-height: none; overflow: visible; }
  .floor, .floor.layout-long { width: 100%; }
  .floor.layout-square { width: min(100%, 720px); }
}
@media (max-width: 760px) {
  .floor-live { width: 100%; margin-left: 0; justify-content: space-between; }
  .live-counts { width: 100%; justify-content: space-between; }
  .live-counts li { flex: 1; justify-content: center; padding: 0 6px; font-size: 12px; }
  .floor-live .live-pill { display: none; }
  .floor-live .floor-summary-actions { width: 100%; }
  .floor-live .floor-summary-actions .button { flex: 1; }
  .floor.layout-square { width: 100%; min-width: 480px; }
}

/* Agenda: calendario entre las flechas, cabecera en una fila y columna lateral con sala y lista de espera */
.day-actions { flex-wrap: wrap; justify-content: flex-end; }
/* Cabecera del día fija: «Hoy» va a la izquierda de las flechas y su hueco queda reservado aunque no salga,
   así las flechas y «Nueva reserva» no se mueven al cambiar de día. */
.day-actions > .button[data-agenda-nav] { order: -1; min-height: var(--control-h); }
.day-arrows .date-jump { margin: 0; }  /* es una etiqueta de formulario: sin su margen inferior */
@media (min-width: 761px) { .day-actions { min-width: 324px; } }
@media (max-width: 760px) { .day-actions { min-width: 166px; } }
@media (max-width: 380px) { :root { --h1-size: 20px; } }  /* la fecha más larga sigue cabiendo en dos líneas */
.day-arrows { display: inline-flex; align-items: center; gap: 0; padding: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
.day-arrows .icon-button { width: 36px; height: var(--control-h); border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.day-arrows .icon-button:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.day-arrows .icon-button:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.day-arrows .icon-button + .icon-button { box-shadow: -1px 0 0 var(--line); }
.date-jump { position: relative; overflow: hidden; cursor: pointer; }
.date-jump input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; box-shadow: none; }
.date-jump input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.date-jump:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.agenda-side { display: grid; gap: 16px; align-content: start; position: sticky; top: calc(var(--bar-h) + 20px); max-height: calc(100dvh - var(--bar-h) - 36px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px; margin: -2px; }
.agenda-side .room { position: relative; top: auto; }
.agenda-side .waitlist-box { margin-top: 0; }
.agenda-side .waitlist-item { grid-template-columns: 46px minmax(0, 1fr); }
.agenda-side .waitlist-actions { grid-column: 1 / -1; justify-content: flex-end; }
@media (min-width: 1241px) {
  /* El título mide siempre lo que la fecha más larga («Miércoles, 30 de septiembre»): el resumen no se mueve. */
  .day-hero { grid-template-columns: calc(var(--h1-size) * 13.2) minmax(0, 1fr) auto; }
  .day-hero .day-sub { min-height: calc(var(--pill-h) * 2 + 6px); align-content: flex-start; }
  .day-hero .service-meter { grid-column: 2; grid-row: 1; align-self: stretch; align-content: center; padding: 12px 18px; }
  .day-hero .day-actions { grid-column: 3; grid-row: 1; }
}
@media (min-width: 1440px) {
  .agenda-layout { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 1240px) {
  .agenda-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .agenda-toolbar .segmented { grid-column: 1 / 4; }
}

/* Ajustes: menú de secciones fijo a la izquierda en pantallas anchas */
@media (min-width: 1241px) {
  .settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
  .settings-layout .settings-nav { flex-direction: column; align-items: stretch; width: auto; margin: 0; padding: 6px; border-radius: var(--r-lg); top: calc(var(--bar-h) + 20px); }
  .settings-layout .settings-nav a { justify-content: flex-start; }
}
/* Informes: más columnas cuando sobra ancho */
@media (min-width: 1500px) {
  .report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.next-state.status-btn-seated { --bg: var(--olive-deep); --bg-hover: #166534; }
.next-state.status-btn-dessert { --bg: var(--state-dessert); --bg-hover: var(--state-dessert-ink); }
.next-state.status-btn-bill { --bg: var(--state-bill); --bg-hover: var(--state-bill-ink); }
.next-state.status-btn-cleaning { --bg: var(--state-cleaning); --bg-hover: var(--state-cleaning-ink); }
.next-state.status-btn-completed { --bg: var(--ink); --bg-hover: #272b35; }

/* Agenda: lista más estrecha y el plano real de la sala, grande, al lado */
.map-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.map-tabs button { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; height: var(--control-h-sm); padding: 0 10px 0 8px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: 13px; font-weight: 500; transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.map-tabs button .floor-swatch { width: 14px; height: 14px; border-radius: 4px; }
.map-tabs button small { color: var(--olive-ink); font-size: 11.5px; font-weight: 550; }
.map-tabs button[aria-selected=true] { background: var(--ink); color: #fff; box-shadow: none; }
.map-tabs button[aria-selected=true] small { color: #a7f3c0; }
@media (hover: hover) and (pointer: fine) {
  .map-tabs button:not([aria-selected=true]):hover { background: var(--surface-2); color: var(--ink); }
}
.map-panel[hidden] { display: none; }
.map-panel { min-width: 0; }
/* The map gets every pixel the card leaves: the screen minus the top bar, the title row and the bottom line. */
.mini-floor { --map-h: calc(100dvh - var(--bar-h) - 140px); width: min(100%, calc(var(--map-h) * 1.6)); min-width: 0; margin-inline: auto; }
.mini-floor.layout-long { width: min(100%, calc(var(--map-h) * 2)); }
.mini-floor.layout-square { width: min(100%, var(--map-h)); min-width: 0; max-width: none; }
/* Title, room tabs and lock share one row; legend and help share the bottom line. */
.agenda-side .room { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
.agenda-side .room-heading, .agenda-side .room-maps { display: contents; }
.agenda-side .room-heading > :first-child { grid-area: 1 / 1; }
.agenda-side .room-heading-end { grid-area: 1 / 3; }
.agenda-side .map-tabs { grid-area: 1 / 2; margin: 0; }
.agenda-side .map-panel, .agenda-side .room-foot, .agenda-side .freeing { grid-column: 1 / -1; }
.agenda-side .map-panel { margin-top: 10px; }
.room-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 10px; }
.room-foot .room-legend { margin: 0; padding: 0; border: 0; }
.room-foot .room-help { margin: 0; }
.room .floor-empty { position: absolute; }
.agenda-splitter { display: none; }
.reservations { container: agenda-list / inline-size; }
@media (min-width: 1241px) {
  .agenda-layout { grid-template-columns: var(--list-w, minmax(440px, min(560px, 36%))) 16px minmax(0, 1fr); gap: 8px; }
  .agenda-splitter { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; place-items: center; align-self: stretch; height: calc(100dvh - var(--bar-h) - 40px); max-height: 100%; border-radius: 8px; cursor: col-resize; touch-action: none; outline: none; }
  .agenda-splitter span { width: 4px; height: 44px; border-radius: 2px; background: var(--line-2); transition: background-color 140ms ease, height 200ms var(--ease-out); }
  .agenda-splitter::before { content: ""; position: absolute; inset: 0 6px; border-radius: 4px; background: var(--line); opacity: 0; transition: opacity 140ms ease; }
  .agenda-splitter:hover::before, .agenda-splitter.dragging::before, .agenda-splitter:focus-visible::before { opacity: .6; }
  .agenda-splitter:hover span, .agenda-splitter.dragging span, .agenda-splitter:focus-visible span { height: 72px; background: var(--ink-3); }
  .agenda-splitter:focus-visible span { background: var(--tile); }
  body.resizing-agenda { cursor: col-resize; user-select: none; -webkit-user-select: none; }
  /* A narrow list shows each reservation more compactly. */
  @container agenda-list (max-width: 680px) {
    .res-row { grid-template-columns: 58px minmax(0, 1fr) auto auto; gap: 12px; }
    .res-avatar, .res-state { display: none; }
    .res-name .status-inline { display: inline-flex; }
  }
}
@media (max-width: 1240px) {
  .mini-floor, .mini-floor.layout-long { width: 100%; }
  .mini-floor.layout-square { width: min(100%, 640px); }
}
@media (max-width: 760px) {
  .room .map-panel { overflow-x: auto; margin-inline: -12px; padding: 0 12px 16px; scrollbar-width: thin; }
  .agenda-side .map-tabs { grid-area: 2 / 1 / 3 / -1; margin-top: 10px; }
  .mini-floor, .mini-floor.layout-long, .mini-floor.layout-square { min-width: 560px; }
}

/* Gestión: vista previa del plano y acceso directo al editor */
.plan-preview { padding: 12px; margin-bottom: 16px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.plan-preview .mini-floor { width: min(100%, 900px); }
.plan-preview .mini-floor.layout-square { width: min(100%, 560px); }
.plan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0; }
.plan-actions .field-hint { margin: 0; }
@media (max-width: 760px) {
  .plan-preview { overflow-x: auto; }
  .plan-preview .mini-floor, .plan-preview .mini-floor.layout-square { min-width: 520px; }
}

/* Ajustes: una categoría por pantalla y mesas agrupadas por sala */
.settings-section[hidden] { display: none; }
.settings-layout.is-tabbed .settings-grid { grid-template-columns: minmax(0, 1fr); }
.settings-layout.is-tabbed .settings-section { grid-column: 1 / -1; }
.settings-layout.is-tabbed .settings-section:not([hidden]) { animation: settings-in 320ms var(--ease-spring) both; }
/* Each section comes in from the side of its place in the menu (--settings-from, set by app.js), rising a little. */
@keyframes settings-in { from { opacity: 0; transform: translate(var(--settings-from, 0px), 6px); } }
@media (prefers-reduced-motion: reduce) { .settings-layout.is-tabbed .settings-section:not([hidden]) { animation: none; } }
.settings-nav a[aria-current] { background: var(--sunk); color: var(--ink); }
.settings-nav a[aria-current] .icon { color: var(--ink); }
.table-group + .table-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.table-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.table-group-title small { margin-left: 2px; color: var(--ink-3); font-size: 12.5px; font-weight: 450; }
.table-group-title .floor-swatch, .capacity-group-title .floor-swatch { width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; }
.capacity-group-title { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.capacity-group-title:first-child { margin-top: 4px; }
.table-group:last-of-type { margin-bottom: 4px; }

/* Ficha de reserva: el mismo aire entre todos los bloques */
.reservation-detail .detail-head { margin-bottom: var(--detail-gap); }
.reservation-detail .lifecycle-closed { margin: 0 0 var(--detail-gap); }
.reservation-detail .contact-actions { margin: var(--detail-gap) 0; }
.reservation-detail .guest-card, .reservation-detail .guest-note, .reservation-detail .attendance,
.reservation-detail .service-actions, .reservation-detail .detail-actions { margin: 0 0 var(--detail-gap); }
.reservation-detail .internal-note { padding-top: var(--detail-gap); }

/* Informes: una rejilla regular, tarjetas de cada fila con la misma altura y los mismos tamaños en todas */
.kpi-grid { gap: 16px; }
.kpi { gap: 6px; padding: 16px 18px; }
.kpi-label, .fact-grid dt, .report-head p, .bar-label, .meter-block p { font-size: 13px; }
.kpi-delta, .kpi-hint, .fact-grid dd small, .bar-value small, .top-guests span:last-child, .meter-caption { font-size: 12.5px; }
.report-grid, .report-grid.report-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.report-grid > .report-card { display: flex; flex-direction: column; grid-column: span 12; }
.report-grid > .span-6 { grid-column: span 6; }
.report-grid > .span-4 { grid-column: span 4; }
.report-head { margin-bottom: 18px; }
.report-head h2, .report-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.report-card.wide { margin-bottom: 16px; }
.bar-list { gap: 10px; }
.bar-list li { min-height: 22px; grid-template-columns: 84px minmax(0, 1fr) 64px; }
.bar-list.wide-label li { grid-template-columns: 162px minmax(0, 1fr) 80px; }
.bar-track { height: 12px; }
.bar-value { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; font-size: 13.5px; white-space: nowrap; }
.fact-grid { gap: 10px; }
.fact-grid div { padding: 12px 14px; }
.fact-grid dd { font-size: 22px; }
.report-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.report-facts, .report-top { display: flex; flex-direction: column; min-width: 0; }
.report-facts .fact-grid { flex: 1; grid-auto-rows: 1fr; }
.report-facts .fact-grid div { align-content: center; }
.report-sub { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; font-weight: 550; }
.report-top .top-guests a { min-height: 48px; }
@media (max-width: 560px) {
  /* En el móvil el nombre entero y debajo sus visitas */
  .top-guests a { grid-template-columns: 32px minmax(0, 1fr); row-gap: 1px; }
  .top-guests .res-avatar { display: grid; grid-row: span 2; }
  .top-guests span:last-child { grid-column: 2; }
}
.meter-block { padding: 14px 0; }
@media (max-width: 1240px) {
  .report-grid > .span-4 { grid-column: span 6; }
  .report-grid > .report-ahead { grid-column: span 12; }
}
@media (max-width: 900px) {
  .report-grid > .report-card, .report-grid > .span-6, .report-grid > .span-4, .report-grid > .report-ahead { grid-column: 1 / -1; }
  .report-split { grid-template-columns: minmax(0, 1fr); }
}

/* Informes: cada color dice algo. Ámbar = comida y añil = cena (como en la agenda), gris = una cantidad sin más,
   rojo = tiempo de más sobre lo reservado, verde azulado = se van antes de lo reservado,
   verde = días y meses con más trabajo y lo que salió bien. */
:root {
  /* Comida y cena: un solo azul en dos tonos (claro de día, marino de noche). Sobrio, y se distinguen por
     luminosidad, así que también los separa quien no distingue colores (validado: ΔE 18,9 en deuteranopía,
     los dos ≥ 3:1 sobre blanco). */
  --chart-lunch: #3987e5;
  --chart-dinner: #184f95;
  --chart-plain: #667085;
  --chart-over: #b42318;
  --chart-early: #0d9488;
  --early-ink: #0f766e;
  --chart-busy: #3fae67;
  --chart-busiest: #1b7a43;
}
i.key { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 3px; background: var(--chart-plain); }
i.key.lunch { background: var(--chart-lunch); }
i.key.dinner { background: var(--chart-dinner); }
i.key.over { background: var(--chart-over); }
i.key.full { width: 2px; height: 13px; border-radius: 1px; background: var(--ink); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 3px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.report-head { flex-wrap: wrap; }

/* Columnas apiladas: cena arriba, comida abajo, con 2 px de aire entre las dos */
.column { display: flex; flex-direction: column; gap: 2px; background: none; transition: opacity 160ms ease; }
.column.is-empty { border-radius: 2px; background: var(--line-2); }
.column .seg { flex: 1 1 0; min-height: 2px; }
.column .seg:first-child { border-radius: 3px 3px 0 0; }
.column .seg.lunch { background: var(--chart-lunch); }
.column .seg.dinner { background: var(--chart-dinner); }
.columns li:hover .column:not(.is-empty), .columns li:focus-visible .column:not(.is-empty) { background: none; }
.columns:hover li:not(:hover) .column { opacity: .42; }
.chart-tip { display: grid; gap: 3px; }
.tip-split { display: flex; align-items: center; gap: 5px; color: #e4cdbb; }
.tip-split i.key { width: 8px; height: 8px; border-radius: 2px; }
.tip-split i.key + * , .tip-split i.key.dinner { margin-left: 6px; }

/* Barras horizontales con significado */
.bar.lunch { background: var(--chart-lunch); }
.bar.dinner { background: var(--chart-dinner); }
.bar.plain { background: var(--chart-plain); }
.bar-track.stack { display: flex; gap: 2px; }
.bar-track.stack .bar { flex: none; border-radius: 0; }
.bar-track.stack .bar:last-child { border-radius: 0 3px 3px 0; }
.bar-list li[data-tip]:hover .bar-label { color: var(--ink); }
.bar-list li[data-tip]:hover .bar-track { box-shadow: 0 0 0 1px var(--line-2); }
.meter span { background: var(--olive); }

/* Tiempo en la mesa: lo reservado en gris, lo que se pasan en rojo y una raya donde acaba la reserva */
.fact-grid.fact-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 24px; }
.fact-row dd, .year-split .fact-grid dd { flex-direction: column; align-items: flex-start; gap: 3px; }
.fact-row > div, .year-split .fact-grid > div { align-content: start; }
.times-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 44px; }
.bar-list.time-bars li { min-height: 34px; grid-template-columns: 84px minmax(0, 1fr) 100px; }
.time-bars .bar-value { flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.25; }
/* La raya del centro es lo reservado: a la derecha, en rojo, lo que se quedan de más; a la izquierda, en verde, lo que se van antes */
.diff-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 12px; border-radius: 3px; background: var(--surface-2); }
.diff-track::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: 50%; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.diff-half { display: flex; min-width: 0; }
.diff-half.less { justify-content: flex-end; }
.diff-bar { width: var(--w); min-width: 3px; height: 100%; }
.less .diff-bar { margin-right: 2px; border-radius: 3px 0 0 3px; background: var(--chart-early); }
.more .diff-bar { margin-left: 2px; border-radius: 0 3px 3px 0; background: var(--chart-over); }
.bar-list.time-bars li.diff-axis { min-height: 0; margin-bottom: -4px; }
.diff-scale { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; color: var(--ink-3); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.diff-scale span:nth-child(2) { color: var(--ink-2); font-weight: 600; }
.diff-scale span:last-child { text-align: right; }
.bar-value small.is-more { color: var(--tomato-ink); font-weight: 550; }
.bar-value small.is-less { color: var(--early-ink); font-weight: 550; }

/* Avisos: una tarjeta por servicio, con la fecha como en un calendario y lo reservado frente a lo que suele venir */
.service-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.service-tag .icon { width: 13px; height: 13px; }
.service-tag.lunch { background: color-mix(in srgb, var(--chart-lunch) 12%, #fff); color: #1c5cab; }
.service-tag.dinner { background: color-mix(in srgb, var(--chart-dinner) 10%, #fff); color: var(--chart-dinner); }
.alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.alert-card { display: grid; align-content: start; gap: 14px; padding: 14px 16px 16px; border-radius: var(--r-lg); transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.alert-card.is-usual { --card-line: rgb(245 158 11 / .28); background: linear-gradient(180deg, #fff7e8 0%, #fffdf8 70%); box-shadow: inset 0 0 0 1px var(--card-line); }
.alert-card.is-full { --card-line: rgb(180 35 24 / .26); background: linear-gradient(180deg, #ffefeb 0%, #fffaf9 70%); box-shadow: inset 0 0 0 1px var(--card-line); }
.alert-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--card-line), 0 10px 22px -12px rgb(120 60 20 / .28); }
.alert-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.alert-title { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.alert-title strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.alert-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 4px 10px; border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.alert-badge .icon { width: 14px; height: 14px; }
.is-full .alert-badge { color: var(--tomato-ink); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .3); }
.is-usual .alert-badge { color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .38); }
.date-block { display: grid; justify-items: center; align-content: center; flex-shrink: 0; width: 48px; padding: 5px 0 6px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / .07), inset 0 0 0 1px var(--line); line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.date-block small { color: var(--ink-3); font-size: 10.5px; font-weight: 600; }
.date-block small:first-child { color: var(--tomato-ink); }
.date-block b { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.fill { display: grid; gap: 8px; }
.fill-meter { position: relative; display: block; height: 10px; border-radius: 5px; background: rgb(17 24 39 / .07); }
.fill-meter > span { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w); border-radius: 5px; }
.fill-meter.lunch { --svc: var(--chart-lunch); --svc-soft: color-mix(in srgb, var(--chart-lunch) 32%, transparent); }
.fill-meter.dinner { --svc: var(--chart-dinner); --svc-soft: color-mix(in srgb, var(--chart-dinner) 28%, transparent); }
.fill-usual { background: repeating-linear-gradient(135deg, var(--svc-soft) 0 3px, rgb(255 255 255 / .55) 3px 6px); box-shadow: inset 0 0 0 1px var(--svc-soft); }
.fill-booked { background: var(--svc); }
.fill-meter > .fill-full { left: var(--w); top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 1.5px rgb(255 255 255 / .9); }
.fill-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--ink-2); font-size: 12.5px; }
.fill-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.fill-legend b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
i.key.booked.lunch { background: var(--chart-lunch); }
i.key.booked.dinner { background: var(--chart-dinner); }
i.key.usual.lunch { --soft: color-mix(in srgb, var(--chart-lunch) 45%, transparent); background: repeating-linear-gradient(135deg, var(--soft) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px var(--soft); }
i.key.usual.dinner { --soft: color-mix(in srgb, var(--chart-dinner) 40%, transparent); background: repeating-linear-gradient(135deg, var(--soft) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px var(--soft); }
.alert-effects { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding-top: 12px; border-top: 1px dashed rgb(17 24 39 / .12); }
.alert-effects > span { color: var(--ink-3); font-size: 12.5px; }
.effect-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.effect-chips li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.effect-chips li b { color: var(--ink); font-weight: 650; }
.effect-chips li.is-over b { color: var(--tomato-ink); }
.effect-chips .icon { width: 13px; height: 13px; color: var(--ink-3); }
.report-calm { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font-size: 13.5px; }
.report-calm .icon { width: 16px; height: 16px; color: var(--olive); }

/* De cada 10: diez puntos, los de color son los que cuentan */
.dots { display: inline-flex; flex: none; gap: 3px; margin: 7px 0 3px; }
.load-level dd .dots { flex-basis: 100%; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgb(17 24 39 / .1); }
.dots.is-over i.on { background: var(--chart-over); }
.dots.is-wait i.on { background: var(--ink-2); }
.fact-row dt, .load-level dt { display: flex; align-items: center; gap: 6px; }
.fact-row dt .icon, .load-level dt .icon { flex-shrink: 0; width: 14px; height: 14px; color: var(--ink-3); }

/* Tranquilos, normales y llenos: más color cuanto más lleno */
.load-headline { max-width: 72ch; margin: -6px 0 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.load-headline strong { color: var(--ink); }
.load-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 26px; }
.load-level { padding: 14px 16px 16px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.load-level.is-normal { background: linear-gradient(180deg, #fff9ee 0%, #fffdf9 70%); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .22); }
.load-level.is-busy { background: linear-gradient(180deg, #fff1ed 0%, #fffaf9 70%); box-shadow: inset 0 0 0 1px rgb(180 35 24 / .22); }
.load-level h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; font-size: 15px; font-weight: 650; }
.load-level h4 small { flex-basis: 100%; color: var(--ink-3); font-size: 12.5px; font-weight: 450; }
.load-level dl { display: grid; gap: 14px; margin: 0; }
.load-level dt { color: var(--ink-3); font-size: 12.5px; }
.load-level dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 3px 0 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.load-level dd small { color: var(--ink-3); font-size: 12.5px; font-weight: 450; letter-spacing: 0; }
.load-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.load-meter i { width: 4px; border-radius: 1px; background: var(--line-2); }
.load-meter i:nth-child(1) { height: 6px; }
.load-meter i:nth-child(2) { height: 10px; }
.load-meter i:nth-child(3) { height: 14px; }
.is-quiet .load-meter i:nth-child(1) { background: var(--ink-3); }
.is-normal .load-meter i:nth-child(-n+2) { background: var(--saffron); }
.is-busy .load-meter i { background: var(--chart-over); }
.over-bar { display: block; flex-basis: 100%; height: 6px; margin-top: 7px; border-radius: 3px; background: rgb(17 24 39 / .07); }
.over-bar span { display: block; width: var(--w); height: 100%; border-radius: 3px; background: var(--chart-over); }

/* Servicios llenos que se complicaron */
.hard-list { display: grid; margin: 0; padding: 0; list-style: none; }
.hard-list > li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.hard-list > li:first-child { border-top: 0; padding-top: 2px; }
.hard-what { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.hard-what strong { font-size: 14px; font-weight: 650; }
.hard-date { color: var(--ink-3); font-weight: 500; }
.hard-covers { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.hard-covers .icon { width: 14px; height: 14px; color: var(--ink-3); }
@media (max-width: 760px) {
  .hard-list > li { grid-template-columns: 48px minmax(0, 1fr); }
  .hard-list .hard-covers, .hard-list .effect-chips { grid-column: 2; }
  .alert-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .alert-card { transition: none; }
  .alert-card:hover { transform: none; }
}
.slow-days, .busy-days { display: grid; margin: 0; padding: 0; list-style: none; }
.slow-days li, .busy-days li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.busy-days li { grid-template-columns: 22px minmax(0, 1fr) auto; }
.slow-days li:first-child, .busy-days li:first-child { border-top: 0; padding-top: 0; }
.slow-rank { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 650; }
.slow-days .slow-rank { background: var(--tomato-tint); color: var(--tomato-ink); }
.busy-days .slow-rank { background: var(--chart-busiest); color: #fff; }
.slow-date { display: grid; min-width: 0; color: var(--ink); font-size: 13.5px; font-weight: 550; }
.slow-date small { color: var(--ink-3); font-size: 12px; font-weight: 450; }
.slow-days strong, .busy-days strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.busy-days strong small { color: var(--ink-3); font-size: 12px; font-weight: 450; letter-spacing: 0; }
.slow-diff { display: inline-flex; align-items: center; gap: 3px; color: var(--tomato-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.slow-diff .icon { width: 14px; height: 14px; }
.small-note { margin: 0; font-size: 13px; }
.report-empty { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.report-empty .icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; color: var(--ink-3); }
.report-empty strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 14px; }
.report-empty p { max-width: 68ch; margin: 0; }

/* Días con más trabajo: los datos del año, los 5 días con más comensales y una barra por mes */
.year-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 22px 36px; align-items: start; }
.year-split .fact-grid dd { font-size: 19px; }
.year-split .fact-wide { grid-column: 1 / -1; }
.fact-grid dd.service-share { display: grid; gap: 8px; }
.share-bar { display: flex; gap: 2px; height: 10px; border-radius: 3px; overflow: hidden; }
.share-bar .lunch { background: var(--chart-lunch); }
.share-bar .dinner { background: var(--chart-dinner); }
.share-labels { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: 12.5px; font-weight: 450; letter-spacing: 0; }
.share-labels span { display: inline-flex; align-items: center; gap: 6px; }
.share-labels b { color: var(--ink); font-weight: 650; }
.bar-list.month-bars { gap: 7px; }
.bar-list.month-bars li { min-height: 20px; grid-template-columns: 50px minmax(0, 1fr) 46px; gap: 10px; }
.month-bars .bar-track { height: 10px; }
.month-bars .bar { background: var(--chart-busy); }
.month-bars .bar.is-best { background: var(--chart-busiest); }

/* Informes por secciones, como Ajustes: cada sección es un título que la explica y solo sus gráficas, sin otra tarjeta alrededor */
.settings-section.report-section { gap: 16px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.settings-section.report-section:not([hidden]) { display: grid; }
.report-section > .settings-heading { align-items: center; margin: 0 0 2px; padding: 0; border-bottom: 0; }
.report-section > .settings-heading h2 { font-size: 19px; letter-spacing: -.015em; }
.report-section > .settings-heading p { max-width: 78ch; }
.report-section > .settings-heading .section-icon { width: 40px; height: 40px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.report-section > .settings-heading .section-icon .icon { width: 19px; height: 19px; }
.report-section .kpi-grid, .report-section > .report-card, .report-section > .report-grid { margin: 0; }
@media (max-width: 760px) {
  /* Las etiquetas se anclan a la gráfica para caber incluso en los periodos largos. */
  .report-layout .columns li { position: static; }
  .report-layout .columns li .chart-tip { left: 0; right: auto; transform: none; max-width: 100%; white-space: normal; }
  .report-layout .tip-split { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .report-layout .cash-facts > div:last-child { grid-column: 1 / -1; }
}
.ahead-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding: 12px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.ahead-label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.ahead-label .icon { width: 16px; height: 16px; color: var(--ink-3); }
.ahead-number { color: var(--ink-2); font-size: 13.5px; }
.ahead-number b { margin-right: 3px; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.ahead-strip .text-link { margin-left: auto; }
.report-calm.muted-calm .icon { color: var(--ink-3); }

/* Caja: el cierre de cada día y su análisis. Tarjeta azul, efectivo verde y otros cobros violeta, en todas las gráficas. */
:root {
  --pay-card: #2a78d6;
  --pay-cash: #16a34a;
  --pay-other: #9f5bd9;
}
i.key.card { background: var(--pay-card); }
i.key.cash { background: var(--pay-cash); }
i.key.other { background: var(--pay-other); }
.column .seg.card, .bar.card, .share-bar .card { background: var(--pay-card); }
.column .seg.cash, .bar.cash, .share-bar .cash { background: var(--pay-cash); }
.column .seg.other, .bar.other, .share-bar .other { background: var(--pay-other); }
.cash-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.cash-day { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.cash-day-title { text-align: center; }
.cash-day-title h2 { font-size: 19px; letter-spacing: -.015em; }
.cash-day-title p { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; color: var(--ink-3); font-size: 13px; }
.icon-button.is-off { opacity: .35; pointer-events: none; }
.cash-back { margin: 6px 0 0; text-align: center; font-size: 13px; }
.cash-status { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 10px 14px; border-radius: var(--r); font-size: 13.5px; line-height: 1.45; }
.cash-status .icon { flex-shrink: 0; width: 17px; height: 17px; margin-top: 1px; }
.cash-status.is-closed { background: var(--olive-tint); color: var(--olive-ink); }
.cash-status.is-warning { background: var(--saffron-tint); color: var(--saffron-ink); }
.cash-form { display: grid; gap: 18px; margin-top: 20px; }
.cash-form .form-error { padding: 10px 14px; border-radius: var(--r); background: var(--tomato-tint); color: var(--tomato-ink); font-size: 13.5px; }
.cash-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cash-amount { display: grid; align-content: start; gap: 8px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: text; transition: box-shadow 150ms ease, background-color 150ms ease; }
.cash-amount:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--ring); }
.cash-method { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.cash-method i.key { width: 12px; height: 12px; }
.money-input { display: flex; align-items: baseline; gap: 6px; }
.money-input input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: 650 26px/1.2 var(--font-num); letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); -moz-appearance: textfield; appearance: textfield; }
.money-input input::-webkit-outer-spin-button, .money-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money-input input:focus { outline: none; }
.money-input input::placeholder { color: var(--line-2); }
.money-input b { color: var(--ink-3); font-size: 18px; font-weight: 600; }
.cash-amount .field-hint { margin: 0; font-size: 12px; }
.cash-amount .field-error { color: var(--tomato-ink); font-size: 12.5px; font-weight: 500; }
.cash-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: #15171c; color: #fff; }
.cash-total span { color: rgb(255 255 255 / .72); font-size: 13.5px; font-weight: 500; }
.cash-total strong { font-size: 28px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cash-extra { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cash-extra p { display: grid; align-content: start; gap: 6px; margin: 0; }
.cash-extra label { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.cash-extra .field-hint { margin: 0; font-size: 12px; }
.cash-form > .button { justify-self: start; }
.cash-missing { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--saffron-tint); }
.cash-missing p { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--saffron-ink); font-size: 13px; }
.cash-missing .icon { width: 15px; height: 15px; }
.cash-missing ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cash-missing a { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--saffron-ink); font-size: 12.5px; font-weight: 600; box-shadow: inset 0 0 0 1px rgb(245 158 11 / .35); }
.cash-list { display: grid; margin: 0; padding: 0; list-style: none; }
.cash-list li + li { border-top: 1px solid var(--line); }
.cash-list a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: var(--r); transition: background-color 150ms ease; }
.cash-list a[aria-current] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cash-list-what { display: grid; min-width: 0; }
.cash-list-what span { color: var(--ink); font-size: 14px; font-weight: 600; }
.cash-list-what small { overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.cash-list strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
@media (hover: hover) {
  .cash-list a:hover { background: var(--surface-2); }
}
.cash-link.is-closed { color: var(--olive-ink); }
.cash-link.is-closed .icon { color: var(--olive); }
@media (max-width: 1100px) {
  .cash-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cash-amounts, .cash-extra { grid-template-columns: minmax(0, 1fr); }
  .cash-amounts { gap: 8px; }
  /* En el móvil cada forma de pago es una fila: el nombre a la izquierda y el importe a la derecha */
  .cash-amount { grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 4px 10px; padding: 10px 14px; }
  .cash-amount .field-hint, .cash-amount .field-error { grid-column: 1 / -1; }
  .money-input input { font-size: 22px; text-align: right; }
  .cash-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cash-link { padding: 0; width: var(--control-h-sm); justify-content: center; }
}

/* Sala en pantalla completa: solo el plano y una barra con el restaurante, la hora y Salir */
.room-mode-bar { display: none; }
body.room-mode .topbar, body.room-mode .tabbar, body.room-mode .demo-banner, body.room-mode .page-heading,
body.room-mode .floor-summary-actions, body.room-mode .floor-help, body.room-mode .floor-live > .text-link, body.room-mode .room-add { display: none !important; }
body.room-mode .app-main { max-width: none; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
body.room-mode .room-mode-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 8px 10px 8px 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.rm-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.rm-title strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.rm-date { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.rm-clock { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.rm-actions { display: flex; gap: 8px; }
body.is-fullscreen .rm-full { display: none; }
body.room-mode .floor-layout { --floor-chrome: 166px; }
/* The plan takes the whole screen. Tables, chairs and references keep the size they would have in the room's own
   proportions (the side that limits decides), and only the space between them grows. */
body.room-mode .floor-scroll { overflow: hidden; }
body.room-mode .floor-layout .floor, body.room-mode .floor-layout .floor.layout-long, body.room-mode .floor-layout .floor.layout-square {
  --fit-h: calc(100dvh - var(--floor-chrome));
  --cq: min(1cqw, calc(var(--fit-h) * 1.6 / 100));
  width: 100%; min-width: 0; max-width: none; height: var(--fit-h); aspect-ratio: auto; margin: 0;
}
body.room-mode .floor-layout .floor.layout-long { --cq: min(1cqw, calc(var(--fit-h) * 2 / 100)); }
body.room-mode .floor-layout .floor.layout-square { --cq: min(1cqw, calc(var(--fit-h) / 100)); }
body.room-mode .room-bar { margin-bottom: 8px; }
@media (max-width: 640px) {
  .rm-date { display: none; }
  .rm-clock { font-size: 18px; }
}

/* Sentar sin reserva: lo primero al pulsar una mesa libre de hoy */
.walkin-card { display: grid; gap: 14px; margin: 4px 0 0; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(180deg, #eef8f1 0%, #f8fcf9 100%); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .25); }
.walkin-head { display: flex; align-items: flex-start; gap: 12px; }
.walkin-head strong { display: block; color: var(--ink); font-size: 15px; }
.walkin-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.walkin-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--r); background: var(--olive); color: #fff; box-shadow: 0 4px 10px -4px rgb(22 163 74 / .6); }
.walkin-icon .icon { width: 18px; height: 18px; }
.walkin-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.walkin-row .guest-stepper { background: var(--surface); }
.walkin-row .guest-stepper button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--ink-2); cursor: pointer; }
.walkin-row .guest-stepper button:hover { background: var(--sunk); color: var(--ink); }
.walkin-name { flex: 1 1 140px; min-width: 0; }
.walkin-row .button { background: var(--olive-deep); }
.walkin-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; color: var(--ink-3); font-size: 12.5px; }
.walkin-or::before, .walkin-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Informes → Caja */
.column-days { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--ink-3); font-size: 11px; font-weight: 500; text-align: center; }
.column-days li.is-weekend { color: var(--ink); font-weight: 650; }
.money-chart .chart-axis { margin-top: 2px; }
/* Qué días se hace más dinero: una columna por día, con su importe encima y el gasto por comensal debajo */
:root { --money-1: #bfe5df; --money-2: #7cc8bd; --money-3: #2f9d8f; --money-4: #0f6b61; }
.week-money { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; background: linear-gradient(var(--line-2), var(--line-2)) 0 177px / 100% 1px no-repeat; }
.week-money li { display: grid; justify-items: center; gap: 4px; min-width: 0; border-radius: var(--r-sm); cursor: default; }
.wm-plot { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 100%; height: 177px; }
.wm-value { margin-bottom: 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
.wm-bar { display: block; width: min(72%, 44px); height: calc(var(--h) * 1.4px); min-height: 3px; border-radius: 6px 6px 0 0; transition: filter 150ms ease, transform 200ms var(--ease-out); transform-origin: bottom; }
.wm-bar[data-level="1"], .wm-scale [data-level="1"] { background: var(--money-1); }
.wm-bar[data-level="2"], .wm-scale [data-level="2"] { background: var(--money-2); }
.wm-bar[data-level="3"], .wm-scale [data-level="3"] { background: var(--money-3); }
.wm-bar[data-level="4"], .wm-scale [data-level="4"] { background: var(--money-4); }
.week-money li.is-best .wm-value { color: var(--ink); font-size: 13.5px; font-weight: 700; }
.wm-day { margin-top: 4px; color: var(--ink); font-size: 13px; font-weight: 600; }
.wm-cover { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
.week-money li:hover .wm-bar { filter: brightness(.94) saturate(1.1); }
.chart-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; color: var(--ink-3); font-size: 12.5px; }
.wm-scale { display: inline-flex; gap: 2px; }
.wm-scale i { width: 14px; height: 8px; border-radius: 2px; }
@media (max-width: 560px) {
  .week-money { gap: 3px; }
  .wm-value { font-size: 10.5px; }
  .week-money li.is-best .wm-value { font-size: 11.5px; }
  .wm-cover { font-size: 10px; }
}
.money-chart { padding-left: 58px; }
.money-chart .chart-grid { left: 58px; }
.money-chart .chart-grid span[data-value]::before { white-space: nowrap; }
.cash-facts { margin-bottom: 0; }
.report-section .pending-banner { margin: 0; }
.weekday-best { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--olive-tint); color: var(--olive-ink); font-size: 11.5px; font-weight: 650; }
.pay-split { display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.pay-split .share-bar { height: 12px; }
.pay-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 13px; }
.pay-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pay-legend b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.cash-empty .button { margin-top: 12px; }

/* Una sola etiqueta flotante para las barras */
.float-tip { position: fixed; z-index: 60; max-width: 300px; padding: 5px 9px; border-radius: var(--r-xs); background: #15171c; color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 8px)); transition: opacity 120ms ease; }
.float-tip.below { transform: translate(-50%, 8px); }
.float-tip.is-on { opacity: 1; }
@media (max-width: 1240px) {
  .year-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-split .year-months { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .times-grid, .year-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .bar-list.time-bars li { grid-template-columns: 66px minmax(0, 1fr) 84px; gap: 8px; }
  .diff-scale span:nth-child(2) { display: none; }
  .slow-days li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .slow-days .slow-diff { grid-column: 2 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .column, .float-tip { transition: none; }
}

/* Portada: para restaurantes (sin lista de restaurantes) */
.diner-note { display: flex; align-items: flex-start; gap: 12px; margin: 26px 0 8px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.diner-note .icon { flex-shrink: 0; margin-top: 1px; color: var(--ink-3); }
.diner-note strong { color: var(--ink); }

/* Portada: planes */
.pricing { margin-top: 72px; scroll-margin-top: 90px; }
.pricing-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 20px; }
.pricing-head h2 { font-size: 26px; letter-spacing: -.03em; }
.pricing-head p { color: var(--ink-2); font-size: 14.5px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px var(--card-pad) var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.plan.is-featured { box-shadow: var(--shadow-2), 0 0 0 1.5px var(--ink); }
.plan-badge { position: absolute; top: -11px; left: var(--card-pad); padding: 3px 9px; border-radius: var(--r-xs); background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.plan h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.plan-pitch { min-height: 3em; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.plan-price > * { white-space: nowrap; }
.plan-price .plan-price-from { flex-basis: 100%; margin-bottom: 2px; }
.plan-price strong { font-size: 36px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.plan-price span { color: var(--ink-3); font-size: 14px; font-weight: 450; }
.plan-cta { justify-content: center; width: 100%; }
.plan-includes { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; }
.plan-cta + .plan-features { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.plan-features { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.plan-features li { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.plan-features .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--olive); stroke-width: 2.4; }
@media (max-width: 960px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; gap: 24px; }
  .plan-pitch { min-height: 0; }
}

/* Planes: tarjetas en Ajustes, avisos de «incluido en el plan…», página bloqueada y elección al registrarse */
.plan-badge.is-current { background: var(--olive-deep); }
.plan.is-current { box-shadow: var(--shadow-2), 0 0 0 1.5px var(--olive); }
.plan-grid.in-settings .plan { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.plan-grid.in-settings .plan.is-current { background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1.5px var(--olive); }
.plan-grid.in-settings { margin-top: 24px; }
.plan-form { margin: 0; }
.plan-cta.is-current-plan { cursor: default; color: var(--olive-ink); border-color: rgb(22 163 74 / .3); box-shadow: none; background: var(--olive-tint); }
.plan-lock { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--saffron-tint); color: var(--ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); font-size: 13.5px; line-height: 1.45; }
.plan-lock .icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--saffron-ink); }
.plan-lock span { flex: 1 1 220px; }
.plan-lock .text-link { flex-shrink: 0; }
.plan-lock.is-small { margin: 12px 0 4px; padding: 9px 12px; font-size: 13px; }
.plan-lock[hidden] { display: none; }
.plan-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin: 0 6px; border-radius: 5px; background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .25); font-size: 11.5px; font-weight: 550; white-space: nowrap; vertical-align: middle; }
.client-name .plan-chip { margin: 4px 0 0; width: fit-content; }
.room-add.is-locked { color: var(--ink-3); }
.room-add.is-locked small { display: block; font-size: 11px; font-weight: 550; color: var(--saffron-ink); }
.plan-locked { display: grid; justify-items: start; gap: 14px; max-width: 600px; margin: 24px auto; padding: 32px var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.plan-locked-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .25); }
.plan-locked-icon .icon { width: 22px; height: 22px; }
.plan-locked h1 { font-size: 24px; letter-spacing: -.025em; }
.plan-locked-text { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.plan-locked .owner-actions { margin-top: 6px; }
.plan-locked .owner-actions form { margin: 0; }
/* Suscripción */
.subscription-facts { display: grid; gap: 0; width: 100%; margin: 4px 0; border-top: 1px solid var(--line); }
.subscription-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.subscription-facts dt { color: var(--ink-3); }
.subscription-facts dd { margin: 0; font-weight: 600; text-align: right; }
/* Gestión → Solicitudes */
.request-list { display: grid; gap: 12px; }
.request-card { display: grid; gap: 10px; padding: var(--card-pad); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.request-card.is-done { opacity: .62; }
.request-card header { display: flex; align-items: center; gap: 12px; }
.request-card header > div { flex: 1; min-width: 0; }
.request-card h2 { font-size: 16px; }
.request-card .muted { margin: 2px 0 0; font-size: 13px; }
.request-contact { margin: 0; font-size: 14px; }
.request-message { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.request-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.request-card .actions form { margin: 0; }
.login-card .plan-features { margin: 16px 0 20px; }
.plan-choice .plan-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-option { position: relative; display: grid; align-content: start; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); cursor: pointer; transition: box-shadow 140ms ease, background-color 140ms ease; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option-name { font-weight: 600; }
.plan-option-price { font-weight: 600; letter-spacing: -.02em; }
.plan-option-price small { color: var(--ink-3); font-size: 11.5px; font-weight: 450; }
.plan-option-pitch { color: var(--ink-3); }
.plan-option:has(input:checked) { background: var(--surface); box-shadow: 0 0 0 1.5px var(--ink); }
.plan-option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 520px) {
  .plan-choice .plan-options { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Páginas públicas (antes de entrar): menos huecos, pie siempre abajo, formularios compactos ---------- */
body.public:not(.direct) { display: flex; flex-direction: column; min-height: 100dvh; background: var(--surface); }
body.public:not(.direct) > .public-main { flex: 1 0 auto; width: 100%; min-height: 0; padding-bottom: 56px; }
body.public:not(.direct) > .public-footer { width: 100%; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; width: fit-content; margin: 0 0 18px; padding: 4px 10px 4px 8px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 550; }
.eyebrow .icon { width: 14px; height: 14px; color: var(--tomato); }
.auth-lede { max-width: 46ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.6; }

/* Acceso y registro */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 72px; align-items: center; min-height: calc(100dvh - var(--bar-h) - 210px); }
.auth-layout.register-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 64px; align-items: start; min-height: 0; }
.auth-intro { min-width: 0; }
.auth-intro h1 { margin-bottom: 16px; font-size: clamp(34px, 3.6vw, 52px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; }
.auth-intro h1 em { font-style: normal; }
.register-layout .auth-intro { position: sticky; top: 28px; padding-top: 28px; }
.auth-intro .register-steps { margin-top: 28px; }
.login-card .card-head { margin-bottom: 18px; }
.login-card .card-head h2 { font-size: 19px; letter-spacing: -.02em; }
.login-card .card-head .muted { margin: 4px 0 0; color: var(--ink-3); }
.login-card form p { margin: 0 0 14px; }
.login-card .field-hint, .register-form .field-hint { margin-top: 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.register-card { padding: 26px 28px 28px; }
.register-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.register-form fieldset + fieldset { margin-top: 20px; }
.register-form legend { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 14px; padding: 0; font-size: 12.5px; }
.register-form legend::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.register-form .field { gap: 6px; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.register-form > .button.wide { margin-top: 8px; }
.plan-choice .plan-options { gap: 8px; }
.plan-option { gap: 3px; padding: 12px 14px; }
.plan-option-top { display: flex; justify-content: space-between; flex-wrap: wrap; }
.plan-option-name { font-size: 14px; }
.plan-option-price { font-size: 15px; white-space: nowrap; }
.plan-option-pitch { font-size: 12px; line-height: 1.4; }
.plan-choice .field-hint { margin-top: 10px; }
.session-note + .session-alt { margin: -8px 0 18px; font-size: 13.5px; }

/* Portada */
.home-hero { display: grid; gap: 56px; align-items: center; margin: 8px 0 64px; }
.home-hero h1 { margin-bottom: 18px; font-weight: 600; letter-spacing: -.045em; line-height: 1.02; }
.home-hero h1 em { font-style: normal; color: var(--tomato); }
.home-hero .auth-lede { margin-bottom: 26px; }
.hero-points { display: grid; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14.5px; }
.hero-points .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--olive); stroke-width: 2.4; }
.hero-visual { position: relative; padding-bottom: 30px; }
.hero-card { padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 48px -24px rgb(16 24 40 / .25), 0 0 0 1px var(--line); }
.hero-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--ink-3); font-size: 13px; }
.hero-card-head strong { color: var(--ink); font-size: 14.5px; }
.hero-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-xs); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .18); font-size: 12px; font-weight: 550; }
.hero-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--olive); }
.hero-rows { display: grid; gap: 0; list-style: none; }
.hero-rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: var(--r-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.hero-rows b { display: grid; place-items: center; height: 36px; border-radius: var(--r-xs); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.hero-rows li > span:nth-child(2) { display: grid; min-width: 0; }
.hero-rows strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.hero-rows small { color: var(--ink-3); font-size: 12.5px; }
.hero-toast { position: absolute; right: -14px; bottom: 0; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: var(--r); background: #15171c; color: rgb(255 255 255 / .75); box-shadow: var(--shadow-3); font-size: 13px; animation: hero-toast-in 480ms var(--ease-out) 400ms both; }
.hero-toast .icon { width: 16px; height: 16px; flex-shrink: 0; color: #4ade80; stroke-width: 2.4; }
.hero-toast strong { display: block; color: #fff; }
@keyframes hero-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .hero-toast { animation: none; } }

@media (max-width: 1060px) {
  .auth-layout, .auth-layout.register-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; }
  .register-layout .auth-intro { position: static; padding-top: 0; }
  .home-hero { gap: 36px; }
  .hero-visual { max-width: 560px; }
  .hero-toast { right: 10px; }
}
@media (max-width: 760px) {
  .auth-intro .register-steps { display: none; }
  .auth-lede { font-size: 15.5px; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .register-card { padding: 20px 16px 22px; }
  .hero-toast { position: static; margin-top: 10px; width: fit-content; }
  .hero-visual { padding-bottom: 0; }
}
.form-row .field { align-content: start; }
.plan-option-top { flex-direction: column; align-items: flex-start; gap: 0; }
.home-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.home-hero h1 { font-size: clamp(40px, 4.4vw, 60px); }
@media (max-width: 1060px) { .home-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .plan-choice .plan-options { gap: 6px; }
  .plan-option { padding: 10px 14px; }
  .plan-option-top { flex-direction: row; align-items: baseline; justify-content: space-between; width: 100%; }
  .plan-option-pitch { display: none; }
}

/* Acceso: una sala en directo que se mueve sola (reservas, clientes que entran, mesas que se liberan) */
.live-demo { position: relative; max-width: 560px; margin-top: 30px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 48px -24px rgb(16 24 40 / .25), 0 0 0 1px var(--line); animation: rise 500ms var(--ease-out) 120ms both; }
.live-demo-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 2px 2px 12px; color: var(--ink-3); font-size: 13px; }
.live-demo-head .hero-live::before { animation: live 1.6s ease-in-out infinite; }
.live-clock { display: inline-flex; align-items: center; gap: 6px; }
.live-clock .icon { width: 15px; height: 15px; color: var(--ink-3); }
.live-clock b, .live-covers b { color: var(--ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.live-covers { display: inline-block; margin-left: auto; transform-origin: right center; }
.live-floor { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line-2);
  background: repeating-linear-gradient(0deg, transparent 0 calc(11% - 1px), rgb(120 90 60 / .09) calc(11% - 1px) 11%), linear-gradient(#faf7f3, #f6f1ea); }
.live-bar, .live-door { position: absolute; left: 50%; translate: -50% 0; padding: 3px 14px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.live-bar { top: 0; border-radius: 0 0 6px 6px; background: var(--ink); color: #fff; }
.live-door { bottom: 0; border-radius: 6px 6px 0 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink-2); }
.demo-table { position: absolute; z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 15px; transform: translate(-50%, -50%); box-shadow: 0 4px 10px -6px rgb(16 24 40 / .35), inset 0 0 0 1.5px #c4c9d1; transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease; }
.demo-table.round { width: 46px; height: 46px; border-radius: 50%; }
.demo-table.wide { width: 94px; }
.demo-table b { position: relative; z-index: 1; font-weight: 650; }
.demo-table::before, .demo-table::after { content: ""; position: absolute; left: 50%; width: 22px; height: 6px; border-radius: 3px; background: #d5d9df; translate: -50% 0; }
.demo-table::before { top: -10px; }
.demo-table::after { bottom: -10px; }
.demo-table.wide::before, .demo-table.wide::after { width: 62px; }
.demo-table[data-state=seated] { background: var(--olive-deep); color: #fff; box-shadow: 0 4px 10px -6px rgb(17 97 50 / .5), inset 0 0 0 1.5px #116132; }
.demo-table:is([data-state=soon], [data-state=walking]) { background: #fde7b0; color: #6b3a03; box-shadow: 0 4px 10px -6px rgb(16 24 40 / .35), inset 0 0 0 2px #d97706; }
.demo-ring { display: none; position: absolute; inset: -6px; border-radius: inherit; box-shadow: 0 0 0 2px var(--saffron); animation: ring 1.6s ease-out infinite; }
.demo-table:is([data-state=soon], [data-state=walking]) .demo-ring { display: block; }
.demo-tag { position: absolute; bottom: calc(100% + 14px); left: 50%; padding: 1px 7px; border-radius: 5px; background: var(--saffron); color: var(--ink); font-size: 10.5px; font-weight: 650; white-space: nowrap; opacity: 0; transform: translateX(-50%) translateY(4px); transition: opacity 220ms ease, transform 260ms var(--ease-out); pointer-events: none; }
.demo-table:is([data-state=soon], [data-state=walking]) .demo-tag { opacity: 1; transform: translateX(-50%); }
.demo-guest { position: absolute; z-index: 3; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgb(16 24 40 / .3); pointer-events: none; }
.demo-spark { position: absolute; z-index: 3; width: 7px; height: 7px; border-radius: 2px; pointer-events: none; }
.live-toasts { position: absolute; right: -22px; bottom: -26px; z-index: 4; display: grid; justify-items: end; gap: 8px; width: max-content; max-width: 330px; pointer-events: none; }
.demo-toast { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px 8px 8px; border-radius: var(--r); background: #15171c; color: rgb(255 255 255 / .72); box-shadow: var(--shadow-3); font-size: 12px; line-height: 1.3; }
.demo-toast strong { display: block; color: #fff; font-size: 13px; font-weight: 550; }
.demo-toast-icon { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--r-xs); background: rgb(255 255 255 / .1); color: #4ade80; }
.demo-toast-icon .icon { width: 14px; height: 14px; }
@media (max-width: 760px) { .auth-intro .live-demo { display: none; } }
@media (prefers-reduced-motion: reduce) { .live-demo, .demo-ring, .live-demo-head .hero-live::before { animation: none; } }

/* Portada: la agenda se mueve sola (confirman, llegan, se sientan, se van; entran reservas nuevas) */
.hero-head-end { display: inline-flex; align-items: center; gap: 12px; }
.hero-seated { display: inline-block; color: var(--ink-3); font-size: 13px; transform-origin: right center; }
.hero-seated b { color: var(--ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.hero-rows { height: calc(4 * 56px + 3 * 6px + 8px); margin: -4px; padding: 4px; overflow: hidden; align-content: start; gap: 6px; }
.hero-rows li { height: 56px; }
@media (max-width: 600px) {
  .hero-rows { height: calc(3 * 56px + 2 * 6px + 8px); }
  .hero-rows li:nth-child(n+4) { display: grid; }
  .hero-seated { display: none; }
}

/* «Sala ahora»: candado para mover las mesas desde la agenda */
.room-heading-end { display: inline-flex; align-items: center; gap: 8px; }
.map-lock { width: 30px; height: 30px; color: var(--ink-2); }
.map-lock .icon { width: 15px; height: 15px; }
.map-lock .lock-open, .map-lock[aria-pressed=true] .lock-closed { display: none; }
.map-lock[aria-pressed=true] .lock-open { display: contents; }
.map-lock[aria-pressed=true] { background: var(--saffron-tint); color: var(--saffron-ink); border-color: var(--saffron); }
.room-help-unlocked { display: none; }
.room.is-unlocked .room-help { display: none; }
.room.is-unlocked .room-help-unlocked { display: flex; align-items: center; gap: 8px; color: var(--saffron-ink); font-weight: 500; }
.room-help-unlocked .icon { width: 15px; height: 15px; flex-shrink: 0; }
.room.is-unlocked .mini-floor { box-shadow: inset 0 0 0 2px var(--saffron), 0 0 0 3px rgb(245 158 11 / .16); }
.room.is-unlocked .mini-floor .floor-table { cursor: grab; touch-action: none; }
.room.is-unlocked .mini-floor .floor-table:hover { filter: brightness(1.03); }
.room .mini-floor .floor-table.is-dragging { z-index: 6; cursor: grabbing; transition: none; filter: drop-shadow(0 10px 14px rgb(16 24 40 / .25)); }

/* Agenda: el aviso de primeros pasos se puede cerrar */
.first-steps { position: relative; padding-right: calc(var(--card-pad) + 40px); }
.first-steps-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.first-steps-close .icon-button { width: 30px; height: 30px; }
@media (max-width: 760px) { .first-steps { padding-right: var(--card-pad); padding-top: calc(var(--card-pad) + 18px); } }

/* «Sala ahora» desbloqueada: separar mesas unidas */
.map-unjoin { position: absolute; z-index: 7; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border: 0; border-radius: var(--r-xs); background: #15171c; color: #fff; font-size: 11.5px; font-weight: 550; white-space: nowrap; transform: translate(-50%, -50%); box-shadow: 0 6px 14px -6px rgb(16 24 40 / .5); cursor: pointer; animation: pop-in 200ms var(--ease-out) both; transition: background-color 140ms ease; }
.map-unjoin .icon { width: 13px; height: 13px; color: #fde68a; }
.map-unjoin:hover { background: var(--tomato); }
.map-unjoin:active { transform: translate(-50%, -50%) translateY(1px); }
.map-unjoin:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.map-unjoin:disabled { opacity: .6; cursor: progress; }
.mini-floor:has(.is-dragging) .map-unjoin { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .map-unjoin { animation: none; } }

/* Portada: «Así funciona» integrado con el resto (mismas tarjetas que los planes, pasos unidos por una línea) */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 20px; }
.section-head h2 { font-size: 26px; letter-spacing: -.03em; }
.section-head p { color: var(--ink-2); font-size: 14.5px; }
.how-steps { margin: 0 0 8px; }
.steps-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; display: grid; align-content: start; gap: 8px; padding: 20px var(--card-pad) 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); transition: box-shadow 200ms ease; }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.step-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.step-icon .icon { width: 17px; height: 17px; }
.step h3 { font-size: 16px; font-weight: 600; letter-spacing: -.012em; }
.step p { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
/* The thin path from one step to the next. */
.step:not(:last-child)::after { content: ""; position: absolute; z-index: 1; top: 34px; left: calc(100% + 1px); width: 14px; border-top: 1px solid var(--line-2); }
@media (hover: hover) {
  .step:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--line-2); }
}
@media (max-width: 900px) {
  .steps-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step:not(:last-child)::after { top: 100%; left: 34px; width: 0; height: 12px; border-top: 0; border-left: 1px solid var(--line-2); }
}
@media (prefers-reduced-motion: reduce) { .step { transition: none; } }

/* Acceso y registro: el acento en rojo, como la portada */
.auth-intro h1 em { color: var(--tomato); }
.auth-intro .register-steps .step-dot { background: var(--ink); }

/* Gestión → Sistema: tarjetas de cada fila con la misma altura y sus filas repartidas por igual */
.system-grid { align-items: stretch; }
.system-grid > .settings-section { display: flex; flex-direction: column; }
.system-grid .tech-list { flex: 1; grid-auto-rows: 1fr; }

/* ==========================================================================
   Servicio: deshacer, avisos en directo, lista y plano conectados
   y la agenda compacta en el móvil
   ========================================================================== */
/* Avisos con botón («Deshacer», «Ver») */
.toast.has-action { padding-right: 8px; }
.toast-action { flex-shrink: 0; margin-left: 4px; padding: 5px 10px; border: 0; border-radius: var(--r-xs); background: rgb(255 255 255 / .14); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color 150ms ease; }
.toast-action:hover { background: rgb(255 255 255 / .26); }
.toast-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Reservas que acaban de entrar */
.res-row.is-new { box-shadow: inset 3px 0 0 var(--tile); }
.res-row.is-new .res-name strong::after { content: "Nueva"; display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 6px; border-radius: 5px; background: var(--tile-tint); color: var(--tile-ink); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); font-size: 11px; font-weight: 600; vertical-align: 2px; }

/* Una reserva y su mesa se iluminan juntas */
.res-row.is-linked { background: #f4f7fe; }
.floor-table.is-linked { z-index: 4; }
.floor-table.is-linked .table-top { box-shadow: 0 0 0 calc(.4 * var(--cq, 1cqw)) #fff, 0 0 0 calc(.85 * var(--cq, 1cqw)) var(--tile), 0 calc(.6 * var(--cq, 1cqw)) calc(1.4 * var(--cq, 1cqw)) calc(-.4 * var(--cq, 1cqw)) rgb(16 24 40 / .3); }
.map-tabs button.has-linked { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--tile); color: var(--tile-ink); }

/* La etiqueta nunca es más ancha que su mesa (más un pequeño margen): así dos mesas juntas no se pisan el texto.
   Lo que no cabe se recorta con «…» y se lee entero al pasar por encima o al llegar con el teclado. */
.floor-table:is(:hover, :focus-visible) { z-index: 5; }
.floor-table:is(:hover, :focus-visible) .table-tag { max-width: calc(34 * var(--cq, 1cqw)); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-2); }
/* Minutos que le quedan a la mesa: si no cabe todo, se recorta el nombre y los minutos se ven siempre */
.table-tag:has(.tag-min) { display: flex; }
/* En el plano la etiqueta es estrecha: el nombre arriba y «quedan 67 min» debajo, para que quepan los dos. */
.table-tag[data-left] { display: grid; justify-items: center; line-height: 1.25; }
.table-tag[data-left] .tag-text { max-width: 100%; }
.table-tag[data-left] .tag-min { display: none; }
.table-tag[data-left]::after { content: attr(data-left); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .92em; opacity: .85; white-space: nowrap; }
/* Las demás etiquetas («Tarde 12 min · Ana», «Llegan · Ana») pueden ocupar dos líneas antes de recortarse. */
.table-tag:not([data-left]) { width: max-content; white-space: normal; text-align: center; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.table-tag .tag-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.table-tag .tag-min { flex-shrink: 0; white-space: pre; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* Arrastrar una reserva a otra mesa */
@media (min-width: 1241px) and (hover: hover) and (pointer: fine) {
  .res-row[data-move] { cursor: grab; }
}
.dragging-booking, .dragging-booking * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.res-row.is-dragging { opacity: .45; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 400; padding: 6px 10px; border-radius: var(--r-sm); background: #15171c; color: #fff; font-size: 13px; font-weight: 550; white-space: nowrap; box-shadow: var(--shadow-3); pointer-events: none; }
.dragging-booking .room .floor-table .table-top { outline: 1.5px dashed rgb(37 99 235 / .5); outline-offset: calc(.45 * var(--cq, 1cqw)); }
.room .floor-table.is-drop-target { z-index: 5; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.07); }
.room .floor-table.is-drop-target .table-top { outline: 0; box-shadow: 0 0 0 calc(.4 * var(--cq, 1cqw)) #fff, 0 0 0 calc(.9 * var(--cq, 1cqw)) var(--tile), 0 calc(.8 * var(--cq, 1cqw)) calc(1.6 * var(--cq, 1cqw)) calc(-.4 * var(--cq, 1cqw)) rgb(16 24 40 / .35); }

/* Aviso de demostración: se puede cerrar */
.demo-banner { position: relative; padding-right: 44px; }
.demo-close { position: absolute; right: 6px; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-xs); background: transparent; color: #1e3a8a; opacity: .7; translate: 0 -50%; transition: background-color 150ms ease, opacity 150ms ease; }
.demo-close .icon { width: 16px; height: 16px; }
.demo-close:hover { background: rgb(37 99 235 / .1); opacity: 1; }
.demo-oculto .demo-banner { display: none; }

/* Riesgo de no venir: texto corto en el móvil */
.risk-short { display: none; }

@media (max-width: 760px) {
  .app-main { padding-top: 12px; }
  .demo-banner { margin-bottom: 12px; padding: 7px 40px 7px 10px; font-size: 12.5px; line-height: 1.4; }

  /* Cabecera del día: ‹ fecha › en una fila (tocar la fecha abre el calendario) y el resumen debajo */
  .day-hero { container-type: inline-size; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "prev title next" "sub sub today" "meter meter meter"; align-items: center; gap: 8px; margin-bottom: 12px; }
  .day-hero .day-nav, .day-hero .day-title, .day-hero .day-actions, .day-hero .day-arrows { display: contents; }
  .day-hero .day-title h1 { grid-area: title; display: block; min-height: 0; margin: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(13.5px, calc((100cqi - 118px) / 15.6), 20px); }
  .day-hero .day-title h1::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 5px; vertical-align: -1px; background: currentColor; opacity: .45;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
  .day-hero .day-sub { grid-area: sub; min-height: 0; margin: 0; flex-wrap: wrap; row-gap: 4px; overflow: hidden; }
  .day-hero .day-year { display: none; }
  .day-hero:has(a.walkin-button) { grid-template-areas: "prev title next" "sub sub sub" "walkin walkin walkin" "meter meter meter"; }
  .day-hero .day-arrows [data-dir=prev] { grid-area: prev; }
  .day-hero .day-arrows [data-dir=next] { grid-area: next; }
  .day-hero .day-arrows .icon-button[data-dir] { width: 44px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1); }
  .day-hero .day-arrows .date-jump { grid-area: title; align-self: stretch; justify-self: stretch; width: auto; height: auto; border: 0; border-radius: var(--r-sm); background: transparent; box-shadow: none; }
  .day-hero .day-arrows .date-jump > .icon { display: none; }
  .day-hero .day-actions > .button[data-agenda-nav] { grid-area: today; justify-self: end; min-width: 0; min-height: 30px; padding: 0 8px; }
  .day-hero .day-actions > a.walkin-button { grid-area: walkin; width: 100%; justify-content: center; min-width: 0; min-height: 36px; height: 36px; padding: 0 12px; gap: 6px; font-size: 13px; }
  .day-hero .day-actions > a.walkin-button .icon { width: 15px; height: 15px; }
  .day-hero .service-meter { grid-area: meter; }
  .risk-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .risk-short { display: inline; }
  .schedule-long { display: none; }
  .schedule-short { display: inline; }

  /* Resumen del día en cuatro cifras, dos por fila */
  .service-meter { gap: 8px; padding: 10px 12px; }
  .meter-bar { height: 4px; }
  .meter-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .meter-legend > span { gap: 6px; min-width: 0; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
  .meter-legend b { font-size: 16px; }
  .meter-legend .covers { margin: 0; padding: 0; border: 0; }
  .meter-legend .covers .icon { display: none; }

  /* Buscador, comida/cena y «Más» en una sola fila: la lupa se despliega al tocarla */
  .js .agenda-toolbar { grid-template-columns: var(--control-h) minmax(0, 1fr) var(--control-h); margin-bottom: 10px; }
  .js .agenda-toolbar .search-box { z-index: 2; grid-column: 1; grid-row: 1; }
  .js .agenda-toolbar .segmented { grid-column: 2; grid-row: 1; }
  .js .agenda-toolbar .more-menu { grid-column: 3; grid-row: 1; }
  .js .agenda-toolbar .search-box input { padding: 0; color: transparent; cursor: pointer; }
  .js .agenda-toolbar .search-box input::placeholder { color: transparent; }
  .js .agenda-toolbar .search-box .icon { left: 50%; translate: -50% 0; color: var(--ink-2); }
  .js .agenda-toolbar .search-box:focus-within, .js .agenda-toolbar .search-box:has(input:not(:placeholder-shown)) { grid-column: 1 / 3; }
  .js .agenda-toolbar .search-box:focus-within input, .js .agenda-toolbar .search-box:has(input:not(:placeholder-shown)) input { padding: 8px 12px 8px 36px; color: var(--ink); cursor: text; }
  .js .agenda-toolbar .search-box:focus-within input::placeholder, .js .agenda-toolbar .search-box:has(input:not(:placeholder-shown)) input::placeholder { color: #98a0ab; }
  .js .agenda-toolbar .search-box:focus-within .icon, .js .agenda-toolbar .search-box:has(input:not(:placeholder-shown)) .icon { left: 12px; translate: 0 0; color: var(--ink-3); }
  .js .agenda-toolbar:has(.search-box:focus-within, .search-box input:not(:placeholder-shown)) .segmented { visibility: hidden; }
  .status-tabs, .status-bar { margin-bottom: 10px; }
  .agenda-toolbar.is-timeline .cash-link { grid-column: 1 / -1; justify-self: end; }
}

@media print {
  .demo-banner, .drag-ghost { display: none !important; }
}

/* ==========================================================================
   Fases de la reserva: por llegar, en el local, liberada (o una incidencia)
   ========================================================================== */
/* Pestañas de la agenda por fase */
.status-tabs .tab-confirmar > i { background: var(--tile); }
.status-tabs .tab-llegar > i { background: var(--saffron); }
.status-tabs .tab-local > i { background: var(--olive); }
.status-tabs .tab-liberadas > i { background: #98a0ab; }
.status-tabs .tab-incidencias > i { background: var(--tomato); }

/* Ficha: el camino de la reserva, con el estado exacto bajo la fase en la que está */
.phase-track { --phase: var(--ink); display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.phase-track[data-state=pending] { --phase: var(--state-pending); }
.phase-track[data-state=review] { --phase: var(--tile); }
.phase-track[data-state=confirmed] { --phase: var(--saffron); }
.phase-track[data-state=arrived] { --phase: var(--state-arrived); }
.phase-track[data-state=at_bar] { --phase: var(--state-bar); }
.phase-track[data-state=seated] { --phase: var(--olive); }
.phase-track[data-state=dessert] { --phase: var(--state-dessert); }
.phase-track[data-state=bill] { --phase: var(--state-bill); }
.phase-track[data-state=cleaning] { --phase: var(--state-cleaning); }
.phase-track[data-state=completed] { --phase: #667085; }
.phase-track[data-state=no_show] { --phase: #b4588d; }
.phase-track[data-state=cancelled] { --phase: var(--tomato); }
.phase-track li { display: grid; align-content: start; gap: 2px; min-width: 0; padding-top: 8px; border-top: 3px solid var(--line-2); color: var(--ink-3); font-size: 12.5px; font-weight: 500; line-height: 1.3; }
.phase-track li.is-done { border-top-color: #98a0ab; color: var(--ink-2); }
.phase-track li.is-current, .phase-track li.is-incident { border-top-color: var(--phase); color: var(--ink); font-weight: 600; }
.phase-track small { overflow: hidden; color: var(--ink-2); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.phase-track li.is-incident span { color: var(--tomato-ink); }

/* Lo que suele tocar después, a la vista; el resto de estados, plegado */
.quick-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.quick-states form { display: grid; }
.service-actions .quick-states .button { justify-content: flex-start; gap: 8px; }
.quick-state i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--dot, var(--line-2)); }
.quick-state[data-to=confirmed] { --dot: var(--saffron); }
.quick-state[data-to=arrived] { --dot: var(--state-arrived); }
.quick-state[data-to=at_bar] { --dot: var(--state-bar); }
.quick-state[data-to=bill] { --dot: var(--state-bill); }
.quick-state[data-to=completed] { --dot: #98a0ab; }
.quick-state[data-to=no_show] { --dot: #b4588d; }
.quick-state[data-to=cancelled] { --dot: var(--tomato); color: var(--tomato-ink); }
.more-states { padding-top: 10px; border-top: 1px solid var(--line); }
.more-states summary { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--ink-2); font-size: 13px; font-weight: 500; list-style: none; cursor: pointer; }
.more-states summary::-webkit-details-marker { display: none; }
.more-states summary .icon { width: 15px; height: 15px; transition: transform 160ms var(--ease-out); }
.more-states[open] summary .icon { transform: rotate(180deg); }
.more-states .state-group { margin-top: 10px; }
@media (hover: hover) and (pointer: fine) {
  .more-states summary:hover { color: var(--ink); }
}

/* ==========================================================================
   Nueva reserva en el panel lateral, y el cliente que se reconoce por su teléfono
   ========================================================================== */
.booking-panel { display: grid; gap: 16px; padding: 20px 20px 24px; }
.booking-panel-head h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.booking-panel-head p { margin-top: 4px; font-size: 13.5px; }
.booking-panel .booking-section { padding: 16px; box-shadow: 0 0 0 1px var(--line); }
.booking-panel .booking-submit { bottom: 12px; }
.workspace .booking-panel .booking-submit { bottom: max(12px, env(safe-area-inset-bottom)); }

.guest-match { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--tile-tint); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); }
.guest-match[hidden] { display: none; }
.guest-match-head { display: flex; align-items: center; gap: 10px; }
.guest-match-head > .icon { flex-shrink: 0; width: 18px; height: 18px; color: var(--tile-ink); }
.guest-match-head div { display: grid; min-width: 0; }
.guest-match-head strong { font-size: 14px; font-weight: 600; }
.guest-match-head span { color: var(--ink-2); font-size: 12.5px; }
.guest-match .guest-tags, .guest-match .guest-prefs, .guest-match .guest-filled { margin: 0; }
.guest-match .guest-prefs { font-size: 13px; white-space: pre-line; }
.guest-match .guest-filled { color: var(--tile-ink); font-size: 12.5px; font-weight: 500; }
.guest-match .button { justify-self: start; }

/* ==========================================================================
   Plano en el móvil: cabe entero a lo ancho; con dos dedos o con + y − se amplía
   y se recorre dentro de su marco (al editar las mesas conserva su tamaño de trabajo)
   ========================================================================== */
.floor-zoom { display: none; }
@media (max-width: 760px) {
  .floor-scroll { overflow: auto; touch-action: pan-x pan-y; }
  .floor:not(.editing), .floor.layout-long:not(.editing), .floor.layout-square:not(.editing) { min-width: 0; max-width: none; width: calc(100% * var(--floor-zoom, 1)); }
  .floor-zoom { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
  .floor-zoom p { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
  .floor-zoom p .icon { flex-shrink: 0; width: 15px; height: 15px; }
  .floor-zoom .icon-button { flex-shrink: 0; width: var(--control-h-sm); height: var(--control-h-sm); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); }
  .floor-zoom .icon-button:disabled { opacity: .4; }
  [data-floor-region].is-editing .floor-zoom { display: none; }
}

/* ==========================================================================
   Página de reservas: las próximas mesas libres para dos, y añadir la reserva al calendario
   ========================================================================== */
.quick-slots { display: grid; gap: 10px; margin: 0 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.quick-slots p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 550; }
.quick-slots p .icon { width: 16px; height: 16px; color: var(--ink-3); }
.quick-slot-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(80px, 1fr); gap: 8px; margin: -4px; padding: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.quick-slot-row::-webkit-scrollbar { display: none; }
.quick-slot-row button { display: grid; justify-items: center; gap: 1px; min-height: 56px; padding: 6px 4px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); color: var(--ink); font-variant-numeric: tabular-nums; font-family: var(--font-num); transition: box-shadow 150ms ease; }
.quick-slot-row button span { color: var(--ink-3); font-size: 11.5px; font-weight: 450; }
.quick-slot-row button strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.quick-slot-row button:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) {
  .quick-slot-row button:hover { box-shadow: var(--shadow-1), inset 0 0 0 1.5px var(--ink); }
}
.confirmation-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.confirmation-page .field-hint a { color: var(--ink-2); font-weight: 550; text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Foto de portada y logo del restaurante
   ========================================================================== */
/* Página pública: la foto llena la franja oscura, con un velo que deja leer el nombre */
.restaurant-header { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.restaurant-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 600px; min-height: 56px; margin-inline: auto; padding: 6px 16px; }
.restaurant-brand { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; color: var(--ink); border-radius: var(--r-sm); }
.restaurant-header-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.restaurant-header-mark { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--tomato-tint); color: var(--tomato-ink); font-weight: 650; }
.restaurant-header-phone { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 0 8px; color: var(--ink-2); border-radius: var(--r-sm); font-size: 13px; font-weight: 550; }
.restaurant-header-phone .icon { width: 16px; height: 16px; }
.restaurant-brand-image, .venue-chip .restaurant-brand-image { display: block; flex: 0 0 auto; width: auto; max-width: 112px; height: 36px; padding: 3px; object-fit: contain; border-radius: var(--r-xs); background: #fff; box-shadow: none; }
.venue-chip:has(.restaurant-brand-image) { height: 40px; }
.venue-chip .restaurant-brand-image { max-width: 84px; height: 32px; }
html:has(.restaurant-header) { scroll-padding-top: 72px; }
body.direct:has(.policy-page)::before { display: none; }
@media (hover: hover) and (pointer: fine) {
  .restaurant-header-phone:hover { background: var(--sunk); color: var(--ink); }
}
@media (max-width: 420px) {
  .restaurant-header-inner { gap: 8px; }
  .restaurant-brand { gap: 8px; }
  .restaurant-header-phone span { display: none; }
  .restaurant-header .restaurant-brand-image { max-width: 80px; }
  .venue-chip .restaurant-brand-image { max-width: 64px; }
}
@media print {
  .restaurant-header { position: static; }
  .restaurant-header-phone { display: none; }
}
body.direct.has-cover::before {
  background:
    linear-gradient(180deg, rgb(17 24 39 / .55) 0%, rgb(17 24 39 / .72) 55%, rgb(17 24 39 / .9) 100%),
    var(--cover) center 40% / cover no-repeat,
    #15171c;
}
img.reserve-logo { display: block; object-fit: contain; }

/* Ajustes */
.image-slots { display: grid; gap: 16px; }
.image-slot { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 16px; }
.image-preview { display: grid; place-items: center; overflow: hidden; border-radius: var(--r); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }
.image-preview.image-cover { aspect-ratio: 16 / 10; }
.image-preview.image-logo { justify-self: center; width: 76px; aspect-ratio: 1; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-1); color: var(--tomato); font-size: 30px; font-weight: 650; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview.image-logo img { padding: 6px; object-fit: contain; }
.image-preview > .icon { width: 28px; height: 28px; }
.image-info { display: grid; gap: 4px; min-width: 0; }
.image-info strong { font-size: 14px; font-weight: 600; }
.image-info p { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.image-actions form { margin: 0; }
.image-pick { position: relative; cursor: pointer; }
.image-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.image-pick:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 420px) {
  .image-slot { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
}

/* ==========================================================================
   Privacidad: aviso corto en los formularios, política del restaurante y Ajustes
   ========================================================================== */
/* Formularios públicos: quién guarda los datos, justo bajo el botón */
.privacy-note { max-width: 58ch; margin: 14px auto 0; color: var(--ink-3); font-size: 12px; line-height: 1.55; text-align: center; text-wrap: pretty; }
.reserve-trust + .privacy-note { margin-top: 8px; }
.privacy-note strong { color: var(--ink-2); font-weight: 550; }
.privacy-note a { color: var(--ink-2); font-weight: 550; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Pie de las páginas del restaurante */
.direct-made { flex-wrap: wrap; justify-content: center; }
.direct-dot { color: var(--line-2); }
.direct-legal { color: var(--ink-3); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .direct-legal:hover { color: var(--ink); text-decoration-color: currentColor; }
}

/* Política de privacidad del restaurante: el logo en la franja y el texto en una tarjeta de lectura */
.policy-page { display: grid; }
.policy-head { display: grid; justify-items: center; gap: 6px; padding: 0 8px 22px; text-align: center; }
.policy-head .reserve-logo { margin-bottom: 14px; }
.policy-head h1 { font-size: clamp(24px, 5vw, 30px); }
.policy-head p { color: var(--ink-2); font-size: 15px; }
.policy-card { display: grid; padding: 16px var(--card-pad) 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 48px -20px rgb(16 24 40 / .22), 0 0 0 1px rgb(16 24 40 / .06); }
.policy-card section { display: grid; gap: 10px; padding: 18px 0; }
.policy-card section + section { border-top: 1px solid var(--line); }
.policy-card h2 { font-size: 15px; }
.policy-card p, .policy-list li { color: var(--ink-2); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.policy-card section a { color: var(--ink); font-weight: 550; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; overflow-wrap: anywhere; }
.policy-list { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
.policy-list li::marker { color: var(--ink-3); }
.policy-list strong { color: var(--ink); font-weight: 550; }
.policy-summary { display: grid; gap: 8px; margin: 0 0 4px; padding: 14px 16px; border-radius: var(--r); background: var(--olive-tint); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .18); list-style: none; }
.policy-summary li { display: flex; align-items: flex-start; gap: 10px; color: var(--olive-ink); font-size: 14px; font-weight: 500; line-height: 1.45; }
.policy-summary .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--olive-deep); }
.policy-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.policy-facts div { display: grid; gap: 2px; min-width: 0; }
.policy-facts dt { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.policy-facts dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.policy-facts dd a { font-weight: 500; }
.policy-page > .back { justify-self: center; margin: 24px 0 0; }
@media (max-width: 520px) {
  .policy-card { padding-inline: 16px; }
  .policy-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Ajustes: los datos del responsable y cómo los leen los clientes */
.privacy-fields { margin-bottom: 16px; }
.privacy-fields .field { margin: 0; }
.privacy-fields .field-hint { color: var(--ink-3); }
.privacy-preview { display: grid; gap: 6px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.privacy-preview-label { color: var(--ink-3); font-size: 12px; font-weight: 550; }
.privacy-preview .privacy-note { max-width: none; margin: 0; font-size: 12.5px; text-align: left; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.privacy-form + .field-hint { margin-top: 14px; }

/* ==========================================================================
   Agenda en tres vistas: lista, barras por mesa y mes
   ========================================================================== */
.view-switch { position: relative; isolation: isolate; display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.view-switch a { position: relative; display: inline-flex; align-items: center; gap: 6px; height: calc(var(--control-h) - 6px); padding: 0 12px; border-radius: var(--r-xs); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: color 200ms ease, background-color 150ms ease; }
.view-switch .icon { width: 15px; height: 15px; }
.view-switch a[aria-current] { color: var(--ink); }
.view-pill { position: absolute; inset: 0; z-index: -1; border-radius: var(--r-xs); background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); will-change: transform; }
.view-switch a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .view-switch a:not([aria-current]):hover { color: var(--ink); background: rgb(255 255 255 / .6); }
}
.agenda-toolbar.is-timeline .filters { flex: 0 1 auto; }
.month-help { margin: 0 0 0 auto; color: var(--ink-3); font-size: 12.5px; }

/* Barras: una fila por mesa, la hora de izquierda a derecha (1,8 px por minuto como mínimo: un cuarto de hora, 27 px; app.js lo estira para llenar el ancho) */
.timeline { --min: 1.8px; --label-w: 112px; --head-h: 58px; --bar-h: 30px; --bar-gap: 5px; display: grid; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.timeline-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--saffron-tint); color: var(--saffron-ink); font-size: 13px; }
.timeline-note .icon { flex-shrink: 0; width: 16px; height: 16px; }
.timeline-scroll { overflow: auto; max-height: max(380px, calc(100dvh - 300px)); scrollbar-width: thin; }
.timeline-grid { position: relative; display: grid; grid-template-columns: var(--label-w) calc(var(--span) * var(--min)); width: max-content; min-width: 100%; }
.tl-corner { position: sticky; top: 0; left: 0; z-index: 6; display: flex; align-items: flex-end; height: var(--head-h); padding: 0 14px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 4px 0 8px -4px rgb(16 24 40 / .08); color: var(--ink-3); font-size: 12px; font-weight: 550; }
.tl-head { position: sticky; top: 0; z-index: 5; height: var(--head-h); border-bottom: 1px solid var(--line); background: var(--surface); }
.tl-tick { position: absolute; bottom: 8px; left: calc(var(--x) * var(--min) + 7px); color: var(--ink-3); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; font-family: var(--font-num); line-height: 1; writing-mode: vertical-rl; transform: rotate(180deg); }
.tl-tick.is-hour { color: var(--ink); font-size: 11px; font-weight: 650; }
.tl-gap-head, .tl-gap { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * var(--min)); width: calc(15 * var(--min)); background: repeating-linear-gradient(135deg, var(--sunk) 0 4px, var(--surface) 4px 8px); box-shadow: inset 1px 0 var(--line), inset -1px 0 var(--line); }
.tl-room { position: relative; z-index: 4; grid-column: 1 / -1; padding: 9px 0 7px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.tl-room > span { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; }
.tl-label { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 10px 0 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 4px 0 8px -4px rgb(16 24 40 / .08); }
.tl-table { display: inline-flex; color: inherit; border-radius: 6px; }
.tl-table:hover strong, .tl-table:focus-visible strong { color: var(--tile); text-decoration: underline; text-underline-offset: 3px; }
.tl-label strong { font-size: 15px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tl-label.is-loose strong { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.tl-seats { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tl-seats .icon { width: 12px; height: 12px; }
.tl-joined { display: inline-grid; margin-left: auto; color: var(--ink-3); }
.tl-joined .icon { width: 14px; height: 14px; }
.tl-track { position: relative; height: calc(var(--lanes) * (var(--bar-h) + var(--bar-gap)) + var(--bar-gap)); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, rgb(16 24 40 / .045) 0 1px, transparent 1px calc(15 * var(--min))) var(--surface); cursor: cell; }
/* La fila bajo el ratón: la mesa y toda su franja se tiñen, para seguirla hasta la hora sin perderse */
@media (hover: hover) and (pointer: fine) {
  .tl-track:hover, .tl-label:hover + .tl-track, .tl-label:hover, .tl-label:has(+ .tl-track:hover) { background-color: var(--tile-tint); }
  .tl-label:hover strong, .tl-label:has(+ .tl-track:hover) strong { color: var(--tile); }
}
.tl-overlay { position: absolute; top: var(--head-h); bottom: 0; left: var(--label-w); z-index: 1; width: calc(var(--span) * var(--min)); pointer-events: none; }
.tl-hour { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * var(--min)); width: 1px; background: var(--line); }
.tl-now { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * var(--min) - 1px); z-index: 3; width: 2px; background: var(--saffron); }
.tl-now b { position: absolute; top: 4px; left: 50%; translate: -50% 0; padding: 1px 6px; border-radius: 999px; background: var(--saffron); color: #fff; font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* Cada reserva: su color de estado, el nombre, cuántos son y el icono del estado al final */
.tl-pending { --c: var(--state-pending); --c-tint: var(--state-pending-tint); --c-ink: var(--state-pending-ink); }
.tl-review { --c: var(--tile); --c-tint: var(--tile-tint); --c-ink: var(--tile-ink); }
.tl-confirmed { --c: var(--saffron); --c-tint: var(--saffron-tint); --c-ink: var(--saffron-ink); }
.tl-arrived { --c: var(--state-arrived); --c-tint: var(--state-arrived-tint); --c-ink: var(--state-arrived-ink); }
.tl-at_bar { --c: var(--state-bar); --c-tint: var(--state-bar-tint); --c-ink: var(--state-bar-ink); }
.tl-seated { --c: var(--olive); --c-tint: var(--olive-tint); --c-ink: var(--olive-ink); }
.tl-dessert { --c: var(--state-dessert); --c-tint: var(--state-dessert-tint); --c-ink: var(--state-dessert-ink); }
.tl-bill { --c: var(--state-bill); --c-tint: var(--state-bill-tint); --c-ink: var(--state-bill-ink); }
.tl-completed { --c: #98a0ab; --c-tint: var(--stone-tint); --c-ink: var(--stone-ink); }
.tl-bar { position: absolute; top: calc(var(--bar-gap) + var(--lane) * (var(--bar-h) + var(--bar-gap))); left: calc(var(--x) * var(--min) + 1px); z-index: 2; display: flex; align-items: center; gap: 6px; width: max(calc(var(--w) * var(--min) - 3px), 48px); height: var(--bar-h); padding-left: 9px; overflow: hidden; border-radius: 7px; background: var(--c-tint, var(--sunk)); color: var(--c-ink, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ink-3)) 30%, transparent), 0 1px 2px rgb(16 24 40 / .06); font-size: 12.5px; font-weight: 600; line-height: 1; transition: box-shadow 150ms ease; }
.timeline:not(.axis-y) .tl-bar { container: tl-bar / inline-size; }
@container tl-bar (max-width: 102px) {
  .tl-guests { display: none; }
}
@container tl-bar (max-width: 78px) {
  .tl-name, .tl-state { display: none; }
  .tl-time { font-size: 11.5px; }
}
.tl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name .icon { display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.tl-guests { flex: none; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tl-state { flex: none; display: grid; place-items: center; align-self: stretch; width: 26px; background: var(--c, var(--ink-3)); color: #fff; }
.tl-state .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.tl-bar.is-linked { background: repeating-linear-gradient(135deg, var(--c-tint) 0 5px, var(--surface) 5px 9px); }
.tl-bar.is-linked .tl-state { background: color-mix(in srgb, var(--c) 55%, #fff); }
.tl-bar.is-late { box-shadow: inset 0 0 0 1.5px var(--tomato), 0 1px 2px rgb(16 24 40 / .06); }
.tl-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .tl-bar:hover { box-shadow: inset 0 0 0 1.5px var(--c), var(--shadow-2); }
}
/* Al pasar el ratón por un hueco: dónde caería una reserva nueva (dura lo de siempre) */
.tl-ghost { position: absolute; top: var(--bar-gap); left: calc(var(--x) * var(--min) + 1px); z-index: 1; display: flex; align-items: center; width: calc(var(--d, 90) * var(--min) - 3px); height: var(--bar-h); padding-left: 9px; border: 1.5px dashed #b4bac4; border-radius: 7px; background: rgb(255 255 255 / .75); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.timeline-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border-top: 1px solid var(--line); }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12px; }
.timeline-legend li { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend i { width: 14px; height: 10px; border-radius: 3px; background: var(--c); }
.timeline-help { margin: 0; color: var(--ink-3); font-size: 12px; }

/* Mes: cuántas reservas y personas hay cada día; los días que se cierra, en ámbar */
.month { overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.month-week, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-week { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.month-week span { padding: 10px 12px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.month-day { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; min-height: 108px; padding: 10px 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); transition: background-color 150ms ease; }
.month-day:nth-child(7n) { border-right: 0; }
.month-date { min-width: 28px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); line-height: 28px; }
.month-date small { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.month-day.is-today .month-date { display: grid; place-items: center; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; }
.month-day.is-other { background: var(--surface-2); }
.month-day.is-other .month-date, .month-day.is-past:not(.is-today) .month-date { color: var(--ink-3); }
.month-day.is-past:not(.is-today) .month-chip { opacity: .7; }
.month-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 22px; padding: 0 8px; overflow: hidden; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.month-chip .icon { flex-shrink: 0; width: 13px; height: 13px; }
.month-chip.is-bookings { background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); }
.month-chip.is-people { background: var(--sunk); color: var(--ink-2); }
.month-chip.is-closed { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .25); }
.month-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
  .month-day:hover { background: var(--surface-2); }
}
.month-hero .day-sub { flex-wrap: wrap; }
.month-busiest { flex-basis: 100%; color: var(--ink-2); }

@media (max-width: 760px) {
  /* Las tres vistas, a lo ancho y encima de los filtros */
  .agenda-toolbar .view-switch { grid-column: 1 / -1; grid-row: 1; display: flex; }
  .agenda-toolbar .view-switch a { flex: 1; justify-content: center; }
  .agenda-toolbar .search-box, .agenda-toolbar .more-menu, .js .agenda-toolbar .search-box, .js .agenda-toolbar .segmented, .js .agenda-toolbar .more-menu { grid-row: 2; }
  .agenda-toolbar .filter-date, .agenda-toolbar .segmented { grid-row: 3; }
  .agenda-toolbar.is-timeline .segmented, .js .agenda-toolbar.is-timeline .segmented { grid-column: 1 / -1; grid-row: 2; }
  .month-help { display: none; }
  .month-hero .day-title h1::after { display: none; }
  .timeline { --label-w: 76px; --min: 1.6px; }
  .tl-label { gap: 4px; padding: 0 6px 0 10px; }
  .tl-label strong { font-size: 14px; }
  .tl-seats { padding: 0 5px; }
  .tl-seats .icon, .tl-joined { display: none; }
  .timeline-scroll { max-height: max(360px, calc(100dvh - 250px)); }
  .month-week span { padding: 8px 0; font-size: 0; text-align: center; }
  .month-week span::before { content: attr(data-short); font-size: 12px; }
  .month-day { align-items: center; gap: 3px; min-height: 76px; padding: 6px 2px 8px; }
  .month-date { font-size: 13.5px; }
  .month-word { display: none; }
  .month-chip { gap: 2px; height: 18px; padding: 0 5px; font-size: 11px; }
  .month-chip .icon { width: 11px; height: 11px; }
  .month-chip.is-closed { padding: 0 4px; font-size: 10px; }
}

/* Ajustes: avisos por SMS */
.sms-state { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13px; }
.sms-state .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }
.sms-state.is-on { background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); }
.sms-form .sms-master { margin-bottom: 12px; }
.sms-master label { font-weight: 600; }
.sms-kinds { display: grid; gap: 8px; margin: 0 0 18px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: opacity 150ms ease; }
.sms-kinds legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.sms-kinds p, .sms-kinds p:last-of-type { margin: 0; }
.sms-form:has(#id_sms_enabled:not(:checked)) .sms-kinds { opacity: .55; }
.sms-fields { margin-bottom: 16px; }
.sms-fields .field { margin: 0; }
.sms-fields .field-hint { color: var(--ink-3); }
.sms-test { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.mail-port { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: start; }
.sms-state strong { font-weight: 600; overflow-wrap: anywhere; }
.mail-form:has(#id_mail-mail_enabled:not(:checked)) .mail-fields { opacity: .6; }
.sms-test .field { flex: 1 1 200px; margin: 0; }
.mail-icon.is-sms { background: var(--tile-tint); color: var(--tile-ink); }

/* Señal de los grupos grandes */
.pay-box { display: flex; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: var(--r); background: var(--olive-tint); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); color: var(--olive-ink); font-size: 13px; line-height: 1.5; text-align: left; }
.pay-box[hidden] { display: none; }
.pay-box > .icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.pay-box div { display: grid; gap: 2px; }
.pay-box strong { color: var(--ink); font-size: 13.5px; }
.pay-box + .confirm-button { margin-top: 14px; }
.pay-due { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; width: 100%; margin: 20px 0 6px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--saffron-tint); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); color: var(--saffron-ink); text-align: left; }
.pay-due > .icon { width: 22px; height: 22px; }
.pay-due div { display: grid; gap: 2px; font-size: 13.5px; line-height: 1.45; }
.pay-due strong { color: var(--ink); font-size: 15px; }
.pay-due form { grid-column: 1 / -1; }
.pay-due .button { width: 100%; }
.pay-done, .deposit-line { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 4px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--olive-tint); color: var(--olive-ink); box-shadow: inset 0 0 0 1px rgb(22 163 74 / .2); font-weight: 550; }
.deposit-line { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; font-weight: 450; font-size: 13px; }
.deposit-line > .icon { flex-shrink: 0; width: 17px; height: 17px; margin-top: 1px; }
.deposit-line span { display: grid; flex: 1; gap: 1px; min-width: 0; }
.deposit-line strong { color: var(--ink); font-size: 13.5px; }
.deposit-line.is-due { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); }
.deposit-line.is-expired { background: var(--stone-tint); color: var(--stone-ink); box-shadow: inset 0 0 0 1px var(--line); }
.deposit-line .text-link { align-self: center; font-size: 12.5px; }
.pay-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--olive-tint); color: var(--olive-ink); font-size: 11.5px; font-weight: 600; }
.pay-badge .icon { width: 12px; height: 12px; }
.pay-badge.is-due { background: var(--saffron-tint); color: var(--saffron-ink); }
.pay-fields { margin-bottom: 16px; }
.pay-fields .field { margin: 0; }
.pay-fields .field-hint { color: var(--ink-3); }
.pay-form + .share-help { margin-top: 16px; }
.pay-form:has(#id_pay_enabled:not(:checked)) .pay-fields > .field:not(.full) { opacity: .55; }

/* Ficha del cliente: borrar sus datos cuando lo pide */
.erase-section { margin-top: 16px; box-shadow: var(--shadow-1), 0 0 0 1px #f5c9c4; }
.section-icon.danger { background: var(--tomato-tint); color: var(--tomato-ink); }
.erase-section .settings-heading p { max-width: 70ch; }
.erase-blocked { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); font-size: 13px; line-height: 1.5; }
.erase-blocked .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }
.erase-blocked a { color: var(--ink); font-weight: 550; text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Entre páginas (Agenda, Sala, Clientes, Ajustes…): las barras se quedan quietas
   y el contenido cambia con un fundido corto que sube un poco, sin parpadeo en blanco.
   ========================================================================== */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
:root:active-view-transition:not([data-vt]) #main { view-transition-name: page; }
::view-transition-old(page) { animation: 160ms var(--ease-out) both fade-out; }
::view-transition-new(page) { animation: 380ms var(--ease-spring) 30ms both view-in-up; }

/* Lista: la comida y la cena, cada una en su tarjeta, con su color, su icono y lo que suman.
   Al desplazarse, la cabecera del servicio se queda arriba: siempre se sabe en cuál se está. */
.reservation-list { gap: 14px; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
.reservation-list > * + * { border-top: 0; }
.reservation-list > .empty-state { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.service-block { display: grid; overflow: clip; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.service-block > * + * { border-top: 1px solid var(--line); }
.service-block > .now-line, .service-block > .now-line + * { border-top: 0; }
.service-heading { position: sticky; top: var(--bar-h); z-index: 4; gap: 10px; padding: 10px 16px; color: var(--ink); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.service-heading.lunch { background: color-mix(in srgb, var(--chart-lunch) 8%, #fff); box-shadow: inset 3px 0 0 var(--chart-lunch), 0 1px 0 color-mix(in srgb, var(--chart-lunch) 18%, transparent); }
.service-heading.dinner { background: color-mix(in srgb, var(--chart-dinner) 7%, #fff); box-shadow: inset 3px 0 0 var(--chart-dinner), 0 1px 0 color-mix(in srgb, var(--chart-dinner) 16%, transparent); }
.service-icon { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 999px; }
.service-heading .service-icon .icon { width: 15px; height: 15px; color: #fff; }
.service-heading.lunch .service-icon { background: var(--chart-lunch); }
.service-heading.dinner .service-icon { background: var(--chart-dinner); }
.service-sum { margin-left: auto; color: var(--ink-2); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
@media (max-width: 760px) {
  .reservation-list { gap: 10px; }
  .service-heading { padding: 8px 12px; }
}
/* Narrow lists: a long state («Pendiente de confirmación») is cut with dots instead of running into the people column. */
.res-meta { min-width: 0; }
.res-meta > span { max-width: 100%; min-width: 0; }
.res-name .status-inline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Editor: − Mesas + (tamaño de las mesas de la sala que se ve) */
.table-size { align-items: center; }
.tool-value { display: grid; justify-items: center; min-width: 52px; padding: 0 4px; line-height: 1.1; }
.tool-value small { color: var(--ink-3); font-size: 10.5px; font-weight: 500; }
.tool-value output { color: var(--ink); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--font-num); }

/* ==========================================================================
   Referencias del plano dibujadas como en un plano de verdad, vistas desde arriba:
   la barra con sus taburetes, la puerta con su barrido, los aseos, la cocina…
   Las que van contra una pared se giran hacia ella y la etiqueta cae del lado de la sala.
   ========================================================================== */
.landmark:not(.landmark-texto) { display: block; width: var(--w, calc(6 * var(--cq, 1cqw))); height: var(--h, calc(6 * var(--cq, 1cqw))); padding: 0; border-radius: calc(.6 * var(--cq, 1cqw)); background: none; box-shadow: none; }
.landmark-barra { --w: calc(19 * var(--cq, 1cqw)); --h: calc(5.2 * var(--cq, 1cqw)); }
.landmark-cocina { --w: calc(13 * var(--cq, 1cqw)); --h: calc(5.6 * var(--cq, 1cqw)); }
.landmark-ventana { --w: calc(13 * var(--cq, 1cqw)); --h: calc(1.6 * var(--cq, 1cqw)); }
.landmark-entrada { --w: calc(6.4 * var(--cq, 1cqw)); --h: calc(6.4 * var(--cq, 1cqw)); }
.landmark-escaleras { --w: calc(8.4 * var(--cq, 1cqw)); --h: calc(5.6 * var(--cq, 1cqw)); }
.landmark-caja { --w: calc(6 * var(--cq, 1cqw)); --h: calc(4.2 * var(--cq, 1cqw)); }
.landmark-aseos { --w: calc(5.4 * var(--cq, 1cqw)); --h: calc(5.4 * var(--cq, 1cqw)); }
.landmark-columna { --w: calc(3 * var(--cq, 1cqw)); --h: calc(3 * var(--cq, 1cqw)); }
.landmark-planta { --w: calc(4.4 * var(--cq, 1cqw)); --h: calc(4.4 * var(--cq, 1cqw)); }
.landmark-terraza { --w: calc(8.6 * var(--cq, 1cqw)); --h: calc(8.6 * var(--cq, 1cqw)); }
/* Against a side wall they stand upright, and every one faces into the room */
:is(.landmark-barra, .landmark-cocina, .landmark-ventana, .landmark-entrada, .landmark-escaleras):is([data-side=left], [data-side=right]) { width: var(--h, calc(6 * var(--cq, 1cqw))); height: var(--w, calc(6 * var(--cq, 1cqw))); }
:is(.landmark-barra, .landmark-cocina, .landmark-ventana, .landmark-entrada, .landmark-escaleras)[data-side=right] { --turn: 90deg; }
:is(.landmark-barra, .landmark-cocina, .landmark-ventana, .landmark-entrada, .landmark-escaleras)[data-side=bottom] { --turn: 180deg; }
:is(.landmark-barra, .landmark-cocina, .landmark-ventana, .landmark-entrada, .landmark-escaleras)[data-side=left] { --turn: 270deg; }
.lm-art { position: absolute; left: 50%; top: 50%; width: var(--w, calc(6 * var(--cq, 1cqw))); height: var(--h, calc(6 * var(--cq, 1cqw))); overflow: visible; translate: -50% -50%; rotate: var(--turn, 0deg); pointer-events: none; }
/* El nombre de cada referencia: texto pequeño en mayúsculas, sin píldora ni sombra, como la rotulación de un plano */
.landmark:not(.landmark-texto) .lm-label { position: absolute; z-index: 1; padding: 0 calc(.3 * var(--cq, 1cqw)); color: var(--lm, var(--ink-3)); font-size: max(8.5px, calc(.9 * var(--cq, 1cqw))); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; line-height: 1.35; white-space: nowrap; pointer-events: none; }
.landmark:not(.landmark-texto)[data-side=top] .lm-label { left: 50%; top: calc(100% + calc(.45 * var(--cq, 1cqw))); translate: -50% 0; }
.landmark:not(.landmark-texto)[data-side=bottom] .lm-label { left: 50%; bottom: calc(100% + calc(.45 * var(--cq, 1cqw))); translate: -50% 0; }
.landmark:not(.landmark-texto)[data-side=left] .lm-label { top: 50%; left: calc(100% + calc(.45 * var(--cq, 1cqw))); translate: 0 -50%; }
.landmark:not(.landmark-texto)[data-side=right] .lm-label { top: 50%; right: calc(100% + calc(.45 * var(--cq, 1cqw))); translate: 0 -50%; }
/* Plants and pillars speak for themselves: their name only shows while arranging the plan */
.landmark-planta .lm-label, .landmark-columna .lm-label { display: none; }
.floor.editing :is(.landmark-planta, .landmark-columna):is(:hover, .selected, :focus-visible) .lm-label { display: block; }
.landmark-texto .lm-label { max-width: calc(22 * var(--cq, 1cqw)); overflow: hidden; text-overflow: ellipsis; }

/* Under the next step, the other usual move: «Ha llegado» under «Sentar», «Reabrir cuenta» under «Ha pagado» */
.res-steps { display: grid; gap: 4px; }
.res-steps form { display: grid; margin: 0; }
.res-steps .step-second { min-height: 26px; padding: 0 9px; gap: 5px; font-size: 12px; font-weight: 550; }
.res-steps .step-second .icon { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .res-steps { display: flex; flex: 1; gap: 8px; }
  .res-steps form { flex: 1; }
  .res-steps .step-second { min-height: var(--control-h-sm); font-size: var(--control-fs-sm); }
}
.state-panel .second-step { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 48px; margin-top: 6px; padding: 6px 14px; text-align: left; }
.second-step > i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--line-2)); }
.second-step[data-to=arrived] { --dot: var(--state-arrived); }
.second-step[data-to=seated] { --dot: var(--olive); }
.second-step > span { display: grid; gap: 1px; }
.second-step strong { font-size: 14px; font-weight: 600; }
.second-step small { color: var(--ink-3); font-size: 12px; font-weight: 450; }

/* Plano: con la cuenta pedida siguen sentados (sillas ocupadas); los que ya han llegado esperan su mesa */
.floor .floor-table.cur-bill .chair { background: #c7d0fe; }
/* Llegan tarde: su hora ha pasado y nadie los ha marcado. La mesa sigue guardada para ellos, así que no se pinta libre. */
.floor-table.is-late .table-top { background: var(--tomato-tint); border-color: var(--tomato); color: var(--tomato-ink); }
.floor-table.is-late .table-top small { color: var(--tomato-ink); }
.floor .floor-table.is-late .chair { background: #f6c9c3; }
.floor-table.is-late .table-tag { color: var(--tomato-ink); box-shadow: 0 0 0 1px #f6c9c3; }
.floor-legend .lg-late { background: var(--tomato-tint); border-color: var(--tomato); }
/* La app pregunta en vez de decidir sola: «¿Ha venido?» sobre los botones de la fila. */
.res-ask { color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: center; }
/* «¿Ya se han ido?»: liberar la mesa y sentar a los siguientes, en un toque. */
.free-and-seat { display: grid; gap: 8px; margin: 0 0 16px; padding: 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.free-and-seat-title { margin: 0; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.free-and-seat .button { white-space: normal; min-height: 44px; text-align: left; justify-content: flex-start; }
.due-bookings { margin-bottom: 18px; }
.walkin-or { margin: 0 0 6px; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.due-bookings .walkin-table:disabled { opacity: .55; cursor: not-allowed; }
.floor-table.is-waiting .table-top { background: var(--state-arrived-tint); border-color: var(--state-arrived); color: var(--state-arrived-ink); }
.floor-table.is-waiting .table-top small { color: var(--state-arrived-ink); }
.floor .floor-table.is-waiting .chair { background: #fbcfe8; }
.floor-table.is-waiting .table-tag { color: var(--state-arrived-ink); box-shadow: 0 0 0 1px #fbcfe8; }

/* Grupos grandes: sus mesas juntas se dibujan como una sola, donde están, con una silla por persona */
.floor:not(.editing) .floor-table.is-combined { left: var(--combo-x) !important; top: var(--combo-y) !important; }
.floor-table.is-combined.shape-wide.size-xl { --tw: calc(var(--combo-len, 20.5) * var(--cq, 1cqw)); --th: calc(9.8 * var(--cq, 1cqw)); }
.floor-table.is-combined.shape-tall.size-xl { --tw: calc(9.8 * var(--cq, 1cqw)); --th: calc(var(--combo-len, 20.5) * var(--cq, 1cqw)); }
.floor:not(.editing) .floor-table.is-merged { display: none; }

/* Paredes: horizontales o verticales, tan largas como una parte de la sala */
.landmark.landmark-pared { --wt: calc(1.1 * var(--cq, 1cqw)); display: block; width: calc(var(--len, 30) * 1%); height: max(4px, var(--wt)); padding: 0; border-radius: 1px; background: #475467; box-shadow: none; }
.landmark.landmark-pared[data-dir=v] { width: max(4px, var(--wt)); height: calc(var(--len, 30) * 1%); }
.landmark-pared .lm-label { display: none; }
.floor:not(.editing) .landmark-pared { pointer-events: none; }
.floor.editing .landmark-pared::before { content: ""; position: absolute; inset: calc(-1 * var(--cq, 1cqw)); }
.wall-end { display: none; }
.floor.editing .landmark-pared.selected .wall-end { position: absolute; z-index: 2; display: block; width: max(14px, calc(1.8 * var(--cq, 1cqw))); height: max(14px, calc(1.8 * var(--cq, 1cqw))); border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--tile), var(--shadow-1); translate: -50% -50%; touch-action: none; cursor: ew-resize; }
.landmark-pared .wall-end[data-wall-end=start] { left: 0; top: 50%; }
.landmark-pared .wall-end[data-wall-end=end] { left: 100%; top: 50%; }
.landmark-pared[data-dir=v] .wall-end[data-wall-end=start] { left: 50%; top: 0; }
.landmark-pared[data-dir=v] .wall-end[data-wall-end=end] { left: 50%; top: 100%; }
.floor.editing .landmark-pared[data-dir=v].selected .wall-end { cursor: ns-resize; }
.floor.editing .landmark-pared.selected { outline: 2px solid var(--tile); outline-offset: 3px; }
.wall-fields { display: grid; gap: 6px; margin-bottom: 12px; }
.wall-fields .shape-picker .icon { width: 16px; height: 16px; }
.wall-length span { display: flex; justify-content: space-between; }
.wall-length output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.wall-length input[type=range] { width: 100%; min-height: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--tile); }

/* Sala: qué significa cada color (sobre todo en la tablet de la sala) */
.floor-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 4px 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.floor-legend li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.floor-legend li > i { flex-shrink: 0; width: 16px; height: 12px; border: 1.5px solid; border-radius: 3px; }
.floor-legend .lg-free { background: #fff; border-color: #98a2b3; }
.floor-legend .lg-soon { background: #fffaeb; border-color: #dc6803; }
.floor-legend .lg-waiting { background: var(--state-arrived-tint); border-color: var(--state-arrived); }
.floor-legend .lg-seated { background: var(--olive-deep); border-color: var(--olive-deep); }
.floor-legend .lg-bill { background: var(--state-bill); border-color: var(--state-bill-ink); }
.floor-legend .lg-cleaning { background: var(--state-cleaning); border-color: var(--state-cleaning-ink); }
.floor-legend .lg-note { color: var(--ink-3); }
.floor-legend li > .lg-chairs { display: inline-flex; gap: 2px; width: auto; height: auto; border: 0; }
.lg-chairs b { width: 7px; height: 5px; border-radius: 2px; background: #7cc79a; }
[data-floor-region].is-editing .floor-legend { display: none; }
body.room-mode .floor-legend { justify-content: center; gap: 6px 20px; margin-top: 8px; font-size: 13.5px; }

/* Clientes: dos columnas cuando hay sitio, con el teléfono y el correo bajo el nombre */
.guest-sub { display: none; overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) {
  .guest-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guest-list > * + * { border-top: 0; }
  .guest-list > .guest-row { border-bottom: 1px solid var(--line); }
  .guest-list > .guest-row:nth-child(odd) { border-right: 1px solid var(--line); }
  .guest-list > .guest-row:last-child, .guest-list > .guest-row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .guest-list > .empty-state { grid-column: 1 / -1; }
  .guest-row { grid-template-columns: 32px minmax(0, 1fr) 56px minmax(0, 118px) 16px; gap: 12px; min-height: 72px; padding: 12px 14px 12px 16px; }
  .guest-row .guest-contact { display: none; }
  .guest-sub { display: block; }
}
.floor.editing .landmark-pared { transition: left 90ms var(--ease-out), top 90ms var(--ease-out); }

/* Sin conexión: una banda fija que no deja dudas */
.offline-band { position: sticky; top: 0; z-index: 90; padding: 10px var(--gutter); background: var(--tomato-ink); color: #fff; font-size: 14px; font-weight: 600; text-align: center; }

/* Alergias: siempre en rojo, donde aparezca el cliente */
.allergy-note { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--tomato-tint); color: var(--tomato-ink); font-size: 14px; font-weight: 600; }
.allergy-note .icon { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }
.allergy-note small { display: block; font-weight: 500; color: var(--ink-2); }

/* Historial de cambios */
.change-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.change-log li { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.change-log .who { color: var(--ink-3); font-size: 12px; }
.change-log del { color: var(--ink-3); }
.change-log ins { text-decoration: none; font-weight: 600; }

/* Conflicto: alguien guardó antes */
.conflict-box { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--saffron-tint); color: var(--saffron-ink); font-size: 14px; }
.conflict-box dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; color: var(--ink); }
.conflict-box dt { color: var(--ink-2); }

/* Bloqueos */
.block-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.block-card { padding: 14px 16px; border-radius: var(--r-md, 10px); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.block-card h3 { margin: 0 0 4px; font-size: 15px; }
.block-card .affected { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.block-card .affected li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--saffron-tint); }
.agenda-blocks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.agenda-blocks a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: 12.5px; font-weight: 550; }
.agenda-blocks .icon { width: 14px; height: 14px; }

/* Equipo */
.team-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.team-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.team-list form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.role-help { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }

/* Piezas giradas de 45 en 45 grados: gira la forma; los números y los nombres siguen derechos para leerlos. El texto libre
   sí gira con su pieza: escribir a lo largo de una pared es para lo que se gira. */
.floor-table .table-top > strong, .floor-table .table-top > small, .floor-table .table-tag,
.landmark:not(.landmark-pared):not(.landmark-texto) .lm-label { rotate: calc(-1 * var(--rot, 0deg)); }
/* Una pared en diagonal se alarga con el control de «Largo»: sus extremos solo sirven en horizontal y en vertical. */
.floor.editing .landmark-pared:is([data-rot="45"], [data-rot="135"]) .wall-end { display: none !important; }
.rotate-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.floor.editing .floor-table.no-anim, .floor.editing .landmark.no-anim { transition: none !important; }

/* Reserva desde el panel con una mesa elegida: las horas que esa mesa ya tiene ocupadas, en gris y sin poder pulsarse. */
.timeslot.is-taken { cursor: not-allowed; background: repeating-linear-gradient(-45deg, var(--sunk) 0 6px, #fdf6ee 6px 12px); box-shadow: none; color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* Diets on the booking: how many of the party eat vegetarian or vegan. */
.diet-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.diet-field legend { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; padding: 0; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 550; }
.diet-field legend .icon { width: 16px; height: 16px; color: var(--olive-deep); }
.diet-field legend .optional { position: static; margin-left: auto; }
.diet-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diet-counter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 8px 10px 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: text; }
.diet-counter:focus-within { border-color: var(--olive); box-shadow: 0 0 0 3px var(--olive-tint); }
.diet-counter input { width: 64px; min-height: 36px; margin: 0; padding: 4px 8px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.diet-indicator { color: var(--olive-ink); }
.diet-indicator .icon { width: 14px; height: 14px; }
.diet-note { display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--olive-tint); color: var(--olive-ink); font-size: 14px; }
.diet-note .icon { flex-shrink: 0; width: 16px; height: 16px; }
.diet-note strong { margin-right: 6px; }
@media (max-width: 420px) { .diet-counters { grid-template-columns: 1fr; } }

/* ==========================================================================
   Estilo profesional · piezas comunes a toda la app (panel y páginas públicas)
   Sobrio: sin brillos de color, sombras finas, selección en tinta y foco azul.
   ========================================================================== */
.brand { font-weight: 650; letter-spacing: -.03em; }
.public-header { background: rgb(255 255 255 / .9); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); }

/* Botones: firmes, sin halo, estados distinguibles */
.button { font-weight: 600; letter-spacing: -.006em; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled, .button[aria-disabled=true] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Campos: borde azul y anillo suave al enfocar */
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: var(--ring); }

/* Titulares grandes de las páginas públicas */
.confirmation-page h1, .reserve-hero h1, .direct-main h2 { font-weight: 650; letter-spacing: -.03em; }

/* Página pública de reservas: cabecera grafito, sobria */
body.direct::before {
  background:
    radial-gradient(70% 90% at 80% -10%, rgb(255 255 255 / .07), transparent 60%),
    linear-gradient(180deg, #15171c 0%, #232733 100%);
}

/* Etiqueta del plan destacado en pizarra */
.plan-badge { background: var(--gold); }

/* ==========================================================================
   Informes · Resumen: escala redonda (0-25-50-75-100), línea de la media,
   fines de semana marcados, etiquetas de fecha bajo las columnas y tendencia
   en las tarjetas de reservas y comensales.
   ========================================================================== */
.covers-chart { --chart-h: 220px; grid-template-rows: var(--chart-h) auto; }
.covers-chart .chart-grid, .covers-chart .columns { height: var(--chart-h); }
.covers-chart .chart-grid span { border-top: 1px solid var(--line); }
.covers-chart .chart-grid span:last-child { border-top-color: var(--line-2); }
.covers-chart .columns { isolation: isolate; gap: 3px; }
.covers-chart .column { width: min(100%, 26px); gap: 1px; }
.covers-chart .column .seg:first-child { border-radius: 4px 4px 0 0; }
.covers-chart .columns li.is-weekend::before { content: ""; position: absolute; inset: 0 -1.5px; z-index: -1; border-radius: 4px 4px 0 0; background: var(--sunk); }
.chart-average { position: absolute; top: 0; right: 0; left: 34px; z-index: 2; height: var(--chart-h); pointer-events: none; }
.chart-average::before { content: ""; position: absolute; right: 0; left: 0; bottom: var(--at); border-top: 1.5px dashed var(--ink-2); opacity: .7; }
.chart-average span { position: absolute; right: calc(100% + 3px); bottom: var(--at); transform: translateY(50%); padding: 1px 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.column-ticks { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 3px; margin: 0; padding: 8px 0 0; list-style: none; color: var(--ink-3); font-size: 11.5px; font-weight: 500; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.column-ticks li { min-width: 0; overflow: visible; white-space: nowrap; }
.chart-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 14px 0 0; color: var(--ink-3); font-size: 12.5px; }
.chart-foot span { display: inline-flex; align-items: center; gap: 7px; }
i.key.average { width: 16px; height: 0; border-radius: 0; background: none; border-top: 1.5px dashed var(--ink-2); }
i.key.weekend { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line-2); }
.kpi-spark { display: block; width: 100%; height: 34px; margin-top: 8px; overflow: visible; }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--gold); opacity: .07; }
@media (max-width: 760px) {
  .covers-chart { --chart-h: 160px; }
  .covers-chart .columns { gap: 2px; }
  .chart-average { left: 34px; }
}

/* ---------- Ficha de mesa: de arriba abajo, lo que pasa ahora, el día de un vistazo y el resto de opciones ---------- */
.table-panel { display: grid; gap: 18px; }
.table-panel > *, .table-panel .panel-block > * { margin: 0; }
.table-panel .detail-head.table-head { grid-template-columns: auto minmax(0, 1fr) auto; margin: 0; }
.table-avatar.is-busy { background: var(--olive-deep); color: #fff; }
.table-avatar.is-waiting { background: var(--state-arrived-tint); color: var(--state-arrived-ink); box-shadow: inset 0 0 0 1.5px var(--state-arrived); }
.table-avatar.is-soon { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1.5px var(--saffron); }
.table-avatar.is-free { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.table-state { display: grid; justify-items: end; gap: 1px; margin: 0; text-align: right; line-height: 1.25; }
.table-state strong { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; }
.table-state strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.table-state span { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.table-state.is-busy strong { color: var(--olive-ink); }
.table-state.is-busy strong::before { background: var(--olive); }
.table-state.is-waiting strong { color: var(--state-arrived-ink); }
.table-state.is-waiting strong::before { background: var(--state-arrived); }
.table-state.is-soon strong { color: var(--saffron-ink); }
.table-state.is-soon strong::before { background: var(--saffron); }
.table-state.is-free strong::before { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink-3); }
.table-panel .table-days { padding: 4px; border-radius: var(--r); background: var(--sunk); }
.table-panel .table-days .icon-button { background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.panel-block { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel-cap { color: var(--ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.panel-cap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.panel-sum { color: var(--ink-2); font-size: 12.5px; font-weight: 550; font-variant-numeric: tabular-nums; }
.panel-cap-row .schedule-chip { margin-left: auto; }
.panel-sub { margin-top: 4px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.table-panel .table-bookings, .table-panel .walkin-card, .table-panel .table-empty { margin: 0; }
.table-bookings li { display: grid; gap: 6px; }
.table-bookings.is-now a { background: var(--olive-tint); box-shadow: inset 3px 0 0 var(--olive), inset 0 0 0 1px rgb(22 163 74 / .22); }
.table-bookings.is-now a.is-waiting { background: var(--state-arrived-tint); box-shadow: inset 3px 0 0 var(--state-arrived), inset 0 0 0 1px rgb(219 39 119 / .2); }
.table-bookings.is-gone a { opacity: .7; }
.table-bookings a.tb-extra { grid-column: 1 / -1; justify-self: start; display: inline-flex; grid-template-columns: none; align-items: center; gap: 6px; height: var(--control-h-sm); padding: 0 10px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: 13px; font-weight: 550; }
.tb-extra .icon { width: 15px; height: 15px; }
.strip-block.is-waiting { background: var(--state-arrived-tint); box-shadow: inset 0 0 0 1.5px var(--state-arrived); color: var(--state-arrived-ink); }
.walkin-head p b { color: var(--ink); font-weight: 600; }
/* El día de la mesa en una tira: de la apertura al cierre, con un bloque por reserva. */
.table-strip { display: grid; gap: 4px; }
.strip-track { position: relative; height: 34px; border-radius: var(--r-sm); background: repeating-linear-gradient(135deg, var(--sunk) 0 5px, var(--surface-2) 5px 10px); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.strip-open { position: absolute; inset-block: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: var(--r-xs); }
.strip-block { position: absolute; inset-block: 4px; container: strip-block / inline-size; display: flex; align-items: center; min-width: 6px; padding: 0 6px; border-radius: 5px; overflow: hidden; background: var(--saffron-tint); box-shadow: inset 0 0 0 1.5px var(--saffron); color: var(--saffron-ink); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip-block b { font-weight: 650; }
@container strip-block (max-width: 40px) {
  .strip-block b { display: none; }
}
.strip-block.is-here { background: var(--olive-deep); box-shadow: none; color: #fff; }
.strip-block.is-gone { background: var(--stone-tint); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.strip-now { position: absolute; inset-block: 0; width: 2px; margin-left: -1px; background: var(--tomato); }
.strip-hours { position: relative; height: 16px; color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.strip-hours span { position: absolute; display: flex; justify-content: space-between; }
.strip-hours i { font-style: normal; }
.strip-key { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-3); font-size: 12px; }
.strip-key span { display: inline-flex; align-items: center; gap: 6px; }
.strip-key i { width: 12px; height: 12px; border-radius: 3px; }
.strip-key .is-free { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.strip-key .is-due { background: var(--saffron-tint); box-shadow: inset 0 0 0 1.5px var(--saffron); }
.strip-key .is-here { background: var(--olive-deep); }
.strip-key .is-now { width: 2px; border-radius: 0; background: var(--tomato); }
/* Lo demás que se puede hacer con la mesa, siempre al final y en el mismo orden. */
.panel-options { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-options .option { flex: 1 1 calc(50% - 4px); min-width: 180px; }
.panel-options .option { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); color: var(--ink); transition: background-color 150ms ease, box-shadow 150ms ease; }
.panel-options .option > .icon { width: 17px; height: 17px; color: var(--ink-3); }
.panel-options .option span { display: grid; min-width: 0; }
.panel-options .option strong { font-size: 13.5px; font-weight: 600; }
.panel-options .option small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.panel-options .option.is-main { flex-basis: 100%; background: var(--ink); box-shadow: none; color: #fff; }
.panel-options .option.is-main > .icon, .panel-options .option.is-main small { color: rgb(255 255 255 / .72); }
@media (hover: hover) {
  .panel-options .option:hover { background: var(--surface-2); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); }
  .panel-options .option.is-main:hover { background: #272b35; box-shadow: none; }
  .table-bookings a.tb-extra:hover { background: var(--surface-2); box-shadow: var(--shadow-1), 0 0 0 1px var(--line-2); color: var(--ink); }
}
@media (max-width: 420px) {
  .table-panel .detail-head.table-head { grid-template-columns: auto minmax(0, 1fr); }
  .table-state { grid-column: 1 / -1; justify-items: start; text-align: left; }
}
.detail-page .table-panel { padding: 20px; }

/* ---------- Agenda de hoy: la lista sigue el servicio (por llegar, esperan mesa, en la mesa, más tarde, cerradas) ---------- */
.service-heading[class*=moment-] { background: color-mix(in srgb, var(--m) 8%, #fff); box-shadow: inset 3px 0 0 var(--m), 0 1px 0 color-mix(in srgb, var(--m) 18%, transparent); }
.service-heading[class*=moment-] .service-icon { background: var(--m); }
.moment-due { --m: #b45309; }
.moment-waiting { --m: var(--state-arrived); }
.moment-table { --m: var(--olive-deep); }
.moment-later { --m: var(--gold); }
.moment-gone { --m: #7b8494; }
.service-block.moment-gone .res-row { background: var(--surface-2); }
.step-btn.step-confirmed { --bg: var(--gold); --bg-hover: var(--gold-ink); }
.reservation-detail .service-actions { margin-top: var(--detail-gap); }

/* ---------- Informes de un vistazo: primero la respuesta en una frase, luego el gráfico; un color por serie y el dato que importa, destacado ---------- */
.report-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; margin: 0 0 16px; padding: 4px 6px; list-style: none; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.report-glance li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; }
.glance-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); color: var(--ink-2); }
.glance-icon .icon { width: 16px; height: 16px; }
.report-glance p { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
.report-glance strong { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.report-glance p span { color: var(--ink-3); font-size: 12.5px; }
.kpi-value { font-size: 32px; font-variant-numeric: normal; }
.kpi-delta { font-size: 13px; }
.kpi-delta.is-better, .kpi-delta.is-worse { justify-self: start; padding: 2px 8px 2px 6px; border-radius: 999px; }
.kpi-delta.is-better { background: var(--olive-tint); }
.kpi-delta.is-worse { background: var(--tomato-tint); }
.kpi-delta.is-better > span, .kpi-delta.is-worse > span { color: inherit; opacity: .85; }
/* La frase que resume el gráfico: se lee antes que las barras. */
.chart-lead { display: flex; align-items: flex-start; gap: 9px; margin: -6px 0 18px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1.4; }
.chart-lead .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--ink-3); }
.chart-grid span { border-top-style: solid; }
.chart-grid span:last-child { border-top-color: var(--line-2); }
.chart-average::before { border-top-style: solid; border-top-width: 1.5px; opacity: .55; }
i.key.average { border-top-style: solid; }
.covers-chart .column-days { gap: 3px; margin-top: 6px; }
.covers-chart .column-days + .column-ticks { padding-top: 2px; }
.column b { padding: 1px 5px; border-radius: 999px; background: var(--ink); color: #fff; }
/* Dinero: una sola serie, un solo color. Cómo pagaron va aparte, en partes de 100. */
.column.is-money { border-radius: 4px 4px 0 0; background: var(--money-3); }
.columns li:hover .column.is-money, .columns li:focus-visible .column.is-money { background: var(--money-4); }
.money-chart { padding-left: 64px; }
.money-chart .chart-grid { left: 64px; }
i.key.no-closing { background: var(--line-2); }
.pay-split { display: flex; gap: 2px; height: 28px; }
.pay-split .seg { min-width: 4px; }
.pay-split .seg:first-child { border-radius: 6px 0 0 6px; }
.pay-split .seg:last-child { border-radius: 0 6px 6px 0; }
.pay-split .seg:only-child { border-radius: 6px; }
.pay-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.pay-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; }
.pay-list li span { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.pay-list li strong { grid-column: 2; font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.pay-list li small { grid-column: 2; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.report-card + .report-card, .report-card + .report-grid, .ahead-strip + .report-card { margin-top: 16px; }
.wm-bar[data-level] { background: var(--money-2); }
.week-money li.is-best .wm-bar { background: var(--money-4); }
.week-money li.is-best .wm-day::after { content: " ★"; color: var(--money-4); }
/* Previsión: el porqué del aviso, con palabras, antes de la barra. */
.alert-reason { margin: 0; color: var(--ink); font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.alert-effects { border-top-style: solid; }
/* Tiempo en la mesa: la barra es lo que se quedan; la raya, lo reservado; en rojo, lo que se pasan. */
.stay-legend { margin: 0 0 18px; }
i.key.stay { background: var(--chart-lunch); }
i.key.spare { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--chart-lunch) 45%, transparent) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chart-lunch) 45%, transparent); }
.stay-track { position: relative; display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--surface-2); }
.stay-base, .stay-gap { position: absolute; top: 0; bottom: 0; }
.stay-base { left: 0; width: var(--w); min-width: 3px; border-radius: 0 4px 4px 0; background: var(--chart-lunch); }
.stay-gap { left: calc(var(--x) + 2px); width: max(calc(var(--w) - 2px), 2px); border-radius: 0 4px 4px 0; }
.stay-gap.is-more { background: var(--chart-over); }
.stay-gap.is-less { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--chart-lunch) 40%, transparent) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chart-lunch) 40%, transparent); }
.stay-mark { position: absolute; top: -4px; bottom: -4px; left: var(--x); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--surface); }
/* La fila que más: en negrita y con fondo, para verla sin leer las demás. */
.bar-list li.is-best { margin: -4px -8px; padding: 4px 8px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bar-list li.is-best .bar-label { color: var(--ink); font-weight: 700; }
.bar-list li.is-best .bar-value { font-weight: 750; }
.bar-list li.is-best .bar.plain { background: var(--ink); }
.bar-list li:not(.is-best) .bar.plain { background: #98a2b3; }
.bar-track { height: 14px; }
@media (max-width: 760px) {
  .report-glance { grid-template-columns: minmax(0, 1fr); }
  .money-chart { padding-left: 58px; }
  .money-chart .chart-grid { left: 58px; }
}
.pay-split .seg.card { background: var(--pay-card); }
.pay-split .seg.cash { background: var(--pay-cash); }
.pay-split .seg.other { background: var(--pay-other); }
@media (max-width: 520px) {
  .table-panel .table-bookings li.has-step { grid-template-columns: minmax(0, 1fr); }
  .table-panel .table-bookings li.has-step form .button { width: 100%; justify-content: center; }
  .table-panel .table-bookings a:not(.tb-extra) { grid-template-columns: 52px minmax(0, 1fr); }
  .table-panel .table-bookings a .status { grid-column: 2; justify-self: start; }
}

/* ---------- Lo que pide cada mesa, a la vista en la lista: vegetarianos (hoja), veganos (brote) y la nota del cliente (bocadillo) ---------- */
.diet-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.diet-chip, .note-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: var(--pill-h); padding: 0 8px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.diet-chip .icon, .note-chip .icon { width: 13px; height: 13px; stroke-width: 2; }
.diet-chip.is-vegetarian { background: #e9f7e4; color: #2f6b1f; box-shadow: inset 0 0 0 1px rgb(63 140 40 / .28); }
.diet-chip.is-vegan { background: #dff6ee; color: #0f6b54; box-shadow: inset 0 0 0 1px rgb(15 118 92 / .3); }
.note-chip { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1px rgb(245 158 11 / .3); font-weight: 550; }
.note-chip > span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; }
.note-chip.is-internal { background: var(--stone-tint); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.note-chip.is-internal:has(.sr-only) { padding: 0 6px; }
.tb-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; min-width: 0; }
.tb-marks .note-chip { min-width: 0; }
/* Quien lleva mucho esperando: texto blanco sobre el rojo (antes heredaba el rosa de «esperan mesa» y no se leía). */
.floor-table.is-waiting .table-tag.is-long { color: #fff; box-shadow: none; }

/* ---------- Agenda «Por hora»: la lista por el reloj, con la raya de «ahora»; entra como la lista ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-entering=hours] .res-row { animation: rise 260ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 14ms + 30ms); }
}
@media (max-width: 420px) {
  .agenda-toolbar .view-switch a { gap: 4px; padding: 0 6px; font-size: 12.5px; }
  .agenda-toolbar .view-switch .icon { width: 14px; height: 14px; }
}

/* ---------- Lista: el estado de cada reserva, sin leer. A la izquierda, el color del estado (borde y degradado); a la derecha, un cuadro con el estado ---------- */
.res-row { --st: var(--line-2); --st-ink: var(--ink-2); --base: var(--surface); }
.res-row.state-pending { --st: var(--state-pending); --st-ink: var(--state-pending-ink); }
.res-row.state-review { --st: var(--tile); --st-ink: var(--tile-ink); }
.res-row.state-confirmed { --st: var(--saffron); --st-ink: var(--saffron-ink); }
.res-row.state-arrived { --st: var(--state-arrived); --st-ink: var(--state-arrived-ink); }
.res-row.state-at_bar { --st: var(--state-bar); --st-ink: var(--state-bar-ink); }
.res-row.state-seated { --st: var(--olive-deep); --st-ink: var(--olive-ink); }
.res-row.state-dessert { --st: var(--state-dessert); --st-ink: var(--state-dessert-ink); }
.res-row.state-bill { --st: var(--state-bill); --st-ink: var(--state-bill-ink); }
.res-row.state-cleaning { --st: var(--state-cleaning); --st-ink: var(--state-cleaning-ink); }
.res-row.state-completed { --st: #98a0ab; --st-ink: var(--stone-ink); --base: var(--surface-2); }
.res-row.state-no_show { --st: #a3467a; --st-ink: var(--plum-ink); --base: var(--surface-2); }
.res-row.state-cancelled { --st: var(--tomato); --st-ink: var(--tomato-ink); --base: var(--surface-2); }
.reservation-list .service-block .res-row { grid-template-columns: 62px 132px minmax(0, 1fr) 46px 172px; background: var(--base); box-shadow: inset 4px 0 0 var(--st); }
.reservation-list .service-block .res-row.is-linked { --base: #f4f7fe; }
@media (hover: hover) { .reservation-list .service-block .res-row:hover { --base: #f6f7f9; } }
/* Llega tarde: el borde avisa en rojo; el cuadro sigue diciendo su estado. Recién entrada: en azul. */
.reservation-list .service-block .res-row.is-late { box-shadow: inset 4px 0 0 var(--tomato); }
.reservation-list .service-block .res-row.is-new { box-shadow: inset 4px 0 0 var(--tile); }
.reservation-list .res-row .res-state { display: flex; justify-content: flex-start; min-width: 0; }
.reservation-list .res-row .res-state .state-box { width: 100%; min-width: 0; }
.state-box { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 126px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--st) 12%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st) 60%, transparent); color: var(--st-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .005em; white-space: nowrap; }
.state-box .icon { width: 14px; height: 14px; stroke-width: 2.2; }
/* Un cuadro, no un botón: letra de etiqueta y fondo suave, para no confundirlo con el paso que hay debajo. En el local,
   borde entero del color del estado; lo anulado, lleno, que ahí no hay nada más que pulsar. */
.state-box { height: 26px; border-radius: 6px; font-size: 11.5px; letter-spacing: .045em; text-transform: uppercase; }
.state-arrived .state-box, .state-at_bar .state-box, .state-seated .state-box, .state-dessert .state-box, .state-bill .state-box, .state-cleaning .state-box { background: color-mix(in srgb, var(--st) 17%, #fff); box-shadow: inset 0 0 0 1.5px var(--st); }
.state-cancelled .state-box { background: var(--st); box-shadow: none; color: #fff; }
.res-flag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--st); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.state-cancelled .res-time, .state-no_show .res-time { opacity: 1; }
.state-cancelled .res-time strong, .state-no_show .res-time strong { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.state-cancelled .res-guests, .state-no_show .res-guests { opacity: .55; }
/* Lista estrecha (junto al plano): la hora y, debajo, el cuadro de estado, a la izquierda; a la derecha, solo los botones. */
@container agenda-list (max-width: 680px) {
  .reservation-list .service-block .res-row { grid-template-columns: 112px minmax(0, 1fr) auto minmax(132px, auto); grid-template-areas: "time main guests actions" "state main guests actions"; gap: 6px 12px; }
  .reservation-list .service-block .res-row > .res-time { grid-area: time; align-self: end; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
  .reservation-list .service-block .res-row > .res-main { grid-area: main; }
  .reservation-list .service-block .res-row > .res-guests { grid-area: guests; }
  .reservation-list .service-block .res-row > .res-state { grid-area: state; align-self: start; }
  .reservation-list .service-block .res-row > .res-actions { grid-area: actions; min-width: 0; }
  .reservation-list .service-block .res-row .res-actions .icon-button, .reservation-list .service-block .res-row .res-actions:not(:has(form)) { display: none; }
  .reservation-list .service-block .res-row .res-steps { flex: 1; }
}
@media (max-width: 760px) {
  .reservation-list .service-block .res-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time state guests" "main main main" "actions actions actions"; gap: 8px 10px; }
  .reservation-list .service-block .res-row > .res-time { align-self: center; }
  .reservation-list .service-block .res-row > .res-state { align-self: center; justify-content: flex-start; }
  .reservation-list .service-block .res-row > .res-guests { justify-self: end; align-self: center; }
  .reservation-list .service-block .res-row .res-state .state-box { width: auto; min-width: 0; height: 26px; }
}
@media print {
  .reservation-list .service-block .res-row { background: none; box-shadow: none; }
}

/* ---------- Marco a pantalla completa: todo el ancho, paneles planos pegados entre sí, sin tarjetas con sombra ---------- */
body.workspace { --gutter: clamp(10px, 1vw, 18px); --shadow-1: 0 0 #0000; --r-lg: 8px; --card-pad: 16px; --page-gap: 14px; }
.workspace .topbar-inner, .workspace .app-main { max-width: none; }
.workspace .app-main { padding-top: 12px; padding-bottom: 40px; }
.workspace .page-heading { align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.workspace .page-heading h1 { font-size: 20px; }
.workspace .page-heading .muted { margin-top: 2px; font-size: 13px; max-width: 110ch; }
/* Los formularios no se estiran a lo ancho de un monitor: una medida cómoda de leer y de rellenar. */
.workspace .settings-section .form-grid, .workspace .settings-section > form:not(.table-form) { max-width: 980px; }

/* ---------- Agenda: una barra y tres zonas (el mes y el día en cifras | la lista | la sala y los avisos) ---------- */
.agenda-rail, .rail-toggle { display: none; }
.confirm-box { padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.confirm-items { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.confirm-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.confirm-items a { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink); }
.confirm-items form { margin: 0; }
.confirm-time { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.confirm-main { display: grid; min-width: 0; }
.confirm-main strong { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.confirm-main small { overflow: hidden; color: var(--ink-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .confirm-items a:hover { background: var(--surface-2); } }
/* Calendario pequeño: cada día, un botón; más oscuro cuanta más gente; el día abierto, en negro; hoy, con aro rojo. */
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mini-head strong { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.mini-head .icon-button { width: 28px; height: 28px; min-height: 0; }
.mini-week, .mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-week { margin: 8px 0 4px; color: var(--ink-3); font-size: 10.5px; font-weight: 600; text-align: center; }
.mini-day { display: grid; place-items: center; aspect-ratio: 1; min-height: 26px; border-radius: 50%; color: var(--ink); font-size: 12.5px; font-variant-numeric: tabular-nums; font-weight: 500; }
.mini-day[data-level="1"], .mini-key [data-level="1"] { background: #e7ebf0; }
.mini-day[data-level="2"], .mini-key [data-level="2"] { background: #cdd4dd; }
.mini-day[data-level="3"], .mini-key [data-level="3"] { background: #9aa6b5; }
.mini-day[data-level="3"] { color: #fff; font-weight: 650; }
.mini-day.is-other { opacity: .38; }
.mini-day.is-closed { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgb(16 24 40 / .4); }
.mini-day.is-today { box-shadow: inset 0 0 0 2px var(--tomato); font-weight: 700; }
.mini-day.is-open { background: var(--ink); color: #fff; font-weight: 700; opacity: 1; text-decoration: none; }
.mini-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) { .mini-day:not(.is-open):hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); } }
.mini-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--ink-3); font-size: 11.5px; }
.mini-key span { display: inline-flex; align-items: center; gap: 3px; }
.mini-key i { width: 9px; height: 9px; border-radius: 50%; }
.mini-key i:last-of-type { margin-right: 3px; }
.mini-key i.is-closed { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
/* El día en cifras */
.rail-cap { color: var(--ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.figure-grid div { display: grid; gap: 2px; padding: 9px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figure-grid dt { color: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; line-height: 1.25; text-transform: uppercase; }
.figure-grid dd { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.figure-grid .is-due dd { color: var(--saffron-ink); }
.figure-grid .is-here dd { color: var(--olive-ink); }
.figure-grid .is-confirm dd { color: var(--state-pending-ink); }
.figure-grid .is-risk dd, .figure-grid .is-incident dd { color: var(--tomato-ink); }
.figure-grid .is-zero dd { color: var(--ink-3); font-weight: 500; }

@media (min-width: 1241px) {
  /* La cabecera del día y los filtros, en una sola línea. */
  .agenda-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
  .agenda-head .day-hero, .agenda-head .day-actions, .agenda-head .agenda-toolbar { display: contents; }
  .agenda-head .rail-toggle { display: inline-grid; order: 0; }
  .agenda-head .day-arrows { order: 1; }
  .agenda-head .day-nav { order: 2; }
  .agenda-head .day-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
  .agenda-head .day-title h1 { font-size: 21px; white-space: nowrap; }
  .agenda-head .day-hero .day-sub { min-height: 0; margin: 0; }
  .agenda-head .day-actions > .button.small { order: 3; }
  .agenda-head .filters { order: 5; flex: 1 1 auto; justify-content: flex-end; margin-left: auto; flex-wrap: nowrap; }
  .agenda-head .search-box { flex: 1 1 220px; min-width: 190px; max-width: 340px; }
  .agenda-head .search-box input { text-overflow: ellipsis; }
  .agenda-head .schedule-chip .schedule-long, .agenda-head .risk-chip .risk-long, .agenda-head .more-menu summary span { display: none; }
  .agenda-head .schedule-chip .schedule-short, .agenda-head .risk-chip .risk-short { display: inline; }
  .agenda-head .view-switch { order: 6; }
  .agenda-head .month-help { order: 5; margin: 0 0 0 auto; }
  .agenda-head .more-menu { order: 7; margin-left: 0; }
  .agenda-head .cash-link { order: 7; margin-left: 0; }
  .agenda-head .walkin-button { order: 8; }
  .agenda-head [data-new-booking] { order: 9; }
  .agenda-head .service-meter { order: 20; flex: 1 1 100%; display: flex; align-items: center; gap: 18px; padding: 8px 14px; }
  .agenda-head .service-meter .meter-bar { flex: 1; min-width: 120px; }
  .agenda-head .service-meter .meter-legend { flex-wrap: nowrap; gap: 6px 18px; }
  .agenda-head .service-meter .meter-legend b { font-size: 16px; }
  .agenda-head .pending-banner, .agenda-head .agenda-blocks { order: 21; flex: 1 1 100%; margin: 0; }
  /* Tres zonas pegadas: cada una, un solo panel; dentro, secciones separadas por una línea. */
  .agenda-layout { --rail-w: 232px; }
  .agenda-layout .agenda-side { gap: 0; padding: 0; margin: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); top: calc(var(--bar-h) + 12px); max-height: calc(100dvh - var(--bar-h) - 24px); }
  .agenda-layout .agenda-side > * { border-radius: 0; background: none; box-shadow: none; }
  .agenda-layout .agenda-side > * + * { border-top: 1px solid var(--line); }
  .agenda-layout .agenda-splitter { top: calc(var(--bar-h) + 12px); height: calc(100dvh - var(--bar-h) - 24px); }
  .agenda-layout .reservation-list { gap: 8px; }
  .agenda-layout .status-bar { margin-bottom: 8px; }
  .agenda-rail { position: sticky; top: calc(var(--bar-h) + 12px); align-self: start; align-content: start; max-height: calc(100dvh - var(--bar-h) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .rail-block { padding: 14px; }
  .rail-block + .rail-block { border-top: 1px solid var(--line); }
  :root[data-rail=on] .agenda-layout { grid-template-columns: var(--rail-w) var(--list-w, minmax(460px, min(720px, 38%))) 16px minmax(0, 1fr); }
  :root[data-rail=on] .agenda-rail { display: grid; }
  :root[data-rail=on] #agenda-region:has(.agenda-rail) .agenda-head .service-meter, :root[data-rail=on] #agenda-region:has(.agenda-rail) .agenda-head .day-sub > span:not([class]), :root[data-rail=on] #agenda-region:has(.agenda-rail) .agenda-head .day-year, :root[data-rail=on] #agenda-region:has(.agenda-rail) .agenda-head .risk-chip { display: none; }
}
@media (min-width: 1500px) {
  :root:not([data-rail=off]) .agenda-layout { grid-template-columns: var(--rail-w) var(--list-w, minmax(460px, min(720px, 38%))) 16px minmax(0, 1fr); }
  :root:not([data-rail=off]) .agenda-rail { display: grid; }
  :root:not([data-rail=off]) #agenda-region:has(.agenda-rail) .agenda-head .service-meter, :root:not([data-rail=off]) #agenda-region:has(.agenda-rail) .agenda-head .day-sub > span:not([class]), :root:not([data-rail=off]) #agenda-region:has(.agenda-rail) .agenda-head .day-year, :root:not([data-rail=off]) #agenda-region:has(.agenda-rail) .agenda-head .risk-chip { display: none; }
}
@media (min-width: 761px) {
  @container agenda-list (max-width: 680px) {
    .reservation-list .service-block .res-row { grid-template-columns: 118px minmax(0, 1fr) auto minmax(128px, auto); }
    .reservation-list .service-block .res-row .state-box { gap: 4px; padding: 0 6px; font-size: 11px; letter-spacing: .03em; }
    .reservation-list .service-block .res-row .state-box .icon { width: 13px; height: 13px; }
  }
}

/* «Por confirmar», en la columna izquierda: quién falta por confirmar y un botón para darle el sí. */
.agenda-rail .confirm-box { padding: 14px; border-radius: 0; background: none; box-shadow: none; }
.rail-cap .waitlist-count { margin-left: 6px; letter-spacing: 0; }
.agenda-rail .confirm-items { gap: 2px; margin-top: 8px; }
.agenda-rail .confirm-items li { gap: 4px; }
.agenda-rail .confirm-items a { grid-template-columns: 40px minmax(0, 1fr); padding: 6px 4px; }
.confirm-yes { width: 32px; height: 32px; min-height: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--olive-ink); }
.confirm-yes .icon { width: 16px; height: 16px; stroke-width: 2.4; }
@media (hover: hover) { .confirm-yes:hover { background: var(--olive-tint); box-shadow: inset 0 0 0 1.5px var(--olive); } }

/* ---------- Agenda: la barra de herramientas como segunda fila de la cabecera, y las tres zonas a la misma altura ---------- */
@media (min-width: 1241px) {
  /* Una banda blanca de lado a lado, pegada a la barra superior y alineada con ella: mismos márgenes a izquierda y derecha. */
  .agenda-head { --control-h: 36px; gap: 8px; margin: -12px calc(var(--gutter) * -1) 12px; padding: 8px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); row-gap: 8px; }
  /* Todos los controles miden lo mismo (36 px) y comparten borde y radio: nada sobresale ni baila de altura. */
  .agenda-head .icon-button, .agenda-head .more-menu summary { width: var(--control-h); height: var(--control-h); min-height: 0; padding: 0; justify-content: center; }
  .agenda-head .day-arrows .icon-button { width: 34px; }
  .agenda-head .button { min-height: var(--control-h); height: var(--control-h); }
  .agenda-head .search-box input { height: var(--control-h); min-height: 0; }
  .agenda-head .segmented, .agenda-head .view-switch { height: var(--control-h); align-items: center; }
  .agenda-head .rail-toggle { color: var(--ink-2); }
  /* Grupos: navegar por los días | qué día es | buscar y filtrar | cómo verlo | acciones. Más aire entre grupos que dentro. */
  .agenda-head .day-arrows { margin-right: 4px; }
  .agenda-head .day-nav { margin-right: 8px; }
  .agenda-head .day-title { gap: 4px 10px; }
  .agenda-head .day-title h1 { font-size: 20px; line-height: var(--control-h); letter-spacing: -.022em; }
  .agenda-head .day-hero .day-sub { gap: 6px; align-items: center; }
  .agenda-head .day-actions > .button.small { height: 28px; min-height: 0; }
  .agenda-head .filters { gap: 8px; }
  .agenda-head .view-switch { margin-left: 4px; }
  .agenda-head .more-menu, .agenda-head .is-timeline ~ .cash-link { position: relative; margin-left: 13px; }
  .agenda-head .more-menu::before { content: ""; position: absolute; left: -11px; top: 7px; bottom: 7px; width: 1px; background: var(--line-2); }
  .agenda-head .walkin-button, .agenda-head [data-new-booking] { padding-inline: 14px; }
  .agenda-head .service-meter { margin-top: 2px; box-shadow: none; background: var(--surface-2); border-radius: var(--r-sm); }
  .agenda-head .pending-banner, .agenda-head .agenda-blocks { margin-top: 2px; }

  /* Las tres zonas son tres paneles iguales: mismo borde, mismo radio, y su primera fila a la misma altura (52 px). */
  .agenda-layout { --zone-head: 52px; align-items: start; }
  .agenda-layout .reservations { border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .agenda-layout .status-bar { align-items: center; height: var(--zone-head); margin: 0; padding: 0 12px 0 10px; border-bottom: 1px solid var(--line); }
  .agenda-layout .status-bar .status-tabs { align-self: flex-end; }
  .agenda-layout .status-bar .cash-link { height: 32px; min-height: 0; }
  /* La lista, de corrido: los bloques ya no son tarjetas sueltas, sino tramos de un mismo panel separados por su cabecera. */
  .agenda-layout .reservation-list { gap: 0; }
  .agenda-layout .service-block { border-radius: 0; box-shadow: none; }
  .agenda-layout .service-block + .service-block { border-top: 1px solid var(--line); }
  .agenda-layout .reservation-list > .service-block:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .agenda-layout .reservation-list > .empty-state { background: none; }
  .agenda-layout .list-footer { padding: 10px 14px; border-top: 1px solid var(--line); }
  .agenda-layout .now-line { border-top: 1px solid var(--line); }
  .agenda-layout .agenda-side .room { padding: 0 12px 12px; }
  .agenda-layout .agenda-side .room-heading > :first-child, .agenda-layout .agenda-side .room-heading-end, .agenda-layout .agenda-side .map-tabs { height: var(--zone-head); align-items: center; display: flex; }
  .agenda-layout .agenda-side .map-tabs { margin: 0; }
  .agenda-layout .agenda-side .map-panel { margin-top: 0; }
  .agenda-rail .rail-block { padding: 14px 12px; }
  .agenda-rail .mini-month { padding-top: 0; }
  .agenda-rail .mini-head { height: var(--zone-head); margin: 0 -4px; }
  .agenda-rail .mini-week { margin-top: 0; }
}

/* ---------- Agenda a pantalla fija: la página no se mueve; solo se desplaza la lista. El mes, las cifras y la sala quedan a la vista ---------- */
@media (min-width: 1241px) and (min-height: 620px) {
  body.workspace:has(#agenda-region .agenda-layout) .app-main { display: flex; flex-direction: column; height: calc(100dvh - var(--bar-h) - 1px); padding-bottom: 10px; overflow: hidden; }
  body.workspace:has(#agenda-region .agenda-layout) .app-main > * { flex: none; }
  body.workspace:has(#agenda-region .agenda-layout) #agenda-region { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  #agenda-region:has(.agenda-layout) .agenda-head { flex: none; }
  #agenda-region:has(.agenda-layout) .agenda-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  #agenda-region .agenda-layout { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  /* La lista: las pestañas arriba y el pie abajo, quietos; en medio, las reservas con su propio desplazamiento. */
  #agenda-region .agenda-layout .reservations { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  #agenda-region .agenda-layout .status-bar, #agenda-region .agenda-layout .list-footer { flex: none; }
  #agenda-region .agenda-layout .reservation-list { flex: 1 1 0; min-height: 0; align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
  #agenda-region .agenda-layout .service-heading { top: 0; }
  #agenda-region .agenda-layout .reservation-list > .service-block:last-child { border-radius: 0; }
  /* Las columnas de los lados ocupan toda la altura y no se van al bajar; si algo no cabe, se desplaza dentro de su columna. */
  #agenda-region .agenda-layout .agenda-rail, #agenda-region .agenda-layout .agenda-side { position: static; height: 100%; max-height: none; overflow-y: auto; }
  #agenda-region .agenda-layout .agenda-splitter { position: relative; top: auto; height: 100%; }  /* relative: its hover band (::before) must stay inside it, not cover the list */
  /* El plano se ajusta a la altura de su columna, tenga la barra una línea o dos: lo que mide menos su cabecera, «se liberan pronto» y el pie. */
  #agenda-region .agenda-layout .agenda-side { container: agenda-side / size; }
  #agenda-region .agenda-layout .agenda-side .room { overflow: visible; }
  #agenda-region .agenda-layout .mini-floor { --map-h: calc(100cqh - 200px); }
}

/* ---------- Ajustes · Pasos del servicio: el recorrido de una visita y qué pasos marca cada restaurante ---------- */
.step-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin: 0 0 18px; padding: 12px 14px; list-style: none; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.step-flow li { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.step-flow li[hidden] { display: none; }
.step-flow li:not(:first-child)::before { content: "→"; margin: 0 10px 0 -26px; color: var(--ink-3); font-weight: 500; }
.step-flow li:not(:first-child) { margin-left: 26px; }
.step-flow li.is-fixed { background: var(--ink); box-shadow: none; color: #fff; }
.step-flow li.is-fixed::before { color: var(--ink-3); }
.step-flow .flow-arrived { box-shadow: inset 0 0 0 1.5px var(--state-arrived); color: var(--state-arrived-ink); }
.step-flow .flow-at_bar { box-shadow: inset 0 0 0 1.5px var(--state-bar); color: var(--state-bar-ink); }
.step-flow .flow-dessert { box-shadow: inset 0 0 0 1.5px var(--state-dessert); color: var(--state-dessert-ink); }
.step-flow .flow-bill { box-shadow: inset 0 0 0 1.5px var(--state-bill); color: var(--state-bill-ink); }
.step-flow .flow-cleaning { box-shadow: inset 0 0 0 1.5px var(--state-cleaning); color: var(--state-cleaning-ink); }
.step-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; max-width: 980px; }
.step-option { display: flex; align-items: flex-start; gap: 10px; height: 100%; margin: 0; padding: 12px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.step-option input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; padding: 0; box-shadow: none; accent-color: var(--olive-deep); }
.step-option span { display: grid; gap: 2px; min-width: 0; }
.step-option strong { font-size: 14px; font-weight: 600; }
.step-option small { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.step-option:has(input:checked) { background: var(--olive-tint); box-shadow: inset 0 0 0 1.5px var(--olive); }
.step-option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Fases de la agenda: pastillas en vez de pestañas subrayadas; la elegida, en negro; cada fase, con su color ---------- */
.status-bar .status-tabs { align-self: center; align-items: center; gap: 0; padding: 0 8px 0 0; }
.status-bar .status-tabs a { gap: 5px; height: 30px; padding: 0 5px 0 8px; border-radius: 999px; color: var(--ink-2); font-size: 12.5px; font-weight: 550; letter-spacing: -.005em; transition: background-color 150ms ease, color 150ms ease; }
.status-bar .status-tabs a > i { width: 7px; height: 7px; }
.status-bar .status-tabs a > span { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--sunk); font-size: 11px; }
.status-bar .status-tabs a[aria-current=true] { background: var(--ink); color: #fff; }
.status-bar .status-tabs a[aria-current=true] > span { background: rgb(255 255 255 / .2); color: #fff; }
.status-bar .status-tabs a[aria-current=true] > i { box-shadow: 0 0 0 2px rgb(255 255 255 / .28); }
.status-bar .status-tabs .tab-pill { display: none; }
.status-bar .status-tabs .tab-all { padding-left: 12px; }
.status-bar .status-tabs .tab-confirmar > i { background: var(--state-pending); }
@media (hover: hover) and (pointer: fine) {
  .status-bar .status-tabs a:not([aria-current=true]):hover { background: var(--sunk); color: var(--ink); }
}
/* Junto al plano la lista es estrecha: «Cerrar caja» se queda en su icono para dejar sitio a las fases (el texto, al pasar el ratón). */
@container agenda-list (max-width: 860px) {
  .status-bar .cash-link:not(.is-closed) { width: 32px; padding: 0; justify-content: center; }
  .status-bar .cash-link:not(.is-closed) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.rail-cap { letter-spacing: .05em; }
/* Botones de paso con texto blanco: el tono oscuro de cada color, para que se lea bien. */
.step-btn.step-cleaning { --bg: var(--state-cleaning-ink); --bg-hover: #0b5266; }
.step-btn.step-dessert { --bg: var(--state-dessert-ink); --bg-hover: #32500e; }
@media (min-width: 1241px) { .agenda-layout .status-bar { padding: 0 8px; gap: 8px; } }

/* ---------- Lista: cada categoría, un bloque aparte con su cabecera de color. La cabecera no se parece a una reserva:
   banda llena, letra de rótulo y el total a la derecha; entre bloques, aire. Las cerradas, en gris apagado ---------- */
/* Suave: fondo apenas teñido del color de la categoría, una línea fina de ese color arriba, el rótulo en su tono oscuro
   y el icono en un círculo claro. Se distingue de una reserva por la forma y la letra, no por un bloque de color. */
.moment-due { --m: var(--saffron); --m-ink: var(--saffron-ink); }
.moment-waiting { --m: var(--state-arrived); --m-ink: var(--state-arrived-ink); }
.moment-table { --m: var(--olive); --m-ink: var(--olive-ink); }
.moment-later { --m: #98a2b3; --m-ink: var(--ink-2); }
.moment-gone { --m: #c4c9d1; --m-ink: var(--ink-3); }
.service-block.lunch, .service-heading.lunch { --m: var(--chart-lunch); --m-ink: #1d4f9c; }
.service-block.dinner, .service-heading.dinner { --m: var(--chart-dinner); --m-ink: var(--chart-dinner); }
.service-heading[class*=moment-], .service-heading.lunch, .service-heading.dinner { min-height: 40px; padding: 8px 14px 8px 12px; gap: 9px; background: color-mix(in srgb, var(--m) 7%, #fff); box-shadow: inset 0 2px 0 var(--m), inset 0 -1px 0 color-mix(in srgb, var(--m) 16%, var(--line)); color: var(--m-ink); }
.service-heading[class*=moment-] .service-icon, .service-heading.lunch .service-icon, .service-heading.dinner .service-icon { width: 22px; height: 22px; background: color-mix(in srgb, var(--m) 20%, #fff); }
.service-heading[class*=moment-] .service-icon .icon, .service-heading.lunch .service-icon .icon, .service-heading.dinner .service-icon .icon { width: 13px; height: 13px; color: var(--m-ink); }
.service-heading .service-name { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.service-heading[class*=moment-] .service-sum, .service-heading.lunch .service-sum, .service-heading.dinner .service-sum { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.service-heading.moment-gone, .service-heading.moment-later { background: var(--surface-2); }
.service-block[class*=moment-], .service-block.lunch, .service-block.dinner { box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(16 24 40 / .04); }
/* Las filas, un punto más ligeras: el borde de estado más fino y los cuadros con el trazo más suave. */
.reservation-list .service-block .res-row { box-shadow: inset 3px 0 0 var(--st); }
.reservation-list .service-block .res-row.is-late { box-shadow: inset 3px 0 0 var(--tomato); }
.reservation-list .service-block .res-row.is-new { box-shadow: inset 3px 0 0 var(--tile); }
.state-box { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st) 45%, transparent); font-weight: 650; }
.state-arrived .state-box, .state-at_bar .state-box, .state-seated .state-box, .state-dessert .state-box, .state-bill .state-box, .state-cleaning .state-box { background: color-mix(in srgb, var(--st) 12%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st) 70%, transparent); }
.service-heading + .res-row { border-top: 0; }
@media (min-width: 1241px) {
  /* Dentro del panel de la lista, los bloques vuelven a ir sueltos sobre un fondo gris: se ve dónde acaba uno y empieza otro. */
  .agenda-layout .reservation-list { gap: 10px; padding: 10px; background: var(--ground); }
  .agenda-layout .service-block, .agenda-layout .reservation-list > .service-block:last-child { border-radius: var(--r-lg); }
  .agenda-layout .service-block + .service-block { border-top: 0; }
  .agenda-layout .service-block .service-heading { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .agenda-layout .now-line { border-top: 0; background: none; }
  .agenda-layout .reservation-list > .empty-state { border-radius: var(--r-lg); background: var(--surface); }
}
@media (min-width: 1241px) and (min-height: 620px) {
  /* La cabecera se queda arriba al bajar: tapa del todo lo que pasa por debajo, también el hueco de encima. */
  #agenda-region .agenda-layout .service-heading { top: -10px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  #agenda-region .agenda-layout .service-heading::before { content: ""; position: absolute; inset: -10px 0 100% 0; background: var(--ground); }
  #agenda-region .agenda-layout .service-block { overflow: visible; }
  #agenda-region .agenda-layout .service-block > .res-row:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
}

/* ---------- Repaso de armonía: el color queda para el estado; lo demás, neutro. Y una sola familia de esquinas:
   8 px los controles y los bloques, 6 px las etiquetas; redondos solo los avatares, los puntos y los días del mes ---------- */
.res-row.state-confirmed { --st: #e0a02c; --st-ink: #8a5a10; }
.res-row.state-seated { --st: #1f7f50; --st-ink: #175e3b; }
.res-row.state-no_show { --st: #a0658a; --st-ink: #7a3f63; }
.res-row.state-cancelled { --st: #c2473d; --st-ink: #96281f; }
.res-row.state-completed { --st: #aab2bd; }
.moment-due { --m: #e0a02c; --m-ink: #8a5a10; }
.moment-table { --m: #1f7f50; --m-ink: #175e3b; }
/* Los botones de paso, todos del mismo peso: el tono oscuro de su color, sin saltos de brillo entre uno y otro. */
.step-btn.step-seated { --bg: #1f7a4d; --bg-hover: #186240; }
.step-btn.step-bill { --bg: var(--state-bill-ink); --bg-hover: #432d8f; }
.step-btn.step-cleaning { --bg: var(--state-cleaning-ink); --bg-hover: #0f5266; }
.step-btn.step-dessert { --bg: var(--state-dessert-ink); --bg-hover: #3d5114; }
.step-btn.step-confirmed { --bg: var(--state-pending-ink); --bg-hover: #204590; }
.step-btn.step-completed { --bg: #2b303b; --bg-hover: #15171c; }
.res-actions .step-btn, .res-actions .step-second { border-radius: 8px; }
/* Etiquetas de la fila: rectángulos de 6 px, como el cuadro de estado. Dietas en verde suave; nota y zona, neutras. */
.diet-chip, .note-chip, .res-meta .zone-tag, .res-meta .vip-badge { border-radius: 6px; }
.diet-chip.is-vegetarian { background: #eaf6ef; color: #175e3b; box-shadow: inset 0 0 0 1px rgb(31 127 80 / .26); }
.diet-chip.is-vegan { background: #f2f7e4; color: #4d651a; box-shadow: inset 0 0 0 1px rgb(122 154 46 / .3); }
.note-chip, .note-chip.is-internal { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 500; }
.note-chip .icon { color: var(--ink-3); }
.res-meta .zone-tag { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.state-box { border-radius: 6px; }
/* Fases: mismo radio que los selectores de la barra de arriba, no píldoras. */
.status-bar .status-tabs a { border-radius: 8px; }
.status-bar .status-tabs a > span { border-radius: 6px; }
.status-bar .status-tabs .tab-llegar > i { background: #e0a02c; }
.status-bar .status-tabs .tab-local > i { background: #1f7f50; }
.status-bar .status-tabs .tab-incidencias > i { background: #c2473d; }
.waitlist-count, .rail-cap .waitlist-count { border-radius: 6px; }
.confirm-yes, .mini-head .icon-button { border-radius: 8px; }
.figure-grid { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.figure-grid div { border: 0; box-shadow: inset -1px -1px 0 var(--line); }
.figure-grid .is-due dd { color: #8a5a10; }
.figure-grid .is-here dd { color: #175e3b; }
.figure-grid .is-risk dd, .figure-grid .is-incident dd { color: #96281f; }
.meter-bar .seg-confirmed { background: #e0a02c; }
.meter-bar .seg-seated { background: #1f7f50; }
.mini-day.is-today { box-shadow: inset 0 0 0 2px #c2473d; }

/* ---------- Secciones de la lista, al estilo de las aplicaciones de ahora: el título de cada categoría va fuera, como
   una etiqueta sobre el fondo (icono, nombre y total), y debajo sus reservas en una tarjeta limpia de esquinas suaves.
   El estado es una etiqueta de color suave, sin mayúsculas ni recuadro; el segundo botón, discreto ---------- */
.reservation-list .service-block[class*=moment-], .reservation-list .service-block.lunch, .reservation-list .service-block.dinner { overflow: visible; border-radius: 0; background: none; box-shadow: none; }
.reservation-list .service-heading[class*=moment-], .reservation-list .service-heading.lunch, .reservation-list .service-heading.dinner { min-height: 0; gap: 9px; padding: 2px 6px 8px 2px; border-radius: 0; background: var(--ground); box-shadow: none; color: var(--ink); }
.reservation-list .service-heading .service-icon { width: 24px; height: 24px; border-radius: 8px; background: color-mix(in srgb, var(--m) 22%, #fff); }
.reservation-list .service-heading .service-icon .icon { width: 14px; height: 14px; color: var(--m-ink); }
.reservation-list .service-heading .service-name { font-size: 14px; font-weight: 650; letter-spacing: -.012em; text-transform: none; }
.reservation-list .service-heading .service-sum { padding: 2px 8px; border-radius: 6px; background: rgb(16 24 40 / .05); color: var(--ink-2); font-size: 12px; font-weight: 550; }
.reservation-list .service-heading.moment-gone .service-name, .reservation-list .service-heading.moment-later .service-name { color: var(--ink-2); }
/* Las reservas de la categoría, en una tarjeta: borde fino, esquinas de 12 px y una sombra muy leve. */
.reservation-list .service-block > * + * { border-top: 0; }
.reservation-list .service-block .res-row { background: var(--base); box-shadow: inset 3px 0 0 var(--st), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.reservation-list .service-block .service-heading + .res-row, .reservation-list .service-block .now-line + .res-row { box-shadow: inset 3px 0 0 var(--st), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line); }
.reservation-list .service-block .service-heading + .res-row { border-radius: 12px 12px 0 0; }
.reservation-list .service-block .res-row:last-child { border-radius: 0 0 12px 12px; filter: drop-shadow(0 1px 1px rgb(16 24 40 / .04)); }
.reservation-list .service-block .service-heading + .res-row:last-child { border-radius: 12px; }
.reservation-list .service-block .res-row.is-late { box-shadow: inset 3px 0 0 var(--tomato), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.reservation-list .service-block .service-heading + .res-row.is-late { box-shadow: inset 3px 0 0 var(--tomato), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line); }
.reservation-list .service-block .res-row.is-new { box-shadow: inset 3px 0 0 var(--tile), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.reservation-list .service-block .now-line { margin: 6px 0; background: none; }
/* El estado: etiqueta suave, con su icono; en minúsculas, como se lee. Sin recuadro. */
.reservation-list .res-row .state-box, .state-arrived .state-box, .state-at_bar .state-box, .state-seated .state-box, .state-dessert .state-box, .state-bill .state-box, .state-cleaning .state-box { height: 24px; padding: 0 9px 0 7px; border-radius: 7px; background: color-mix(in srgb, var(--st) 15%, #fff); box-shadow: none; color: var(--st-ink); font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.reservation-list .res-row.state-cancelled .state-box { background: color-mix(in srgb, var(--st) 14%, #fff); color: var(--st-ink); }
.reservation-list .res-row.state-completed .state-box { background: rgb(16 24 40 / .06); }
.reservation-list .res-row .state-box .icon { width: 13px; height: 13px; stroke-width: 2.2; }
/* Botones: el paso siguiente, lleno y con un punto de relieve; la alternativa, solo texto hasta que pasas por encima. */
.res-actions .step-btn { border-radius: 9px; font-weight: 600; box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 1px 2px rgb(16 24 40 / .14); }
.res-actions .step-second { border-radius: 9px; background: transparent; box-shadow: none; color: var(--ink-2); font-weight: 550; }
@media (hover: hover) {
  .res-actions .step-second:hover { background: rgb(16 24 40 / .06); color: var(--ink); }
  .reservation-list .service-block .res-row:hover { --base: #fbfbfc; }
}
.res-avatar { border-radius: 10px; }
.diet-chip, .note-chip, .res-meta .zone-tag { box-shadow: none; }
.note-chip, .note-chip.is-internal, .res-meta .zone-tag { background: rgb(16 24 40 / .05); }
@media (min-width: 1241px) {
  .agenda-layout .reservation-list { gap: 18px; padding: 14px 12px 12px; }
  .agenda-layout .service-block .service-heading { border-radius: 0; }
}
@media (min-width: 1241px) and (min-height: 620px) {
  #agenda-region .agenda-layout .service-heading { top: -14px; padding-top: 6px; border-radius: 0; }
  #agenda-region .agenda-layout .service-heading::before { inset: -14px 0 100% 0; }
  #agenda-region .agenda-layout .service-block > .res-row:last-child { border-radius: 0 0 12px 12px; }
  #agenda-region .agenda-layout .service-block > .service-heading + .res-row:last-child { border-radius: 12px; }
}
@media (max-width: 1240px) {
  .reservation-list { gap: 18px; }
}

/* Las pastillas de fase, centradas en su barra y con aire por debajo: antes quedaban pegadas a la línea inferior. */
.status-bar { padding: 2px 0 10px; }
@media (min-width: 1241px) {
  .agenda-layout .status-bar { padding: 0 8px; }
  .agenda-layout .status-bar .status-tabs { align-self: center; }
}
@media (max-width: 760px) { .status-bar { padding: 0 0 4px; } }

/* ---------- Barra superior oscura y algo más alta: contrasta con la banda blanca de herramientas y con el contenido ---------- */
body.workspace { --bar-h: 64px; }
.workspace .topbar { background: var(--topbar); border-bottom-color: var(--topbar-line); -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.workspace .topbar .brand, .workspace .topbar .venue-chip { color: #fff; }
.workspace .topbar .brand { font-size: 17px; }
.workspace .topbar .venue-chip > .icon { color: rgb(255 255 255 / .6); }
.workspace .topbar .brand + .venue-switch::before, .workspace .topbar .brand + .venue-chip::before { background: rgb(255 255 255 / .28); }
.workspace .topbar .venue-switch[open] > summary { background: rgb(255 255 255 / .12); }
.workspace .topbar .main-nav { gap: 4px; margin-left: 16px; }
.workspace .topbar .main-nav a { padding: 0 12px; color: rgb(255 255 255 / .72); }
.workspace .topbar .main-nav a::before { inset: 14px 0; border-radius: 9px; }
.workspace .topbar .main-nav a::after { display: none; }
.workspace .topbar .main-nav a[aria-current=page] { color: #fff; font-weight: 600; }
.workspace .topbar .main-nav a[aria-current=page]::before { background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.workspace .topbar .topbar-end .ghost-link { color: rgb(255 255 255 / .78); }
.workspace .topbar .avatar { background: rgb(255 255 255 / .14); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.workspace .topbar .account summary:hover .avatar, .workspace .topbar .account[open] .avatar { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3), 0 0 0 3px rgb(255 255 255 / .1); }
.workspace .topbar .account-menu { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .workspace .topbar .main-nav a:not([aria-current=page]):hover { color: #fff; }
  .workspace .topbar .main-nav a:not([aria-current=page]):hover::before { background: rgb(255 255 255 / .08); }
  .workspace .topbar .venue-switch > summary:hover { background: rgb(255 255 255 / .1); }
  .workspace .topbar .topbar-end .ghost-link:hover { background: rgb(255 255 255 / .1); color: #fff; }
}
@media (max-width: 1240px) {
  .workspace .topbar .main-nav { gap: 0; margin-left: 6px; }
  .workspace .topbar .main-nav a { padding: 0 9px; }
  .workspace .topbar .main-nav a::before { inset: 7px 0; }
}
@media (max-width: 760px) { body.workspace { --bar-h: 56px; } }

/* ---------- Marca: el nombre más grande y el logo nuevo (una mesa con sus sillas que es también un reloj) ---------- */
.brand-mark { width: 28px; height: 28px; }
.workspace .topbar .brand { gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -.035em; }
.workspace .topbar .brand-mark { width: 32px; height: 32px; }
.direct-footer .brand-mark { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .workspace .topbar .brand { font-size: 18px; }
  .workspace .topbar .brand-mark { width: 28px; height: 28px; }
}

/* ---------- Junto a la lista, lo que cambia la lista: cómo verla (Lista, Por hora, Barras, Mes) y qué servicio.
   Y las fases, todas a la vista: si no caben en una línea, pasan a la siguiente en vez de cortarse ---------- */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.list-tools .segmented { margin: 0; }
@media (min-width: 761px) {
  .status-bar { align-items: flex-start; }
  .status-bar .status-tabs { flex-wrap: wrap; gap: 4px 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .status-bar .cash-link { align-self: flex-start; }
}
@media (min-width: 1241px) {
  .agenda-layout .list-tools { --control-h: 34px; margin: 0; padding: 10px 10px 0; }
  .agenda-layout .status-bar { height: auto; min-height: 50px; padding: 9px 10px; align-items: center; }
  .agenda-layout .status-bar .status-tabs { align-self: center; }
  .agenda-layout .status-bar .cash-link { align-self: center; }
  #agenda-region .agenda-layout .list-tools { flex: none; }
}
@media (max-width: 760px) {
  .list-tools { gap: 8px; }
  .list-tools .view-switch, .list-tools .segmented { display: flex; flex: 1 1 100%; }
  .list-tools .view-switch a, .list-tools .segmented label { flex: 1; justify-content: center; padding: 0 6px; }
}
@media (max-width: 760px) {
  /* En móvil el buscador ocupa el hueco que deja el selector de servicio (ahora junto a la lista): ya no hace falta plegarlo. */
  .js .agenda-toolbar .search-box { grid-column: 1 / 3; }
  .js .agenda-toolbar .search-box input { padding: 8px 12px 8px 36px; color: var(--ink); cursor: text; }
  .js .agenda-toolbar .search-box input::placeholder { color: #98a0ab; }
  .js .agenda-toolbar .search-box .icon { left: 12px; translate: 0 0; color: var(--ink-3); }
}

/* ---------- Barras, al día: horas legibles en horizontal, cada servicio con su nombre, barras suaves con la hora y el
   nombre, y los mismos colores de estado que la lista. Y dos formas de verlo: las horas arriba o a la izquierda ---------- */
.tl-confirmed { --c: #e0a02c; --c-tint: #fbf3e1; --c-ink: #7a4f0d; }
.tl-seated { --c: #1f7f50; --c-tint: #e6f4ec; --c-ink: #175e3b; }
.tl-cleaning { --c: var(--state-cleaning); --c-tint: var(--state-cleaning-tint); --c-ink: var(--state-cleaning-ink); }
.tl-review { --c: var(--state-pending); --c-tint: var(--state-pending-tint); --c-ink: var(--state-pending-ink); }
.tl-completed { --c: #aab2bd; --c-tint: #f1f3f6; --c-ink: var(--ink-2); }
.timeline { --head-h: 56px; --bar-h: 34px; --bar-gap: 6px; --label-w: 104px; border-radius: 12px; }
.timeline-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.timeline-hint { margin: 0; color: var(--ink-3); font-size: 12.5px; }
.axis-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line); }
.axis-switch > span { padding: 0 8px 0 9px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.axis-switch a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.axis-switch a .icon { width: 13px; height: 13px; }
.axis-switch a[aria-current=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 0 0 1px rgb(16 24 40 / .06); }
@media (hover: hover) { .axis-switch a:not([aria-current=true]):hover { color: var(--ink); background: rgb(255 255 255 / .6); } }
/* Cabecera de horas: el servicio arriba («Comida 13:00–16:30»), y debajo las horas en punto en negrita y las medias en gris. */
.tl-corner { align-items: center; padding: 0 14px; color: var(--ink-3); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.tl-band { position: absolute; top: 9px; left: calc(var(--x) * var(--min) + 8px); display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-band b { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tl-tick { display: none; bottom: 8px; left: calc(var(--x) * var(--min) + 6px); writing-mode: horizontal-tb; transform: none; }
.tl-tick.is-hour { display: block; color: var(--ink); font-size: 12px; font-weight: 650; }
.tl-tick.is-half { display: block; color: var(--ink-3); font-size: 11px; font-weight: 500; }
.tl-room { padding: 7px 0 6px; background: var(--surface-2); color: var(--ink-3); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.tl-zone { display: none; }
.tl-seats { height: 20px; padding: 0 6px; border-radius: 6px; background: var(--sunk); box-shadow: none; }
.tl-track { background: repeating-linear-gradient(90deg, rgb(16 24 40 / .04) 0 1px, transparent 1px calc(30 * var(--min))) var(--surface); }
@media (hover: hover) and (pointer: fine) {
  .tl-track:hover, .tl-label:hover + .tl-track, .tl-label:hover, .tl-label:has(+ .tl-track:hover) { background-color: var(--surface-2); }
  .tl-label:hover strong, .tl-label:has(+ .tl-track:hover) strong { color: var(--ink); }
}
/* Cada reserva: fondo suave de su estado, una franja fina de color, la hora en negrita, el nombre y cuántos son. */
.tl-bar { gap: 7px; padding-left: 11px; border-radius: 9px; background: var(--c-tint, var(--sunk)); color: var(--c-ink, var(--ink)); box-shadow: inset 3px 0 0 var(--c, var(--ink-3)); font-size: 12.5px; font-weight: 550; }
.tl-time { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-name { color: var(--ink); font-weight: 600; }
.tl-guests { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: rgb(255 255 255 / .75); box-shadow: none; color: var(--ink-2); font-size: 11.5px; }
.tl-state { align-self: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 7px; background: rgb(255 255 255 / .75); color: var(--c-ink, var(--ink-2)); }
.tl-state .icon { width: 13px; height: 13px; }
.tl-bar.is-linked { background: repeating-linear-gradient(135deg, var(--c-tint) 0 6px, color-mix(in srgb, var(--c-tint) 45%, #fff) 6px 12px); }
.tl-bar.is-linked .tl-state { background: rgb(255 255 255 / .75); }
.tl-bar.is-late { box-shadow: inset 3px 0 0 var(--tomato), inset 0 0 0 1.5px color-mix(in srgb, var(--tomato) 55%, transparent); }
@media (hover: hover) { .tl-bar:hover { box-shadow: inset 3px 0 0 var(--c), 0 2px 8px -2px rgb(16 24 40 / .18); } }
.tl-now { background: var(--tomato); }
.tl-now b { top: 5px; padding: 2px 7px; border-radius: 6px; background: var(--tomato); white-space: nowrap; }
.tl-hour { background: rgb(16 24 40 / .09); }
.timeline-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--c-tint); box-shadow: inset 3px 0 0 var(--c); }
.tl-ghost { border-radius: 9px; }

/* Horas a la izquierda: una columna por mesa y la hora bajando, como una agenda. Cabe el día entero sin desplazarse. */
.timeline.axis-y { --min: 1.5px; --head-h: 62px; --label-w: 62px; }
.axis-y .timeline-scroll { height: max(460px, calc(100dvh - 310px)); max-height: none; }
.axis-y .timeline-grid { grid-auto-flow: column; grid-template-columns: var(--label-w); grid-auto-columns: minmax(96px, 1fr); grid-template-rows: var(--head-h) calc(var(--span) * var(--min)); width: auto; min-width: 100%; }
.axis-y .tl-corner { justify-content: center; padding: 0; }
.axis-y .tl-head { top: auto; left: 0; height: auto; border-right: 1px solid var(--line); border-bottom: 0; }
.axis-y .tl-band { display: none; }
.axis-y .tl-tick { top: calc(var(--x) * var(--min) - 7px); right: 9px; bottom: auto; left: auto; }
.axis-y .tl-gap-head, .axis-y .tl-gap { top: calc(var(--x) * var(--min)); right: 0; bottom: auto; left: 0; width: auto; height: calc(15 * var(--min)); box-shadow: inset 0 1px var(--line), inset 0 -1px var(--line); }
.axis-y .tl-room { display: none; }
.axis-y .tl-label { top: 0; left: auto; flex-direction: column; justify-content: center; gap: 3px; height: var(--head-h); padding: 4px; }
.axis-y .tl-label strong { font-size: 16px; }
.axis-y .tl-zone { display: block; order: -1; max-width: 100%; overflow: hidden; color: var(--ink-3); font-size: 9.5px; font-style: normal; font-weight: 650; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.axis-y .tl-joined { margin: 0; position: absolute; top: 5px; right: 5px; }
.axis-y .tl-track { height: auto; border-right: 1px solid var(--line); border-bottom: 0; background: repeating-linear-gradient(180deg, rgb(16 24 40 / .04) 0 1px, transparent 1px calc(30 * var(--min))) var(--surface); }
.axis-y .tl-bar { top: calc(var(--x) * var(--min) + 1px); left: calc(3px + var(--lane) * (100% - 6px) / var(--lanes)); flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; width: calc((100% - 6px) / var(--lanes) - 1px); height: max(calc(var(--w) * var(--min) - 3px), 26px); padding: 7px 7px 6px 10px; line-height: 1.2; box-shadow: inset 0 3px 0 var(--c, var(--ink-3)); }
.axis-y .tl-bar.is-late { box-shadow: inset 0 3px 0 var(--tomato), inset 0 0 0 1.5px color-mix(in srgb, var(--tomato) 55%, transparent); }
.axis-y .tl-name { flex: none; max-width: 100%; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.axis-y .tl-state { position: absolute; top: 6px; right: 5px; margin: 0; width: 20px; height: 20px; }
.axis-y .tl-overlay { top: var(--head-h); right: 0; bottom: auto; left: var(--label-w); width: auto; height: calc(var(--span) * var(--min)); }
.axis-y .tl-hour { top: calc(var(--x) * var(--min)); right: 0; bottom: auto; left: 0; width: auto; height: 1px; }
.axis-y .tl-now { top: calc(var(--x) * var(--min) - 1px); right: 0; bottom: auto; left: 0; width: auto; height: 2px; }
.axis-y .tl-now b { top: -10px; left: 6px; translate: none; }
.axis-y .tl-ghost { top: calc(var(--x) * var(--min) + 1px); right: 3px; left: 3px; width: auto; height: calc(var(--d, 90) * var(--min) - 3px); align-items: flex-start; padding: 6px 8px; }
@media (hover: hover) { .axis-y .tl-bar:hover { box-shadow: inset 0 3px 0 var(--c), 0 2px 8px -2px rgb(16 24 40 / .18); } }
/* La misma flecha que «Arriba», girada hacia abajo: un cheurón parecía un desplegable. */
.axis-switch a.is-down .icon { rotate: 90deg; }

/* Barras · columna de mesas: todo sobre la misma línea de margen (14 px). «Mesa» a la altura de las horas; la sala,
   una franja baja con su muestra pequeña; el número de mesa en un ancho fijo para que las plazas queden en columna. */
.tl-corner { align-items: flex-end; padding: 0 14px 9px; line-height: 1; }
.tl-room { padding: 0; border-bottom: 1px solid var(--line); }
.tl-room > span { gap: 8px; height: 30px; padding: 0 14px; white-space: nowrap; }
.tl-room .floor-swatch { width: 14px; height: 14px; border-radius: 4px; }
.tl-label { gap: 10px; padding: 0 12px 0 14px; }
.tl-label .tl-table strong, .tl-label > strong { display: inline-block; min-width: 20px; }
.tl-seats { gap: 4px; height: 22px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.tl-seats .icon { width: 12px; height: 12px; color: var(--ink-3); }
.axis-y .tl-corner { align-items: center; padding: 0; }
.axis-y .tl-label { gap: 3px; padding: 4px; }
.axis-y .tl-label .tl-table strong, .axis-y .tl-label > strong { min-width: 0; }

/* ---------- Caja: las dos columnas empiezan a la misma altura (el margen entre tarjetas apiladas no aplica aquí) ---------- */
.cash-layout > .report-card { margin-top: 0; }

/* ---------- Temas del panel: Clásico (el de siempre), Oscuro, Mediterráneo y Huerta. Cada uno cambia la barra de
   arriba, el fondo, los grises y el color de las acciones principales; los colores de estado no cambian, porque
   significan algo (por llegar, en la mesa, cuenta...). Solo en el panel: la web pública de reservas no cambia. ---------- */
:root { --topbar: #16181d; --topbar-line: #16181d; --brand-tile: #d63b25; --brand-head: #ffd8d0; }
.workspace .topbar { background: var(--topbar); border-bottom-color: var(--topbar-line); }
.brand-mark .bm-tile { fill: var(--brand-tile); }
.brand-mark .bm-head { fill: var(--brand-head); }
.brand-mark .bm-ink { stroke: var(--brand-tile); }

/* Mediterráneo: azul marino y coral, fondo de azul muy claro. */
html[data-theme=mediterraneo] {
  --topbar: #0f3554; --topbar-line: #0f3554; --brand-tile: #e0603f; --brand-head: #ffd9cd;
  --ground: #eef3f7; --surface-2: #f6f9fb; --sunk: #e9eff4; --line: #dbe3ea; --line-2: #c5d1dc;
  --ink: #10202e; --ink-2: #3c4f60; --ink-3: #566a7c;
  --tomato: #c4492f; --tomato-hover: #a33a24; --tomato-tint: #fdeee9; --tomato-ink: #a33a24;
  --gold: #1d4a6e; --gold-tint: #e8f0f7; --gold-ink: #0f3554;
}
/* Huerta: verde bosque y terracota, fondo crema. */
html[data-theme=huerta] {
  --topbar: #1f3a2c; --topbar-line: #1f3a2c; --brand-tile: #c8643a; --brand-head: #fde0cf;
  --ground: #f4f2ea; --surface-2: #faf8f2; --sunk: #eeebe1; --line: #e3ded1; --line-2: #cfc8b7;
  --ink: #1b1e17; --ink-2: #474b3f; --ink-3: #62675a;
  --tomato: #b0522a; --tomato-hover: #8e4020; --tomato-tint: #fbeee6; --tomato-ink: #8e4020;
  --gold: #2f5440; --gold-tint: #e9efe9; --gold-ink: #1f3a2c;
}
/* Oscuro: superficies gris carbón, texto claro y los tintes de estado en versión oscura. */
html[data-theme=oscuro] {
  color-scheme: dark;
  --topbar: #0b0d10; --topbar-line: #242a33; --brand-tile: #e5533f; --brand-head: #ffc9be;
  --ground: #0f1115; --surface: #171a20; --surface-2: #1c2027; --sunk: #232832; --line: #2a3039; --line-2: #3a414c;
  --ink: #eceef2; --ink-2: #b9bfc9; --ink-3: #8f97a4;
  --tomato: #d9472f; --tomato-hover: #ea5f49; --tomato-tint: #3a1d19; --tomato-ink: #ff9d8c;
  --gold: #a9b4c6; --gold-tint: #222a36; --gold-ink: #d5dce8; --focus: #6b96ff;
  --saffron-tint: #33270f; --saffron-ink: #f4bf5a; --olive-tint: #12291b; --olive-ink: #74d69b;
  --tile-tint: #172340; --tile-ink: #9cb8ff; --plum-tint: #2f1a27; --plum-ink: #eba3c9;
  --stone-tint: #222730; --stone-ink: #b9bfc9; --lemon: #5a4a12;
  --state-pending-tint: #1a2440; --state-pending-ink: #a3bdf7;
  --state-arrived-tint: #36192a; --state-arrived-ink: #f2a5c6; --state-bar-tint: #36192a; --state-bar-ink: #f2a5c6;
  --state-dessert-tint: #243015; --state-dessert-ink: #bcd77f; --state-bill-tint: #261f45; --state-bill-ink: #bdaef7;
  --state-cleaning-tint: #0f2c35; --state-cleaning-ink: #86d4ea;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-2: 0 4px 12px -2px rgb(0 0 0 / .5), 0 2px 4px -2px rgb(0 0 0 / .3);
  --shadow-3: 0 24px 48px -12px rgb(0 0 0 / .6), 0 4px 12px -4px rgb(0 0 0 / .4);
  --ring: 0 0 0 3px rgb(107 150 255 / .3);
  scrollbar-color: #3a414c transparent;
  --chart-lunch: #7fb2f5; --chart-dinner: #3b7fd9; --chart-plain: #8a94a6; --chart-over: #f0705c;
}
html[data-theme=oscuro] ::selection { background: #2b3f6b; }
/* Dibujos del plano y del plato vacío: trazos grises sobre blanco, apagados para que no deslumbren. */
html[data-theme=oscuro] .plate, html[data-theme=oscuro] .floor-landmark, html[data-theme=oscuro] .landmark { filter: invert(.86) hue-rotate(180deg); }

/* El selector de tema, en el menú de la cuenta: cuatro muestras con su nombre. */
.theme-picker { padding: 4px 4px 6px; }
.theme-picker > p { margin: 0 0 6px; color: var(--ink-3); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.theme-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.account-menu .theme-options button { display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 0; padding: 6px 2px 5px; border-radius: 9px; color: var(--ink-2); font-size: 11.5px; font-weight: 550; }
.theme-swatch { position: relative; width: 36px; height: 26px; overflow: hidden; border-radius: 7px; background: var(--sw-ground); box-shadow: inset 0 0 0 1px rgb(16 24 40 / .12); }
.theme-swatch::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--sw-bar); }
.theme-swatch::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 12px; height: 6px; border-radius: 3px; background: var(--sw-accent); }
.theme-options button[aria-pressed=true] { background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.theme-options button[data-theme-choice=clasico] .theme-swatch { --sw-ground: #f6f7f9; --sw-bar: #16181d; --sw-accent: #b42318; }
.theme-options button[data-theme-choice=oscuro] .theme-swatch { --sw-ground: #171a20; --sw-bar: #0b0d10; --sw-accent: #d9472f; }
.theme-options button[data-theme-choice=mediterraneo] .theme-swatch { --sw-ground: #eef3f7; --sw-bar: #0f3554; --sw-accent: #c4492f; }
.theme-options button[data-theme-choice=huerta] .theme-swatch { --sw-ground: #f4f2ea; --sw-bar: #1f3a2c; --sw-accent: #b0522a; }
.theme-menu .account-menu { min-width: 288px; }
.theme-menu > summary { list-style: none; cursor: pointer; }
.theme-menu > summary::-webkit-details-marker { display: none; }
.workspace .topbar .theme-menu > summary { color: rgb(255 255 255 / .78); }
.workspace .topbar .theme-menu[open] > summary { background: rgb(255 255 255 / .12); color: #fff; }
/* En el móvil la barra solo deja sitio para el icono: el tema sigue a mano, junto a la cuenta. */
@media (max-width: 760px) {
  .topbar-end .theme-menu > summary.ghost-link { display: inline-flex; width: var(--control-h-sm); padding: 0; justify-content: center; }
  .theme-menu > summary > span { display: none; }
}
@media (hover: hover) { .workspace .topbar .theme-menu > summary:hover { background: rgb(255 255 255 / .1); color: #fff; } }

/* ---------- Tema oscuro: colores escritos a mano (generado) ---------- */
:where(html[data-theme=oscuro]) ::selection { background: #1e283d; }
:where(html[data-theme=oscuro]) .skip-link { background: #353c48; }
:where(html[data-theme=oscuro]) input:hover, :where(html[data-theme=oscuro]) select:hover, :where(html[data-theme=oscuro]) textarea:hover { border-color: #51545a; }
:where(html[data-theme=oscuro]) .form-errors { box-shadow: inset 0 0 0 1px #4b2e2b; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .button.secondary:hover:not(:disabled) { border-color: #51545a; } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .text-danger:hover { color: #eeb4ac; } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .icon-button:hover { border-color: #51545a; } }
:where(html[data-theme=oscuro]) .status-completed::before { background: #5f6368; }
:where(html[data-theme=oscuro]) .avatar { background: #2a2c31; }
:where(html[data-theme=oscuro]) .meter-bar .seg-completed { background: #494c52; }
:where(html[data-theme=oscuro]) .meter-legend .dot-completed { background: #494c52; }
:where(html[data-theme=oscuro]) .status-tabs .tab-completed > i { background: #5f6368; }
:where(html[data-theme=oscuro]) .tab-pill { background: #353c48; }
:where(html[data-theme=oscuro]) .status-tabs a[aria-current=true] > span { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .res-row:hover { background: #1d2023; } }
:where(html[data-theme=oscuro]) .room-legend .l-upcoming { background: #332c17; }
:where(html[data-theme=oscuro]) .room-legend .l-free { background: var(--surface); box-shadow: inset 0 0 0 1.5px #5b6068; }
:where(html[data-theme=oscuro]) .drawer-top { background: rgb(255 255 255 / .07); }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .contact-actions a:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .toast { background: #353c48; }
:where(html[data-theme=oscuro]) .day-shortcuts button[aria-pressed=true] { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .day-shortcuts button:not([aria-pressed=true]):hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .timeslot[aria-pressed=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .timeslot.skeleton { background: linear-gradient(90deg, var(--sunk) 0 40%, #30251a 50%, var(--sunk) 60% 100%) 0 0 / 300% 100%; }
:where(html[data-theme=oscuro]) .move-panel .walkin-go { background: #353c48; }
:where(html[data-theme=oscuro]) .booking-submit { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .confirmation-badge.cancelled { box-shadow: 0 0 0 8px #2e1b17; }
:where(html[data-theme=oscuro]) .switch::after { background: var(--surface); }
:where(html[data-theme=oscuro]) .period-chip { background: color-mix(in srgb, var(--chart-lunch) 10%, var(--surface)); color: #9abce7; }
:where(html[data-theme=oscuro]) .period-chip.dinner { background: color-mix(in srgb, var(--chart-dinner) 9%, var(--surface)); }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .period-chip button:hover { background: rgb(255 255 255 / .07); } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .mail-item:not([open]):hover { background: #1d2023; } }
@media (max-width: 1240px) { :where(html[data-theme=oscuro]) .js .pane-switch { background: rgb(255 255 255 / .07); } }
@media (max-width: 1240px) { :where(html[data-theme=oscuro]) .pane-switch button[aria-pressed=true] { background: #353c48; } }
@media (max-width: 760px) { :where(html[data-theme=oscuro]) .tabbar { background: rgb(255 255 255 / .07); } }
@media print { :root:where([data-theme=oscuro]), :where(html[data-theme=oscuro]) body { background: var(--surface); color: #e6e6e6; } }
@media print { :where(html[data-theme=oscuro]) .service-meter, :where(html[data-theme=oscuro]) .reservation-list { border: 1px solid #4c4c4c; } }
:where(html[data-theme=oscuro]) .floor { background: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 5% 100%,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% var(--tile-y),
    #1b1f23; }
:where(html[data-theme=oscuro]) .floor.floor-wood { background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% calc(var(--tile-y) / 2),
    #24211c; }
:where(html[data-theme=oscuro]) .floor.floor-stone { background: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 12.5% 100%,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% calc(var(--tile-y) * 2.5),
    #1e2024; }
:where(html[data-theme=oscuro]) .floor.floor-carpet { background: #211f24; }
:where(html[data-theme=oscuro]) .floor.floor-garden { background: #1f251f; }
:where(html[data-theme=oscuro]) .table-top { border: max(1.5px, calc(.16 * var(--cq, 1cqw))) solid #5b6068; }
:where(html[data-theme=oscuro]) .chair { background: #3d4044; }
:where(html[data-theme=oscuro]) .floor-table.is-free .table-top { background: var(--surface); border-color: #5b6068; }
:where(html[data-theme=oscuro]) .floor .floor-table.is-free .chair { background: #3d4044; }
:where(html[data-theme=oscuro]) .floor .floor-table.is-occupied .chair { background: #527660; }
:where(html[data-theme=oscuro]) .floor-table.is-soon .table-top { background: #332c17; color: #efc1ae; }
:where(html[data-theme=oscuro]) .floor-table.is-soon .table-top small { color: #efbba3; }
:where(html[data-theme=oscuro]) .floor .floor-table.is-soon .chair { background: #69582c; }
:where(html[data-theme=oscuro]) .floor-table.is-soon .table-tag { color: #efbba3; box-shadow: 0 0 0 1px #75622d; }
:where(html[data-theme=oscuro]) .floor.editing .floor-table .table-top { border-color: #5b6068; }
:where(html[data-theme=oscuro]) .floor.editing .floor-table .chair { background: #3d4044; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .palette-chip:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #51545a; } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .shape-picker button:not([aria-pressed=true]):hover { box-shadow: inset 0 0 0 1px #51545a; } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .zone-tab:not([aria-selected=true]):hover { box-shadow: var(--shadow-1), 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .demo-banner { color: #a9b9e6; }
:where(html[data-theme=oscuro]) .demo-banner strong { color: #a9b9e6; }
:where(html[data-theme=oscuro]) body.direct::before { background: radial-gradient(70% 90% at 80% -10%, rgb(255 255 255 / .08), transparent 60%),
    linear-gradient(180deg, #353c48 0%, #232733 100%); }
:where(html[data-theme=oscuro]) .reserve-logo { background: var(--surface); }
:where(html[data-theme=oscuro]) .wizard-progress li.is-done::before { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .wizard-back:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .guest-chips button[aria-pressed=true], :where(html[data-theme=oscuro]) .guest-chips .more-guests[aria-expanded=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .calendar-day.state-full { background: repeating-linear-gradient(-45deg, #301d1a 0 5px, var(--surface) 5px 10px); box-shadow: inset 0 0 0 1px #462c29; }
:where(html[data-theme=oscuro]) .calendar-day[aria-pressed=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .calendar-day[aria-pressed=true] i { background: var(--surface); }
:where(html[data-theme=oscuro]) .calendar-day[aria-pressed=true]::after { background: var(--surface); }
:where(html[data-theme=oscuro]) .calendar-legend .lg-closed { background: #59493c; }
:where(html[data-theme=oscuro]) .hour[aria-pressed=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .hour.is-taken { background: repeating-linear-gradient(-45deg, var(--sunk) 0 6px, #30251a 6px 12px); }
:where(html[data-theme=oscuro]) .hour-legend .lg-taken { background: repeating-linear-gradient(-45deg, var(--sunk) 0 3px, #30251a 3px 6px); }
:where(html[data-theme=oscuro]) .hour-skeleton { background: linear-gradient(90deg, var(--sunk) 0 40%, #30251a 50%, var(--sunk) 60% 100%) 0 0 / 300% 100%; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .summary-box:hover { box-shadow: inset 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .key-reveal .share-box { background: var(--surface); }
:where(html[data-theme=oscuro]) .venue-chip.admin-chip { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .client-card:hover { box-shadow: var(--shadow-2), 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .first-steps .step-dot, :where(html[data-theme=oscuro]) .register-steps .step-dot { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .first-steps a:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px #51545a; } }
:where(html[data-theme=oscuro]) .public-header { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .topbar { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .tag-vip { background: #3b341c; color: #f5d0a5; }
:where(html[data-theme=oscuro]) .tag-vip .icon { color: #f2bf84; }
:where(html[data-theme=oscuro]) .vip-badge { color: #f5d0a5; }
:where(html[data-theme=oscuro]) .vip-badge .icon { color: #f2bf84; }
:where(html[data-theme=oscuro]) .attendance.risk-high:not(.is-confirmed) { background: #2e1b17; box-shadow: inset 0 0 0 1px #462c29; }
:where(html[data-theme=oscuro]) .attendance.risk-medium:not(.is-confirmed) { background: #302716; box-shadow: inset 0 0 0 1px #67552e; }
:where(html[data-theme=oscuro]) .waitlist-item.has-room { background: #1d2a22; }
:where(html[data-theme=oscuro]) .res-avatar.is-vip, :where(html[data-theme=oscuro]) .restaurant-initial.is-vip { background: #3b341c; color: #f5d0a5; box-shadow: inset 0 0 0 1.5px #8d793e; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .guest-row:hover { background: #1d2023; } }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .history-list a:hover { background: #1d2023; } }
:where(html[data-theme=oscuro]) .service-choice label:has(input:checked) { background: #353c48; }
:where(html[data-theme=oscuro]) .chart-tip { background: #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .top-guests a:hover { background: #1d2023; } }
:where(html[data-theme=oscuro]) .danger-zone { background: #2e1b17; box-shadow: inset 0 0 0 1px #462c29; }
:where(html[data-theme=oscuro]) .editor-toolbar { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .floor-swatch.floor-tiles { background: linear-gradient(90deg, #3d4044 1px, transparent 1px) 0 0 / 5px 100%, linear-gradient(#3d4044 1px, transparent 1px) 0 0 / 100% 5px, var(--surface); }
:where(html[data-theme=oscuro]) .floor-swatch.floor-wood { background: linear-gradient(#3d4044 1px, transparent 1px) 0 0 / 100% 4px, #24211c; }
:where(html[data-theme=oscuro]) .floor-swatch.floor-stone { background: linear-gradient(90deg, #3d4044 1px, transparent 1px) 0 0 / 10px 100%, linear-gradient(#3d4044 1px, transparent 1px) 0 0 / 100% 10px, #1e2024; }
:where(html[data-theme=oscuro]) .floor-swatch.floor-carpet { background: #2b2930; }
:where(html[data-theme=oscuro]) .floor-swatch.floor-garden { background: #2f3a2f; }
:where(html[data-theme=oscuro]) .state-chip[aria-pressed=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .state-completed i { background: #5f6368; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .state-chip:not(:disabled):hover { box-shadow: inset 0 0 0 1px #5f6368; } }
:where(html[data-theme=oscuro]) .floor .floor-table.cur-dessert .chair, :where(html[data-theme=oscuro]) .floor .floor-table.cur-bill .chair, :where(html[data-theme=oscuro]) .floor .floor-table.cur-cleaning .chair { background: #3d4044; }
:where(html[data-theme=oscuro]) .floor .floor-table.cur-dessert .chair { background: #466964; }
:where(html[data-theme=oscuro]) .live-counts .l-upcoming { background: #332c17; }
:where(html[data-theme=oscuro]) .live-counts .l-free { background: var(--surface); box-shadow: inset 0 0 0 1.5px #5b6068; }
:where(html[data-theme=oscuro]) .map-tabs button[aria-selected=true] { background: #353c48; }
:where(html[data-theme=oscuro]) i.key.full { background: #353c48; }
:where(html[data-theme=oscuro]) .diff-track::after { background: #353c48; }
:where(html[data-theme=oscuro]) .service-tag.lunch { background: color-mix(in srgb, var(--chart-lunch) 12%, var(--surface)); color: #9abce7; }
:where(html[data-theme=oscuro]) .service-tag.dinner { background: color-mix(in srgb, var(--chart-dinner) 10%, var(--surface)); }
:where(html[data-theme=oscuro]) .alert-card.is-usual { background: linear-gradient(180deg, #352b18 0%, #2b2413 70%); }
:where(html[data-theme=oscuro]) .alert-card.is-full { background: linear-gradient(180deg, #331d17 0%, #2a1713 70%); }
:where(html[data-theme=oscuro]) .fill-usual { background: repeating-linear-gradient(135deg, var(--svc-soft) 0 3px, rgb(255 255 255 / .07) 3px 6px); }
:where(html[data-theme=oscuro]) .fill-meter > .fill-full { background: #353c48; }
:where(html[data-theme=oscuro]) i.key.usual.lunch { background: repeating-linear-gradient(135deg, var(--soft) 0 2px, var(--surface) 2px 4px); }
:where(html[data-theme=oscuro]) i.key.usual.dinner { background: repeating-linear-gradient(135deg, var(--soft) 0 2px, var(--surface) 2px 4px); }
:where(html[data-theme=oscuro]) .load-level.is-normal { background: linear-gradient(180deg, #312816 0%, #2a2313 70%); }
:where(html[data-theme=oscuro]) .load-level.is-busy { background: linear-gradient(180deg, #321d16 0%, #2a1713 70%); }
:where(html[data-theme=oscuro]) .cash-total { background: #353c48; }
:where(html[data-theme=oscuro]) .walkin-card { background: linear-gradient(180deg, #212d24 0%, #1c251e 100%); }
:where(html[data-theme=oscuro]) .float-tip { background: #353c48; }
:where(html[data-theme=oscuro]) .plan-badge { background: #353c48; }
:where(html[data-theme=oscuro]) .hero-toast { background: #353c48; }
:where(html[data-theme=oscuro]) .live-floor { background: repeating-linear-gradient(0deg, transparent 0 calc(11% - 1px), rgb(120 90 60 / .09) calc(11% - 1px) 11%), linear-gradient(#29241e, #302b23); }
:where(html[data-theme=oscuro]) .live-bar { background: #353c48; }
:where(html[data-theme=oscuro]) .demo-table { background: var(--surface); box-shadow: 0 4px 10px -6px rgb(16 24 40 / .35), inset 0 0 0 1.5px #494c52; }
:where(html[data-theme=oscuro]) .demo-table::before, :where(html[data-theme=oscuro]) .demo-table::after { background: #3a3d41; }
:where(html[data-theme=oscuro]) .demo-table:is([data-state=soon], [data-state=walking]) { background: #584a29; color: #f7d6b2; }
:where(html[data-theme=oscuro]) .demo-guest { box-shadow: 0 0 0 2px var(--surface), 0 2px 5px rgb(16 24 40 / .3); }
:where(html[data-theme=oscuro]) .demo-toast { background: #353c48; }
:where(html[data-theme=oscuro]) .map-unjoin { background: #353c48; }
:where(html[data-theme=oscuro]) .step-num { background: #353c48; }
:where(html[data-theme=oscuro]) .auth-intro .register-steps .step-dot { background: #353c48; }
:where(html[data-theme=oscuro]) .toast-action:focus-visible { outline: 2px solid var(--surface); }
:where(html[data-theme=oscuro]) .res-row.is-linked { background: #171d2c; }
:where(html[data-theme=oscuro]) .floor-table.is-linked .table-top { box-shadow: 0 0 0 calc(.4 * var(--cq, 1cqw)) var(--surface), 0 0 0 calc(.85 * var(--cq, 1cqw)) var(--tile), 0 calc(.6 * var(--cq, 1cqw)) calc(1.4 * var(--cq, 1cqw)) calc(-.4 * var(--cq, 1cqw)) rgb(16 24 40 / .3); }
:where(html[data-theme=oscuro]) .drag-ghost { background: #353c48; }
:where(html[data-theme=oscuro]) .room .floor-table.is-drop-target .table-top { box-shadow: 0 0 0 calc(.4 * var(--cq, 1cqw)) var(--surface), 0 0 0 calc(.9 * var(--cq, 1cqw)) var(--tile), 0 calc(.8 * var(--cq, 1cqw)) calc(1.6 * var(--cq, 1cqw)) calc(-.4 * var(--cq, 1cqw)) rgb(16 24 40 / .35); }
:where(html[data-theme=oscuro]) .demo-close { color: #a9b9e6; }
:where(html[data-theme=oscuro]) .status-tabs .tab-liberadas > i { background: #5f6368; }
:where(html[data-theme=oscuro]) .phase-track li.is-done { border-top-color: #5f6368; }
:where(html[data-theme=oscuro]) .restaurant-brand-image, :where(html[data-theme=oscuro]) .venue-chip .restaurant-brand-image { background: var(--surface); }
:where(html[data-theme=oscuro]) body.direct.has-cover::before { background: linear-gradient(180deg, rgb(17 24 39 / .55) 0%, rgb(17 24 39 / .72) 55%, rgb(17 24 39 / .9) 100%),
    var(--cover) center 40% / cover no-repeat,
    #353c48; }
@media (hover: hover) and (pointer: fine) { :where(html[data-theme=oscuro]) .view-switch a:not([aria-current]):hover { background: rgb(255 255 255 / .07); } }
:where(html[data-theme=oscuro]) .tl-bar.is-linked .tl-state { background: color-mix(in srgb, var(--c) 55%, var(--surface)); }
:where(html[data-theme=oscuro]) .tl-ghost { border: 1.5px dashed #51545a; background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .month-day.is-today .month-date { background: #353c48; }
:where(html[data-theme=oscuro]) .erase-section { box-shadow: var(--shadow-1), 0 0 0 1px #4b2e2b; }
:where(html[data-theme=oscuro]) .service-heading.lunch { background: color-mix(in srgb, var(--chart-lunch) 8%, var(--surface)); }
:where(html[data-theme=oscuro]) .service-heading.dinner { background: color-mix(in srgb, var(--chart-dinner) 7%, var(--surface)); }
:where(html[data-theme=oscuro]) .floor .floor-table.cur-bill .chair { background: #222849; }
:where(html[data-theme=oscuro]) .floor .floor-table.is-late .chair { background: #4c2e2b; }
:where(html[data-theme=oscuro]) .floor-table.is-late .table-tag { box-shadow: 0 0 0 1px #4c2e2b; }
:where(html[data-theme=oscuro]) .floor .floor-table.is-waiting .chair { background: #442336; }
:where(html[data-theme=oscuro]) .floor-table.is-waiting .table-tag { box-shadow: 0 0 0 1px #442336; }
:where(html[data-theme=oscuro]) .floor.editing .landmark-pared.selected .wall-end { background: var(--surface); }
:where(html[data-theme=oscuro]) .floor-legend .lg-free { background: var(--surface); border-color: #5b6068; }
:where(html[data-theme=oscuro]) .floor-legend .lg-soon { background: #332c17; }
:where(html[data-theme=oscuro]) .lg-chairs b { background: #527660; }
:where(html[data-theme=oscuro]) .timeslot.is-taken { background: repeating-linear-gradient(-45deg, var(--sunk) 0 6px, #30251a 6px 12px); }
:where(html[data-theme=oscuro]) .public-header { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) body.direct::before { background: radial-gradient(70% 90% at 80% -10%, rgb(255 255 255 / .07), transparent 60%),
    linear-gradient(180deg, #353c48 0%, #232733 100%); }
:where(html[data-theme=oscuro]) .chart-average span { background: #353c48; }
:where(html[data-theme=oscuro]) .panel-options .option.is-main { background: #353c48; }
:where(html[data-theme=oscuro]) .service-heading[class*=moment-] { background: color-mix(in srgb, var(--m) 8%, var(--surface)); }
:where(html[data-theme=oscuro]) .column b { background: #353c48; }
:where(html[data-theme=oscuro]) i.key.spare { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--chart-lunch) 45%, transparent) 0 2px, var(--surface) 2px 4px); }
:where(html[data-theme=oscuro]) .stay-mark { background: #353c48; }
:where(html[data-theme=oscuro]) .bar-list li.is-best .bar.plain { background: #353c48; }
:where(html[data-theme=oscuro]) .bar-list li:not(.is-best) .bar.plain { background: #5b6068; }
:where(html[data-theme=oscuro]) .diet-chip.is-vegetarian { background: #283523; color: #c1e5b7; }
:where(html[data-theme=oscuro]) .diet-chip.is-vegan { background: #253832; color: #b5efe0; }
:where(html[data-theme=oscuro]) .state-box { background: color-mix(in srgb, var(--st) 12%, var(--surface)); }
:where(html[data-theme=oscuro]) .state-arrived .state-box, :where(html[data-theme=oscuro]) .state-at_bar .state-box, :where(html[data-theme=oscuro]) .state-seated .state-box, :where(html[data-theme=oscuro]) .state-dessert .state-box, :where(html[data-theme=oscuro]) .state-bill .state-box, :where(html[data-theme=oscuro]) .state-cleaning .state-box { background: color-mix(in srgb, var(--st) 17%, var(--surface)); }
:where(html[data-theme=oscuro]) .mini-day[data-level="1"], :where(html[data-theme=oscuro]) .mini-key [data-level="1"] { background: #2a2d32; }
:where(html[data-theme=oscuro]) .mini-day[data-level="2"], :where(html[data-theme=oscuro]) .mini-key [data-level="2"] { background: #41474e; }
:where(html[data-theme=oscuro]) .mini-day[data-level="3"], :where(html[data-theme=oscuro]) .mini-key [data-level="3"] { background: #5a6067; }
:where(html[data-theme=oscuro]) .mini-day.is-open { background: #353c48; }
:where(html[data-theme=oscuro]) .step-flow li.is-fixed { background: #353c48; }
:where(html[data-theme=oscuro]) .status-bar .status-tabs a[aria-current=true] { background: #353c48; }
:where(html[data-theme=oscuro]) .service-heading[class*=moment-], :where(html[data-theme=oscuro]) .service-heading.lunch, :where(html[data-theme=oscuro]) .service-heading.dinner { background: color-mix(in srgb, var(--m) 7%, var(--surface)); }
:where(html[data-theme=oscuro]) .service-heading[class*=moment-] .service-icon, :where(html[data-theme=oscuro]) .service-heading.lunch .service-icon, :where(html[data-theme=oscuro]) .service-heading.dinner .service-icon { background: color-mix(in srgb, var(--m) 20%, var(--surface)); }
:where(html[data-theme=oscuro]) .state-arrived .state-box, :where(html[data-theme=oscuro]) .state-at_bar .state-box, :where(html[data-theme=oscuro]) .state-seated .state-box, :where(html[data-theme=oscuro]) .state-dessert .state-box, :where(html[data-theme=oscuro]) .state-bill .state-box, :where(html[data-theme=oscuro]) .state-cleaning .state-box { background: color-mix(in srgb, var(--st) 12%, var(--surface)); }
:where(html[data-theme=oscuro]) .diet-chip.is-vegetarian { background: #233028; color: #bcead3; }
:where(html[data-theme=oscuro]) .diet-chip.is-vegan { background: #303523; color: #d9e8b9; }
:where(html[data-theme=oscuro]) .figure-grid .is-due dd { color: #eed2a7; }
:where(html[data-theme=oscuro]) .figure-grid .is-here dd { color: #bcead3; }
:where(html[data-theme=oscuro]) .figure-grid .is-risk dd, :where(html[data-theme=oscuro]) .figure-grid .is-incident dd { color: #e5a9a4; }
:where(html[data-theme=oscuro]) .reservation-list .service-heading .service-icon { background: color-mix(in srgb, var(--m) 22%, var(--surface)); }
:where(html[data-theme=oscuro]) .reservation-list .res-row .state-box, :where(html[data-theme=oscuro]) .state-arrived .state-box, :where(html[data-theme=oscuro]) .state-at_bar .state-box, :where(html[data-theme=oscuro]) .state-seated .state-box, :where(html[data-theme=oscuro]) .state-dessert .state-box, :where(html[data-theme=oscuro]) .state-bill .state-box, :where(html[data-theme=oscuro]) .state-cleaning .state-box { background: color-mix(in srgb, var(--st) 15%, var(--surface)); }
:where(html[data-theme=oscuro]) .reservation-list .res-row.state-cancelled .state-box { background: color-mix(in srgb, var(--st) 14%, var(--surface)); }
@media (hover: hover) { :where(html[data-theme=oscuro]) .axis-switch a:not([aria-current=true]):hover { background: rgb(255 255 255 / .07); } }
:where(html[data-theme=oscuro]) .tl-guests { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .tl-state { background: rgb(255 255 255 / .07); }
:where(html[data-theme=oscuro]) .tl-bar.is-linked { background: repeating-linear-gradient(135deg, var(--c-tint) 0 6px, color-mix(in srgb, var(--c-tint) 45%, var(--surface)) 6px 12px); }
:where(html[data-theme=oscuro]) .tl-bar.is-linked .tl-state { background: rgb(255 255 255 / .07); }

/* Tutorial de primera entrada: el resto del panel queda en gris y un hueco señala cada cosa (static/tour.js) */
.tour { position: fixed; inset: 0; z-index: 400; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: var(--ink); pointer-events: none; }
.tour-veil { position: fixed; inset: 0; background: rgb(17 21 29 / .46); -webkit-backdrop-filter: grayscale(1) brightness(.86); backdrop-filter: grayscale(1) brightness(.86); pointer-events: auto; opacity: 0; transition: opacity .32s var(--ease-out); }
.tour.is-on .tour-veil { opacity: 1; }
.tour-stop, .tour-ring { position: fixed; top: 0; left: 0; border-radius: 12px; }
.tour-stop { pointer-events: auto; }
.tour.is-click .tour-stop, .tour.is-blank .tour-stop { display: none; }
.tour-ring { pointer-events: none; box-shadow: 0 0 0 2px var(--tomato), 0 0 0 7px rgb(180 35 24 / .22); opacity: 0; transition: opacity .3s var(--ease-out); }
.tour.is-on .tour-ring { opacity: 1; }
.tour.is-on.is-blank .tour-ring { opacity: 0; }
.tour-ring::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 2px var(--tomato); opacity: 0; animation: tour-pulse 1.9s var(--ease-out) infinite; }
.tour.is-click .tour-ring::after { animation-duration: 1.25s; }
@keyframes tour-pulse { 0% { opacity: .75; box-shadow: 0 0 0 2px var(--tomato); } 70%, 100% { opacity: 0; box-shadow: 0 0 0 14px var(--tomato); } }
.tour-card { position: fixed; top: 0; left: 0; display: flex; flex-direction: column; width: min(372px, calc(100vw - 24px)); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-3), 0 0 0 1px rgb(16 24 40 / .08); pointer-events: auto; opacity: 0; transition: transform .46s var(--ease-out), opacity .24s var(--ease-out); will-change: transform; outline: none; }
.tour.is-on .tour-card { opacity: 1; }
.tour-card.is-center { width: min(440px, calc(100vw - 24px)); text-align: center; }
.tour-progress { flex: 1; max-width: 88px; height: 4px; margin-right: auto; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.tour-progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--tomato); transition: width .5s var(--ease-out); }
.tour-card.is-center .tour-progress { display: none; }
.tour-body { padding: 16px 20px 6px; }
.tour-card.is-center .tour-body { padding: 22px 28px 8px; }
.tour-card.is-fresh .tour-body > * { animation: tour-in .42s var(--ease-out) both; }
.tour-card.is-fresh .tour-body > :nth-child(2) { animation-delay: .04s; }
.tour-card.is-fresh .tour-body > :nth-child(3) { animation-delay: .07s; }
.tour-card.is-fresh .tour-body > :nth-child(4) { animation-delay: .1s; }
.tour-card.is-fresh .tour-body > :nth-child(5) { animation-delay: .13s; }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px); } }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; }
.tour-card.is-center .tour-top { justify-content: center; }
.tour-card.is-center .tour-top .tour-skip { display: none; }
.tour-kicker { margin: 0; padding: 3px 9px; border-radius: 999px; background: var(--tomato-tint); color: var(--tomato-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.tour-skip { padding: 4px 2px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.tour-skip:hover, .tour-skip:focus-visible { color: var(--ink); text-decoration-color: currentColor; }
.tour-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 16px auto 4px; border-radius: 18px; background: var(--tomato-tint); color: var(--tomato-ink); font-size: 28px; font-weight: 600; overflow: hidden; animation: tour-mark .6s var(--ease-spring, var(--ease-out)) both; }
.tour-mark:empty { display: none; }
.tour-mark img { width: 100%; height: 100%; object-fit: cover; }
.tour-mark.is-done { border-radius: 50%; background: var(--olive-tint, #e8f1dc); color: var(--olive, #46711e); }
@keyframes tour-mark { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }
.tour-card h2 { margin: 12px 0 6px; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.tour-card.is-center h2 { font-size: 21px; }
.tour-card #tour-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.tour-hint { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--tomato-tint); color: var(--tomato-ink); font-size: 13px; font-weight: 600; }
.tour-hint[hidden] { display: none; }
.tour-tap { position: relative; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.tour-tap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: tour-tap 1.25s var(--ease-out) infinite; }
@keyframes tour-tap { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.tour-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; }
.tour-foot [hidden] { display: none; }
.tour-card.is-center .tour-foot { flex-direction: column; align-items: stretch; padding: 14px 28px 8px; }
.tour-card.is-center .tour-foot .button { min-height: var(--control-h); font-size: 14.5px; order: -1; }
.tour-card.is-center .tour-foot .button.secondary { order: 0; }
.tour-card.is-center .tour-foot .tour-skip { align-self: center; }
.tour-card.is-center::after { content: ""; display: block; height: 12px; }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); border-radius: 3px; }
.tour-card[data-side=bottom] .tour-arrow { top: -6px; left: calc(var(--arrow, 50%) - 7px); box-shadow: -1px -1px 0 rgb(16 24 40 / .08); }
.tour-card[data-side=top] .tour-arrow { bottom: -6px; left: calc(var(--arrow, 50%) - 7px); box-shadow: 1px 1px 0 rgb(16 24 40 / .08); }
.tour-card[data-side=right] .tour-arrow { left: -6px; top: calc(var(--arrow, 50%) - 7px); box-shadow: -1px 1px 0 rgb(16 24 40 / .08); }
.tour-card[data-side=left] .tour-arrow { right: -6px; top: calc(var(--arrow, 50%) - 7px); box-shadow: 1px -1px 0 rgb(16 24 40 / .08); }
.tour-card[data-side=center] .tour-arrow, .tour-card[data-side=over] .tour-arrow, .tour-card:not([data-side]) .tour-arrow { display: none; }
.tour-target { scroll-margin: 104px 16px 48px; }
.tour-confetti { position: fixed; left: 50%; top: 46%; width: 0; height: 0; pointer-events: none; }
.tour-confetti i { position: absolute; width: 9px; height: 14px; border-radius: 3px; opacity: 0; animation: tour-confetti 1.7s cubic-bezier(.16, .8, .3, 1) both; }
.tour-confetti i:nth-child(3n) { width: 10px; height: 10px; border-radius: 50%; }
.tour-confetti i:nth-child(4n) { width: 6px; height: 16px; }
@keyframes tour-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--turn)); } }
.account-menu [data-tour-start] { cursor: pointer; font-family: inherit; }
:where(html[data-theme=oscuro]) .tour-veil { background: rgb(4 6 10 / .58); }
:where(html[data-theme=oscuro]) .tour-card { box-shadow: 0 24px 48px -12px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .1); }
:where(html[data-theme=oscuro]) .tour-arrow { box-shadow: none; }
@media (max-width: 560px) {
  .tour-card, .tour-card.is-center { width: calc(100vw - 24px); }
  .tour-body, .tour-card.is-center .tour-body { padding: 14px 16px 4px; }
  .tour-foot, .tour-card.is-center .tour-foot { padding: 10px 16px 14px; }
  .tour-foot .button { flex: 1; min-height: 42px; }
  .tour-progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-veil, .tour-ring, .tour-card, .tour-progress i { transition: none; }
  .tour-ring::after, .tour-tap::after, .tour-mark, .tour-card.is-fresh .tour-body > * { animation: none; }
}

/* Gestión → Visitas: barras por día y por origen, y la lista de visitas */
.visit-days { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.visit-days li { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) minmax(64px, auto); align-items: center; gap: 12px; font-size: 13.5px; }
.visit-rows li { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(64px, auto); }
.visit-day { color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-track { display: flex; height: 10px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.visit-track i, .visit-key i { display: block; height: 100%; background: var(--tomato); }
.visit-track i.is-panel, .visit-key i.is-panel { background: var(--olive); }
.visit-count { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: nowrap; }
.visit-count small { color: var(--ink-3); font-size: 12px; }
.visit-key { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.visit-key i { width: 10px; height: 10px; border-radius: 3px; }
.visit-list { display: grid; margin: 0; padding: 0; list-style: none; }
.visit-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.visit-list li:first-child { border-top: 0; }
.visit-when, .visit-who { display: grid; gap: 1px; min-width: 0; }
.visit-when strong { font-variant-numeric: tabular-nums; font-family: var(--font-num); font-weight: 600; }
.visit-list small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-who strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-where { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); white-space: nowrap; }
.visit-where .icon { width: 15px; height: 15px; color: var(--ink-3); }
@media (max-width: 640px) {
  .visit-list li { grid-template-columns: 96px minmax(0, 1fr); }
  .visit-where { grid-column: 2; white-space: normal; }
  .visit-days li { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; }
  .visit-rows li { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
}

/* ==========================================================================
   Ajustes del móvil (revisión de noviembre de 2026). Todo va dentro de reglas
   de móvil o de pantalla táctil: el escritorio se queda como estaba.
   ========================================================================== */
@media (max-width: 760px) {
  /* Sala: «Sin reserva · Bloquear · Añadir mesa · Editar plano» no cabían en una fila y ensanchaban la página. */
  .floor-live .floor-summary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor-live .floor-summary-actions .button { min-width: 0; padding-inline: 10px; }

  /* Menús que se deslizan de lado (Ajustes, Informes, salas, fases): un degradado avisa de que hay más. */
  .settings-nav.fade-end, .zone-tabs.fade-end, .map-tabs.fade-end, .status-tabs.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .settings-nav.fade-start, .zone-tabs.fade-start, .map-tabs.fade-start, .status-tabs.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
  .settings-nav.fade-start.fade-end, .zone-tabs.fade-start.fade-end, .map-tabs.fade-start.fade-end, .status-tabs.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
  .js .status-tabs:not(.fade-start):not(.fade-end) { -webkit-mask-image: none; mask-image: none; }
  .table-panel .table-days .table-today.is-off { display: none; }
  .table-panel .table-days .table-day-pick { padding: 0 6px; gap: 5px; }
  .table-panel .table-days strong { font-size: 13px; }
  .cash-list-what small { white-space: normal; line-height: 1.35; }
  body.workspace:not(.admin-area) .app-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.workspace:not(.admin-area) .toast-region { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .ticket > div > span:has(.ticket-link) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
  .ticket-link { margin-left: 0; }

  /* Nueva reserva: vegetarianos y veganos, uno al lado del otro (son números cortos). */
  .booking-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-form .form-grid > * { grid-column: 1 / -1; }
  .booking-form .form-grid > .field:has(> input[type=number]) { grid-column: auto; }
}
@media (max-width: 420px) {
  /* Móviles estrechos (320–420 px): la barra de arriba se salía unos píxeles y los menús se cortaban por los lados. */
  .workspace .topbar .venue-chip { max-width: min(56vw, calc(100vw - 156px)); }
  .topbar .account-menu, .topbar .venue-menu, .theme-menu .account-menu { position: fixed; top: calc(var(--bar-h, 56px) + 6px); left: 10px; right: 10px; width: auto; min-width: 0; max-height: calc(100dvh - var(--bar-h, 56px) - 90px); overflow-y: auto; transform-origin: top center; }
}
@media (pointer: coarse) {
  /* Enlaces de texto («Volver», «Ver ficha»…): la zona para el dedo crece sin mover nada de sitio. */
  .back, .text-link { position: relative; }
  .back::after, .text-link::after { content: ""; position: absolute; inset: -12px -6px; }
}

/* ==========================================================================
   Noviembre 2026 · Sala y agenda: sin franjas de color a la izquierda, mesa grande en la lista, plano más legible
   ========================================================================== */

/* Sin franja de color pegada al borde izquierdo: el color va en el fondo suave y en un filete fino alrededor. */
.guest-note { box-shadow: inset 0 0 0 1px rgb(245 158 11 / .32); }
.guest-prefs { box-shadow: inset 0 0 0 1px rgb(245 158 11 / .28); }
.late-banner { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tomato) 26%, transparent); }
.table-bookings a.is-here { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--olive) 42%, var(--line)); }
.table-bookings a.is-waiting { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state-arrived) 42%, var(--line)); }
.table-bookings.is-now a { box-shadow: inset 0 0 0 1px rgb(22 163 74 / .3); }
.table-bookings.is-now a.is-waiting { box-shadow: inset 0 0 0 1px rgb(219 39 119 / .26); }
.waitlist-item.has-room { box-shadow: inset 0 0 0 1px rgb(22 163 74 / .24); }
.chart-lead { box-shadow: inset 0 0 0 1px var(--line-2); }
.tl-bar { padding-left: 9px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ink-3)) 38%, transparent); }
.tl-bar.is-late { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tomato) 62%, transparent); }
@media (hover: hover) { .tl-bar:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ink-3)) 60%, transparent), 0 2px 8px -2px rgb(16 24 40 / .18); } }
.timeline-legend i { box-shadow: inset 0 0 0 1.5px var(--c); }

/* La lista: el número de la mesa, grande, al principio de cada fila, en el color de su estado. Se lee de un vistazo. */
.res-row.is-late, .res-row.is-new { box-shadow: none; }
.reservation-list .res-row { padding-left: 70px; }
.res-table { position: absolute; left: 12px; top: 50%; z-index: 1; display: grid; place-items: center; width: 46px; height: 44px; translate: 0 -50%; border-radius: 10px; background: color-mix(in srgb, var(--st, var(--line-2)) 15%, var(--surface)); color: var(--st-ink, var(--ink)); font-family: var(--font-num); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; white-space: nowrap; pointer-events: none; }
.res-table.is-long { font-size: 13.5px; letter-spacing: -.02em; }
.res-row.is-late .res-table { background: var(--tomato-tint); color: var(--tomato-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tomato) 45%, transparent); }
.res-row.is-new .res-table { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tile) 55%, transparent); }
.res-row:is(.state-completed, .state-cancelled, .state-no_show) .res-table { opacity: .75; }
.state-cancelled .res-table, .state-no_show .res-table { text-decoration: line-through; text-decoration-thickness: 1.5px; }
@media screen {
  .reservation-list .service-block .res-row, .reservation-list .service-block .res-row.is-late, .reservation-list .service-block .res-row.is-new { box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
  .reservation-list .service-block :is(.service-heading, .now-line) + .res-row, .reservation-list .service-block :is(.service-heading, .now-line) + .res-row.is-late, .reservation-list .service-block :is(.service-heading, .now-line) + .res-row.is-new { box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line); }
}
.reservation-list .res-row { padding-left: 66px; }
.res-table { left: 10px; width: 44px; }
/* Junto al plano, la lista es estrecha: la columna de hora y estado se ajusta y los botones solo ocupan si los hay. */
@media (min-width: 761px) {
  @container agenda-list (max-width: 680px) {
    .reservation-list .service-block .res-row { grid-template-columns: 102px minmax(0, 1fr) auto auto; gap: 6px 10px; padding-right: 12px; }
  }
}
@media (max-width: 760px) {
  .reservation-list .res-row { padding-left: 64px; }
  .res-table { left: 10px; top: 12px; translate: none; width: 42px; height: 42px; font-size: 19px; }
}

/* En el plano, lo que pasa en cada mesa se lee entero: letra más pequeña y, si no cabe, en varias líneas, sin cortar. */
.floor .table-tag { font-size: max(9px, calc(.9 * var(--cq, 1cqw))); max-width: max(calc(100% + 4 * var(--cq, 1cqw)), calc(21 * var(--cq, 1cqw))); overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.floor .table-tag:not([data-left]) { display: block; width: max-content; white-space: normal; text-align: center; line-height: 1.25; -webkit-line-clamp: none; line-clamp: none; }
.floor .table-tag .tag-text { overflow: visible; text-overflow: clip; white-space: normal; }
@media (max-width: 760px) {
  .floor .table-tag, .floor .table-tag:not([data-left]) { display: block; width: auto; max-width: max(100%, calc(14 * var(--cq, 1cqw))); padding: 1px 4px; font-size: max(8px, calc(.88 * var(--cq, 1cqw))); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .floor .table-tag .tag-text { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* La leyenda del plano, completa también junto a la agenda. */
.floor-legend .lg-dessert { background: var(--state-dessert); border-color: var(--state-dessert); }
.room-foot .floor-legend { flex: 1 1 100%; margin: 0; gap: 6px 14px; font-size: 12px; }
.room-foot .floor-legend li > i { width: 13px; height: 11px; }

/* «Se liberan pronto»: cada mesa con el color de su estado (en mesa, postre, cuenta, limpiando o pasada de hora). */
.freeing a { --fc: var(--olive-deep); --fc-ink: var(--olive-ink); grid-template-columns: auto auto auto; align-items: center; gap: 2px 6px; background: color-mix(in srgb, var(--fc) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 32%, var(--line)); }
.freeing a.freeing-dessert { --fc: var(--state-dessert); --fc-ink: var(--state-dessert-ink); }
.freeing a.freeing-bill { --fc: var(--state-bill); --fc-ink: var(--state-bill-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 32%, var(--line)); }
.freeing a.freeing-cleaning { --fc: var(--state-cleaning); --fc-ink: var(--state-cleaning-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 32%, var(--line)); }
.freeing a.is-overrun { --fc: var(--saffron); --fc-ink: var(--saffron-ink); }
.freeing-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fc); }
.freeing a span, .freeing a.freeing-bill span { grid-column: 1 / -1; color: var(--fc-ink); font-weight: 600; }

/* Editor del plano: lo que no es de la pieza elegida queda oculto de verdad (la barra enseñaba los campos de una pared). */
.pane-field[hidden], .wall-fields[hidden], .pane-hint[hidden] { display: none; }

/* La barra, dibujada para poder estirarla: el mostrador y debajo los taburetes, repartidos a lo largo. */
.landmark-barra { --w: calc(var(--len, 19) * var(--cq, 1cqw)); }
.lm-bar { display: block; }
.lm-bar::before { content: ""; position: absolute; left: 1%; right: 1%; top: 4%; height: 46%; box-sizing: border-box; border: max(1px, calc(.15 * var(--cq, 1cqw))) solid #667085; border-radius: calc(.4 * var(--cq, 1cqw)); background: linear-gradient(#d0d5dd, #d0d5dd) no-repeat center calc(.6 * var(--cq, 1cqw)) / calc(100% - 1.2 * var(--cq, 1cqw)) 1px, #f2f4f7; }
.lm-bar::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: 4%; height: 30%; background: radial-gradient(circle at center, #fff 0 calc(.5 * var(--cq, 1cqw)), #667085 calc(.5 * var(--cq, 1cqw) + .5px) calc(.66 * var(--cq, 1cqw)), transparent calc(.66 * var(--cq, 1cqw) + .5px)) 0 0 / calc(2.9 * var(--cq, 1cqw)) 100%; background-repeat: space no-repeat; }

/* Un texto libre vacío no se ve en el plano; mientras se coloca, solo un recuadro de puntos para encontrarlo. */
.landmark-texto:has(> .lm-label:empty) { display: none; }
.floor.editing .landmark-texto:has(> .lm-label:empty) { display: inline-flex; min-width: calc(6 * var(--cq, 1cqw)); min-height: calc(2.2 * var(--cq, 1cqw)); background: transparent; box-shadow: none; outline: 1.5px dashed var(--line-2); outline-offset: 0; }

/* Panel de la mesa: el día se pulsa para elegir cualquier otro en el calendario. */
.table-day-pick { position: relative; display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 36px; padding: 0 10px; border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms ease; }
.table-days .table-day-pick strong { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-day-pick .icon { flex-shrink: 0; width: 15px; height: 15px; color: var(--ink-3); }
@media (hover: hover) { .table-day-pick:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--line); } .table-day-pick:hover .icon { color: var(--ink); } }
.table-day-pick:focus-within { box-shadow: 0 0 0 2px var(--tile); }
.table-day-pick input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }

/* Reserva liberada antes de tiempo: su hora acaba cuando se liberó; debajo, en pequeño, hasta cuándo estaba reservada. */
.ticket .ticket-note { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }

/* Preguntas que no avisan de un peligro (juntar mesas unos días): icono y botón en azul, no en rojo. */
.confirm-dialog.is-info .confirm-icon { background: var(--tile-tint); color: var(--tile); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .16); }
.confirm-dialog.is-info .dialog-actions .button.danger { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* Buscar en la agenda: debajo del día, las reservas de esa persona en otras fechas, con su día y su hora. */
.service-heading.moment-search { --m: var(--tile); --m-ink: var(--tile-ink); }
.other-booking { --st: var(--line-2); --st-ink: var(--ink-2); position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto 16px; align-items: center; gap: 4px 12px; min-height: 60px; padding: 8px 14px 8px 66px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); transition: background-color 150ms ease; }
.other-booking:last-child { border-radius: 0 0 12px 12px; }
.other-booking.is-past { background: var(--surface-2); }
@media (hover: hover) { .other-booking:hover { background: #f6f7f9; } }
.other-booking:focus-visible { outline: 2px solid var(--tile); outline-offset: -2px; }
.other-booking .ob-when { display: grid; gap: 2px; }
.other-booking .ob-when strong { font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.other-booking .ob-when span { color: var(--ink-2); font-family: var(--font-num); font-size: 13px; font-variant-numeric: tabular-nums; }
.other-booking .ob-main { display: grid; gap: 2px; min-width: 0; }
.other-booking .ob-main strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.other-booking .ob-main small { overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.other-booking > .icon { width: 16px; height: 16px; color: var(--ink-3); }
.other-booking.state-pending { --st: var(--state-pending); --st-ink: var(--state-pending-ink); }
.other-booking.state-review { --st: var(--tile); --st-ink: var(--tile-ink); }
.other-booking.state-confirmed { --st: #e0a02c; --st-ink: #8a5a10; }
.other-booking:is(.state-arrived, .state-at_bar) { --st: var(--state-arrived); --st-ink: var(--state-arrived-ink); }
.other-booking.state-seated { --st: #1f7f50; --st-ink: #175e3b; }
.other-booking.state-dessert { --st: var(--state-dessert); --st-ink: var(--state-dessert-ink); }
.other-booking.state-bill { --st: var(--state-bill); --st-ink: var(--state-bill-ink); }
.other-booking.state-cleaning { --st: var(--state-cleaning); --st-ink: var(--state-cleaning-ink); }
.other-booking.state-completed { --st: #aab2bd; --st-ink: var(--stone-ink, var(--ink-2)); }
.other-booking.state-no_show { --st: #a0658a; --st-ink: #7a3f63; }
.other-booking.state-cancelled { --st: #c2473d; --st-ink: #96281f; }
.empty-state + .search-elsewhere { margin-top: 14px; }
@container agenda-list (max-width: 520px) {
  .other-booking { grid-template-columns: 78px minmax(0, 1fr) 16px; }
  .other-booking .status { grid-column: 2; grid-row: 2; justify-self: start; }
  .other-booking > .icon { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 760px) {
  .other-booking { grid-template-columns: 78px minmax(0, 1fr) 16px; padding-left: 64px; }
  .other-booking .status { grid-column: 2; grid-row: 2; justify-self: start; }
  .other-booking > .icon { grid-column: 3; grid-row: 1 / span 2; }
  .other-booking .res-table { top: 50%; translate: 0 -50%; }
}

/* ---------- Agenda a pantalla completa (una tablet que se queda en el local): la lista de hoy a la izquierda y la sala a la derecha ---------- */
body.room-mode { --bar-h: 0px; }
body.room-mode #agenda-region .agenda-head, body.room-mode .first-steps, body.room-mode .agenda-rail, body.room-mode .list-tools,
body.room-mode .list-footer .shortcuts, body.room-mode .agenda-side .room-help { display: none !important; }
.room-mode-open .icon { width: 17px; height: 17px; }
@media (min-width: 1241px) { .agenda-head .room-mode-open { order: 7; } }
@media (max-width: 899px) { .room-mode-open { display: none !important; } }
@media (min-width: 900px) {
  body.room-mode .app-main { display: flex; flex-direction: column; height: 100dvh; padding: 10px 14px; overflow: hidden; }
  body.room-mode .app-main > * { flex: none; }
  body.room-mode #agenda-region { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  body.room-mode #agenda-region .agenda-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  body.room-mode .pane-switch { display: none !important; }
  body.room-mode #agenda-region .agenda-layout { flex: 1 1 0; min-height: 0; grid-template-columns: minmax(340px, 42%) minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr); gap: 10px; align-items: stretch; }
  body.room-mode #agenda-region .agenda-layout .reservations { display: flex !important; flex-direction: column; min-height: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  body.room-mode #agenda-region .agenda-layout .status-bar, body.room-mode #agenda-region .agenda-layout .list-footer { flex: none; }
  body.room-mode #agenda-region .agenda-layout .reservation-list { flex: 1 1 0; min-height: 0; align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  body.room-mode #agenda-region .agenda-layout .service-heading { top: 0; }
  body.room-mode #agenda-region .agenda-layout .agenda-side { position: static; height: 100%; max-height: none; overflow-y: auto; container: agenda-side / size; }
  body.room-mode #agenda-region .agenda-layout .agenda-side .room { display: grid !important; overflow: visible; }
  body.room-mode #agenda-region .agenda-layout .mini-floor { --map-h: calc(100cqh - 170px); }
}
@media (min-width: 1241px) {
  body.room-mode #agenda-region .agenda-layout { grid-template-columns: var(--list-w, minmax(400px, 40%)) 16px minmax(0, 1fr) !important; gap: 8px; }
  body.room-mode #agenda-region .agenda-layout .agenda-splitter { position: relative; top: auto; height: 100%; }
}

/* ---------- Ficha del cliente: la ficha y el historial, de la misma altura; el historial se desplaza dentro ---------- */
.guest-page { display: grid; gap: 16px; }
.guest-page > * { margin: 0; }
.guest-page .back { justify-self: start; margin-bottom: -6px; }
.guest-page .page-heading { margin: 0; }
.guest-page .admin-stats, .guest-page .next-visit, .guest-page .waiting-notice { margin: 0; }
.guest-layout { align-items: stretch; gap: 16px; }
.guest-layout > .settings-section { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.guest-layout .settings-heading { flex: none; align-items: flex-start; margin-bottom: 16px; }
.guest-layout .settings-heading > div { flex: 1; min-width: 0; }
.guest-card-section .guest-facts { margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.guest-card-section .allergy-note { margin: 0 0 16px; }
.guest-card-section form > p { margin: 0 0 14px; }
.guest-card-section form .helptext, .guest-card-section form .field-hint { display: block; margin-top: 6px; }
.guest-card-section .change-history { margin-top: 16px; }
.history-count { flex: none; align-self: center; min-width: 28px; padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-family: var(--font-num); font-size: 12.5px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.guest-history-scroll { flex: 1 1 0; height: 0; min-height: 320px; margin-right: -8px; padding: 0 8px 2px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
.guest-history-scroll:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; border-radius: var(--r); }
.guest-history-scroll > .field-hint { margin: 10px 2px 0; }
.guest-history-scroll .history-sub { margin: 18px 2px 8px; }
.guest-history .history-list a { padding: 8px 12px 8px 14px; }
@media (max-width: 900px) {
  .guest-history-scroll { flex: none; height: auto; max-height: 520px; min-height: 0; }
}

/* Gestión · usuarios: cambiar la contraseña escribiendo la nueva (o dejarla vacía para generar una). */
.password-change { position: relative; }
.password-change > summary { list-style: none; cursor: pointer; }
.password-change > summary::-webkit-details-marker { display: none; }
.password-change[open] > summary { background: var(--sunk); }
.password-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); padding: 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--line); }
.password-form label { font-size: 13px; font-weight: 600; }
.password-form .field-hint { margin: 0; }
@media (max-width: 760px) { .password-form { position: static; width: 100%; margin-top: 8px; } }

/* Acceso: usuario o contraseña incorrectos, en un aviso claro encima de los campos. */
.login-error { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r, 10px); background: #fdf0ee; color: #912018; box-shadow: inset 0 0 0 1px #f5c9c4; font-size: 14px; font-weight: 550; line-height: 1.45; }
.login-error .icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }

/* ==========================================================================
   Noviembre 2026 (2) · número de mesa sin caja de color, grupos plegables, panel de la mesa y Sala
   ========================================================================== */

/* Grupos de la lista: la cabecera entera pliega o despliega sus reservas; la flecha dice cómo están. */
.service-heading .block-toggle { display: flex; flex: 1; align-items: center; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.service-heading .block-toggle:focus-visible { outline: 2px solid var(--tile); outline-offset: 3px; border-radius: 6px; }
.block-chevron { display: inline-grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; color: var(--ink-3); transition: transform 200ms var(--ease-out), background-color 150ms ease; }
.block-chevron .icon { width: 16px; height: 16px; }
@media (hover: hover) { .block-toggle:hover .block-chevron { background: rgb(16 24 40 / .06); color: var(--ink); } }
.service-block.is-folded .block-chevron { transform: rotate(-90deg); }
.service-block.is-folded > :not(.service-heading) { display: none !important; }
.reservation-list .service-block.is-folded > .service-heading { border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .block-chevron { transition: none; } }

/* Panel de la mesa: flechas, día y «Hoy» siempre en su sitio y a la misma altura. «Hoy», gris si ya es hoy. */
.table-panel .table-days { gap: 4px; padding: 4px; }
.table-panel .table-days .icon-button, .table-panel .table-days .table-day-pick, .table-panel .table-days .table-today { height: 36px; min-height: 36px; }
.table-panel .table-days .icon-button { width: 36px; border-radius: var(--r-sm); }
.table-panel .table-days .table-day-pick { margin: 0; padding: 0 10px; border-radius: var(--r-sm); }
@media (hover: hover) { .table-panel .table-days .table-day-pick:hover { background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); } }
.table-panel .table-days .table-today { flex: none; min-width: 56px; padding: 0 12px; border-radius: var(--r-sm); }
.table-panel .table-days .table-today.is-off { opacity: .45; cursor: default; pointer-events: none; box-shadow: none; background: transparent; }

/* Agenda: «Pantalla completa», con su nombre; la cabecera hace sitio para que todo quepa en una línea. */
.room-mode-open { gap: 7px; white-space: nowrap; }
@media (min-width: 1241px) {
  .agenda-head .day-nav { flex: 0 1 auto; min-width: 0; }
  .agenda-head .search-box { flex: 1 1 180px; min-width: 150px; }
}
@media (min-width: 1241px) and (max-width: 1499px) {
  .agenda-head .day-year, .agenda-head .day-sub > span:not([class]) { display: none; }
}

/* Sala: el plano se queda quieto en la pantalla; al editar, solo se desplaza el panel de la derecha. */
@media (min-width: 1061px) and (min-height: 620px) {
  body.workspace:has([data-floor-region]) .app-main { display: flex; flex-direction: column; height: calc(100dvh - var(--bar-h) - 1px); padding-bottom: 12px; overflow: hidden; }
  body.workspace:has([data-floor-region]) .app-main > * { flex: none; }
  body.workspace .app-main > [data-floor-region] { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  [data-floor-region] .floor-layout { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  [data-floor-region] .floor-stage { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  [data-floor-region].is-editing .floor-stage { overflow: hidden; }
  [data-floor-region] .floor-side { position: static; height: 100%; max-height: none; padding-bottom: 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
}
.editor-toolbar a.tool { text-decoration: none; }
@media (hover: hover) { .editor-toolbar a.tool:hover { background: var(--sunk); color: var(--ink); } }

/* ==========================================================================
   Noviembre 2026 (3) · Clientes, Caja, Informes, Correos y Ajustes: cabecera grande con su cifra, fila de figuras (la
   primera, oscura y con el plato de la marca), filtros en píldora y listas en tabla. Todo sale de los colores del tema.
   ========================================================================== */
.panel-page { --pp-dark: var(--topbar); --pp-dark-2: color-mix(in srgb, var(--topbar) 84%, #fff); --pp-radius: 14px; --pp-plate: var(--brand-tile); }
html[data-theme=oscuro] .panel-page { --pp-dark: #232832; --pp-dark-2: #2f3642; }
body.workspace:has(.panel-page) { background: linear-gradient(180deg, color-mix(in srgb, var(--tomato) 4%, var(--ground)), var(--ground) 280px) no-repeat, var(--ground); }
.workspace .app-main.panel-page { padding-top: 30px; }
.panel-page .page-heading { align-items: flex-end; margin-bottom: 22px; padding: 0; border: 0; }
.panel-page .page-heading h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 680; letter-spacing: -.034em; line-height: 1.1; }
.panel-page .page-heading .muted { margin-top: 8px; max-width: 96ch; font-size: 14px; line-height: 1.5; }
.head-count { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--pp-dark); color: #fff; font-size: 13.5px; font-weight: 620; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.head-search { display: flex; gap: 8px; margin: 0; }
.head-search .search-box { flex: 0 1 auto; width: min(300px, 70vw); }
.panel-page .head-search .search-box input { height: 40px; min-height: 40px; padding-left: 38px; padding-right: 16px; border-radius: 99px; background: var(--surface); }
.js .head-search .filter-submit, .js .sort-form .filter-submit { display: none; }
.panel-page .page-heading .actions > .button { min-height: 40px; padding: 0 16px; }

/* Figuras */
.figures { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.fig { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.fig > span { color: var(--ink-3); font-size: 11px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase; }
.fig > strong { color: var(--ink); font-size: 27px; font-weight: 660; letter-spacing: -.034em; line-height: 1.18; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig > small { color: var(--ink-3); font-size: 12.5px; }
.fig-meter { display: block; height: 6px; margin: 4px 0 3px; border-radius: 3px; background: var(--sunk); overflow: hidden; font-style: normal; }
.fig-meter b { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 62%, var(--surface))); transform-origin: left; animation: meter-in 700ms var(--ease-out) both; }
@keyframes meter-in { from { transform: scaleX(0); } }
.fig-main, .panel-page .kpi:first-child { border: 0; background: radial-gradient(280px 180px at 100% 0, var(--pp-dark-2), transparent 72%), var(--pp-dark); color: #fff; }
.fig-main > *, .panel-page .kpi:first-child > * { position: relative; z-index: 1; }
.fig-main > span, .fig-main > small { color: rgb(255 255 255 / .7); }
.fig-main > strong { color: #fff; font-size: 33px; }
/* El plato de la marca, asomando por la esquina. */
.fig-main::after, .panel-page .kpi:first-child::after { content: ""; position: absolute; right: -14px; bottom: -34px; width: 104px; height: 104px; border-radius: 50%; background:
  radial-gradient(circle, color-mix(in srgb, var(--pp-plate) 78%, #000) 0 35%, color-mix(in srgb, var(--pp-plate) 62%, #fff) 36% 38.5%, transparent 39%),
  linear-gradient(160deg, color-mix(in srgb, var(--pp-plate) 82%, #fff), var(--pp-plate) 60%, color-mix(in srgb, var(--pp-plate) 76%, #000)); opacity: .92; }
.fig-warn > strong { color: var(--saffron-ink); }
.fig-warn { border-color: color-mix(in srgb, var(--saffron) 40%, var(--line)); background: color-mix(in srgb, var(--saffron) 5%, var(--surface)); }
@media (max-width: 1180px) { .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fig { padding: 13px 14px; }
  .fig > strong { font-size: 22px; }
  .fig-main, .fig:last-child:nth-child(even) { grid-column: 1 / -1; }
  .panel-page .kpi:first-child::after { right: -26px; bottom: -44px; width: 84px; height: 84px; }
  .fig-main > strong { font-size: 30px; }
}

/* Filtros en píldora y «Ordenar por» */
.page-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 14px; }
.chip-filters { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip-filters a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 550; white-space: nowrap; transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease; }
.chip-filters a b { padding: 1px 7px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chip-filters a[aria-current] { border-color: var(--pp-dark); background: var(--pp-dark); color: #fff; }
.chip-filters a[aria-current] b { background: rgb(255 255 255 / .18); color: #fff; }
@media (hover: hover) { .chip-filters a:not([aria-current]):hover { border-color: var(--ink-3); color: var(--ink); } }
.sort-form { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.sort-form label { font-weight: 450; color: inherit; }
.sort-form select { width: auto; height: 36px; min-height: 36px; padding-block: 0; }
@media (max-width: 760px) {
  .chip-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .page-tools { display: grid; grid-template-columns: minmax(0, 1fr); }
  .panel-page .page-heading .actions, .head-search, .head-search .search-box { width: 100%; }
}

/* Listas en tabla: Clientes y Correos */
.panel-page .row-table { display: block; overflow: clip; border: 1px solid var(--line); border-radius: var(--pp-radius); background: var(--surface); box-shadow: none; }
.row-head { display: grid; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase; }
.row-head .num, .guest-row > .num { text-align: right; }
.panel-page .guest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-page .guest-list > .row-head, .panel-page .guest-list > .guest-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 62px 112px 14px; align-items: center; gap: 14px; padding: 8px 14px 8px 16px; border: 0; border-left: 1px solid transparent; }
.panel-page .guest-list > .row-head { padding-block: 11px; white-space: nowrap; }
.panel-page .guest-list > .guest-row { min-height: 58px; border-top: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.panel-page .guest-list > :nth-child(even) { border-left-color: var(--line); }
.panel-page .guest-list > .empty-state { grid-column: 1 / -1; }
.guest-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel-page .guest-who .res-avatar { display: grid; flex: none; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--tomato) 9%, var(--surface)); color: var(--tomato-ink); font-size: 14px; box-shadow: none; }
.panel-page .guest-who .res-avatar.is-vip { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--saffron) 60%, transparent); }
.panel-page .guest-name { display: grid; gap: 1px; min-width: 0; }
.guest-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.guest-line > strong { flex: none; max-width: 68%; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.panel-page .guest-line .guest-tags { display: flex; flex: 0 2 auto; flex-wrap: nowrap; gap: 4px; margin: 0; min-width: 0; overflow: hidden; }
.panel-page .guest-line .tag { flex: none; white-space: nowrap; }
.panel-page .guest-line .note-indicator { flex: none; }
.panel-page .guest-row .guest-sub { display: block; overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.guest-visits { display: flex; align-items: center; gap: 9px; }
.guest-visits strong { min-width: 20px; text-align: right; }
.guest-visits .fig-meter { flex: 1; margin: 0; }
.guest-row .is-none { color: var(--ink-3); opacity: .75; }
.panel-page .guest-list .col-party { padding-right: 8px; }
.panel-page .col-when { display: grid; gap: 1px; min-width: 0; }
.panel-page .col-when small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.panel-page .guest-next { display: inline-flex; align-items: center; gap: 6px; color: var(--olive-ink); font-weight: 600; white-space: nowrap; }
.panel-page .guest-next .icon { width: 14px; height: 14px; }
@media (hover: hover) { .panel-page .guest-list > .guest-row:hover { background: var(--surface-2); } }
/* Sitio justo para las dos columnas: antes se quita la media de personas que una columna de clientes. */
@media (max-width: 1400px) {
  .panel-page .guest-list > .row-head, .panel-page .guest-list > .guest-row { grid-template-columns: minmax(0, 1fr) 80px 108px 14px; gap: 12px; }
  .panel-page .guest-list .col-party { display: none; }
}
@media (max-width: 1080px) {
  .panel-page .guest-list { grid-template-columns: minmax(0, 1fr); }
  .panel-page .guest-list > :nth-child(even) { border-left-color: transparent; }
  .panel-page .guest-list > .row-head.is-second { display: none; }
}
@media (max-width: 760px) {
  .panel-page .guest-list > .row-head { display: none; }
  .panel-page .guest-list > .guest-row { grid-template-columns: minmax(0, 1fr) auto 14px; gap: 10px; padding: 11px 14px; }
  .panel-page .guest-list .guest-visits { display: none; }
  .guest-line { flex-wrap: wrap; gap: 3px 8px; }
  .panel-page .guest-line .guest-tags { flex-wrap: wrap; }
  .panel-page .guest-row .col-when:not(:has(.guest-next)) { display: none; }
  .panel-page .guest-row .col-when small { display: none; }
  .panel-page .guest-row .guest-go { grid-column: 3; }
}
.mail-list > .row-head { grid-template-columns: 40px minmax(0, 1fr) 150px 116px 18px; gap: 16px; }
.panel-page .mail-item summary { grid-template-columns: 40px minmax(0, 1fr) 150px 116px 18px; gap: 16px; padding: 12px 18px; }
.panel-page .mail-icon { width: 40px; height: 40px; border-radius: 12px; }
.panel-page .mail-item .status { justify-self: start; }
.panel-page .mail-body { margin-left: 74px; margin-right: 18px; border-radius: 12px; }
.panel-page .mail-list > .empty-state, .panel-page .guest-list > .empty-state { border-radius: 0; box-shadow: none; }
@media (max-width: 760px) {
  .mail-list > .row-head { display: none; }
  .panel-page .mail-item summary { grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 4px 12px; padding: 12px 14px; }
  .panel-page .mail-icon { grid-row: 1 / 3; }
  .panel-page .mail-chevron { grid-column: 3; grid-row: 1; }
  .panel-page .mail-item .status { grid-column: 2; grid-row: 2; }
  .panel-page .mail-item time { grid-column: 2 / -1; grid-row: 2; justify-self: end; }
  .panel-page .mail-body { margin-left: 14px; margin-right: 14px; }
}

/* Tarjetas */
.panel-page .report-card, .panel-page .settings-section:not(.report-section), .panel-page .kpi, .panel-page .report-glance, .panel-page .fact-grid.fact-row > div { border-radius: var(--pp-radius); }
.panel-page .report-card, .panel-page .settings-section:not(.report-section), .panel-page .kpi { border: 1px solid var(--line); box-shadow: none; }
.panel-page .kpi:first-child { position: relative; overflow: hidden; border: 0; }
.panel-page .report-card { padding: 22px 24px; }
.panel-page .report-head h2, .panel-page .report-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.panel-page .settings-section:not(.report-section) { padding: 24px; }
.panel-page .settings-heading { align-items: center; border-bottom: 0; padding-bottom: 0; }
.panel-page .settings-heading h2 { font-size: 18px; font-weight: 660; letter-spacing: -.022em; }
.panel-page .settings-heading .section-icon, .panel-page .settings-heading .section-icon:is(.olive, .tile, .saffron) { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--tomato) 9%, var(--surface)); color: var(--tomato-ink); box-shadow: none; }
.panel-page .settings-heading .section-icon .icon { width: 19px; height: 19px; }
.panel-page .settings-nav { border-radius: var(--pp-radius); border: 1px solid var(--line); box-shadow: none; }
.panel-page .settings-nav a { border-radius: 9px; }
.panel-page .settings-nav a:is([aria-current], .active) { background: var(--pp-dark); color: #fff; font-weight: 600; }
.panel-page .settings-nav a:is([aria-current], .active) .icon { color: rgb(255 255 255 / .85); }
.panel-page .admin-stats li { border-radius: var(--pp-radius); }

/* Informes */
.panel-page .kpi { padding: 16px 18px; }
.panel-page .kpi-label { font-size: 11px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase; }
.panel-page .kpi-value { font-size: 30px; font-weight: 660; letter-spacing: -.034em; }
.panel-page .kpi:first-child :is(.kpi-label, .kpi-hint, .kpi-delta) { color: rgb(255 255 255 / .72); }
.panel-page .kpi:first-child .kpi-delta:is(.is-better, .is-worse) { background: rgb(255 255 255 / .14); color: #fff; }
.panel-page .kpi:first-child .kpi-delta > span { color: inherit; }
.panel-page .period-switch { padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.panel-page .period-switch a { border-radius: 99px; }
.panel-page .period-switch a[aria-current] { background: var(--pp-dark); color: #fff; box-shadow: none; }

/* Ajustes: el enlace de reservas, en la tarjeta oscura */
.panel-page .settings-section.link-card { position: relative; overflow: hidden; border: 0; background: radial-gradient(520px 260px at 100% 0, var(--pp-dark-2), transparent 70%), var(--pp-dark); color: #fff; }
.panel-page .link-card::after { content: ""; position: absolute; right: -30px; top: -58px; width: 150px; height: 150px; border-radius: 50%; background:
  radial-gradient(circle, color-mix(in srgb, var(--pp-plate) 78%, #000) 0 35%, color-mix(in srgb, var(--pp-plate) 62%, #fff) 36% 38%, transparent 38.5%),
  linear-gradient(160deg, color-mix(in srgb, var(--pp-plate) 82%, #fff), var(--pp-plate) 60%, color-mix(in srgb, var(--pp-plate) 76%, #000)); opacity: .9; pointer-events: none; }
.panel-page .link-card > * { position: relative; z-index: 1; }
.panel-page .link-card .settings-heading { max-width: calc(100% - 110px); }
.panel-page .link-card .settings-heading p { color: rgb(255 255 255 / .72); }
.panel-page .link-card .settings-heading .section-icon { background: rgb(255 255 255 / .12); color: #fff; }
.panel-page .link-card > .share-box { padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: none; }
.panel-page .link-card summary { color: rgb(255 255 255 / .85); }
.panel-page .link-card summary .icon { color: inherit; }
.panel-page .link-card .share-help > :not(summary) { color: rgb(255 255 255 / .85); }

/* Caja: el día se elige en el calendario que se abre al pulsar la fecha; «Últimos cierres» se desplaza dentro de su caja. */
.cash-picker { display: inline-block; }
.cash-picker > summary { display: inline-flex; padding: 4px 10px; border-radius: 10px; transition: background-color 150ms ease; }
.cash-picker > summary h2 { display: inline-flex; align-items: center; gap: 8px; }
.cash-picker > summary .icon { width: 17px; height: 17px; color: var(--ink-3); transition: transform 180ms var(--ease-out); }
.cash-picker[open] > summary { background: var(--sunk); }
.cash-picker[open] > summary .icon:last-child { transform: rotate(180deg); }
.cash-picker > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .cash-picker > summary:hover { background: var(--sunk); } }
.cash-calendar { position: absolute; left: 50%; top: calc(100% + 8px); z-index: 30; width: 316px; max-width: calc(100vw - 32px); padding: 14px 16px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-3), 0 0 0 1px var(--line); text-align: left; transform: translateX(-50%); }
.cash-picker[open] .cash-calendar { animation: cal-in 160ms var(--ease-out); }
@keyframes cal-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } }
.cash-calendar[aria-busy] { opacity: .6; pointer-events: none; }
.cash-calendar .mini-head .icon-button { width: 32px; height: 32px; }
.cash-calendar .mini-head .is-off { opacity: .3; }
.cash-calendar .mini-day { position: relative; min-height: 34px; aspect-ratio: auto; height: 36px; border-radius: 10px; font-size: 13.5px; }
.cash-calendar .mini-day.is-future { color: var(--ink-3); opacity: .38; }
.cash-calendar .mini-day:is(.has-closing, .is-missing)::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--olive); transform: translateX(-50%); }
.cash-calendar .mini-day.is-missing::after { background: var(--saffron); }
.cash-calendar .mini-day.is-open { background: var(--pp-dark); color: #fff; }
.cash-calendar .mini-key { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.mini-key i.has-closing { background: var(--olive); }
.mini-key i.is-missing { background: var(--saffron); }
.panel-page .cash-total { border-radius: 12px; background: radial-gradient(280px 160px at 100% 0, var(--pp-dark-2), transparent 72%), var(--pp-dark); }
.cash-history { display: flex; flex-direction: column; }
.cash-history .history-count { display: inline-block; margin-left: 6px; vertical-align: 1px; }
.cash-layout { align-items: stretch; }
.cash-card { display: flex; flex-direction: column; }
/* Lo que le sobre de alto a la tarjeta del día se lo quedan las notas. */
.cash-card .cash-form { flex: 1; grid-template-rows: auto auto 1fr auto; }
.cash-card .cash-form:has(> .form-error) { grid-template-rows: auto auto auto 1fr auto; }
.cash-card .cash-extra { grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.cash-card .cash-extra > p:first-child { grid-template-rows: auto minmax(84px, 1fr) auto; }
.cash-card .cash-extra > p:first-child textarea { height: 100%; min-height: 84px; resize: none; }
.cash-scroll { flex: 1 1 0; min-height: 300px; margin: 0 -12px -8px 0; padding: 0 12px 8px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
.cash-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.cash-scroll .cash-list a { margin: 0; }
@media (max-width: 900px) { .cash-scroll { flex: none; max-height: 360px; } }

/* Agenda: un grupo sin reservas también se ve, y lo dice. */
.reservation-list .block-empty { margin: 0; padding: 13px 16px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 13.5px; }
.service-block.is-empty .service-sum { opacity: .75; }
.service-block + .empty-state { margin-top: 14px; }

/* Sala: reservas que impiden juntar dos mesas */
.join-dialog { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: min(86dvh, 760px); padding: 0; overflow: hidden; }
.join-dialog[open] { display: flex; flex-direction: column; }
.jc-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 16px; }
.jc-head > div { flex: 1; min-width: 0; }
.jc-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 660; letter-spacing: -.02em; }
.jc-head p { margin: 0; }
.jc-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--saffron-tint); color: var(--saffron-ink); }
.jc-icon .icon { width: 20px; height: 20px; }
.jc-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 22px 14px; }
.jc-ways label { position: relative; display: block; cursor: pointer; }
.jc-ways input { position: absolute; opacity: 0; }
.jc-ways label > span { display: grid; padding: 10px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); }
.jc-ways strong { font-size: 13.5px; }
.jc-ways small { color: var(--ink-3); font-size: 12.5px; }
.jc-ways input:checked + span { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--ink); }
.jc-ways input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.jc-plan { flex: 0 1 auto; min-height: 0; padding: 0 22px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.jc-plan[hidden] { display: none; }
.jc-list { display: grid; gap: 8px; margin: 0; padding: 0 0 4px; list-style: none; }
.jc-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(0, 250px); align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.jc-when, .jc-who { display: grid; gap: 1px; min-width: 0; }
.jc-when strong { font-size: 18px; font-weight: 660; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.jc-when small, .jc-who small { color: var(--ink-3); font-size: 12.5px; }
.jc-who strong { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.jc-who .status { justify-self: start; margin-top: 5px; }
.jc-where { display: grid; gap: 4px; min-width: 0; font-size: 13px; }
.jc-where select { width: 100%; text-overflow: ellipsis; }
.jc-none { display: flex; align-items: flex-start; gap: 6px; color: var(--tomato-ink); font-weight: 550; }
.jc-none .icon { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.jc-error { display: flex; align-items: flex-start; gap: 8px; margin: 0 22px 14px; padding: 10px 14px; border-radius: 10px; background: var(--tomato-tint); color: var(--tomato-ink) !important; font-size: 13.5px; font-weight: 550; }
.jc-plan .jc-error { margin: 10px 0 0; }
.jc-error .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.join-dialog .dialog-actions { margin: 16px 0 0; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 640px) {
  .jc-ways { grid-template-columns: minmax(0, 1fr); }
  .jc-row { grid-template-columns: 62px minmax(0, 1fr); }
  .jc-where { grid-column: 1 / -1; }
  .join-dialog .dialog-actions .button { flex: 1; }
}

/* Un administrador dentro del panel de un restaurante: aviso siempre a la vista, bajo la barra de arriba. */
.admin-visit { position: sticky; top: calc(var(--bar-h) - var(--admin-h)); z-index: 39; display: flex; align-items: center; gap: 10px; height: var(--admin-h); padding: 0 var(--gutter); background: #fbbf24; color: #3b2500; font-size: 13.5px; }
.admin-visit > .icon { flex: none; width: 16px; height: 16px; }
.admin-visit p { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-visit strong { font-weight: 660; }
.admin-visit form { flex: none; margin: 0; }
.admin-visit button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: #3b2500; color: #fff; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.admin-visit button .icon { width: 15px; height: 15px; }
.admin-visit button:focus-visible { outline: 2px solid #3b2500; outline-offset: 2px; }
@media (hover: hover) { .admin-visit button:hover { background: #5c3b05; } }
body.workspace.is-admin-visit { --admin-h: 42px; --bar-h: 106px; }
body.workspace.is-admin-visit.room-mode { --bar-h: 42px; }
.is-admin-visit .topbar-inner { height: calc(var(--bar-h) - var(--admin-h)); }
@media (max-width: 760px) {
  body.workspace.is-admin-visit { --admin-h: 44px; --bar-h: 100px; }
  .admin-visit .wide-only { display: none; }
}
@media (min-width: 761px) { .admin-visit .narrow-only { display: none; } }
@media print { .admin-visit { display: none; } }
/* Gestión: cada restaurante, con su acceso al panel al lado de su ficha. */
.client-item { position: relative; display: grid; }
.client-item .client-card { padding-bottom: 60px; }
.client-item .client-enter { position: absolute; left: 18px; bottom: 16px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .fig-meter b, .cash-picker[open] .cash-calendar { animation: none; } }

/* Ajustes: los formularios largos, en columnas, para no dejar media pantalla vacía. */
@media (min-width: 900px) {
  .panel-page #restaurant > form, .panel-page #messages > form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px 20px; max-width: none; }
  .panel-page #restaurant > form > p, .panel-page #messages > form > p { margin: 0; max-width: none; }
  .panel-page #restaurant > form > p:has(textarea), .panel-page #messages > form > p:has(textarea), .panel-page #restaurant > form > :is(.field-hint, .errorlist), .panel-page #messages > form > .errorlist { grid-column: 1 / -1; }
  .panel-page #restaurant > form :is(input, textarea, select):not([type=checkbox]), .panel-page #messages > form :is(input, textarea, select):not([type=checkbox]) { max-width: none; }
  .panel-page #restaurant > form > .button, .panel-page #messages > form > .button { grid-column: 1 / -1; justify-self: start; }
}
.panel-page .settings-section textarea { min-height: 92px; height: 110px; }
.panel-page .fact-grid.fact-row > div { background: var(--surface); }

/* ==========================================================================
   Noviembre 2026 (4) · Agenda: el estado de cada reserva, en una franja recta a la izquierda (las esquinas redondas
   quedan solo a la derecha, así la franja nunca se curva); y el calendario, con el color del tema en vez de grises.
   ========================================================================== */
@media screen {
  .reservation-list .service-block .res-row, .reservation-list .service-block .res-row:is(.is-late, .is-new) { box-shadow: inset 4px 0 0 var(--st), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
  .reservation-list .service-block :is(.service-heading, .now-line) + .res-row, .reservation-list .service-block :is(.service-heading, .now-line) + .res-row:is(.is-late, .is-new) { box-shadow: inset 4px 0 0 var(--st), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line); }
  #agenda-region .reservation-list .service-block > .res-row, #agenda-region .reservation-list .service-block > .other-booking { border-top-left-radius: 0; border-bottom-left-radius: 0; }
  #agenda-region .agenda-layout .service-block > .res-row:last-child, #agenda-region .agenda-layout .service-block > .service-heading + .res-row:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
  .reservation-list .other-booking { box-shadow: inset 4px 0 0 var(--st), inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
  .reservation-list .block-empty { border-radius: 0 12px 12px 0; }
  /* Barras, con las horas arriba o a la izquierda */
  .tl-bar, .axis-y .tl-bar { border-radius: 0 8px 8px 0; box-shadow: inset 4px 0 0 var(--c, var(--ink-3)), inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ink-3)) 38%, transparent); }
  .tl-bar { padding-left: 12px; }
  .axis-y .tl-bar { padding-left: 11px; }
  .tl-bar.is-late, .axis-y .tl-bar.is-late { box-shadow: inset 4px 0 0 var(--c, var(--tomato)), inset 0 0 0 1.5px color-mix(in srgb, var(--tomato) 62%, transparent); }
  .timeline-legend i { border-radius: 0 3px 3px 0; box-shadow: inset 4px 0 0 var(--c), inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
  /* «Por confirmar», junto a la lista */
  .agenda-rail .confirm-items li { position: relative; border-radius: 0 10px 10px 0; transition: background-color 220ms ease; }
  .agenda-rail .confirm-items li::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; z-index: 1; width: 3px; background: var(--state-pending); transition: width 220ms var(--ease-out); pointer-events: none; }
  .agenda-rail .confirm-items a { padding-left: 13px; border-radius: 0; background: none; transition: transform 220ms var(--ease-out); }
}
@media screen and (hover: hover) {
  .tl-bar:hover, .axis-y .tl-bar:hover { box-shadow: inset 4px 0 0 var(--c, var(--ink-3)), inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ink-3)) 60%, transparent), 0 2px 8px -2px rgb(16 24 40 / .18); }
}

.agenda-rail .mini-month { --heat: var(--brand-tile); }
.agenda-rail .mini-head strong { font-size: 15px; font-weight: 680; letter-spacing: -.02em; }
.agenda-rail .mini-week { color: var(--ink-2); font-size: 11px; font-weight: 650; }
.agenda-rail .mini-week span:nth-child(n + 6) { color: var(--tomato-ink); }
.agenda-rail .mini-grid { gap: 3px; }
.agenda-rail .mini-day { border-radius: 8px; background: none; color: var(--ink); font-size: 13px; font-weight: 550; }
.agenda-rail .mini-day[data-level="1"], .agenda-rail .mini-key [data-level="1"] { background: color-mix(in srgb, var(--heat) 9%, var(--surface)); }
.agenda-rail .mini-day[data-level="2"], .agenda-rail .mini-key [data-level="2"] { background: color-mix(in srgb, var(--heat) 21%, var(--surface)); }
.agenda-rail .mini-day[data-level="3"], .agenda-rail .mini-key [data-level="3"] { background: color-mix(in srgb, var(--heat) 40%, var(--surface)); }
.agenda-rail .mini-day:is([data-level="2"], [data-level="3"]) { color: color-mix(in srgb, var(--tomato-ink) 55%, var(--ink)); font-weight: 650; }
.agenda-rail .mini-day.is-closed { background: none; color: var(--ink-3); font-weight: 450; text-decoration: none; }
.agenda-rail .mini-day.is-other { opacity: .42; }
.agenda-rail .mini-day.is-today { box-shadow: inset 0 0 0 2px var(--tomato); color: var(--tomato-ink); font-weight: 720; }
.agenda-rail .mini-day.is-open { background: var(--tomato); color: #fff; font-weight: 720; opacity: 1; box-shadow: none; }
.agenda-rail .mini-key i { width: 10px; height: 10px; border-radius: 3px; }
@media (hover: hover) { .agenda-rail .mini-day:not(.is-open):hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tomato) 55%, transparent); } }
/* Con poco sitio, a quien es VIP no hace falta decirle también habitual. */
@media (max-width: 1400px) { .panel-page .guest-line .tag-vip + .tag-regular { display: none; } }

/* ==========================================================================
   Noviembre 2026 (5) · Ficha de un cliente. De arriba abajo, lo que se pregunta el equipo: quién es y qué hay que saber
   (alergias, en rojo), sus cifras, qué tiene reservado y qué pasó otras veces. Editar la ficha, solo cuando hace falta.
   ========================================================================== */
.gd-head .gd-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.gd-avatar { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 18px; background: var(--pp-dark); color: #fff; font-size: 25px; font-weight: 680; }
.gd-avatar.is-vip { background: var(--saffron-tint); color: var(--saffron-ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--saffron) 65%, transparent); }
.gd-head h1 .tag { letter-spacing: 0; }
.gd-contact { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 7px; color: var(--ink-2); font-size: 13.5px; }
.gd-contact > * { display: inline-flex; align-items: center; gap: 6px; }
.gd-contact .icon { width: 15px; height: 15px; color: var(--ink-3); }
.gd-contact a { color: var(--ink); font-weight: 550; }
@media (hover: hover) { .gd-contact a:hover { color: var(--tile-ink); text-decoration: underline; text-underline-offset: 3px; } }
.gd-allergy { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--tomato-tint); color: var(--tomato-ink); border: 1px solid color-mix(in srgb, var(--tomato) 30%, transparent); }
.gd-allergy-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--tomato); color: #fff; }
.gd-allergy-icon .icon { width: 20px; height: 20px; }
.gd-allergy p { display: grid; gap: 1px; }
.gd-allergy strong { font-size: 16px; font-weight: 660; letter-spacing: -.01em; }
.gd-allergy small { color: var(--ink-2); font-size: 12.5px; }
.page-guest-detail .figures { grid-template-columns: 1.2fr 1.1fr 1.1fr 1fr 1fr; margin: 0; }
.fig > strong.fig-text { font-size: 22px; line-height: 1.45; }
.page-guest-detail .settings-section.gd-card { padding: 20px 22px; scroll-margin-top: 120px; }
.gd-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.gd-main, .gd-side { display: grid; gap: 16px; min-width: 0; }
.gd-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
.gd-card-head h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 660; letter-spacing: -.022em; }
.gd-card-head p { margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.gd-empty { margin: 0; padding: 16px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--ink-3); font-size: 13.5px; }

/* Próximas reservas: el día en su hoja, y la franja recta con el color del estado, como en la agenda */
.gd-bookings { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gd-booking { --st: var(--line-2); display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 16px; align-items: center; gap: 14px; padding: 10px 14px 10px 16px; border-radius: 0 12px 12px 0; background: var(--surface); box-shadow: inset 4px 0 0 var(--st), inset 0 0 0 1px var(--line); color: var(--ink); transition: background-color 150ms ease; }
.gd-booking.state-pending { --st: var(--state-pending); }
.gd-booking.state-review { --st: var(--tile); }
.gd-booking.state-confirmed { --st: #e0a02c; }
.gd-booking:is(.state-arrived, .state-at_bar) { --st: var(--state-arrived); }
.gd-booking:is(.state-seated, .state-dessert, .state-bill, .state-cleaning) { --st: #1f7f50; }
.gd-booking-what { display: grid; gap: 1px; min-width: 0; }
.gd-booking-what strong { display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 660; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gd-booking-what em { color: var(--ink-2); font-size: 13px; font-style: normal; font-weight: 550; letter-spacing: 0; }
.gd-booking-what small { color: var(--ink-2); font-size: 13.5px; }
.gd-booking > .icon { width: 16px; height: 16px; color: var(--ink-3); }
@media (hover: hover) { .gd-booking:hover { background: var(--surface-2); } }

.gd-rest { margin-top: 8px; }
.gd-rest > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 4px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; list-style: none; cursor: pointer; }
.gd-rest > summary::-webkit-details-marker { display: none; }
.gd-rest > summary .icon { width: 16px; height: 16px; transition: transform 180ms var(--ease-out); }
.gd-rest[open] > summary .icon { transform: rotate(180deg); }
.gd-rest:not([open]) .when-open, .gd-rest[open] .when-closed { display: none; }
.gd-rest[open] > summary { margin-bottom: 4px; }
/* Historial: por meses, con lo que pasó dicho en una palabra */
.gd-filter { gap: 4px; }
.gd-filter label { position: relative; cursor: pointer; }
.gd-filter input { position: absolute; opacity: 0; }
.gd-filter label > span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.gd-filter b { font-size: 11.5px; font-weight: 650; opacity: .75; font-variant-numeric: tabular-nums; }
.gd-filter input:checked + span { border-color: var(--pp-dark); background: var(--pp-dark); color: #fff; }
.gd-filter input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.gd-past-scroll { max-height: 620px; margin: 0 -12px -8px 0; padding: 0 12px 8px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
.gd-past-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.gd-month h3 { position: sticky; top: 0; z-index: 1; padding: 8px 0 6px; background: var(--surface); color: var(--ink-3); font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.gd-month ul { margin: 0 0 8px; padding: 0; list-style: none; }
.gd-month li + li { border-top: 1px solid var(--line); }
.gd-month li a { display: grid; grid-template-columns: 62px 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 42px; padding: 6px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gd-day { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink-3); }
.gd-day b { min-width: 21px; color: var(--ink); font-size: 16px; font-weight: 660; text-align: right; }
.gd-time { color: var(--ink); font-weight: 600; }
.gd-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-outcome { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 7px; background: var(--olive-tint); color: var(--olive-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.gd-outcome .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.is-missed .gd-outcome { background: var(--plum-tint); color: var(--plum-ink); }
.is-cancelled .gd-outcome { background: var(--stone-tint); color: var(--stone-ink); }
.is-open .gd-outcome { background: var(--saffron-tint); color: var(--saffron-ink); }
.is-cancelled :is(.gd-what, .gd-time) { color: var(--ink-3); text-decoration: line-through; }
@media (hover: hover) { .gd-month li a:hover { background: var(--surface-2); } }
.gd-past:has(input[value=came]:checked) li:not(.is-came), .gd-past:has(input[value=missed]:checked) li:not(.is-missed),
.gd-past:has(input[value=cancelled]:checked) li:not(.is-cancelled), .gd-past:has(input[value=open]:checked) li:not(.is-open),
.gd-past:has(input[value=came]:checked) .gd-month:not(:has(.is-came)), .gd-past:has(input[value=missed]:checked) .gd-month:not(:has(.is-missed)),
.gd-past:has(input[value=cancelled]:checked) .gd-month:not(:has(.is-cancelled)), .gd-past:has(input[value=open]:checked) .gd-month:not(:has(.is-open)) { display: none; }

/* La ficha se lee; «Editar» cambia la lectura por el formulario */
.gd-about { position: relative; }
.gd-edit > summary { position: absolute; top: 20px; right: 22px; list-style: none; cursor: pointer; }
.gd-edit > summary::-webkit-details-marker { display: none; }
.gd-edit > summary > span { display: inline-flex; align-items: center; gap: 6px; }
.gd-edit:not([open]) .when-open, .gd-edit[open] .when-closed { display: none; }
.gd-about { display: flex; flex-direction: column; }
.gd-about > .gd-card-head { order: -1; padding-right: 110px; }
.gd-about:has(.gd-edit[open]) .gd-read { display: none; }
.gd-read { display: grid; margin: 0; }
.gd-read > div { padding: 12px 0; border-top: 1px solid var(--line); }
.gd-read > div:last-child { padding-bottom: 0; }
.gd-read dt { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 12.5px; font-weight: 550; }
.gd-read dt .icon { width: 14px; height: 14px; }
.gd-read dd { margin: 3px 0 0; color: var(--ink); font-size: 14.5px; font-weight: 560; line-height: 1.45; }
.gd-read dd.is-none { color: var(--ink-3); font-weight: 450; }
.gd-read dd.is-alert { color: var(--tomato-ink); font-weight: 650; }
.gd-form { display: grid; gap: 16px; margin: 0; }
.gd-form .field { display: grid; gap: 6px; margin: 0; }
.gd-form .field label { font-size: 13.5px; font-weight: 600; }
.gd-form .field-hint { margin: 0; font-size: 12.5px; }
.gd-form textarea { height: auto !important; min-height: 76px; }
.gd-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.gd-check input { margin: 2px 0 0; }
.gd-check span { display: grid; gap: 1px; }
.gd-check strong { font-size: 13.5px; }
.gd-check small { color: var(--ink-3); font-size: 12.5px; font-weight: 450; }

.gd-habits, .gd-mails { display: grid; margin: 0; padding: 0; list-style: none; }
.gd-habits li, .gd-mails li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; }
.gd-habits li + li, .gd-mails li + li { border-top: 1px solid var(--line); }
.gd-habits li:last-child, .gd-mails li:last-child { padding-bottom: 0; }
.gd-habit-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--tomato) 9%, var(--surface)); color: var(--tomato-ink); }
.gd-habit-icon .icon { width: 17px; height: 17px; }
.gd-habits li > span:nth-child(2), .gd-mails li > span { display: grid; min-width: 0; }
.gd-habits small, .gd-mails small { color: var(--ink-3); font-size: 12.5px; }
.gd-habits strong { font-size: 14.5px; font-weight: 620; }
.gd-habits em { color: var(--ink-3); font-size: 12.5px; font-style: normal; white-space: nowrap; }
.gd-mails li { grid-template-columns: 18px minmax(0, 1fr); }
.gd-mails .icon { width: 16px; height: 16px; color: var(--ink-3); }
.gd-mails strong { overflow: hidden; font-size: 13.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.gd-more { display: grid; gap: 2px; padding: 0 6px; }
.gd-more summary { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; color: var(--ink-3); font-size: 13px; font-weight: 550; list-style: none; cursor: pointer; }
.gd-more summary::-webkit-details-marker { display: none; }
.gd-more summary .icon { width: 15px; height: 15px; }
.gd-more details[open] { padding-bottom: 12px; }
.gd-more p { margin: 4px 0 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
@media (hover: hover) { .gd-more summary:hover { color: var(--ink); } .gd-erase summary:hover { color: var(--tomato-ink); } }
@media (max-width: 1180px) {
  .page-guest-detail .figures { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .page-guest-detail .fig { grid-column: span 2; }
  .page-guest-detail .fig:nth-child(n + 4) { grid-column: span 3; }
}
@media (max-width: 980px) {
  .gd-layout { grid-template-columns: minmax(0, 1fr); }
  .gd-side { grid-row: 1; }
  .gd-layout, .gd-main, .gd-side { display: contents; }
  .guest-page:has(.gd-layout) { display: flex; flex-direction: column; gap: 14px; }
  .gd-more { order: 9; }
  .gd-past { order: 6; }
  .gd-about { order: 3; }
  .gd-side > section:not(.gd-about, .gd-more) { order: 5; }
  .gd-main > section:first-child { order: 2; }
  .gd-past-scroll { max-height: 460px; }
}
@media (max-width: 640px) {
  .page-guest-detail .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-guest-detail .fig, .page-guest-detail .fig:nth-child(n + 4) { grid-column: auto; }
  .page-guest-detail .fig-main { grid-column: 1 / -1; }
  .fig > strong.fig-text { font-size: 18px; }
  .gd-head .gd-who { align-items: flex-start; gap: 13px; }
  .gd-avatar { width: 50px; height: 50px; border-radius: 15px; font-size: 21px; }
  .page-guest-detail .settings-section.gd-card { padding: 16px; }
  .gd-edit > summary { top: 16px; right: 16px; }
  .gd-booking { grid-template-columns: 46px minmax(0, 1fr) 16px; gap: 12px; }
  .gd-booking .status { grid-column: 2; grid-row: 2; justify-self: start; }
  .gd-booking > .icon { grid-column: 3; grid-row: 1; }
  .gd-booking .date-block { grid-row: 1 / 3; align-self: start; }
  .gd-month li a { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 4px; }
  .gd-day { grid-row: 1 / 3; }
  .gd-what { grid-column: 2; grid-row: 2; }
  .gd-outcome { grid-row: 1 / 3; grid-column: 3; }
  .gd-filter { width: 100%; margin: 0; padding: 0; }
  .page-guest-detail .gd-head .actions .button { flex: 1; }
}

/* El número de la mesa, en su recuadro con el color del estado. El texto se ajusta a la caja: «12», «7+8», «10+11» y, con
   tres mesas o más, en dos líneas. Que la reserva sea nueva o llegue tarde no cambia su color: lo dicen sus etiquetas. */
.reservation-list .res-row, .reservation-list .other-booking { padding-left: 76px; }
.reservation-list .res-table, .reservation-list .res-row:is(.is-late, .is-new) .res-table { left: 13px; width: 52px; height: 44px; padding: 0 3px; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--st) 17%, var(--surface)); color: var(--st-ink); box-shadow: none; font-size: 22px; font-weight: 700; letter-spacing: -.035em; line-height: 1.08; text-align: center; opacity: 1; }
.reservation-list .res-row.is-new .res-table { box-shadow: inset 0 0 0 1.5px var(--st); }
.reservation-list .res-table.is-mid { font-size: 18.5px !important; }
.reservation-list .res-table.is-long { font-size: 15px !important; letter-spacing: -.03em; }
.reservation-list .res-table.is-full { padding: 0 2px; font-size: 11px !important; letter-spacing: -.02em; white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
.reservation-list :is(.res-row, .other-booking):is(.state-completed, .state-cancelled, .state-no_show) .res-table { background: color-mix(in srgb, var(--st) 14%, var(--surface)); }
@media (max-width: 760px) {
  .reservation-list .res-row, .reservation-list .other-booking { padding-left: 74px; }
  .reservation-list .res-table, .reservation-list .res-row:is(.is-late, .is-new) .res-table { left: 12px; width: 50px; font-size: 20px; }
  .reservation-list .res-table.is-mid { font-size: 17.5px !important; }
  .reservation-list .res-table.is-long { font-size: 14.5px !important; }
}
/* En el tema oscuro, el texto de cada estado, claro: los de Clásico no se leen sobre fondo oscuro. */
html[data-theme=oscuro] :is(.res-row, .other-booking).state-confirmed { --st-ink: #f4bf5a; }
html[data-theme=oscuro] :is(.res-row, .other-booking).state-seated { --st-ink: #74d69b; }
html[data-theme=oscuro] :is(.res-row, .other-booking).state-no_show { --st-ink: #eba3c9; }
html[data-theme=oscuro] :is(.res-row, .other-booking).state-cancelled { --st-ink: #ff9d8c; }

/* «Por confirmar»: al pasar el ratón, la franja se queda y engorda un poco, y el fondo entra despacio. */
@media screen and (hover: hover) {
  .agenda-rail .confirm-items a:hover { background: none; }
  .agenda-rail .confirm-items li:hover { background: color-mix(in srgb, var(--state-pending) 8%, var(--surface)); }
  .agenda-rail .confirm-items li:hover::before { width: 5px; }
}
@media (prefers-reduced-motion: reduce) { .agenda-rail .confirm-items :is(li, li::before, a) { transition: none; } }

/* Detalle de una mesa, en «Ahora» y en «Reservas de hoy»: el paso siguiente, del mismo tamaño que su reserva, al lado. */
.table-panel .table-bookings li.has-step:has(.step-big) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 10px; }
.table-panel .table-bookings li.has-step:has(.step-big) > form { display: grid; margin: 0; }
.table-panel .table-bookings li.has-step:has(.step-big) > a:not(.tb-extra) { grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 6px 12px; min-height: 92px; padding: 12px 14px; }
.table-panel .table-bookings li.has-step:has(.step-big) > a .status { grid-column: 1 / -1; justify-self: start; }
.table-panel .table-bookings li.has-step:has(.step-big) > a .tb-time strong { font-size: 17px; }
.table-panel .table-bookings li.has-step:has(.step-big) > a .tb-name strong { font-size: 15px; }
.step-big { justify-content: space-between; gap: 14px; width: 100%; height: 100%; min-height: 92px; padding: 14px 16px 14px 18px; border-radius: var(--r); text-align: left; white-space: normal; }
.step-big-text { display: grid; gap: 2px; min-width: 0; }
.step-big-text small { font-size: 12px; font-weight: 550; opacity: .78; }
.step-big-text strong { font-size: 20px; font-weight: 680; letter-spacing: -.022em; line-height: 1.15; text-wrap: balance; }
.step-big-arrow { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: rgb(255 255 255 / .18); transition: transform 200ms var(--ease-out), background-color 200ms ease; }
.button .step-big-arrow .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.step-big[data-pending] .step-big-arrow { display: none; }
@media (hover: hover) { .step-big:hover .step-big-arrow { background: rgb(255 255 255 / .28); transform: translateX(3px); } }
@media (max-width: 520px) {
  .table-panel .table-bookings li.has-step:has(.step-big) { grid-template-columns: minmax(0, 1fr) minmax(114px, 37%); align-items: stretch; gap: 8px; }
  .table-panel .table-bookings li.has-step:has(.step-big) > a:not(.tb-extra) { min-height: 0; padding: 10px; gap: 4px 8px; }
  .table-panel .table-bookings li.has-step:has(.step-big) > a .tb-time strong { font-size: 15px; }
  .table-panel .table-bookings li.has-step:has(.step-big) > a .tb-name strong { font-size: 14px; }
  .table-panel .table-bookings li.has-step:has(.step-big) form .button.step-big { justify-content: space-between; min-height: 0; height: 100%; padding: 10px 10px 10px 12px; gap: 6px; }
  .table-panel .table-bookings .step-big-text small { font-size: 10.5px; }
  .table-panel .table-bookings .step-big-text strong { font-size: 15px; }
  .table-panel .table-bookings .step-big-arrow { width: 26px; height: 26px; border-radius: 8px; }
  .table-panel .table-bookings .button .step-big-arrow .icon { width: 15px; height: 15px; }
}

/* Sonido por cada reserva: el altavoz de la barra, el del menú «Más» y el interruptor de Ajustes */
[data-sound-toggle] .sound-on, [data-sound-toggle] .sound-off { display: inline-flex; }
[data-sound-toggle][aria-pressed=true] .sound-off, [data-sound-toggle]:not([aria-pressed=true]) .sound-on { display: none; }
.topbar .sound-switch { border: 0; background: none; cursor: pointer; }
.workspace .topbar .sound-switch[aria-pressed=true] { color: #fff; background: rgb(255 255 255 / .14); }
.sound-setting { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sound-setting .switch { flex: none; cursor: pointer; }
.sound-setting > span { display: grid; flex: 1 1 180px; }
.sound-setting strong { font-size: 14.5px; }
.sound-setting small { color: var(--ink-3); font-size: 12.5px; }
/* El detalle de la mesa nunca se sale del panel: en el móvil, la fecha se recorta antes que empujar lo demás. */
.table-panel { grid-template-columns: minmax(0, 1fr); }
.table-panel > *, .table-panel .panel-block { min-width: 0; }
@media (max-width: 760px) { .workspace .topbar .topbar-end .sound-switch.sound-switch { display: inline-flex; width: 38px; padding: 0; justify-content: center; } }
.table-panel .table-bookings:has(.step-big) { gap: 10px; }
