/* SHIO Service: Tischplan, Reservierungen, Rufe. Setzt tokens.css, fonts.css und ui.css voraus.
   Laptop 1440 x 900 bis 1920 x 1080, Tablet quer 1180 x 820, Handy als Notloesung. */

[hidden] { display: none !important; }
html, body { height: 100%; }
body { overflow: hidden; }

/* ---------------------------------------------------------------------------------------------- */
/* Start und Anmeldung                                                                              */

.start {
  min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center;
  padding: 40px 24px 28px;
  background: radial-gradient(80% 60% at 50% 0%, #12161b 0%, var(--schwarz) 72%);
}
.start__marke { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 560px; }
.start__logo { width: 132px; height: auto; margin-bottom: 6px; }
.start__linie { width: 128px; margin: 8px 0 2px; }
.start__schrift { font-size: 2.7rem; margin-bottom: -6px; }
.start__text { max-width: 44ch; }
.start__aktion { min-height: 72px; display: grid; place-items: center; margin-top: 10px; }
.start__fuss { padding-top: 24px; }

/* ---------------------------------------------------------------------------------------------- */
/* Rahmen                                                                                           */

.app {
  --navi-breite: 240px;
  --kopf-hoehe: 64px;
  display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: var(--navi-breite) minmax(0, 1fr);
  grid-template-rows: var(--kopf-hoehe) minmax(0, 1fr);
}

/* Kopfleiste */
.kopf {
  grid-column: 1 / -1; position: relative; z-index: 30;
  display: flex; align-items: center; gap: 16px; padding: 0 18px 0 22px; min-width: 0;
  background: rgba(8, 9, 12, .96); border-bottom: 1px solid var(--linie);
}
.kopf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ui-gold-linie); opacity: .45; }
.kopf__marke { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 48px; flex: none; border-radius: 12px; }
.kopf__marke img:first-child { width: 36px; height: 36px; }
.kopf__wort { width: auto; height: 21px; }
.kopf__trenner { width: 1px; height: 26px; background: var(--linie-stark); flex: none; }
.kopf__bereich { flex: none; }
.kopf__zeit { display: flex; align-items: baseline; gap: 12px; margin-left: 10px; min-width: 0; white-space: nowrap; }
.kopf__datum { color: var(--text-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.kopf__uhr { font-size: 1.3rem; font-weight: 600; color: var(--weiss); letter-spacing: .02em; }
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.kopf__status { min-height: 30px; }
.kopf__demo { padding: 0 1.1em; }
.kopf__rbpay { padding-left: 14px; border-left: 1px solid var(--linie); min-height: 30px; display: flex; align-items: center; }

/* Navigation */
.navi {
  grid-row: 2; display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px; min-height: 0; overflow-y: auto;
  background: linear-gradient(180deg, #0a0c0f, #08090b); border-right: 1px solid var(--linie);
}
.navi__punkt {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 12px 0 14px;
  border: 1px solid transparent; border-radius: 16px; background: none; color: var(--text-2);
  font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer; width: 100%;
  transition: background-color var(--ui-dauer) var(--ease), color var(--ui-dauer) var(--ease), border-color var(--ui-dauer) var(--ease);
}
.navi__punkt:hover { background: rgba(255, 255, 255, .04); color: var(--weiss); }
.navi__punkt[aria-current="page"] { background: var(--gold-glanz); border-color: rgba(201, 168, 106, .38); color: var(--gold-hell); }
.navi__punkt[aria-current="page"]::before { content: ""; position: absolute; left: -13px; top: 13px; bottom: 13px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.navi__icon { display: grid; place-items: center; flex: none; }
.navi__icon .icon { width: 22px; height: 22px; }
.navi__text { display: grid; gap: 1px; line-height: 1.2; min-width: 0; }
.navi__text small { font-size: .68rem; font-weight: 500; color: var(--text-3); letter-spacing: .01em; }
.navi__zahl {
  margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: var(--gold); color: var(--ui-gold-text); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.navi__zahl--alarm { background: var(--alarm); color: #fff; animation: zahl-atmen 2.4s var(--ease) infinite; }
@keyframes zahl-atmen { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 90, 82, .5); } 50% { box-shadow: 0 0 0 6px rgba(238, 90, 82, 0); } }
.navi__trenner { height: 1px; background: var(--linie); margin: 8px 10px; }
.navi__punkt--aus { opacity: .5; cursor: not-allowed; }
.navi__punkt--aus:hover { background: none; color: var(--text-2); }
.navi__fuss { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--linie); }
.navi__punkt--klein { min-height: 48px; font-size: .88rem; font-weight: 500; color: var(--text-3); }
.navi__entwurf { padding: 0 12px 10px; line-height: 1.45; }
.navi__entwurf-kurz { display: none; }

/* Hauptflaeche */
.haupt { grid-row: 2; grid-column: 2; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; position: relative; }
.ansicht__kopf { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; min-height: 52px; }
.ansicht__titel { display: flex; align-items: center; gap: 12px; }
.ansicht__aktionen { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ansicht__hinweis { margin-left: auto; }

/* ---------------------------------------------------------------------------------------------- */
/* Tischplan                                                                                        */

.ansicht--plan { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px 22px 14px; }
.kennzahlen { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.kennzahl {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 14px;
  border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche);
}
.kennzahl::before { content: ""; width: 12px; height: 12px; border-radius: 4px; flex: none; }
.kennzahl b { font-size: 1.35rem; font-weight: 600; color: var(--weiss); line-height: 1; }
.kennzahl span { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.kennzahl--frei::before { border: 1.5px solid rgba(255, 255, 255, .35); background: #14181d; }
.kennzahl--besetzt::before { background: var(--gold-verlauf); }
.kennzahl--besetzt b { color: var(--gold-hell); }
.kennzahl--reserviert::before { border: 2px solid var(--gold); background: #17140e; }
.kennzahl--gaeste::before { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, var(--gold-hell) 0 3px, transparent 3.5px), rgba(201, 168, 106, .16); }

.planflaeche {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  border: 1px solid var(--linie); border-radius: var(--radius-l);
  background: radial-gradient(120% 90% at 50% 0%, #0f1216 0%, #08090b 80%);
}
.plan-schieber { position: absolute; inset: 10px; transition: transform 420ms var(--ease); }
/* Breite Bildschirme: Plan rueckt neben das Blatt, alle Tische bleiben erreichbar. Schmaler: Blatt liegt darueber, der Plan verschiebt sich zum gewaehlten Tisch. */
@media (min-width: 1600px) { .planflaeche.hat-blatt .plan-schieber { right: calc(min(420px, 100% - 20px) + 22px); } }
.plan { width: 100%; height: 100%; overflow: visible; font-family: var(--font-sans); -webkit-user-select: none; user-select: none; }

/* Grundriss */
.plan .raum { fill: #0c0e11; }
.plan .bereich { fill: rgba(201, 168, 106, .018); stroke: rgba(201, 168, 106, .2); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-dasharray: 4 6; }
.plan .bereich__name { fill: rgba(212, 184, 128, .82); font-weight: 600; }
.plan .beschriftung { fill: var(--text-3); font-weight: 500; letter-spacing: .04em; }
.plan .wand { fill: none; stroke: #2e343d; stroke-linecap: square; stroke-linejoin: miter; }
.plan .wand--innen { stroke: #282d35; }
.plan .teiler { fill: none; stroke: #262b32; stroke-width: 6; stroke-linecap: round; }
.plan .fenster { stroke: rgba(159, 211, 242, .3); }
.plan .fenster-pfosten { fill: #333a44; }
.plan .tuer-luecke { stroke: #0b0d10; }
.plan .tuer-blatt { stroke: rgba(255, 255, 255, .3); stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.plan .tuer-bogen { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1px; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.plan .moebel { fill: #15181d; stroke: rgba(255, 255, 255, .09); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.plan .moebel--pass { fill: rgba(201, 168, 106, .1); stroke: rgba(201, 168, 106, .38); }
.plan .moebel--bank { fill: #191c22; stroke: rgba(255, 255, 255, .06); }

/* Tische */
.tisch { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.tisch__treffer { fill: transparent; }
.tisch__koerper {
  fill: #14181d; stroke: rgba(255, 255, 255, .28); stroke-width: 1.25px; vector-effect: non-scaling-stroke;
  transition: fill 300ms var(--ease), stroke 300ms var(--ease);
}
.sitz { fill: #0f1216; stroke: rgba(255, 255, 255, .24); stroke-width: 1px; vector-effect: non-scaling-stroke; transition: fill 300ms var(--ease); }
.tisch__text { pointer-events: none; }
.tisch__nr { fill: var(--text); font-weight: 600; }
.tisch__info { fill: var(--text-2); font-weight: 500; }
.tisch:hover .tisch__koerper { stroke: rgba(233, 213, 166, .75); }
.tisch:focus-visible .tisch__koerper { stroke: var(--gold-hell); stroke-width: 3px; }

.tisch--reserviert .tisch__koerper { fill: #19160f; stroke: var(--gold); stroke-width: 2px; }
.tisch--reserviert.ist-anfrage .tisch__koerper { stroke-dasharray: 7 5; }
.tisch--reserviert .tisch__nr { fill: var(--weiss); }
.tisch--reserviert .tisch__info { fill: var(--gold-hell); font-weight: 600; }
.tisch--reserviert .sitz { stroke: rgba(201, 168, 106, .5); }

.tisch--besetzt .tisch__koerper { fill: url(#g-besetzt); stroke: rgba(246, 232, 196, .9); stroke-width: 1px; }
.tisch--besetzt .tisch__nr { fill: #1a1408; font-weight: 700; }
.tisch--besetzt .tisch__info { fill: #3d2f14; font-weight: 600; }
.tisch--besetzt:hover .tisch__koerper { stroke: #fff; }
.tisch--besetzt.ist-verbunden .tisch__koerper { fill: rgba(212, 181, 123, .5); stroke: rgba(233, 213, 166, .8); stroke-dasharray: 5 4; }
.tisch--besetzt.ist-verbunden .tisch__nr { fill: var(--weiss); }
.tisch--besetzt.ist-verbunden .tisch__info { fill: var(--gold-hell); }
.sitz--belegt { fill: var(--gold-hell); stroke: rgba(0, 0, 0, .35); }
.tisch .tisch__info--aussen { fill: var(--gold-hell); font-weight: 600; }

.hat-ruf .tisch__koerper { stroke: var(--alarm); stroke-width: 2.5px; }
.tisch__puls {
  fill: none; stroke: var(--alarm); stroke-width: 2.5px; vector-effect: non-scaling-stroke; pointer-events: none;
  transform-box: fill-box; transform-origin: center; animation: tisch-puls 1.7s var(--ease) infinite;
}
.tisch__puls--rechnung { stroke: var(--gold-hell); animation-duration: 2.6s; }
@keyframes tisch-puls { 0% { transform: scale(1); opacity: .95; } 75% { opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }

.marke { pointer-events: none; }
.marke circle { fill: var(--alarm); stroke: #0a0c0f; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.marke use { color: #fff; --icon-strich: 2.4; }
.marke--rechnung circle { fill: var(--gold-hell); }
.marke--rechnung use { color: #1a1408; }
.marke--uhr circle { fill: #19160f; stroke: var(--gold); }
.marke--uhr use { color: var(--gold-hell); }

.tisch__halo { fill: rgba(201, 168, 106, .12); stroke: var(--gold-hell); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.ist-gewaehlt .tisch__koerper { stroke: #fff; stroke-width: 2px; }

@media (prefers-reduced-motion: reduce) {
  .tisch__puls { animation: none !important; transform: scale(1.22); opacity: .9; }
  .navi__zahl--alarm { animation: none !important; }
  .plan-schieber { transition: none; }
}

/* Hinweis beim Ueberfahren */
.plan-tipp {
  position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none;
  min-width: 210px; max-width: 290px; padding: 12px 14px; display: grid; gap: 3px;
  background: rgba(17, 20, 24, .97); border: 1px solid var(--linie-stark); border-radius: 14px; box-shadow: var(--schatten);
  font-size: .8rem; line-height: 1.45; color: var(--text-2);
}
.plan-tipp b { color: var(--weiss); font-weight: 600; }
.tipp__kopf { display: grid; color: var(--weiss); font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.tipp__kopf span { font-size: .72rem; font-weight: 500; color: var(--text-3); }
.tipp__ruf { color: #ffb3ad; }
.tipp__rechnung { color: var(--gold-hell); }

/* Legende */
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 0 6px; font-size: .8rem; color: var(--text-2); min-height: 24px; }
.legende__punkt { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.legende__punkt--leise { color: var(--text-3); margin-left: auto; font-size: .75rem; }
.legende i { display: inline-grid; place-items: center; width: 22px; height: 14px; border-radius: 4px; flex: none; }
.legende__frei { border: 1.25px solid rgba(255, 255, 255, .32); background: #14181d; }
.legende__reserviert { border: 2px solid var(--gold); background: #19160f; }
.legende__besetzt { background: var(--gold-verlauf); }
.legende i.legende__ruf, .legende i.legende__rechnung { width: 20px; height: 20px; border-radius: 50%; }
.legende__ruf { background: var(--alarm); color: #fff; box-shadow: 0 0 0 3px rgba(238, 90, 82, .22); }
.legende__rechnung { background: var(--gold-hell); color: #1a1408; }
.legende i .icon { width: 12px; height: 12px; --icon-strich: 2.4; }

/* ---------------------------------------------------------------------------------------------- */
/* Tisch-Seitenblatt (nicht modal: der Plan bleibt bedienbar)                                      */

.tischblatt {
  position: absolute; z-index: 5; top: 10px; right: 10px; bottom: 10px; width: min(420px, calc(100% - 20px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--tiefe); border: 1px solid var(--linie-stark); border-radius: 22px;
  box-shadow: -30px 0 60px -10px rgba(0, 0, 0, .7), 0 0 0 1px rgba(201, 168, 106, .05) inset;
  transform: translateX(calc(100% + 24px)); opacity: 0; visibility: hidden;
  transition: transform 380ms var(--ease), opacity 240ms var(--ease), visibility 0s linear 380ms;
}
.tischblatt::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: var(--ui-gold-linie); opacity: .8; }
.tischblatt:not(.ist-offen) { pointer-events: none; }
.tischblatt.ist-offen { transform: none; opacity: 1; visibility: visible; transition: transform 380ms var(--ease), opacity 240ms var(--ease), visibility 0s; }
.tb__kopf { display: flex; align-items: center; gap: 14px; padding: 16px 14px 12px 18px; flex: none; }
.tb__nr {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none;
  font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); border: 1.5px solid rgba(255, 255, 255, .25); background: #14181d;
}
.tb__nr--besetzt { background: var(--gold-verlauf); color: #1a1408; border-color: transparent; }
.tb__nr--reserviert { border: 2px solid var(--gold); color: var(--gold-hell); background: #19160f; }
.tb__titel { flex: 1; min-width: 0; }
.tb__titel .t-h3 { font-size: 1.25rem; }
.tb__inhalt { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 18px 20px; display: grid; gap: 18px; align-content: start; }
.tb__status { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text-2); font-size: .92rem; }
.tb__status b { color: var(--weiss); }
.tb__status .icon { width: 22px; height: 22px; flex: none; color: var(--text-3); }
.tb__status--besetzt { border-color: rgba(201, 168, 106, .4); background: linear-gradient(90deg, rgba(201, 168, 106, .14), rgba(201, 168, 106, .03)); }
.tb__status--besetzt .icon, .tb__status--reserviert .icon { color: var(--gold); }
.tb__status--reserviert { border-color: rgba(201, 168, 106, .45); }
.tb__status--frei .icon { color: var(--ok); }
.tb__abschnitt { display: grid; gap: 10px; }
.tb__abschnitt > .t-label { color: var(--text-3); }
.tb__label-mit-pille { display: flex; align-items: center; gap: 10px; }
.tb__fuss { flex: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linie); background: rgba(0, 0, 0, .28); }
.tb__fuss .knopf { flex: 1 1 auto; }
.tb__tarif { display: flex; align-items: center; gap: 8px; }
.tb-warn { display: flex; align-items: center; gap: 8px; color: #ffd48a; }
.tb-warn .icon { color: var(--warn); }

.fakten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.fakten dt { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.fakten dd { margin: 3px 0 0; color: var(--weiss); font-weight: 500; font-size: .95rem; font-variant-numeric: tabular-nums; }
.fakten--breit dd { font-size: 1rem; }
.fortschritt--spaet::after { background: linear-gradient(90deg, var(--gold), var(--warn)); }

.tb-ruf { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px; border: 1px solid rgba(238, 90, 82, .45); background: rgba(238, 90, 82, .08); }
.tb-ruf--rechnung { border-color: rgba(201, 168, 106, .5); background: var(--gold-glanz); }
.tb-ruf__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--alarm); color: #fff; flex: none; }
.tb-ruf--rechnung .tb-ruf__icon { background: var(--gold-hell); color: #1a1408; }
.tb-ruf__icon .icon { width: 18px; height: 18px; --icon-strich: 2.2; }
.tb-ruf__text { flex: 1; min-width: 0; display: grid; }
.tb-ruf__text b { color: var(--weiss); font-weight: 600; font-size: .92rem; }

.tb-best { padding: 10px 12px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); display: grid; gap: 4px; }
.tb-best__kopf { display: flex; align-items: center; gap: 10px; }
.tb-best__kopf b { color: var(--weiss); font-size: .92rem; }
.tb-best__kopf .pille { margin-left: auto; }
.tb-best__knopf { justify-self: end; margin-top: 4px; }

/* Freigabe mit offenen Bons: langer Knopftext, Knoepfe untereinander (Hauptaktion oben) */
.dialog--gestapelt .dialog__knoepfe { flex-direction: column-reverse; }
.dialog--gestapelt .dialog__knoepfe .knopf { flex: none; padding: 0 1em; }

.rechnung { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #0d0f12; border: 1px solid var(--linie); font-size: .9rem; }
.rechnung__zeile { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; color: var(--text-2); }
.rechnung__menge { color: var(--text-3); }
.rechnung__betrag { color: var(--text); }
.rechnung__summe { display: flex; justify-content: space-between; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--linie-stark); color: var(--weiss); font-weight: 700; font-size: 1.05rem; }
.rechnung__summe span:last-child { color: var(--gold-hell); }

.tb-res {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px;
  border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-align: left; cursor: pointer; width: 100%;
}
.tb-res:hover { border-color: rgba(201, 168, 106, .4); }
.tb-res__zeit { font-size: 1.05rem; font-weight: 600; color: var(--weiss); }
.tb-res__name { display: grid; min-width: 0; }
.tb-res__name b { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-res--storniert, .tb-res--abgelehnt { opacity: .5; }
.tb-reskarte { padding: 14px; border-radius: 16px; border: 1px solid rgba(201, 168, 106, .5); background: linear-gradient(180deg, rgba(201, 168, 106, .1), rgba(201, 168, 106, .02)); }
.tb-reskarte--anfrage { border-style: dashed; }
.tb-reskarte__kopf { display: flex; align-items: center; gap: 14px; }
.tb-reskarte__kopf > div { display: grid; min-width: 0; }
.tb-reskarte__kopf b { color: var(--weiss); font-size: 1.02rem; }
.tb-reskarte__zeit { font-size: 1.5rem; font-weight: 600; color: var(--gold-hell); }
.tb-reskarte__notiz, .anfrage__notiz { margin: 0; padding-left: 10px; border-left: 2px solid rgba(201, 168, 106, .55); color: var(--text-2); font-size: .9rem; font-style: italic; }
.gaeste-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.gaeste-zeile > div:first-child { display: grid; }
.gaeste-zeile b { color: var(--weiss); font-weight: 600; }

/* ---------------------------------------------------------------------------------------------- */
/* Reservierungen                                                                                   */

.ansicht--res, .ansicht--rufe { display: grid; gap: 16px; align-content: start; padding: 16px 22px 48px; }
.umschalter { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--linie-stark); background: var(--flaeche-2); }
.umschalter button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: none; color: var(--text-2); font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: background-color var(--ui-dauer) var(--ease), color var(--ui-dauer) var(--ease);
}
.umschalter button:hover { color: var(--weiss); }
.umschalter button[aria-pressed="true"] { background: var(--gold-glanz); color: var(--gold-hell); box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .5); }
.umschalter .icon { width: 18px; height: 18px; }
.umschalter--klein button { padding: 0 16px; }

.tagesleiste { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; }
.tag {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 78px; padding: 8px 2px;
  border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); color: var(--text-2); cursor: pointer;
  transition: border-color var(--ui-dauer) var(--ease), background-color var(--ui-dauer) var(--ease);
}
.tag:hover { border-color: rgba(201, 168, 106, .4); }
.tag__wt { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.tag__nr { font-size: 1.3rem; font-weight: 600; color: var(--weiss); line-height: 1.15; }
.tag__zahl { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: .7rem; font-weight: 700; color: var(--gold-hell); background: rgba(201, 168, 106, .14); font-variant-numeric: tabular-nums; }
.tag__zahl.ist-leer { color: var(--text-3); background: none; }
.tag__zahl.hat-anfrage { background: var(--gold-verlauf); color: var(--ui-gold-text); }
.tag.ist-aktiv { border-color: var(--gold); background: linear-gradient(180deg, rgba(201, 168, 106, .2), rgba(201, 168, 106, .05)); color: var(--gold-hell); }
.tag.ist-zu .tag__nr { color: var(--text-3); }

.anfragen {
  padding: 14px 16px 16px; border-radius: var(--radius-l); border: 1px solid rgba(201, 168, 106, .5);
  background: linear-gradient(180deg, rgba(201, 168, 106, .1), rgba(201, 168, 106, .015) 70%), var(--flaeche);
  box-shadow: 0 22px 44px -30px rgba(201, 168, 106, .55);
}
.anfragen__kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.anfragen__kopf h2 { display: flex; align-items: center; gap: 10px; }
.anfragen__glocke { color: var(--gold); display: grid; }
.anfragen__glocke .icon { width: 22px; height: 22px; }
.anfragen__liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.anfrage { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px; border-radius: 18px; background: var(--tiefe); border: 1px solid var(--linie-stark); }
.anfrage.ist-neu { border-color: var(--gold); animation: anfrage-neu 1.1s var(--ease) 3; }
@keyframes anfrage-neu { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 106, 0); } 50% { box-shadow: 0 0 0 6px rgba(201, 168, 106, .28); } }
.anfrage__kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.anfrage__termin { display: flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; }
.anfrage__tag { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.anfrage__zeit { font-size: 1.35rem; font-weight: 600; color: var(--weiss); }
.anfrage__gast { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; min-width: 0; }
.anfrage__name { font-size: 1.08rem; font-weight: 600; color: var(--weiss); line-height: 1.3; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.anfrage__pers, .anfrage__tel { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.anfrage__gast .icon { width: 17px; height: 17px; color: var(--text-3); }
.anfrage__tel { min-height: 48px; color: var(--gold-hell); text-decoration: none; }
.anfrage__tel .icon { color: var(--gold); }
.anfrage__tel:hover { text-decoration: underline; text-underline-offset: 3px; }
.anfrage__aktion { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: center; margin-top: auto; }
.anfrage__aktion .eingabe { min-height: 48px; font-size: .88rem; padding-left: 14px; padding-right: 38px; background-position: right 12px center; text-overflow: ellipsis; }
.anfrage__quelle { display: grid; justify-items: end; gap: 3px; }

.res-tagkopf { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; padding: 6px 4px 0; }
.res-tagkopf__zeiten { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.res-tagkopf__zeiten .icon { width: 16px; height: 16px; color: var(--gold); }

.res-liste { display: grid; gap: 8px; }
.res-gruppe { display: flex; align-items: baseline; gap: 14px; padding: 12px 6px 2px; }
.res-zeile {
  display: grid; grid-template-columns: 70px minmax(0, 1.7fr) 58px minmax(0, 1fr) minmax(0, 1fr) 150px 24px; align-items: center; gap: 14px;
  width: 100%; min-height: 64px; padding: 10px 16px; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche);
  color: var(--text); text-align: left; cursor: pointer; transition: border-color var(--ui-dauer) var(--ease), background-color var(--ui-dauer) var(--ease);
}
.res-zeile:hover { border-color: rgba(201, 168, 106, .45); background: var(--flaeche-2); }
.res-zeile__zeit { font-size: 1.2rem; font-weight: 600; color: var(--weiss); }
.res-zeile__gast { display: grid; min-width: 0; }
.res-zeile__gast b { font-weight: 600; color: var(--weiss); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-zeile__gast .t-mini { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-zeile__pers, .res-zeile__quelle { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .9rem; white-space: nowrap; overflow: hidden; }
.res-zeile__pers .icon, .res-zeile__quelle .icon { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.res-zeile__tisch { color: var(--text); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-zeile .pille { justify-self: start; letter-spacing: .08em; }
.res-zeile__pfeil { color: var(--text-3); display: grid; }
.res-zeile--angefragt { border-color: rgba(201, 168, 106, .55); border-style: dashed; }
.res-zeile--storniert, .res-zeile--abgelehnt { opacity: .5; }
.res-zeile--storniert .res-zeile__gast b, .res-zeile--abgelehnt .res-zeile__gast b { text-decoration: line-through; }
.res-zeile.ist-vorbei { opacity: .62; }

/* Zeitstrahl */
.zs-rahmen { display: grid; gap: 10px; }
.zs-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .8rem; color: var(--text-2); padding: 0 4px; }
.zs-legende__punkt { display: inline-flex; align-items: center; gap: 8px; }
.zs-legende__punkt i { width: 24px; height: 14px; border-radius: 5px; border: 1px solid; }
.zs-legende .t-mini { margin-left: auto; }
.zs-scroller { overflow: auto; max-height: min(72vh, 760px); border: 1px solid var(--linie); border-radius: 18px; background: var(--flaeche); overscroll-behavior: contain; }
.zs { position: relative; width: calc(var(--spalte) + var(--spur)); min-width: 100%; }
.zs__kopf { position: sticky; top: 0; z-index: 4; display: flex; height: 42px; background: #12151a; border-bottom: 1px solid var(--linie-stark); }
.zs__ecke { position: sticky; left: 0; z-index: 1; width: var(--spalte); flex: none; display: flex; align-items: center; padding-left: 16px; background: #12151a; border-right: 1px solid var(--linie); }
.zs__skala { position: relative; flex: none; width: var(--spur); }
.zs__std { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 6px; font-size: .75rem; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; border-left: 1px solid var(--linie-stark); }
.zs__std.ist-verdeckt { color: transparent; }
.zs__gruppe { position: sticky; left: 0; width: max-content; padding: 16px 16px 6px; }
.zs__zeile { display: flex; height: 55px; border-top: 1px solid rgba(255, 255, 255, .045); }
.zs__tisch {
  position: sticky; left: 0; z-index: 2; width: var(--spalte); flex: none; display: flex; align-items: center; gap: 8px; padding-left: 16px;
  background: var(--flaeche); border-right: 1px solid var(--linie);
}
.zs__tisch b { color: var(--weiss); font-size: .9rem; }
.zs__spur {
  position: relative; flex: none; width: var(--spur); cursor: cell;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px var(--stunde)),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--stunde) / 2), rgba(255, 255, 255, .025) calc(var(--stunde) / 2) calc(var(--stunde) / 2 + 1px), transparent calc(var(--stunde) / 2 + 1px) var(--stunde));
}
.zs__spur:hover { background-color: rgba(201, 168, 106, .025); }
.zs__zu { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 5px, transparent 5px 11px); pointer-events: none; }
.zs__balken {
  position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 8px; padding: 0 10px; overflow: hidden;
  border: 1px solid; border-radius: 10px; font-size: .78rem; white-space: nowrap; text-align: left; cursor: pointer;
  transition: filter var(--ui-dauer) var(--ease), transform 140ms var(--ease);
}
.zs__balken:hover { filter: brightness(1.15); }
.zs__balken:active { transform: scale(.98); }
.zs__balken b { font-weight: 700; }
.zs__balken span { overflow: hidden; text-overflow: ellipsis; }
.zs__balken-p { margin-left: auto; opacity: .8; flex: none; }
.zs__balken--angefragt { background: rgba(201, 168, 106, .1); border-color: var(--gold); border-style: dashed; color: var(--gold-hell); }
.zs__balken--bestaetigt { background: rgba(201, 168, 106, .24); border-color: rgba(201, 168, 106, .75); color: var(--weiss); }
.zs__balken--eingecheckt { background: var(--gold-verlauf); border-color: transparent; color: #1a1408; }
.zs__balken--sitzung { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); color: var(--text); }
.zs__balken--nicht-erschienen { background: rgba(240, 181, 69, .07); border-color: rgba(240, 181, 69, .45); border-style: dashed; color: #ffd48a; }
.zs__balken--storniert { background: transparent; border-color: rgba(255, 255, 255, .16); border-style: dashed; color: var(--text-3); }
.zs__balken--storniert span:first-of-type { text-decoration: line-through; }
.zs-legende__punkt i.zs__balken--eingecheckt { border-color: rgba(243, 227, 184, .6); }
.zs__jetzt { position: absolute; top: 42px; bottom: 0; width: 2px; margin-left: -1px; background: var(--gold); z-index: 3; pointer-events: none; box-shadow: 0 0 12px rgba(201, 168, 106, .6); }
.zs__jetzt-marke { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 2; padding: 3px 9px; border-radius: 999px; background: var(--gold); color: #1a1408; font-size: .72rem; font-weight: 700; box-shadow: 0 0 0 3px #12151a; }

/* Detail und Neu (Blatt aus ui.js) */
.rd, .rn { display: grid; gap: 18px; }
.rd__kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd__kopf .t-mini { margin-left: auto; }
.rd__abschnitt { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--linie); }
.rd__abschnitt > .t-label { color: var(--text-3); }
.status-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feld > .zaehlwerk { justify-self: start; }
.status-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 12px;
  border: 1px solid var(--linie-stark); border-radius: 14px; background: var(--flaeche-2); color: var(--text); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.status-knopf .icon { width: 18px; height: 18px; }
.status-knopf:hover { border-color: rgba(201, 168, 106, .5); }
.status-knopf.ist-aktiv { background: var(--gold-glanz); border-color: var(--gold); color: var(--gold-hell); }
.status-knopf--storniert:hover, .status-knopf--abgelehnt:hover { border-color: rgba(238, 90, 82, .6); color: #ffb9b3; }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.blatt-knoepfe { display: flex; gap: 12px; justify-content: flex-end; width: 100%; }
.blatt-knoepfe .knopf { flex: 1 1 auto; }
.link-gold { color: var(--gold-hell); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
.link-gold:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-gold .icon { width: 17px; height: 17px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; min-height: 48px; align-items: center; }
.slot {
  min-height: 48px; border: 1px solid var(--linie-stark); border-radius: 12px; background: var(--flaeche-2); color: var(--weiss);
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: border-color var(--ui-dauer) var(--ease), background-color var(--ui-dauer) var(--ease);
}
.slot:hover { border-color: rgba(201, 168, 106, .6); }
.slot[aria-pressed="true"] { background: var(--gold-verlauf); color: #1a1408; border-color: transparent; }
.slot[disabled] { opacity: .3; text-decoration: line-through; cursor: not-allowed; }
.zeit-andere { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.eingabe--zeit { width: 150px; }
.feld--fehler .slots { outline: 1px solid rgba(238, 90, 82, .6); outline-offset: 4px; border-radius: 12px; }
.feld--fehler + .t-mini, .feld--fehler .t-mini:last-child { color: #ffb3ad; }

/* ---------------------------------------------------------------------------------------------- */
/* Rufe                                                                                             */

.rufe-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.rufe-leer { grid-column: 1 / -1; padding: 64px 20px; }
.rufe-leer b { color: var(--weiss); font-size: 1.1rem; }
.rufe-leer .icon { color: var(--ok); }
.ruf-karte {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto;
  grid-template-areas: "tisch text alter" "tisch knoepfe knoepfe"; gap: 12px 18px; padding: 16px 18px 16px 16px;
  border-radius: 22px; background: linear-gradient(90deg, rgba(238, 90, 82, .08), transparent 55%), var(--flaeche); border: 1px solid rgba(238, 90, 82, .45);
}
.ruf-karte--rechnung { background: linear-gradient(90deg, rgba(201, 168, 106, .1), transparent 55%), var(--flaeche); border-color: rgba(201, 168, 106, .5); }
.ruf-karte__tisch { grid-area: tisch; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 18px; background: rgba(238, 90, 82, .14); border: 1px solid rgba(238, 90, 82, .3); }
.ruf-karte--rechnung .ruf-karte__tisch { background: var(--gold-glanz); border-color: rgba(201, 168, 106, .35); }
.ruf-karte__tisch .t-mini { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.ruf-karte__tisch b { font-size: 2.3rem; font-weight: 700; color: var(--weiss); line-height: 1; }
.ruf-karte__text { grid-area: text; display: grid; gap: 2px; min-width: 0; }
.ruf-karte__art { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #ffb3ad; }
.ruf-karte--rechnung .ruf-karte__art { color: var(--gold); }
.ruf-karte__art .icon { width: 16px; height: 16px; --icon-strich: 2.2; }
.ruf-karte__grund { color: var(--weiss); font-size: 1.15rem; font-weight: 600; }
.ruf-karte__alter { grid-area: alter; font-size: 1.5rem; font-weight: 600; color: var(--text); align-self: start; }
.ruf-karte.ist-alt .ruf-karte__alter { color: #ff8f87; }
.ruf-karte__knoepfe { grid-area: knoepfe; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.rufe-erledigt { display: grid; gap: 10px; margin-top: 10px; }
.rufe-erledigt > .t-label { color: var(--text-3); }
.rufe-erledigt__liste { display: grid; gap: 6px; }
.ruf-erledigt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text-2); font-size: .88rem; opacity: .8; }
.ruf-erledigt .icon { width: 16px; height: 16px; color: var(--text-3); }
.ruf-erledigt b { color: var(--text); }
.ruf-erledigt .t-mini { margin-left: auto; }

/* ---------------------------------------------------------------------------------------------- */
/* Verbindungshinweis                                                                               */

.netz-banner {
  position: fixed; z-index: 800; top: 76px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px; border-radius: 18px;
  background: rgba(30, 14, 14, .96); border: 1px solid rgba(238, 90, 82, .6); box-shadow: var(--schatten); color: var(--text);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.netz-banner--lokal { background: rgba(32, 25, 10, .96); border-color: rgba(240, 181, 69, .6); }
.netz-banner__icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(238, 90, 82, .18); color: var(--alarm); flex: none; }
.netz-banner--lokal .netz-banner__icon { background: rgba(240, 181, 69, .18); color: var(--warn); }
.netz-banner__text { flex: 1; font-size: .9rem; color: var(--text-2); }
.netz-banner__text b { color: var(--weiss); }

/* ---------------------------------------------------------------------------------------------- */
/* Breiten                                                                                          */

@media (max-width: 1500px) {
  .legende__punkt--leise { display: none; }
}
@media (max-width: 1000px) {
  .kopf__datum { display: none; }
}
@media (max-width: 1279px) {
  .app { --navi-breite: 100px; }
  .navi { padding: 14px 8px; align-items: stretch; }
  .navi__punkt { flex-direction: column; justify-content: center; gap: 5px; min-height: 72px; padding: 8px 4px; text-align: center; font-size: .72rem; }
  .navi__punkt[aria-current="page"]::before { left: -9px; }
  .navi__text small { display: none; }
  .navi__zahl { position: absolute; top: 6px; right: 10px; margin: 0; min-width: 22px; height: 22px; font-size: .7rem; padding: 0 6px; }
  .navi__punkt--klein { min-height: 64px; }
  .navi__entwurf { padding: 0 2px 8px; text-align: center; font-size: .62rem; }
  .navi__entwurf-lang { display: none; }
  .navi__entwurf-kurz { display: inline; }
  .kopf { gap: 12px; padding: 0 12px 0 16px; }
  .kennzahl { padding: 6px 12px 6px 10px; }
  .kennzahl span { letter-spacing: .08em; }
  .res-zeile { grid-template-columns: 62px minmax(0, 1.6fr) 50px minmax(0, 1fr) 150px 20px; }
  .res-zeile__quelle { display: none; }
  .zs-legende .t-mini { display: none; }
}
@media (max-width: 1100px) {
  .kopf__demo span { display: none; }
  .kopf__demo { padding: 0; width: 48px; }
  .kennzahl--gaeste span { display: none; }
  .kopf__rbpay .rbpay-marke span { display: none; }
}
@media (max-width: 900px) {
  .kopf__bereich, .kopf__trenner { display: none; }
  .tagesleiste { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .rufe-liste { grid-template-columns: 1fr; }
  .feld-reihe { grid-template-columns: 1fr; }
}

/* Handy: Navigation unten, Blatt von unten */
@media (max-width: 760px) {
  .app { --kopf-hoehe: 58px; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--kopf-hoehe) minmax(0, 1fr) auto; }
  .kopf__wort, .kopf__rbpay, .kopf__zeit { display: none; }
  .navi { grid-row: 3; grid-column: 1; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--linie); overflow: visible; }
  .navi__punkt { flex: 1; min-height: 60px; }
  .navi__punkt[aria-current="page"]::before { display: none; }
  .navi__trenner, .navi__fuss { display: none; }
  .haupt { grid-column: 1; }
  .ansicht--plan { padding: 12px; }
  .ansicht--res, .ansicht--rufe { padding: 12px 12px 32px; }
  .kennzahlen { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .kennzahl { flex-direction: column; gap: 4px; padding: 6px; align-items: center; }
  .kennzahl::before { display: none; }
  .kennzahl span { font-size: .6rem; }
  .kennzahl--gaeste span { display: inline; }
  .legende { display: none; }
  .planflaeche { overflow: auto; overscroll-behavior: contain; }
  .plan-schieber { position: relative; inset: auto; width: 940px; height: 590px; margin: 8px; transition: none; }
  .tischblatt { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 82dvh; border-radius: 24px 24px 0 0; transform: translateY(104%); }
  .res-zeile { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "zeit gast status" "zeit tisch pers"; }
  .res-zeile__zeit { grid-area: zeit; }
  .res-zeile__gast { grid-area: gast; }
  .res-zeile .pille { grid-area: status; }
  .res-zeile__tisch { grid-area: tisch; }
  .res-zeile__pers { grid-area: pers; }
  .res-zeile__pfeil { display: none; }
  .ansicht__aktionen { margin-left: 0; width: 100%; }
  .anfragen__liste { grid-template-columns: 1fr; }
  .ruf-karte { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "tisch text" "alter alter" "knoepfe knoepfe"; }
  .netz-banner { top: 66px; flex-wrap: wrap; }
}
