/* ============================================================
   ReservierBot Admin — Styles
   ============================================================ */

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

:root {
  /* Surfaces (warm off-white, low saturation) */
  --bg:           #f5f3ee;
  --bg-card:      #fdfcf9;
  --bg-sunken:    #efeae0;
  --panel:        #ffffff;

  /* Borders — warm, low contrast */
  --border:       #e6e1d6;
  --border-hi:    #d6cebd;
  --border-soft:  #eee9de;

  /* Text */
  --text:         #1c1f23;
  --text-mid:     #5e6168;
  --text-dim:     #8a8a85;
  --text-faint:   #b1aea3;

  /* Sidebar (dark, slightly warm) */
  --sb-bg:        #1a1f24;
  --sb-bg-deep:   #15191e;
  --sb-bg-card:   #20262d;
  --sb-border:    #262c34;
  --sb-text:      #d5d3cc;
  --sb-text-dim:  #6c7079;
  --sb-text-faint:#4a4f57;

  /* Functional */
  --ok:           #2f7d3f;
  --ok-soft:      #e3f0e0;
  --warn:         #b8511f;
  --warn-soft:    #fae6d6;
  --alert:        #ad7a17;
  --alert-soft:   #fbf0d3;
  --danger:       #a3322a;
  --danger-soft:  #fae0dc;
  --neutral:      #8d8a82;
  --neutral-soft: #ebe7dc;

  /* Lisa (calm, warm purple — not "AI-buzzy") */
  --lisa:         #6a4d8c;
  --lisa-hi:      #876bab;
  --lisa-soft:    #efe9f5;
  --lisa-edge:    #ddd0ec;

  /* Brand accent — overridden by JS at runtime (PALETTES.wirtshaus in data.jsx).
     Fallback hier auf Marken-Grün/-Gold synchron gehalten (v0.14.x). */
  --accent:       #2c4a1e;
  --accent-hi:    #3d6429;
  --accent-soft:  #eaefe2;
  --accent-bar:   #2c4a1e;
  --gold:         #b48f3a;
  --gold-soft:    #f3ead7;

  /* Floor-plan */
  --floor:        #f5ede0;
  --floor-line:   #e0d4be;
  --wall:         #6e5e44;
  --bar-fill:     #e8dcc4;
  --window-fill:  #bcd4dd;

  /* Type system */
  --font-sans:    "Geist", "Söhne", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-serif:   "Newsreader", "Source Serif Pro", Georgia, serif;

  /* Spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

  /* Radii */
  --r-sm: 4px; --r: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;

  /* Shadows — very subtle, warm */
  --shadow-sm:    0 1px 2px rgba(40, 32, 18, 0.04);
  --shadow:       0 2px 8px rgba(40, 32, 18, 0.06);
  --shadow-lg:    0 12px 32px rgba(40, 32, 18, 0.10);

  /* Density */
  --row-pad-y:    13px;
  --hg-gap:       0;
}

html[data-density="compact"] { --row-pad-y: 10px; }
html[data-density="comfy"]   { --row-pad-y: 18px; }

/* ============================================================
   DARK MODE (v0.13.9, opt-in)
   ------------------------------------------------------------
   Überschreibt NUR Flächen / Text / Rahmen / Schatten. Die
   Funktions- und Akzentfarben (ok/warn/danger/accent/gold/lisa
   inkl. ihrer *-soft-Tints) bleiben BEWUSST unverändert: viele
   Badges, Pills und Lisa-Karten haben dort fest verdrahtete
   dunkle Textfarben, die auf einem dunklen Tint unlesbar würden.
   So bleiben sie als helle, gut lesbare "Inseln" erhalten. Die
   Fein-Politur dieser Akzent-Inseln ist ein bewusster Folge-Schritt.
   Die Sidebar nutzt eigene --sb-*-Variablen und ist bereits dunkel.
   ============================================================ */
html[data-theme="dark"] {
  /* Flächen — warm-neutrales Dunkel, abgestuft damit Karten "schweben" */
  --bg:           #14171b;
  --bg-card:      #1b2026;
  --bg-sunken:    #0f1216;
  --panel:        #1e242b;

  /* Rahmen — heller als die Fläche, damit Kanten sichtbar bleiben */
  --border:       #2c333c;
  --border-hi:    #3b434e;
  --border-soft:  #242a31;

  /* Text — warmes Off-White, gestuft nach Wichtigkeit */
  --text:         #e8e5dd;
  --text-mid:     #a6abb2;
  --text-dim:     #7d828a;
  --text-faint:   #5a5f68;

  /* Floor-Plan-Flächen */
  --floor:        #1d2329;
  --floor-line:   #2e3640;
  --bar-fill:     #2a3038;
  --window-fill:  #24323a;

  /* Schatten — auf dunklem Grund kräftiger, sonst unsichtbar */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow:       0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow-lg:    0 12px 32px rgba(0, 0, 0, 0.55);
}
/* Papier-Grain auf der Canvas ist im Dark Mode kontraproduktiv (helle Punkte) */
html[data-theme="dark"] body::before { opacity: 0.4; }

/* ============================================================
   DARK MODE — Akzent-Inseln (v0.13.10)
   ------------------------------------------------------------
   Status-Pills, Source-Icon, Floor-Tische und Gantt-Balken nutzen
   im Light Mode helle *-soft-Tints. Im Dark Mode wirkten die als
   grelle weiße Flecken, und heller Text darauf wurde unlesbar
   ("weiß auf weiß"). Hier kippen wir sie auf dunkle Tints + helle
   Schrift. WICHTIG: --accent-soft wird zur Laufzeit per Inline-Style
   auf <html> gesetzt (app.jsx) und überschreibt damit jedes
   Token-Override. Darum setzen wir bei accent-basierten Elementen
   die konkrete Property direkt (solides var(--accent) statt Tint).
   ============================================================ */
/* Status-Pills */
html[data-theme="dark"] .st-pill.st-confirmed .st-btn { background: rgba(47,125,63,0.22);  color: #74c98a; border-color: rgba(47,125,63,0.40); }
html[data-theme="dark"] .st-pill.st-arrived   .st-btn { background: var(--accent);         color: #fff;    border-color: var(--accent-hi); }
html[data-theme="dark"] .st-pill.st-cancelled .st-btn { background: rgba(163,50,42,0.24);  color: #e58a7e; border-color: rgba(163,50,42,0.42); }
html[data-theme="dark"] .st-pill.st-waitlist  .st-btn { background: rgba(173,122,23,0.24); color: #d8ad52; border-color: rgba(173,122,23,0.42); }
html[data-theme="dark"] .st-pill.st-noshow    .st-btn { background: rgba(184,81,31,0.24);  color: #e2965f; border-color: rgba(184,81,31,0.42); }

/* Primär-Button ("+ Neue Reservierung") — dunkles Oliv auf fast-schwarzem
   Grund verschwimmt; helleren Akzent nehmen, damit der CTA klar liest */
html[data-theme="dark"] .btn-primary { background: var(--accent-hi); border-color: var(--accent-hi); box-shadow: 0 1px 2px rgba(0,0,0,0.4); }
html[data-theme="dark"] .btn-primary:hover { background: var(--accent); border-color: var(--accent); }

/* Source-Icon: Kellner-Eintrag (staff) war heller Tint → solider Akzent */
html[data-theme="dark"] .src-ic.staff { background: var(--accent); color: #fff; border-color: var(--accent-hi); }

/* Floor-Plan: belegte/reservierte Tische hatten helle Tints → weiße
   Tischnummer war unlesbar. Dunkle Füllungen (Nummer = --text, hell). */
html[data-theme="dark"] .fp-table-confirmed { fill: #234b2c; stroke: var(--ok); }
html[data-theme="dark"] .fp-table-arrived   { fill: var(--accent); stroke: var(--accent-hi); }
html[data-theme="dark"] .fp-table-waitlist  { fill: #574012; stroke: var(--alert); }

/* Gantt (vertikal, .gv-bar): bestätigte Reservierung hatte einen hellen
   --ok-soft-Block; der helle Text (--text / --text-mid) darauf war im Dark
   Mode unlesbar (weiß auf weiß). Dunkler Grün-Tint → Text bleibt lesbar.
   "arrived" ist bereits solides var(--accent) + weiße Schrift (ok). */
html[data-theme="dark"] .gv-bar-confirmed { background: rgba(47,125,63,0.26); border-color: var(--ok); }
html[data-theme="dark"] .gv-bar-confirmed .gv-bar-cn { color: #74c98a; }
html[data-theme="dark"] .gv-bar:hover { filter: brightness(1.18); }

/* ============================================================
   DARK MODE — grünes Accent als VORDERGRUND lesbar machen
   ------------------------------------------------------------
   --accent (#2c4a1e) ist als Schrift-/Icon-Farbe auf dunklem Grund
   zu dunkel ("dunkelgrün auf fast-schwarz"). Überall, wo Accent-Grün
   als Text/Icon auf dunkler Fläche sitzt, auf das hellere Grün (#74c98a)
   heben. NICHT angefasst: Accent als FLÄCHE (z. B. "arrived"-Pills mit
   weißer Schrift) und Accent-Text auf hellem --accent-soft (z. B. Chips).
   ============================================================ */
html[data-theme="dark"] .dp-date-btn svg:first-child { color: #74c98a; }   /* Kalender-Icon (SS14) */
html[data-theme="dark"] .rd-link { color: #74c98a; }                       /* "Vollständiges Profil öffnen" (SS15) */
html[data-theme="dark"] .gv-bar-cn { color: #74c98a; }                     /* Gantt-Kundennummer */
html[data-theme="dark"] .gv-time-hour { color: #74c98a; }                  /* Gantt-Stunde links (18, 19 …) (SS16) */
html[data-theme="dark"] .tr-current .tr-time { color: #74c98a; }           /* "Jetzt"-Zeile Uhrzeit (SS17) */
html[data-theme="dark"] .tr-now { color: #74c98a; }
html[data-theme="dark"] .tr-now-dot { background: #74c98a; box-shadow: 0 0 0 0 #74c98a; }

/* Tages-Notiz-Banner: hat fest verdrahtete Creme-Farben (Light Mode).
   Im Dark Mode wirkten die als grell-helle Box → auf dunkle Tints kippen. */
html[data-theme="dark"] .rv-notes-banner { background: #2a2410; border-color: #4a3c18; color: #e7d6a8; }
html[data-theme="dark"] .rv-notes-icon,
html[data-theme="dark"] .rv-note-x,
html[data-theme="dark"] .rv-note-add-link { color: #d8ad52; }
html[data-theme="dark"] .rv-note-add-link { border-color: #5a4a1e; }
html[data-theme="dark"] .rv-note-input { background: var(--bg-card); border-color: var(--border-hi); color: var(--text); }

body {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
}

/* Paper grain on the canvas — extremely subtle */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(120, 100, 60, 0.03) 1px, transparent 1px),
    radial-gradient(rgba(120, 100, 60, 0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  z-index: 0;
}

button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ============================================================
   Demo-Mode Banner — public /demo-admin Live-Demo nur
   ============================================================ */
.demo-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: linear-gradient(90deg, #2c4a1e 0%, #3d6429 100%);
  color: #f3ecdf;
  font-size: 13.5px;
  line-height: 1.2;
  box-shadow: 0 1px 8px rgba(0,0,0,0.15);
}
.demo-banner-icon { font-size: 17px; flex-shrink: 0; }
.demo-banner-text { flex: 1; min-width: 0; }
.demo-banner-text strong { color: #c9a84c; font-weight: 600; margin-right: 6px; }
.demo-banner-cta {
  color: #c9a84c;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.demo-banner-cta:hover { background: rgba(201, 168, 76, 0.15); border-color: #c9a84c; }
@media (max-width: 720px) {
  .demo-banner { height: auto; padding: 8px 12px; flex-wrap: wrap; font-size: 12.5px; }
  .demo-banner-cta { padding: 4px 9px; font-size: 12px; }
}
/* Wenn Banner da ist: App schrumpft auf verbleibenden Viewport */
body:has(.demo-banner) { padding-top: 44px; }
@media (max-width: 720px) {
  body:has(.demo-banner) { padding-top: 76px; }   /* Banner ist auf Mobile höher */
}

/* ============================================================
   App shell
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;            /* feste Viewport-Höhe, kein outer scroll */
  position: relative;
  z-index: 1;
  overflow: hidden;
}
body:has(.demo-banner) .app { height: calc(100vh - 44px); }
@media (max-width: 720px) {
  body:has(.demo-banner) .app { height: calc(100vh - 76px); }
}
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;            /* erlaubt dem Main-Container zu schrumpfen */
  background: var(--bg);
  overflow-y: auto;         /* Content scrollt intern, Sidebar bleibt fest */
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sb {
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sb-border);
  position: relative;
}
.sb::after {
  /* very subtle vertical glow on the right edge so the boundary feels intentional */
  content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15) 40%, transparent);
  pointer-events: none;
}

.sb-brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--sb-border);
}
.sb-brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.05);
}
.sb-brand-text { min-width: 0; }
.sb-brand-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.sb-brand-sub {
  font-size: 10.5px;
  color: var(--sb-text-dim);
  letter-spacing: 0.02em;
  margin-top: 2px;
  font-variant-caps: all-small-caps;
}

.sb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sb-section + .sb-section { margin-top: 18px; }
.sb-section-title {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sb-text-faint);
  padding: 6px 8px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sb-lock {
  display: inline-flex;
  align-items: center;
  color: var(--sb-text-faint);
}
.sb-lock.is-open { color: #9bc88a; }
.sb-logout {
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-text-faint);
  font-weight: 600;
  padding: 0 4px;
}
.sb-logout:hover { color: var(--gold); }
.sb-item-lock {
  margin-left: auto;
  color: var(--sb-text-faint);
  display: inline-flex;
  align-items: center;
}
.sb-item.is-active .sb-item-lock { color: rgba(255,255,255,0.6); }

.sb-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--sb-text);
  font-size: 13px;
  text-align: left;
  position: relative;
  transition: background 0.1s, color 0.1s;
}
.sb-item:hover { background: var(--sb-bg-card); color: #fff; }
.sb-item.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.06) inset, 0 1px 0 rgba(0,0,0,0.2);
}
.sb-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px;
  width: 2px; background: var(--gold); border-radius: 2px;
}
.sb-ic { display: inline-flex; align-items: center; justify-content: center; opacity: 0.85; }
.sb-item.is-active .sb-ic { opacity: 1; }
.sb-lbl { flex: 1; min-width: 0; }
.sb-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--sb-text-dim);
  letter-spacing: 0;
}
.sb-item.is-active .sb-count { background: rgba(255,255,255,0.2); color: #fff; }

/* "Platz frei"-Alarm-Badge: auffälliger, grün, pulsierend — hebt sich vom neutralen Count ab */
.sb-count-alert {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  letter-spacing: 0;
  box-shadow: 0 0 0 0 rgba(47,125,63,0.6);
  animation: sb-alert-pulse 2s ease-out infinite;
}
@keyframes sb-alert-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47,125,63,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(47,125,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,125,63,0); }
}

/* Ambient activity */
.sb-act {
  border-top: 1px solid var(--sb-border);
  padding: 14px 16px 16px;
  background: linear-gradient(to bottom, transparent, var(--sb-bg-deep) 60%);
}
.sb-act-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sb-text-dim);
  font-weight: 600;
  margin-bottom: 10px;
}
.sb-act-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(184, 146, 78, 0.6);
  animation: pulse-ring 2.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(184, 146, 78, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(184, 146, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 146, 78, 0); }
}
.sb-act-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sb-text-faint);
  font-weight: 500;
}
.sb-act-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sb-act-row {
  display: flex; gap: 10px;
  padding: 6px 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--sb-text-dim);
  position: relative;
  transition: color 0.15s;
  animation: fade-in 0.6s ease-out backwards;
  animation-delay: calc(var(--row-i, 0) * 0.12s);
}
@keyframes fade-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}
.sb-act-row:hover { color: var(--sb-text); }
.sb-act-glyph {
  width: 14px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.sb-act-arrive .sb-act-glyph { color: #8eb38a; }
.sb-act-cancel .sb-act-glyph { color: #c8856b; }
.sb-act-book   .sb-act-glyph { color: var(--gold); }
.sb-act-body { min-width: 0; }
.sb-act-text { color: var(--sb-text); }
.sb-act-when { color: var(--sb-text-faint); font-size: 10.5px; margin-top: 1px; letter-spacing: 0.01em; }

.sb-act-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.sb-act-link:hover { color: #fff; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.datepick {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2px;
  gap: 0;
}
.dp-nav {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  color: var(--text-mid);
  display: inline-flex; align-items: center; justify-content: center;
}
.dp-nav:hover { background: var(--bg-sunken); color: var(--text); }
.dp-date {
  padding: 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dp-main { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.dp-rel  { font-size: 11.5px; color: var(--text-dim); font-variant-caps: all-small-caps; letter-spacing: 0.05em; }

.filter-row { display: flex; gap: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  transition: all 0.12s;
}
.chip:hover { border-color: var(--border-hi); color: var(--text); }
.chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.chip-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.7;
}
.chip.is-active .chip-count { opacity: 1; }

.search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 5px 8px 5px 10px;
  color: var(--text-mid);
  min-width: 220px;
}
.search input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 12.5px;
  color: var(--text);
  min-width: 0;
}
.search input::placeholder { color: var(--text-faint); }
.search kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  background: var(--bg-sunken);
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.1s, border-color 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-card); border-color: var(--border-hi); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--panel);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 16px;  /* explizit fixiert, damit Icon-Buttons und Text-Buttons exakt gleich hoch sind */
}
.btn-sm svg { display: block; }  /* gegen Baseline-Offset bei Icon-Buttons */
.btn-sm:hover { background: var(--bg-card); }
.btn-icon {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mid);
}
.btn-icon:hover { background: var(--bg-card); color: var(--text); }

/* ============================================================
   STATS STRIP
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.stat {
  padding: 14px 24px 16px;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
}
.stat-val {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-unit {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  font-family: var(--font-sans);
}
.stat-delta {
  font-size: 11.5px;
  color: var(--text-mid);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-alert .stat-num { color: var(--alert); }
.stat-warn  .stat-num { color: var(--warn); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.rv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rv-content {
  padding: 20px 24px 60px;
  max-width: 1220px;
  margin: 0 auto;
  width: 100%;
}

.rv-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.rv-h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
}
.rv-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.rv-section-actions { display: flex; gap: 6px; }

/* ============================================================
   TIMELINE / HOUR-GROUPS
   ============================================================ */
.timeline {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hg {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: stretch;
  position: relative;
}
.hg + .hg { border-top: 1px solid var(--border); }
.hg-right { min-width: 0; }

/* ── Time-Rail (left column) ─────────────────────────────────────────────── */
.tr {
  position: relative;
  padding: 16px 14px 14px 18px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.tr-current {
  background: linear-gradient(to right, var(--accent-soft) 0%, var(--bg-card) 90%);
}
.tr-current::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
}
.tr-time-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  cursor: help;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
  transition: background 0.12s;
}
.tr-time-wrap:hover { background: rgba(0,0,0,0.025); }
.tr-time {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tr-current .tr-time { color: var(--accent); }
.tr-now {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
}
.tr-now-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: tr-pulse 2.2s ease-out infinite;
}
@keyframes tr-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(58,90,42,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(58,90,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(58,90,42,0); }
}
.tr-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--lisa-soft);
  color: var(--lisa);
  border: 1px solid var(--lisa-edge);
  letter-spacing: 0.005em;
  transition: all 0.12s;
}
.tr-tip:hover { background: var(--lisa); color: #fff; border-color: var(--lisa); }
.tr-tip.is-open { background: var(--lisa); color: #fff; border-color: var(--lisa); }
.tr-tip-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.55);
  color: var(--lisa);
  border-radius: 999px;
  font-weight: 600;
}
.tr-tip.is-open .tr-tip-count,
.tr-tip:hover .tr-tip-count { background: rgba(255,255,255,0.25); color: #fff; }

/* ── Hour Hover Tooltip ──────────────────────────────────────────────────── */
.hour-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: -4px;
  background: #1a1f24;
  color: #f0eee8;
  border-radius: var(--r);
  padding: 12px 14px 10px;
  width: 220px;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(20,16,8,0.22), 0 1px 0 rgba(255,255,255,0.05) inset;
  animation: hour-tip-in 0.14s ease-out;
  pointer-events: none;
}
@keyframes hour-tip-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hour-tip::before {
  content: "";
  position: absolute;
  top: -4px; left: 16px;
  width: 8px; height: 8px;
  background: #1a1f24;
  transform: rotate(45deg);
}
.hour-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hour-tip-hour {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.hour-tip-badge {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
}
.hour-tip-badge-peak {
  background: rgba(212, 145, 50, 0.18);
  color: #e9b56a;
}
.hour-tip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  margin-bottom: 10px;
}
.ht-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ht-lbl {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(240,238,232,0.5);
  font-weight: 500;
}
.ht-val {
  font-family: var(--font-mono);
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #fff;
}
.ht-val strong {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ht-val-alert strong { color: #e9b56a; }
.ht-unit {
  font-size: 10px;
  color: rgba(240,238,232,0.5);
}
.hour-tip-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.hour-tip-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
}
.hour-tip-bar-fill.is-alert { background: #e9b56a; }
.hour-tip-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ht-chip {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.ht-chip-stamm  { background: rgba(150, 200, 130, 0.16); color: #b8d6a4; }
.ht-chip-neu    { background: rgba(180, 200, 220, 0.16); color: #b8d2e6; }
.ht-chip-wait   { background: rgba(220, 180, 100, 0.16); color: #e9c98e; }
.ht-chip-cancel { background: rgba(220, 130, 110, 0.16); color: #e5b0a0; }

/* ============================================================
   RESERVATION ROW
   ============================================================ */
.hg-rows { background: var(--panel); }
.rr {
  display: grid;
  grid-template-columns: 3px 28px 76px minmax(0, 1.4fr) 44px 64px minmax(0, 2fr) auto;
  gap: 14px;
  padding: var(--row-pad-y) 18px var(--row-pad-y) 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.hg-rows .rr:last-child { border-bottom: none; }
.rr:hover { background: var(--bg-card); }

.rr-bar {
  align-self: stretch;
  background: var(--neutral);
  border-radius: 0 2px 2px 0;
  min-height: 32px;
}
.rr-bar-confirmed { background: var(--ok); }
.rr-bar-arrived   { background: var(--accent); }
.rr-bar-cancelled { background: var(--danger); }
.rr-bar-waitlist  { background: var(--alert); }
.rr-bar-noshow    { background: var(--warn); }

.rr-source {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.src-ic {
  display: inline-flex;
  color: var(--text-dim);
  width: 22px; height: 22px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.src-ic.staff { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.rr-time {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.rr-time-main {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.rr-time-end {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 400;
}
.rr-time-open { color: var(--alert); }

.rr-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  min-width: 0;
}
.rr-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.1s, color 0.1s;
}
.rr-name:hover .rr-name-text { border-color: var(--text-mid); color: var(--text); }
.rr-name-arr {
  opacity: 0;
  color: var(--text-dim);
  transition: opacity 0.12s;
  margin-left: auto;
  flex-shrink: 0;
}
.rr:hover .rr-name-arr { opacity: 1; }

.rr-guests {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
  justify-self: center;
}
.rr-guests-ic { color: var(--text-faint); display: inline-flex; }
.rr-guests-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.rr-table-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  color: var(--text-mid);
}
.rr-table-chip.is-waiting {
  background: var(--alert-soft);
  border-color: transparent;
  color: var(--alert);
}

.rr-notes {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
  min-width: 0;
}
.rr-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 3px; }
.rr-notes-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-mid);
}
.rr-notes-empty { color: var(--text-faint); }

.rr.is-cancelled .rr-name-text,
.rr.is-cancelled .rr-time-main { text-decoration: line-through; color: var(--text-dim); }
.rr.is-cancelled { opacity: 0.7; }

/* ============================================================
   GUEST BADGES
   ============================================================ */
.g-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.g-badge.stamm { background: var(--accent-soft); color: var(--accent); }
.g-badge.neu   { background: #e6efe2; color: #547a3e; }
.g-badge.risk  { background: var(--warn-soft); color: var(--warn); }
[data-palette="burgund"] .g-badge.neu { background: #f0e6da; color: #8d5a30; }
[data-palette="schiefer"] .g-badge.neu { background: #e6eaee; color: #3a4a5c; }

/* ============================================================
   NOTE TAGS
   ============================================================ */
.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 7px 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.01em;
}
.note-guest { background: var(--gold-soft); color: #6f5320; }
.note-admin { background: var(--accent-soft); color: var(--accent); }
.nt-ic { font-size: 10px; line-height: 1; }

/* ============================================================
   STATUS PILLS (3 variants — all same width)
   ============================================================ */
.st { position: relative; display: inline-block; }
.st-btn {
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  width: 134px;
  justify-content: center;
  white-space: nowrap;
}
.st-ic { display: inline-flex; align-items: center; }
.st-chev { font-size: 8px; opacity: 0.55; margin-left: auto; }
.st-lbl { line-height: 1; }

/* Variant A: pill (default) */
.st-pill.st-confirmed .st-btn { background: var(--ok-soft);    color: var(--ok);    border-color: rgba(47,125,63,0.18); }
.st-pill.st-arrived   .st-btn { background: var(--accent-soft);color: var(--accent);border-color: rgba(58,90,42,0.18); }
.st-pill.st-cancelled .st-btn { background: var(--danger-soft);color: var(--danger);border-color: rgba(163,50,42,0.18); }
.st-pill.st-waitlist  .st-btn { background: var(--alert-soft); color: var(--alert); border-color: rgba(173,122,23,0.18); }
.st-pill.st-noshow    .st-btn { background: var(--warn-soft);  color: var(--warn);  border-color: rgba(184,81,31,0.18); }

/* Variant B: bracket (operations style) */
.st-bracket .st-btn {
  font-family: var(--font-mono);
  background: transparent;
  border-radius: 4px;
  border-color: transparent;
  letter-spacing: 0.06em;
  font-size: 10.5px;
  padding: 4px 8px;
  font-weight: 500;
}
.st-bracket .st-br { opacity: 0.4; }
.st-bracket.st-confirmed .st-btn { color: var(--ok); }
.st-bracket.st-arrived   .st-btn { color: var(--accent); }
.st-bracket.st-cancelled .st-btn { color: var(--danger); }
.st-bracket.st-waitlist  .st-btn { color: var(--alert); }
.st-bracket.st-noshow    .st-btn { color: var(--warn); }
.st-bracket .st-btn:hover { background: var(--bg-sunken); }

/* Variant C: marker (side-tab) */
.st-marker .st-btn {
  padding: 4px 10px 4px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
  position: relative;
  justify-content: flex-start;
}
.st-marker .st-tab {
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--neutral);
}
.st-marker.st-confirmed .st-tab { background: var(--ok); }
.st-marker.st-arrived   .st-tab { background: var(--accent); }
.st-marker.st-cancelled .st-tab { background: var(--danger); }
.st-marker.st-waitlist  .st-tab { background: var(--alert); }
.st-marker.st-noshow    .st-tab { background: var(--warn); }
.st-marker .st-btn:hover { background: var(--bg-sunken); }

/* Status dropdown menu */
.st-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 150px;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.st-mi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-sm);
}
.st-mi:hover { background: var(--bg-sunken); }
.st-mi.is-current { background: var(--accent-soft); color: var(--accent); }
.st-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.st-dot.st-confirmed { background: var(--ok); }
.st-dot.st-arrived   { background: var(--accent); }
.st-dot.st-cancelled { background: var(--danger); }
.st-dot.st-waitlist  { background: var(--alert); }
.st-dot.st-noshow    { background: var(--warn); }

/* ============================================================
   LISA tip button + drawer
   ============================================================ */
.lisa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--lisa-soft);
  color: var(--lisa);
  border: 1px solid var(--lisa-edge);
  letter-spacing: 0.005em;
  transition: all 0.12s;
}
.lisa-btn:hover { background: var(--lisa); color: #fff; border-color: var(--lisa); }
.lisa-btn.is-open { background: var(--lisa); color: #fff; border-color: var(--lisa); }
.lisa-btn .lisa-mark { display: inline-flex; }
.lisa-count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.55);
  color: var(--lisa);
  border-radius: 999px;
  font-weight: 600;
}
.lisa-btn.is-open .lisa-count,
.lisa-btn:hover .lisa-count { background: rgba(255,255,255,0.25); color: #fff; }
.lisa-btn-ghost {
  background: transparent;
  border-color: transparent;
}

/* ── Lisa drawer ── */
.lisa-drawer {
  background: linear-gradient(to bottom, var(--lisa-soft), #faf7fc);
  border-bottom: 1px solid var(--lisa-edge);
  overflow: hidden;
  animation: slide-down 0.22s ease-out;
}
@keyframes slide-down {
  from { max-height: 0; opacity: 0; }
  to   { max-height: 600px; opacity: 1; }
}
.ld-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--lisa-edge);
  gap: 12px;  /* damit Avatar+Text nicht direkt am Close kleben */
}
/* min-width: 0 sorgt dafür dass die Text-Spalte schrumpfen kann statt zu
   overflowen wenn der Avatar als flex-Item daneben steht. */
.ld-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.ld-head-text { min-width: 0; }  /* gleicher Grund — Text darf truncaten */
.ld-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font-serif);
  letter-spacing: 0;
  flex-shrink: 0;  /* niemals schrumpfen — sonst wird das Bild gequetscht */
}
/* v0.9.14: Lisa-Bild-Variante des Avatars — gleiches Foto wie im Chat */
.ld-avatar--img {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;  /* sicherstellen dass nichts über die runde Maske ragt */
}
.ld-title { font-size: 13px; font-weight: 600; color: #3a2a52; line-height: 1.1; }
.ld-sub { font-size: 11px; color: var(--lisa); opacity: 0.75; margin-top: 1px; }
.ld-close {
  width: 24px; height: 24px;
  border: none; background: transparent;
  border-radius: var(--r-sm);
  color: var(--lisa);
  display: inline-flex; align-items: center; justify-content: center;
}
.ld-close:hover { background: rgba(106, 77, 140, 0.12); }

.ld-body { padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 10px; }

/* Variant: lines */
.ld-line {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}
.ld-line + .ld-line { border-top: 1px dashed var(--lisa-edge); }
.ld-line-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lisa); margin-top: 7px; flex-shrink: 0;
}
.ld-line-body { flex: 1; min-width: 0; }
.ld-line-head { font-size: 12.5px; font-weight: 600; color: #3a2a52; margin-bottom: 3px; }
.ld-line-detail { font-size: 12px; color: #5a4775; line-height: 1.45; }
.ld-line-actions { margin-top: 6px; }

/* Variant: cards */
.ld-card {
  background: #fff;
  border: 1px solid var(--lisa-edge);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: grid;
  /* v0.9.16: viz-Spalte 110→160px damit "HEUTE", "STAMMPLATZ" und längere
     Tisch-Namen ("Tisch 3") nicht abgeschnitten werden. Body rückt entsprechend
     nach rechts. */
  grid-template-columns: 160px 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(106, 77, 140, 0.06);
}
.ld-card-viz {
  background: var(--lisa-soft);
  border-radius: var(--r);
  padding: 10px;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px;
  /* v0.9.14: overflow + min-width verhindern dass das viz-Element in die
     Body-Spalte daneben hineinragt und Text überdeckt. Wichtig bei langen
     Tisch-Namen ("Großer Festtisch") in der Stammplatz-Visualisierung. */
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}
.viz-swap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lisa);
}
.viz-swap-box {
  display: flex; flex-direction: column; align-items: center;
  border: 1.5px dashed var(--lisa-edge);
  border-radius: var(--r-sm);
  padding: 4px 6px;
  background: rgba(255,255,255,0.5);
  min-width: 32px;
}
.viz-swap-box.to { border-style: solid; background: var(--lisa); color: #fff; }
.viz-swap-lbl { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.65; }
.viz-swap-tbl { font-family: var(--font-mono); font-size: 12px; font-weight: 600; margin-top: 1px; }
.viz-peak { width: 100%; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.viz-peak-bar { width: 80%; height: 8px; background: rgba(106,77,140,0.15); border-radius: 4px; overflow: hidden; }
.viz-peak-fill { width: 92%; height: 100%; background: var(--lisa); }
.viz-peak-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--lisa); font-weight: 600; }

.ld-card-body { min-width: 0; }
.ld-card-head { font-size: 12.5px; font-weight: 600; color: #3a2a52; margin-bottom: 4px; line-height: 1.3; }
.ld-card-detail { font-size: 11.5px; color: #5a4775; line-height: 1.45; }
.ld-card-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* v0.9.13: Kompakter Modus für Lisa-Tipps in der Reservierungs-Liste */
.ld-card--compact {
  padding: 8px 12px;
  gap: 10px;
}
.ld-card--compact .ld-card-head {
  font-size: 12px;
  margin-bottom: 1px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ld-card--compact .ld-card-detail {
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ld-card--compact .ld-card-actions {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.ld-card--compact .ld-act-mute {
  font-size: 10.5px;
}
.ld-card--compact .ld-card-viz {
  min-height: 38px;
  padding: 6px 10px;
}
/* v0.9.16: Boxes deutlich breiter damit Tisch-Namen + "HEUTE"/"STAMMPLATZ"
   reinpassen. white-space:nowrap verhindert Umbruch innerhalb der Box. */
.ld-card--compact .viz-swap-box {
  padding: 3px 8px;
  min-width: 52px;
  white-space: nowrap;
}
.ld-card--compact .viz-swap-lbl {
  font-size: 8px;
  letter-spacing: 0.05em;
}
.ld-card--compact .viz-swap-tbl {
  font-size: 11px;
  white-space: nowrap;
}
.ld-card--compact .viz-swap { gap: 6px; }
/* Wenn kein viz vorhanden ist: 2-Spalten-Grid statt 3 */
.ld-card--no-viz {
  grid-template-columns: 1fr auto;
}

/* Variant: chat */
.ld-chat { display: flex; }
.ld-chat-bubble {
  background: #fff;
  border: 1px solid var(--lisa-edge);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  max-width: 540px;
  box-shadow: 0 1px 2px rgba(106, 77, 140, 0.06);
}
.ld-chat-head { font-size: 12.5px; font-weight: 600; color: #3a2a52; margin-bottom: 4px; }
.ld-chat-body { font-size: 12px; color: #5a4775; line-height: 1.5; }
.ld-chat-actions { display: flex; gap: 6px; margin-top: 8px; }

.ld-act {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--lisa-edge);
  background: #fff;
  color: var(--lisa);
}
.ld-act:hover { background: var(--lisa-soft); }
.ld-act-primary {
  background: var(--lisa);
  color: #fff;
  border-color: var(--lisa);
}
.ld-act-primary:hover { background: var(--lisa-hi); }
.ld-act-mute {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--lisa);
  opacity: 0.65;
}
.ld-act-mute:hover { opacity: 1; }

/* ============================================================
   GUEST PROFILE DRAWER
   ============================================================ */
.gp-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 8, 0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 100;
  animation: fade-in-overlay 0.18s ease-out;
}
@keyframes fade-in-overlay { from { opacity: 0; } to { opacity: 1; } }
.gp-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 90vw;
  background: var(--panel);
  box-shadow: -12px 0 32px rgba(20, 16, 8, 0.12);
  z-index: 101;
  display: flex;
  flex-direction: column;
  animation: slide-in 0.24s cubic-bezier(.22,.61,.36,1);
}
@keyframes slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.gp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gp-close {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mid);
}
.gp-close:hover { background: var(--bg-sunken); color: var(--text); }
.gp-head-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.gp-head-actions { margin-left: auto; display: flex; gap: 4px; }
.gp-head-actions .btn-icon { font-size: 16px; line-height: 1; }

.gp-hero {
  display: flex;
  gap: 16px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.gp-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.gp-hero-body { min-width: 0; flex: 1; }
.gp-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.gp-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
}
.gp-meta { font-size: 12px; color: var(--text-mid); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.gp-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.gp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.gp-stat {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  position: relative;
}
.gp-stat:last-child { border-right: none; }
.gp-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 4px;
}
.gp-stat-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.gp-stat-sub { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.gp-stat-good .gp-stat-val { color: var(--ok); }
.gp-stat .sparkline {
  position: absolute;
  right: 12px;
  top: 36px;
  color: var(--accent);
  opacity: 0.7;
}

.gp-tabs {
  display: flex;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  flex-shrink: 0;
}
.gp-tab {
  border: none;
  background: transparent;
  padding: 12px 12px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  position: relative;
}
.gp-tab:hover { color: var(--text); }
.gp-tab.is-active { color: var(--text); }
.gp-tab.is-active::after {
  content: ""; position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.gp-body { flex: 1; overflow-y: auto; padding: 18px 24px 32px; }
.gp-overview { display: flex; flex-direction: column; gap: 22px; }
.gp-block-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}
.gp-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 14px;
  font-size: 12.5px;
}
.gp-dl dt { color: var(--text-dim); }
.gp-dl dd { color: var(--text); }

.gp-lisa-tip {
  display: flex; gap: 10px;
  background: var(--lisa-soft);
  border: 1px solid var(--lisa-edge);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #4a3568;
  line-height: 1.45;
}
.gp-lisa-tip svg { color: var(--lisa); flex-shrink: 0; margin-top: 4px; }

.gp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.gp-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.gp-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.gp-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.gp-table td.dim { color: var(--text-dim); }

.gp-note-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.gp-note-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.gp-note-text { font-size: 13px; line-height: 1.5; color: var(--text); margin-bottom: 4px; }
.gp-note-author { font-size: 11px; color: var(--text-dim); font-style: italic; }
.gp-note-add {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--border-hi);
  background: transparent;
  color: var(--text-mid);
  padding: 6px 12px;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 500;
}
.gp-note-add:hover { background: var(--bg-card); color: var(--text); border-style: solid; }

.gp-prefs { display: flex; flex-direction: column; gap: 1px; }
.gp-pref-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.gp-pref-label { color: var(--text-dim); }
.gp-pref-val { color: var(--text); font-weight: 500; }

/* ============================================================
   TISCHPLAN — Floor Plan
   ============================================================ */
.tp { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tp-content {
  padding: 18px 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.tp-view-switch {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2px;
  gap: 2px;
}
.tp-vs {
  border: none; background: transparent;
  padding: 6px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--text-mid);
  border-radius: var(--r-sm);
}
.tp-vs:hover { color: var(--text); }
.tp-vs.is-active { background: var(--accent); color: #fff; }

.tp-board {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: stretch;
}
.tp-floor {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.fp-wrap { position: relative; }
.fp-svg {
  width: 100%;
  /* Höhe an Viewport koppeln, damit Floor-Plan + Scrubber + Toolbars in
     einem Bildschirm passen und keine outer-Page-Scroll entsteht. */
  max-height: calc(100vh - 320px);
  height: auto;
  display: block;
  border-radius: var(--r);
}
.fp-table { cursor: pointer; }
.fp-table-rect {
  fill: var(--bg-card);
  stroke: var(--text-dim);
  stroke-width: 1.5;
  transition: fill 0.15s, stroke 0.15s;
}
.fp-table:hover .fp-table-rect {
  stroke: var(--text);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}
.fp-table.is-selected .fp-table-rect {
  stroke: var(--accent);
  stroke-width: 2.5;
}
.fp-table-free      { fill: var(--bg-card); stroke: var(--border-hi); }
.fp-table-confirmed { fill: var(--ok-soft); stroke: var(--ok); }
.fp-table-arrived   { fill: var(--accent-soft); stroke: var(--accent); }
.fp-table-waitlist  { fill: var(--alert-soft); stroke: var(--alert); }
.fp-table-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  fill: var(--text);
}
.fp-table-seats {
  font-size: 8px;
  fill: var(--text-dim);
  font-family: var(--font-sans);
}
.fp-table-pop {
  fill: var(--text);
}
.fp-table-pop-text {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  fill: #fff;
}
.fp-chair { fill: var(--border-hi); }
.fp-table:hover .fp-chair,
.fp-table.is-selected .fp-chair { fill: var(--text-mid); }

.fp-feature-label {
  font-size: 10px;
  fill: var(--text-mid);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.fp-feature-label-sm {
  font-size: 9px;
  fill: var(--text-dim);
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
}

/* Table detail panel */
.tp-side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.td { display: flex; flex-direction: column; flex: 1; }
.td-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}
.td-empty-glyph { color: var(--text-faint); }
.td-empty-text { font-size: 13px; color: var(--text-mid); }
.td-empty-hint { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.td-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.td-head-left { display: flex; align-items: center; gap: 12px; }
.td-id {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
}
.td-seats { font-size: 13px; font-weight: 600; }
.td-area { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.td-status {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.td-status-free { background: var(--ok-soft); color: var(--ok); }
.td-status-occupied { background: var(--accent-soft); color: var(--accent); }

.td-current, .td-day { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.td-current { background: var(--bg-card); }
.td-section-head {
  display: flex; justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}
.td-section-time { font-family: var(--font-mono); letter-spacing: 0; text-transform: none; color: var(--text-mid); }
.td-res-time { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-mid); }
.td-res-name { font-size: 14px; font-weight: 600; margin-top: 2px; }
.td-res-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-mid); margin-top: 4px; }
.td-res-notes { font-size: 12px; color: var(--text-mid); margin-top: 6px; line-height: 1.4; padding-top: 6px; border-top: 1px solid var(--border-soft); }

.td-day-row {
  display: flex; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.td-day-row:last-child { border-bottom: none; }
.td-day-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mid);
  width: 50px;
  flex-shrink: 0;
}
.td-day-name { font-size: 12.5px; font-weight: 500; }
.td-day-meta { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* Time scrubber */
.tp-timeline {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 24px 22px;
  box-shadow: var(--shadow-sm);
}
.ts-rail {
  position: relative;
  height: 64px;
}
.ts-track {
  position: absolute;
  left: 0; right: 0;
  bottom: 18px;
  height: 32px;
  border-bottom: 1px solid var(--border);
}
.ts-hour {
  position: absolute;
  bottom: 0;
  width: 36px;
  margin-left: -18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ts-hour-fill {
  width: 4px;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
}
.ts-hour-label {
  position: absolute;
  bottom: -16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.ts-input {
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.ts-thumb {
  position: absolute;
  top: 0;
  width: 2px;
  height: 50px;
  background: var(--accent);
  pointer-events: none;
  transform: translateX(-1px);
}
.ts-thumb::before {
  content: "";
  position: absolute;
  top: -3px; left: -4px;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--panel);
}
.ts-thumb-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ============================================================
   PLACEHOLDER VIEW
   ============================================================ */
.ph {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-mid);
}
.ph-glyph { color: var(--text-faint); }
.ph h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--text); }
.ph p { font-size: 13px; max-width: 360px; }

/* ============================================================
   TWEAKS PANEL ADDITIONS
   ============================================================ */
.twk-help {
  font-size: 10.5px;
  color: rgba(41, 38, 27, 0.6);
  line-height: 1.55;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.025);
  border-radius: 6px;
  margin-top: 2px;
}
.twk-help strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: rgba(41, 38, 27, 0.9);
  font-size: 10px;
}
.twk-pal-name {
  font-size: 11px;
  padding: 4px 8px;
  color: rgba(41, 38, 27, 0.7);
  margin-top: -4px;
}
.twk-pal-name .dim { color: rgba(41, 38, 27, 0.45); }

/* ============================================================
   HELPERS
   ============================================================ */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim  { color: var(--text-dim); }
.btn-sm.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   TP VIEW SWITCH — icons
   ============================================================ */
.tp-vs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tp-vs svg { opacity: 0.8; }
.tp-vs.is-active svg { opacity: 1; }

.tp-timeline-strip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 24px 22px;
  box-shadow: var(--shadow-sm);
}
.tp-timeline-strip .ts {
  margin: 0;
}
/* Make sure the time scrubber inside the strip looks right */
.ts { padding: 0; }

/* ============================================================
   GANTT VIEW
   ============================================================ */
.gantt {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gantt-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: 36px;
  position: relative;
}
.gantt-head-label {
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.gantt-head-time { position: relative; }
.gantt-hour {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
  transform: translateX(-50%);
}
.gantt-hour-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}

.gantt-body {
  position: relative;
}
.gantt-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--border-soft);
}
.gantt-row:last-child { border-bottom: none; }
.gantt-row-label {
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.gantt-row-id {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}
.gantt-row-seats {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  background: var(--bg-sunken);
  padding: 1px 5px;
  border-radius: 3px;
}
.gantt-row-lane {
  position: relative;
  height: 46px;
}
.gantt-grid-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border-soft);
}
.gantt-bar {
  position: absolute;
  top: 6px; bottom: 6px;
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  border-left: 3px solid var(--ok);
  border-radius: var(--r-sm);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.12s;
}
.gantt-bar:hover { filter: brightness(0.97); }
.gantt-bar-time {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10.5px;
  color: var(--text-mid);
}
.gantt-bar-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.gantt-bar-guests {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mid);
  flex-shrink: 0;
}
.gantt-bar-confirmed { background: var(--ok-soft);    border-color: var(--ok);     border-left-color: var(--ok); color: #1a3d22; }
.gantt-bar-arrived   { background: var(--accent-soft);border-color: var(--accent); border-left-color: var(--accent); color: var(--accent); }
.gantt-bar-waitlist  { background: var(--alert-soft); border-color: var(--alert);  border-left-color: var(--alert); color: #5a3d09; }

.gantt-now {
  position: absolute;
  top: -36px; /* extend above into header */
  bottom: 0;
  pointer-events: none;
}
.gantt-now-line {
  width: 2px;
  height: 100%;
  background: var(--danger);
  margin: 0 auto;
}
.gantt-now-lbl {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.gantt-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 14px;
}
.gantt-scrub {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-sunken);
  height: 4px;
  border-radius: 2px;
  outline: none;
}
.gantt-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--panel);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  cursor: pointer;
}
.gantt-scrub::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--panel);
}
.gantt-foot-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 50px;
}

/* ============================================================
   TIMELINE VIEW (chronological)
   ============================================================ */
.tlv {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tlv-head {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.tlv-head-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
}
.tlv-head-meta { font-size: 12px; color: var(--text-mid); }

.tlv-rail {
  padding: 18px 24px 14px;
  position: relative;
}
.tlv-rail::before {
  content: "";
  position: absolute;
  left: 74px; top: 14px; bottom: 14px;
  width: 1px;
  background: var(--border);
}
.tlv-evt {
  display: grid;
  grid-template-columns: 60px 16px 1fr;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 0;
  position: relative;
}
.tlv-evt-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.005em;
  padding-top: 1px;
  text-align: right;
}
.tlv-evt.is-past .tlv-evt-time { color: var(--text-faint); }
.tlv-evt.is-now .tlv-evt-time  { color: var(--danger); }
.tlv-evt-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--neutral);
  margin: 5px 0 0 3px;
  border: 2px solid var(--panel);
  position: relative;
  z-index: 1;
}
.tlv-evt.is-past .tlv-evt-dot { opacity: 0.5; }
.tlv-evt-start  .tlv-evt-dot { background: var(--ok); }
.tlv-evt-end    .tlv-evt-dot { background: var(--neutral); }
.tlv-evt-cancel .tlv-evt-dot { background: var(--danger); }
.tlv-evt.is-now .tlv-evt-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(163, 50, 42, 0.18);
}
.tlv-evt-body {
  padding: 0 0 0 6px;
  font-size: 13px;
}
.tlv-evt.is-past { opacity: 0.55; }
.tlv-evt-head {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 3px;
}
.tlv-evt-label { color: var(--text-mid); }
.tlv-evt-table { font-family: var(--font-mono); color: var(--text); letter-spacing: 0.01em; }
.tlv-evt-name { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tlv-evt-tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }

.tlv-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ============================================================
   WARTELISTE
   ============================================================ */
.wl-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.wl-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.wl-card-head {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  align-items: center;
}
.wl-time-main {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.wl-time-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 2px;
}
.wl-name {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  border-bottom: 1px solid transparent;
}
.wl-name:hover { border-color: var(--text-mid); }
.wl-info { font-size: 12.5px; color: var(--text-mid); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.wl-since {
  text-align: right;
  font-family: var(--font-mono);
}
.wl-since-lbl {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
}
.wl-since-val { font-size: 13px; color: var(--text-mid); margin-top: 2px; }

.wl-note {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-sunken);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-mid);
}
.wl-note svg { flex-shrink: 0; color: var(--text-dim); }

.wl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

/* v0.12.6 — "Gast wurde per SMS benachrichtigt" Hinweis */
.wl-notified {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
}

/* v0.12.5 — "Platz frei geworden" Hervorhebung */
.wl-card.is-freed {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px var(--ok), var(--shadow-sm);
}
.wl-freed-banner {
  display: flex; align-items: center; gap: 7px;
  margin: -4px 0 12px;
  padding: 7px 12px;
  background: var(--ok-soft);
  color: var(--ok);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}
.wl-freed-banner svg { flex-shrink: 0; }
.wl-freed-hint { color: var(--ok); font-weight: 600; }

/* v0.12.5 — Leer-Zustand */
.wl-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 56px 24px;
  color: var(--text-dim);
}
.wl-empty svg { color: var(--text-dim); opacity: 0.55; margin-bottom: 14px; }
.wl-empty-title { font-size: 15px; font-weight: 600; color: var(--text-mid); }
.wl-empty-sub { font-size: 12.5px; max-width: 360px; margin-top: 6px; line-height: 1.5; }

.lisa-suggest {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  background: var(--lisa-soft);
  border: 1px solid var(--lisa-edge);
  border-radius: var(--r-md);
}
.lisa-suggest-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  flex-shrink: 0;
}
.lisa-suggest-body {
  font-size: 12.5px;
  color: #3a2a52;
  line-height: 1.5;
}
.lisa-suggest-body strong { color: #2a1e3a; }
.lisa-suggest-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ============================================================
   WALK-INS
   ============================================================ */
.wi-quick {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.wi-quick-head {
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.wi-quick-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wi-quick-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}
.wi-quick-row label {
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 500;
}
.wi-quick-num { display: flex; gap: 4px; flex-wrap: wrap; }
.wi-num-btn {
  width: 36px; height: 32px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.wi-num-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wi-num-btn:hover:not(.is-active) { background: var(--bg-card); border-color: var(--border-hi); }
.wi-quick-tables { display: flex; gap: 6px; flex-wrap: wrap; }
.wi-tbl-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.1;
}
.wi-tbl-btn:hover { background: var(--ok-soft); border-color: var(--ok); }
.wi-tbl-btn span {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ok);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.wi-quick-input {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  outline: none;
}
.wi-quick-input:focus { border-color: var(--accent); background: var(--panel); }
.wi-quick-foot {
  display: flex; align-items: center; gap: 12px;
  padding-top: 6px;
}
.wi-quick-hint { font-size: 11.5px; color: var(--text-dim); }

.wi-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.wi-list-head {
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.wi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.wi-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  padding: 8px 18px;
  background: var(--bg-card);
}
.wi-table td {
  padding: 10px 18px;
  border-top: 1px solid var(--border-soft);
}

/* ============================================================
   GÄSTE
   ============================================================ */
.ga-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.ga-toolbar .search {
  min-width: 0;
}
.ga-table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ga-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ga-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.ga-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.ga-table tbody tr { cursor: pointer; transition: background 0.1s; }
.ga-table tbody tr:hover { background: var(--bg-card); }
.ga-name-cell { display: flex; align-items: center; gap: 12px; }
.ga-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.ga-name { font-weight: 500; font-size: 13.5px; }
.ga-tags { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* ============================================================
   TISCHE
   ============================================================ */
.ti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ti-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.ti-card.is-inactive { opacity: 0.6; }
.ti-card-head { display: flex; align-items: center; justify-content: space-between; }
.ti-id {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--r-sm);
}
.ti-seats-row {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-mid);
  font-size: 12px;
}
.ti-seats-row strong { font-family: var(--font-mono); font-size: 14px; color: var(--text); font-weight: 600; }
.ti-info { display: flex; flex-direction: column; gap: 2px; }
.ti-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-soft);
}
.ti-info-row:last-child { border-bottom: none; }
.ti-info-row span:first-child { color: var(--text-dim); }
.ti-info-row span:last-child { color: var(--text); font-weight: 500; }
.ti-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.ti-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-mid);
  cursor: pointer;
}
.ti-toggle input { accent-color: var(--accent); }

/* ============================================================
   STORNIERUNGEN
   ============================================================ */
.reason-pill {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--bg-sunken);
  color: var(--text-mid);
}
.reason-pill.is-noshow { background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.reason-pill.is-internal { background: var(--gold-soft); color: #6f5320; }

.storno-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   STATISTIKEN
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.chart-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px 18px;
  box-shadow: var(--shadow-sm);
}
.chart-card-head { margin-bottom: 14px; }
.chart-card-title { font-family: var(--font-serif); font-size: 15px; font-weight: 500; letter-spacing: -0.005em; }
.chart-card-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

.bar-chart {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  height: 180px;
  padding: 20px 0 4px;
}
.bc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bc-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  width: 100%;
  position: relative;
}
.bc-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: height 0.4s;
  min-height: 4px;
}
.bc-ok .bc-bar    { background: var(--accent); opacity: 0.55; }
.bc-high .bc-bar  { background: var(--accent); opacity: 0.85; }
.bc-peak .bc-bar  { background: var(--alert); }
.bc-bar-val {
  position: absolute;
  top: -18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-mid);
}
.bc-peak .bc-bar-val { color: var(--alert); }
.bc-lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
}
.donut-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  fill: var(--text);
}
.donut-lbl {
  font-size: 10px;
  fill: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-mid); }
.dl-row { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.dl-row strong { color: var(--text); font-weight: 600; font-family: var(--font-mono); }
.dl-sw { width: 10px; height: 10px; border-radius: 2px; }
.dl-trend { font-size: 11px; color: var(--accent); margin-top: 4px; font-weight: 500; }

.topguest-list { display: flex; flex-direction: column; gap: 2px; }
.tg-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.tg-row:last-child { border-bottom: none; }
.tg-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  border-radius: 50%;
}
.tg-name { font-weight: 500; }
.tg-meta { font-size: 11.5px; color: var(--text-mid); }
.tg-spend { font-weight: 600; color: var(--text); font-size: 12.5px; }

/* ============================================================
   STATISTIK-TAB (v0.9.0): 5-Col KPI-Grid, Donut-Mini-Insights,
   Vergleichs-Delta-Pillen, Walk-in-Section
   ============================================================ */
.stats--5col { grid-template-columns: repeat(5, 1fr); }

.donut-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.donut-insights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.di-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.di-label {
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
}
.di-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  font-size: 12.5px;
}

.stat-delta-up,
.stat-delta-down {
  font-size: 11.5px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.stat-delta-up   { color: var(--accent); }   /* grün — positiv */
.stat-delta-down { color: var(--alert); }    /* rot — negativ */

.stats-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.stats-section-head {
  margin-bottom: 16px;
}
.stats-section-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.stats-section-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================================
   STATISTIK-TAB v0.9.1: Sub-Tabs, Heatmap, BucketChart,
   TableUtilizationList, TopwordsList, weitere Grid-Varianten
   ============================================================ */

/* Vergleichs-Modus Toggle (v0.9.3) — Vorperiode | Vorjahr.
   Padding so gewählt, dass die Außen-Höhe exakt der von .btn-sm entspricht
   (1px Border + 4px Padding + Text + 4px Padding + 1px Border). */
.compare-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-sunken);
}
.compare-btn {
  background: transparent;
  border: none;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  transition: background 120ms, color 120ms;
}
.compare-btn:hover {
  color: var(--text);
}
.compare-btn.is-active {
  background: var(--accent);
  color: white;
}

/* Action-Bar in der Statistik-Topbar in 3 logische Gruppen geteilt
   (v0.9.4 Fix): Vergleichs-Toggle | Zeitraum-Buttons | Export+Bericht.
   Innerhalb einer Gruppe: gap 6px (wie gewohnt). Zwischen Gruppen: gap 22px. */
.rv-section-actions.with-groups {
  gap: 22px;
  align-items: center;
}
.action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.stats-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  transition: color 120ms, border-color 120ms;
  margin-bottom: -1px;
}
.stats-tab:hover {
  color: var(--text);
}
.stats-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Grid-Varianten für unterschiedliche KPI-Card-Anzahlen */
.stats--3col { grid-template-columns: repeat(3, 1fr); }
.stats--4col { grid-template-columns: repeat(4, 1fr); }

/* Chart-Card-Wide nimmt 2 Spalten ein (für breite Inhalte wie Heatmap, Top-Gäste-Liste) */
.chart-card--wide { grid-column: span 2; }

/* ──── BucketChart ──── */
.bucket-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.bucket-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  align-items: center;
  gap: 12px;
}
.bucket-label {
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 500;
}
.bucket-bar {
  height: 14px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.bucket-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 200ms ease-out;
}
.bucket-bar-fill--alert {
  background: var(--alert);
}
.bucket-val {
  font-size: 12px;
  color: var(--text);
  text-align: right;
  font-weight: 500;
}

/* ──── Heatmap ──── */
.heatmap-wrap {
  display: flex;
  gap: 28px;
  padding: 8px 0;
  align-items: flex-start;
  justify-content: center;
}
.heatmap {
  display: grid;
  gap: 3px;
  flex-shrink: 0;
}
.heatmap-corner { /* leere Ecke oben links */ }
.heatmap-h-label,
.heatmap-wd-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  align-self: center;
  font-family: var(--font-mono);
}
.heatmap-wd-label {
  padding-right: 6px;
  text-align: right;
}
.heatmap-cell {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: transform 100ms;
}
.heatmap-cell:hover {
  transform: scale(1.1);
  outline: 1.5px solid var(--accent);
  outline-offset: 0;
  z-index: 1;
}

/* Heatmap-Legende rechts daneben */
.heatmap-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 22px;  /* visuell ausrichten mit erster Cell-Reihe (Header-Höhe) */
}
.heatmap-legend-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 4px;
}
.heatmap-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.heatmap-legend-sw {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}
.heatmap-legend-lbl {
  font-size: 11px;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}

/* ──── TableUtilizationList ──── */
.table-util-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}
.table-util-row {
  display: grid;
  grid-template-columns: 100px 1fr 140px;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.table-util-row:last-child { border-bottom: none; }
.table-util-name {
  font-weight: 500;
  color: var(--text);
}
.table-util-bar {
  height: 18px;
  background: var(--bg-sunken);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.table-util-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 220ms ease-out;
}
.table-util-pct {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  z-index: 1;
  mix-blend-mode: difference;
  color: white;
}
.table-util-meta {
  text-align: right;
  font-size: 11.5px;
}

/* ──── TopwordsList (Tag-Cloud) ──── */
.topwords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  align-items: baseline;
}
.topword-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-sunken);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* ============================================================
   EINSTELLUNGEN
   ============================================================ */
.set-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 480px;
}
.set-nav {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  display: flex; flex-direction: column;
}
.set-nav-item {
  border: none; background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 500;
}
.set-nav-item:hover { background: var(--bg-sunken); color: var(--text); }
.set-nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.set-panel { padding: 24px 28px 32px; min-width: 0; }
.set-placeholder { color: var(--text-dim); padding: 32px; text-align: center; }

/* Dezenter Brand-Footer-Link in Settings — fühlt sich nicht wie ein "Hauptbutton" an */
.set-footer { margin-top: 28px; text-align: right; }
.set-about-link {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 4px;
  transition: color 0.15s;
}
.set-about-link:hover { color: var(--accent); }

.set-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.set-h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.set-row { display: flex; flex-direction: column; gap: 5px; }
.set-row label { font-size: 11.5px; color: var(--text-mid); font-weight: 500; }
.set-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.set-input {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.set-input:focus { border-color: var(--accent); background: var(--panel); }
.set-input.mono { font-family: var(--font-mono); }
.set-check { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-mid); }
.set-check input { accent-color: var(--accent); }

.set-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

.set-toggle-list { display: flex; flex-direction: column; }
.set-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.set-toggle-row:last-child { border-bottom: none; }
.set-toggle-row > span {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px;
  color: var(--text);
}
.set-toggle-row strong { font-weight: 500; }
.set-toggle-row small { font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.set-toggle-row input { accent-color: var(--accent); transform: scale(1.2); flex-shrink: 0; }

.set-callout {
  background: var(--accent-soft);
  border: 1px solid rgba(58,90,42,0.18);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 12px;
  color: #2a3d1c;
  line-height: 1.5;
}
.set-callout strong { color: var(--accent); }
.set-callout a { color: var(--accent); font-weight: 500; }

/* v0.14.0 Wartungsmodus-Block — hebt sich leicht ab, wenn aktiv (warmes Amber) */
.set-maint {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2px 14px;
  background: var(--bg-card);
  transition: border-color .15s ease, background .15s ease;
}
.set-maint.is-on {
  border-color: rgba(180,120,30,0.45);
  background: rgba(214,158,46,0.08);
}
.set-maint .set-toggle-row { border-bottom: none; }
.set-maint-note {
  font-size: 11.5px;
  color: #8a5a12;
  font-weight: 500;
  padding: 0 0 12px;
}

/* v0.14.0 „Änderung anfragen" — read-only Settings, Änderung läuft per Mail an Support */
.set-changereq {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.set-changereq-label { font-size: 11.5px; color: var(--text-mid); font-weight: 500; }

/* v0.14.0 Test-Benachrichtigung */
.set-test {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.set-test-head { display: flex; flex-direction: column; gap: 3px; }
.set-test-head strong { font-size: 13px; font-weight: 500; }
.set-test-head small { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.set-test-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.set-test-status { font-size: 11.5px; }

.hours-grid { display: flex; flex-direction: column; }
.hours-row {
  display: grid;
  grid-template-columns: 110px 90px 24px 90px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.hours-row:last-child { border-bottom: none; }
.hours-day { font-size: 13px; font-weight: 500; }
.hours-row .set-input { padding: 5px 8px; }

.lisa-hero {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--lisa-soft);
  border: 1px solid var(--lisa-edge);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.lisa-hero-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}
.lisa-hero-title { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: #2a1e3a; }
.lisa-hero-sub { font-size: 12px; color: #5a4775; line-height: 1.5; }

.set-bigtoggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  cursor: pointer;
}
.set-bigtoggle input { opacity: 0; width: 0; height: 0; }
.set-bigtoggle span {
  position: absolute; inset: 0;
  background: var(--border-hi);
  border-radius: 12px;
  transition: background 0.15s;
}
.set-bigtoggle span::before {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.set-bigtoggle input:checked + span { background: var(--lisa); }
.set-bigtoggle input:checked + span::before { transform: translateX(20px); }

.set-code {
  background: var(--sb-bg);
  color: #d5d3cc;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  line-height: 1.5;
  overflow-x: auto;
}

/* ============================================================
   AI CHAT (floating Lisa)
   ============================================================ */
.ai-fab {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--sb-bg);
  color: #fff;
  border: 1px solid var(--sb-border);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(20, 16, 8, 0.18), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.12s, box-shadow 0.12s;
}
.ai-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(20, 16, 8, 0.22);
}
.ai-fab-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14px;
}
.ai-fab-pulse {
  position: absolute;
  top: 10px; right: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 var(--gold);
  animation: tr-pulse 2.2s ease-out infinite;
}

.ai-chat {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 200;
  width: 380px;
  max-height: calc(100vh - 36px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 48px rgba(20, 16, 8, 0.22), 0 1px 0 rgba(255,255,255,0.6) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ai-in 0.18s ease-out;
}
@keyframes ai-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--sb-bg);
  color: #fff;
}
.ai-head-left { display: flex; align-items: center; gap: 10px; }
.ai-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
}
.ai-name { font-size: 13px; font-weight: 600; }
.ai-sub {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px;
  color: #a8aba8;
}
.ai-online {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6ed074;
  display: inline-block;
}
.ai-head-actions {
  display: flex;
  gap: 6px;
}
.ai-head-btn {
  width: 28px; height: 28px;
  border: none;
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-sm);
  color: #cbd0d6;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.ai-head-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ai-head-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.ai-close { /* backward-compat — alte Klasse, jetzt Alias für ai-head-btn */ }

/* Status-Dot beim "Lisa denkt..." soll subtil gelb-pulsierend sein statt grün */
.ai-online--thinking {
  background: var(--gold) !important;
  animation: ai-online-pulse 1.2s ease-in-out infinite;
}
@keyframes ai-online-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* Lisa-Avatar als rundes Bild — gleiche Lisa.png wie im Gast-Chatbot */
.ai-lisa-img {
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--lisa); /* Fallback bevor Bild geladen */
}
.ai-lisa-img--sm {
  width: 28px; height: 28px;
}
.ai-lisa-img--md {
  width: 36px; height: 36px;
  border: 2px solid rgba(255,255,255,0.1);
}

.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 420px;
  background: var(--bg);
}

.ai-msg {
  display: flex; gap: 8px;
  align-items: flex-end;
  max-width: 95%;
}
.ai-msg-assistant { align-self: flex-start; }
.ai-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lisa);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 11px;
  flex-shrink: 0;
}
.ai-msg-bubble {
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 280px;
  word-wrap: break-word;
}
.ai-msg-assistant .ai-msg-bubble {
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.ai-msg-user .ai-msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg-typing {
  display: inline-flex; gap: 4px;
  align-items: center;
}
.ai-msg-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: ai-bounce 1.2s ease-in-out infinite;
}
.ai-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* Sanftes Fade-In für neue Chat-Nachrichten — wirkt natürlicher beim Streaming */
.ai-msg-fadein {
  animation: ai-msg-in 0.22s ease-out;
}
@keyframes ai-msg-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ai-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
}
.ai-suggest-chip {
  font-size: 11.5px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 4px 9px;
  border-radius: 999px;
  transition: all 0.12s;
}
.ai-suggest-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.ai-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.ai-input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.ai-input:focus { border-color: var(--accent); background: var(--panel); }
.ai-send {
  width: 32px; height: 32px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-send:hover:not(:disabled) { background: var(--accent-hi); }
.ai-send:disabled { background: var(--border-hi); cursor: not-allowed; }
.ai-foot {
  font-size: 10px;
  color: var(--text-faint);
  padding: 6px 14px 10px;
  background: var(--panel);
  line-height: 1.4;
}
.ai-foot-usage {
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.ai-foot-sep { opacity: 0.5; }

/* v0.9.7: Soft-Limit-Banner über dem Input — zeigt Nutzung wenn nahe oder über Limit */
.ai-limit-banner {
  padding: 8px 14px;
  font-size: 11px;
  background: rgba(180, 140, 40, 0.12);
  color: var(--text);
  border-top: 1px solid rgba(180, 140, 40, 0.3);
  line-height: 1.4;
}
.ai-limit-banner--over {
  background: rgba(180, 60, 40, 0.14);
  border-top-color: rgba(180, 60, 40, 0.4);
}
.ai-limit-banner strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   PASSWORD GATE (Verwaltung)
   ============================================================ */
.pwgate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(800px 400px at 50% 30%, rgba(58, 90, 42, 0.04), transparent),
    var(--bg);
}
.pwgate-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 36px 28px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(40, 32, 18, 0.08);
}
.pwgate-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.pwgate-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 4px;
}
.pwgate-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}
.pwgate-sub {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 22px;
}
.pwgate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.pwgate-input {
  border: 1px solid var(--border-hi);
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.pwgate-input:focus {
  border-color: var(--accent);
  background: var(--panel);
}
.pwgate-input.is-err {
  border-color: var(--danger);
  background: var(--danger-soft);
  animation: pw-shake 0.4s ease-out;
}
@keyframes pw-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}
.pwgate-err {
  font-size: 12px;
  color: var(--danger);
  text-align: center;
}
.pwgate-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.pwgate-actions .btn { flex: 1; justify-content: center; }
.pwgate-actions .btn-primary { flex: 1; justify-content: center; }
.pwgate-hint {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}
.pwgate-hint code {
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-host {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
/* Im Demo-Modus rutscht der Toast unter den 44px-hohen Banner — sonst überlappen sie */
body:has(.demo-banner) .toast-host { top: 60px; }
@media (max-width: 720px) {
  body:has(.demo-banner) .toast-host { top: 92px; }   /* Banner ist auf Mobile höher */
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #1a1f24;
  color: #f0eee8;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.22);
  animation: toast-in 0.22s cubic-bezier(.22, .61, .36, 1);
  pointer-events: auto;
  max-width: 540px;
}
@keyframes toast-in {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.toast-success .toast-icon {
  background: rgba(110, 208, 116, 0.22);
  color: #6ed074;
}
.toast-text { line-height: 1.4; }

/* ============================================================
   INFO BANNER (auf View-Ebene)
   ============================================================ */
.info-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  background: var(--gold-soft);
  border: 1px solid rgba(184, 146, 78, 0.25);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #5a4520;
  line-height: 1.5;
}
.info-banner strong { color: #3d2e15; display: block; margin-bottom: 2px; }
.info-banner-ic {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.info-banner-soft {
  background: var(--accent-soft);
  border-color: rgba(58, 90, 42, 0.2);
  color: #2a3d1c;
}
.info-banner-soft strong { color: var(--accent); }
.info-banner-soft .info-banner-ic { background: var(--accent); }
/* Warn-Variante — z.B. wenn echte Daten nicht geladen werden konnten */
.info-banner-warn {
  background: rgba(176, 58, 46, 0.07);
  border-color: rgba(176, 58, 46, 0.28);
  color: #7d2b22;
}
.info-banner-warn strong { color: #b03a2e; }
.info-banner-warn .info-banner-ic { background: #b03a2e; }

/* ============================================================
   MODAL (Änderungsanfrage etc.)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 8, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 150;
  animation: fade-in-overlay 0.18s ease-out;
}
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 48px rgba(20, 16, 8, 0.22);
  z-index: 151;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  animation: modal-in 0.18s cubic-bezier(.22,.61,.36,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.modal-close {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-sunken); color: var(--text); }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-hint {
  background: var(--gold-soft);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #5a4520;
  line-height: 1.5;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* ============================================================
   TI-TABLE (new Tische view)
   ============================================================ */
.ti-table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ti-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ti-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.ti-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.ti-table tbody tr:hover { background: var(--bg-card); }
.ti-row-id {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-sunken);
  padding: 3px 9px;
  border-radius: var(--r-sm);
  color: var(--text);
}
.ti-today-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.ti-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.ti-status-pill.is-on { background: var(--ok-soft); color: var(--ok); }
.ti-status-pill.is-off { background: var(--bg-sunken); color: var(--text-dim); }
.ti-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 50px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.empty-state-glyph { color: var(--accent); opacity: 0.5; margin-bottom: 4px; }
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.empty-state-sub {
  font-size: 12.5px;
  color: var(--text-mid);
  max-width: 360px;
  line-height: 1.5;
}
.empty-state-action { margin-top: 14px; }

/* Fehler-Zustand: gleiche Struktur wie .empty-state, aber warmer Alarm-Ton */
.error-state { border-color: rgba(176, 58, 46, 0.28); }
.error-glyph { color: #b03a2e; opacity: 0.75; }

/* Lade-Skelett (Shimmer). Nutzt CSS-Variablen → funktioniert auch im Dark Mode. */
@keyframes skel-shimmer {
  0%   { background-position: -360px 0; }
  100% { background-position: 360px 0; }
}
.skel-line, .skel-dot {
  background: var(--border-soft, #efece4);
  background-image: linear-gradient(90deg, transparent 0, rgba(255,255,255,0.55) 50%, transparent 100%);
  background-size: 360px 100%;
  background-repeat: no-repeat;
  animation: skel-shimmer 1.3s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skel-list { display: flex; flex-direction: column; gap: 2px; }
.skel-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.skel-dot { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.skel-line { height: 12px; flex: 1; }
.skel-line.skel-sm { height: 10px; width: 45%; flex: none; }
.skel-line.skel-lg { height: 22px; width: 75%; flex: none; margin-top: 10px; }
.skel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.skel-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel);
  padding: 16px;
}

/* ============================================================
   CONSENT BADGE (Gast-Profil DSGVO)
   ============================================================ */
.consent-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.consent-badge.is-yes { background: var(--ok-soft); color: var(--ok); }
.consent-badge.is-no  { background: var(--bg-sunken); color: var(--text-dim); }

/* ============================================================
   GP CUSTOMER NUMBER (in head)
   ============================================================ */
.gp-head-customer {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
}
.gp-customer-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  font-family: var(--font-sans);
}
.gp-customer-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.gp-block-text {
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.55;
}
.gp-stat-val-sm { font-size: 13px; font-weight: 500; }
.gp-stat-warn .gp-stat-val { color: var(--warn); }

/* ============================================================
   GA TABLE — Kundennummer-Spalte
   ============================================================ */
.ga-col-nr { width: 60px; }
.ga-nr {
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ============================================================
   ============================================================
   OVERRIDES + NEW STYLES (Iteration v3)
   ============================================================
   ============================================================ */

/* ── Time-Rail 50px Override ────────────────────────────────────────────── */
.tr {
  width: 50px;
  padding: 14px 4px 12px 8px;
}
.tr-time-wrap {
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.tr-time {
  font-size: 12.5px;
}
.tr-now-dot {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Circle tip button (replaces text "Tipp" pill) */
.tr-tip-circle {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--lisa-soft);
  color: var(--lisa);
  border: 1px solid var(--lisa-edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  cursor: pointer;
  flex-shrink: 0;
}
.tr-tip-circle:hover,
.tr-tip-circle.is-open { background: var(--lisa); color: #fff; border-color: var(--lisa); }
.tr-tip-count-bubble {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  min-width: 14px;
  text-align: center;
  border: 1.5px solid var(--bg-card);
  line-height: 1.55;
}

/* ── Reservation Row — new layout with phone column + chev ───────────────── */
.rr {
  grid-template-columns: 3px 24px 62px minmax(140px, 1.4fr) 116px 36px 50px minmax(80px, 1fr) auto 14px;
  gap: 12px;
  padding-right: 14px;
  cursor: pointer;
}
.rr-phone {
  font-size: 11.5px;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rr-name-text { cursor: pointer; }
.rr-chev {
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, color 0.12s;
}
.rr:hover .rr-chev { color: var(--text-mid); transform: translateX(2px); }

/* Make notes slim — single line, dim */
.rr-notes {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  min-width: 0;
  overflow: hidden;
}
.rr-tags-inline {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.rr-notes-text {
  display: block;
  -webkit-line-clamp: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dim);
  min-width: 0;
}

/* Compact note-dot — icon only with hover-tooltip */
.note-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 10px;
  cursor: help;
}
.note-dot.note-guest { background: var(--gold-soft); color: #6f5320; }
.note-dot.note-admin { background: var(--accent-soft); color: var(--accent); }

/* Scrollable timeline */
.timeline-scroll {
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
}
.timeline-scroll::-webkit-scrollbar { width: 8px; }
.timeline-scroll::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.timeline-scroll::-webkit-scrollbar-track { background: transparent; }

.rv-sub-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.rv-sub-link:hover { text-decoration: underline; }

/* ============================================================
   RESERVATION DETAIL DRAWER
   ============================================================ */
.rd-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 8, 0.22);
  backdrop-filter: blur(2px);
  z-index: 110;
  animation: fade-in-overlay 0.16s ease-out;
}
.rd-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 92vw;
  background: var(--panel);
  box-shadow: -12px 0 32px rgba(20, 16, 8, 0.14);
  z-index: 111;
  display: flex;
  flex-direction: column;
  animation: slide-in 0.22s cubic-bezier(.22,.61,.36,1);
}
.rd-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rd-close {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mid);
}
.rd-close:hover { background: var(--bg-sunken); color: var(--text); }
.rd-head-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.rd-head-id {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.rd-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.rd-time-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 4px;
  text-align: center;
}
.rd-time-main {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}
.rd-time-end {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.rd-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rd-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.rd-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mid);
  flex-wrap: wrap;
}
.rd-meta .src-ic {
  width: 18px; height: 18px;
  background: transparent;
  border: none;
}

.rd-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.rd-status-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}

.rd-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rd-block-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 8px;
}
.rd-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rd-notes {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.rd-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  font-size: 12.5px;
}
.rd-link:hover { text-decoration: underline; }
.rd-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.rd-actions .btn-sm { display: inline-flex; gap: 6px; }
.rd-danger {
  color: var(--danger);
  border-color: var(--danger-soft);
}
.rd-danger:hover { background: var(--danger-soft); }

/* ============================================================
   MODAL — Form sections, num steppers, table grid, tag quickadd
   ============================================================ */
.modal-wide { width: 600px; }

.form-section {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.form-toggle { padding: 6px 0; border-bottom: none; }
.form-hint {
  font-size: 11.5px;
  color: var(--text-mid);
  padding: 4px 8px;
  background: var(--lisa-soft);
  border-radius: var(--r-sm);
  line-height: 1.5;
}

/* Number stepper */
.num-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.num-btn {
  width: 34px; height: 32px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.1s;
}
.num-btn:hover:not(.is-active) { background: var(--bg-card); border-color: var(--border-hi); }
.num-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.num-more {
  width: 56px; height: 32px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--r-sm);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  outline: none;
}

/* Table grid (Tisch-Auswahl) */
.tbl-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tbl-opt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.1s;
  min-width: 52px;
}
.tbl-opt:hover:not(.is-active) { background: var(--bg-card); border-color: var(--border-hi); }
.tbl-opt.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tbl-opt.is-active.is-block {
  background: var(--danger);
  border-color: var(--danger);
}
.tbl-opt-free .tbl-opt-status {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  color: var(--ok);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}
.tbl-opt-free.is-active .tbl-opt-status { color: rgba(255,255,255,0.7); }

/* Tag quick-add */
.tag-quickadd {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tag-quick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-soft);
  border: 1px solid transparent;
  color: #6f5320;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.1s;
}
.tag-quick:hover {
  background: var(--gold);
  color: #fff;
}

.block-row {
  display: grid;
  grid-template-columns: 50px 110px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 12.5px;
}
.block-row:last-child { border-bottom: none; }

/* ============================================================
   GANTT VERTICAL — X = Tische, Y = Uhrzeiten
   ============================================================ */
.gantt-v {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
.gantt-v-shell {
  display: grid;
  grid-template-rows: 44px 1fr;
  min-width: max-content;
}
.gv-head {
  display: grid;
  grid-template-columns: var(--time-col) repeat(var(--col-count), minmax(110px, 1fr));
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 2;
}
.gv-head-corner {
  border-right: 1px solid var(--border);
}
.gv-head-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  border-right: 1px solid var(--border);
  gap: 1px;
}
.gv-head-cell:last-child { border-right: none; }
.gv-head-id {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.gv-head-seats {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.gv-body {
  display: grid;
  grid-template-columns: var(--time-col) repeat(var(--col-count), minmax(110px, 1fr));
  position: relative;
}
.gv-time-col {
  border-right: 1px solid var(--border);
  background: var(--bg-card);
}
.gv-time-cell {
  border-bottom: 1px dashed transparent;
  position: relative;
  padding-right: 8px;
}
.gv-time-cell.is-hour {
  border-bottom: 1px solid var(--border);
}
.gv-time-lbl {
  position: absolute;
  top: -7px;
  right: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  background: var(--bg-card);
  padding: 0 4px;
  font-weight: 500;
}
.gv-lane {
  position: relative;
  border-right: 1px solid var(--border-soft);
}
.gv-lane:last-child { border-right: none; }
.gv-lane-cell {
  border-bottom: 1px dashed transparent;
}
.gv-lane-cell.is-hour {
  border-bottom: 1px solid var(--border-soft);
}
.gv-bar {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  border-top: 3px solid var(--ok);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 11px;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.12s;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gv-bar:hover { filter: brightness(0.97); }
.gv-bar-time {
  font-weight: 600;
  font-size: 10.5px;
  color: var(--text-mid);
}
.gv-bar-name {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gv-bar-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mid);
}
.gv-bar-confirmed { background: var(--ok-soft);    border-color: var(--ok);     border-top-color: var(--ok); }
.gv-bar-arrived   { background: var(--accent-soft);border-color: var(--accent); border-top-color: var(--accent); color: var(--accent); }
.gv-bar-waitlist  { background: var(--alert-soft); border-color: var(--alert);  border-top-color: var(--alert); }

.gv-now {
  position: absolute;
  left: var(--time-col); right: 0;
  height: 2px;
  background: var(--danger);
  pointer-events: none;
  z-index: 3;
}
.gv-now-lbl {
  position: absolute;
  top: -8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ============================================================
   TIME SCRUBBER (Floor-Plan) — Live indicator
   ============================================================ */
.ts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ts-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
}
.ts-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.ts-status.is-live .ts-status-dot {
  animation: tr-pulse 2.2s ease-out infinite;
  background: var(--accent);
}
.ts-status.is-scrubbing { color: var(--gold); }
.ts-status.is-scrubbing .ts-status-dot { background: var(--gold); }

.ts-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.ts-live-btn:hover {
  background: var(--accent);
  color: #fff;
}

.ts-now-marker {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.45;
  pointer-events: none;
}

/* ============================================================
   ACTIVITY LOG OVERLAY
   ============================================================ */
.al-drawer { width: 480px; }
.al-live-dot {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ok);
}
.al-live-dot span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: tr-pulse 2s ease-out infinite;
}
.al-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.al-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}
.al-row {
  display: grid;
  grid-template-columns: 70px 24px 1fr;
  gap: 10px;
  padding: 10px 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.1s;
}
.al-row:hover { background: var(--bg-card); }
.al-when {
  font-size: 11.5px;
  color: var(--text-mid);
  padding-top: 2px;
  text-align: right;
  font-weight: 500;
}
.al-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  flex-shrink: 0;
}
.al-arrive .al-dot { background: var(--accent-soft); color: var(--accent); }
.al-cancel .al-dot { background: var(--danger-soft); color: var(--danger); }
.al-book   .al-dot { background: var(--gold-soft); color: #6f5320; }
.al-edit   .al-dot { background: var(--bg-sunken); color: var(--text-mid); }
.al-walkin .al-dot { background: var(--lisa-soft); color: var(--lisa); }
.al-block  .al-dot { background: #fad7d2; color: #8a3a2f; }
.al-body { min-width: 0; }
.al-text { font-size: 13px; font-weight: 500; line-height: 1.3; }
.al-detail { font-size: 11.5px; color: var(--text-mid); margin-top: 2px; line-height: 1.4; }
.al-actor { font-size: 11px; color: var(--text-dim); margin-top: 3px; font-style: italic; }

/* ============================================================
   WALK-IN PROGRESS BAR
   ============================================================ */
.wi-progress {
  width: 80px;
  height: 3px;
  background: var(--bg-sunken);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.wi-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

/* ============================================================
   CUSTOM RANGE POPOVER (Statistiken)
   ============================================================ */
.period-custom { position: relative; }
.cr-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.14);
  padding: 14px;
  z-index: 50;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cr-pop-head {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}
.cr-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.cr-preset {
  font-size: 11.5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  color: var(--text-mid);
}
.cr-preset:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-foot { display: flex; justify-content: flex-end; gap: 6px; }

/* ============================================================
   SETTINGS — new sections
   ============================================================ */
.set-intro {
  font-size: 12.5px;
  color: var(--text-mid);
  margin-top: -4px;
  margin-bottom: 8px;
}
.set-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.set-input-sm { padding: 4px 8px; font-size: 12px; }

.multi-target {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.multi-target label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-mid);
  cursor: pointer;
}
.multi-target input { accent-color: var(--accent); }

.team-list { display: flex; flex-direction: column; }
.team-row {
  display: grid;
  grid-template-columns: 36px 1fr 200px 100px 28px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.team-row:last-child { border-bottom: none; }
.team-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 13px;
}
.team-name { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.team-you-badge {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.team-email { font-size: 11.5px; }
.team-role select { width: 100%; }
.team-meta { font-size: 11.5px; text-align: right; }

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.role-card-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.role-card-text { font-size: 11.5px; color: var(--text-mid); line-height: 1.5; }

.plan-card {
  background: var(--accent-soft);
  border: 1px solid rgba(58, 90, 42, 0.2);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.plan-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
}
.plan-sub { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.plan-status {
  background: var(--ok);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.plan-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin: 12px 0;
}
.plan-feat {
  font-size: 12px;
  color: var(--text);
}
.plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(58, 90, 42, 0.2);
  font-size: 12px;
}

.dsgvo-list { display: flex; flex-direction: column; }
.dsgvo-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.dsgvo-row:last-child { border-bottom: none; }
.dsgvo-name { font-weight: 500; }
.dsgvo-meta { font-size: 11.5px; color: var(--text-dim); }
.dsgvo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dsgvo-officer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.dsgvo-officer-name { font-weight: 500; font-size: 13px; }
.dsgvo-officer-contact { font-size: 11.5px; color: var(--text-mid); margin-top: 2px; }


/* ============================================================
   ITERATION v4 — Compact stats, guest search, calendar, fixes
   ============================================================ */

/* ── Stats: compact 50px row, label + value + delta inline ───────────────── */
.stat-compact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
}
.stat-compact .stat-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0;
  min-width: 110px;
  flex-shrink: 0;
}
.stat-compact .stat-val {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.stat-compact .stat-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1;
}
.stat-compact .stat-unit {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-weight: 500;
}
.stat-delta-inline {
  font-size: 11px;
  color: var(--text-mid);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-alert .stat-num { color: var(--alert); }
.stat-warn  .stat-num { color: var(--warn); }

/* ── Timeline fills viewport height ──────────────────────────────────────── */
.timeline-fill {
  height: calc(100vh - 240px);
  min-height: 360px;
}

/* ── Center tip-circle in 50px rail ──────────────────────────────────────── */
.tr {
  align-items: center;
  padding-left: 6px;
  padding-right: 6px;
}
.tr-time-wrap {
  align-self: center;
}
.tr-tip-circle {
  align-self: center;
}

/* ── Activity log: single dot, fixed layout ──────────────────────────────── */
.al-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ok);
}
.al-live-dot > span:first-child,
.al-live-dot .al-live-dot-inner {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  animation: none;
  box-shadow: none;
}
.al-live-dot-label {
  display: inline-block;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  animation: none !important;
  box-shadow: none !important;
  color: var(--ok);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
}

/* ── Gantt: sticky time column when scrolling horizontally ───────────────── */
.gv-time-col {
  position: sticky;
  left: 0;
  z-index: 2;
}
.gv-time-lbl {
  background: var(--bg-card);
}
.gv-head-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-card);
}

/* ============================================================
   GUEST SEARCH FIELD (in NewReservation + WaitlistAdd)
   ============================================================ */
.set-row-3 {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 12px;
}
.gs-wrap {
  position: relative;
}
.gs-matched {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 12px;
  background: var(--ok-soft);
  border: 1px solid rgba(47, 125, 63, 0.2);
  border-radius: 999px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 500;
}
.gs-matched strong { font-family: var(--font-mono); color: var(--ok); }
.gs-clear {
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 11px;
  color: var(--text-mid);
  text-decoration: underline;
  cursor: pointer;
}
.gs-clear:hover { color: var(--text); }

.gs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.14);
  z-index: 60;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.gs-dropdown-head {
  padding: 8px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.gs-match {
  display: grid;
  grid-template-columns: 56px 1fr 16px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.1s;
}
.gs-match:last-child { border-bottom: none; }
.gs-match:hover { background: var(--accent-soft); }
.gs-match-nr {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-align: center;
}
.gs-match:hover .gs-match-nr { background: var(--accent); color: #fff; }
.gs-match-name {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.gs-match-name strong { font-weight: 600; }
.gs-match-meta { font-size: 11px; margin-top: 2px; }
.gs-match-arrow { color: var(--text-faint); }

.gs-noresult {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 12px;
  background: var(--bg-sunken);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 12px;
}

/* Section-Title with hint */
.form-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.form-section-hint {
  font-size: 10.5px;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  font-weight: 400;
}

/* ============================================================
   CALENDAR — Date-Range Picker
   ============================================================ */
.cal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px;
}
.cal-month {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.cal-nav {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  cursor: pointer;
}
.cal-nav:hover { background: var(--bg-sunken); color: var(--text); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-wd {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cal-day:hover:not(.cal-day-empty) { background: var(--bg-sunken); }
.cal-day-empty { cursor: default; }
.cal-day.is-today {
  font-weight: 700;
  color: var(--accent);
}
.cal-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.cal-day.is-from,
.cal-day.is-to {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.cal-day.is-from.is-today::after,
.cal-day.is-to.is-today::after { background: #fff; }
.cal-day.is-range {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 0;
}
.cal-day.is-hover-range {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 0;
  opacity: 0.7;
}

.cr-range-summary {
  font-size: 12px;
  color: var(--text-mid);
  text-align: center;
  padding: 6px 0;
}
.cr-range-summary strong { color: var(--text); }

.cr-pop {
  min-width: 340px;
}
.cr-foot button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ============================================================
   ITERATION v5 — DateField, Gantt scrollable + clickable bars
   ============================================================ */

/* ── Gantt scrollable ─────────────────────────────────────────────────────── */
.gantt-v-scroll {
  height: calc(100vh - 220px);
  min-height: 400px;
  max-height: 900px;
  overflow: auto;
}

/* ── Gantt bar: new layout with phone + Kundennr ──────────────────────────── */
.gv-bar {
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: filter 0.12s, transform 0.06s;
}
.gv-bar:hover { filter: brightness(0.97); }
.gv-bar:active { transform: scale(0.99); }

.gv-bar-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10.5px;
}
.gv-bar-time {
  font-weight: 600;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.gv-bar-cn {
  font-size: 9.5px;
  color: var(--accent);
  background: rgba(58, 90, 42, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gv-bar-arrived .gv-bar-cn { background: rgba(255, 255, 255, 0.25); color: #fff; }
.gv-bar-guests {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.gv-bar-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.gv-bar-phone {
  font-size: 10px;
  color: var(--text-mid);
  letter-spacing: 0.005em;
}
.gv-bar-arrived .gv-bar-name,
.gv-bar-arrived .gv-bar-phone,
.gv-bar-arrived .gv-bar-time,
.gv-bar-arrived .gv-bar-guests { color: rgba(255,255,255,0.92); }
.gv-bar-arrived { color: #fff; background: var(--accent); border-color: var(--accent); border-top-color: var(--accent-hi); }

.gv-bar-short {
  padding: 3px 8px;
  gap: 0;
}
.gv-bar-short .gv-bar-name { font-size: 11px; }

/* ── DateField (Single-Date Picker mit Dropdown) ─────────────────────────── */
.df-wrap {
  position: relative;
}
.df-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.df-field:hover { border-color: var(--border-hi); }
.df-field svg { color: var(--text-mid); flex-shrink: 0; }
.df-text {
  flex: 1;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.df-chev {
  margin-left: auto;
  color: var(--text-faint);
}
.df-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.18);
  border-radius: var(--r-md);
  background: var(--panel);
}

/* Heute-Button am Boden des Kalenders */
.cal-today-btn {
  margin-top: 4px;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
}
.cal-today-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Topbar Date as button ───────────────────────────────────────────────── */
.dp-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--r-sm);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.1s;
}
.dp-date-btn:hover {
  background: var(--bg-card);
  border-color: var(--border);
}
.dp-date-btn svg:first-child { color: var(--accent); opacity: 0.85; flex-shrink: 0; }
.dp-date-btn .dp-chev { color: var(--text-faint); margin-left: 2px; flex-shrink: 0; }
.dp-rel.is-today {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-caps: normal;
  text-transform: uppercase;
  margin-left: 4px;
}

.datepick {
  position: relative;
}
.dp-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  box-shadow: 0 12px 32px rgba(20, 16, 8, 0.18);
  border-radius: var(--r-md);
}

/* Make set-row-3 align labels at the top so fields line up regardless of label wrapping */
.set-row-3 {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  gap: 12px;
  align-items: end;
}


/* ============================================================
   ITERATION v6 — Live-flag SVG, Gantt time labels, KNr/RNr layout
   ============================================================ */

/* ── Activity log live-flag (SVG dot + text, kein span-Trick) ────────────── */
.al-live-flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ok);
  line-height: 1;
}
.al-live-flag svg { flex-shrink: 0; display: block; }
.al-live-flag span { color: var(--ok); line-height: 1; }

/* ── Gantt time column: hour big, minutes small ──────────────────────────── */
.gv-time-cell {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4px 8px 0 0;
}
.gv-time-cell.is-hour {
  background: var(--bg-card);
}
.gv-time-hour {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
}
.gv-time-min {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 500;
  line-height: 1;
}
.gv-time-lbl { /* legacy — hide if still in DOM */ display: none; }

/* ── Gantt bars new layout: KNr below time, RNr below name ───────────────── */
.gv-bar {
  padding: 5px 8px 5px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: filter 0.12s, transform 0.06s;
  border-left: 4px solid;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.gv-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
}
.gv-bar-time {
  font-weight: 600;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.gv-bar-guests {
  font-size: 10px;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.gv-bar-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.gv-bar-cn,
.gv-bar-rnr {
  font-size: 10px;
  color: var(--text-mid);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gv-bar-cn { color: var(--accent); font-weight: 600; }

.gv-bar-arrived {
  background: var(--accent);
  border-color: var(--accent-hi);
  color: #fff;
}
.gv-bar-arrived .gv-bar-name,
.gv-bar-arrived .gv-bar-time,
.gv-bar-arrived .gv-bar-guests,
.gv-bar-arrived .gv-bar-cn,
.gv-bar-arrived .gv-bar-rnr { color: rgba(255,255,255,0.92); }
.gv-bar-arrived .gv-bar-cn { color: #fff; font-weight: 700; }

.gv-bar-short {
  padding: 3px 8px;
  gap: 1px;
}
.gv-bar-short .gv-bar-name { font-size: 11px; }
.gv-bar-short .gv-bar-rnr { display: none; }

/* ── NewReservation date field: full width like other inputs ─────────────── */
.df-wrap { width: 100%; }
.df-field {
  width: 100%;
  height: 32px;
  padding: 6px 10px;
}
.df-pop {
  min-width: 280px;
  width: max-content;
}

/* ── Calendar: a bit wider for readability ──────────────────────────────── */
.cal {
  min-width: 280px;
  padding: 14px;
}
.cal-day {
  height: 34px;
  font-size: 13px;
}
.cal-month {
  font-size: 16px;
}

/* ── Topbar datepick: single-line, no wrap ───────────────────────────────── */
.dp-date-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.dp-date-btn .dp-main {
  white-space: nowrap;
}


/* ── Gantt-Zeitspalte wie im Reference-Screenshot ─────────────────────── */
.gv-time-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  border-bottom: 1px solid var(--border-soft);
}
.gv-time-cell.is-hour {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.gv-time-hour {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.gv-time-min {
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 500;
  line-height: 1;
}

/* Lane cells in line with the time grid */
.gv-lane-cell { border-bottom: 1px solid var(--border-soft); }
.gv-lane-cell.is-hour { border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.012); }

/* Empty-State für Reservierungs-Liste (wenn 0 Buchungen an dem Tag) */
.rv-empty {
  padding: 64px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--border, #d8d4c7);
  border-radius: 14px;
  background: var(--bg-card, #fdfcf9);
  margin: 12px 0;
}
.rv-empty-icon {
  color: var(--text-faint, #b1aea3);
  margin-bottom: 4px;
}
.rv-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #1c1f23);
  letter-spacing: -0.1px;
}
.rv-empty-sub {
  font-size: 13px;
  color: var(--text-mid, #5e6168);
  max-width: 460px;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Gesperrte-Tische-Banner über dem Timeline */
.rv-blocked-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #fff7e6;
  border: 1px solid #f4d99b;
  border-radius: 8px;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #6b4a14;
}
.rv-blocked-banner svg { color: #b8761f; flex-shrink: 0; }
.rv-blocked-banner strong { color: #54380e; font-weight: 600; }
.rv-blocked-chip {
  display: inline-block;
  background: rgba(255,255,255,0.6);
  border: 1px solid #f0d39a;
  padding: 2px 9px;
  border-radius: 11px;
  margin-right: 4px;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Tages-Notizen-Banner — gelb wie Blocked-Banner, eigene Optik */
.rv-notes-banner {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: #fff7e6;
  border: 1px solid #f4d99b;
  border-radius: 8px;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #54380e;
}
.rv-notes-icon { color: #b8761f; flex-shrink: 0; padding-top: 2px; }
.rv-notes-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rv-note-row { display: flex; align-items: center; gap: 8px; }
.rv-note-text { flex: 1; }
.rv-note-x {
  background: transparent; border: none; cursor: pointer;
  color: #b8761f; font-size: 18px; line-height: 1; padding: 0 4px;
  border-radius: 4px;
}
.rv-note-x:hover { background: rgba(184, 118, 31, 0.1); }
.rv-note-add-row { display: flex; gap: 6px; margin-top: 4px; }
.rv-note-input {
  flex: 1; border: 1px solid #e0c98c; background: white;
  border-radius: 5px; padding: 5px 9px; font-size: 13px;
}
.rv-note-input:focus { outline: 1px solid #b8761f; outline-offset: 0; }
.rv-note-add-link {
  background: transparent; border: 1px dashed #d9b96d;
  color: #b8761f; font-size: 12px; padding: 3px 10px;
  border-radius: 12px; cursor: pointer; align-self: flex-start;
}
.rv-note-add-link:hover { background: rgba(184, 118, 31, 0.08); }
.rv-notes-add {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px dashed #d8d4c7;
  color: var(--text-mid, #5e6168); padding: 6px 12px;
  border-radius: 16px; font-size: 12px; cursor: pointer;
  margin: 0 0 10px;
}
.rv-notes-add:hover { border-color: #b8761f; color: #b8761f; }

/* Walk-in/Reservation dialog: belegte Tische ausgrauen */
.tbl-opt-busy {
  opacity: 0.45;
  cursor: not-allowed !important;
  background: var(--bg, #f5f3ee) !important;
  border-color: var(--border, #ddd6c5) !important;
}
.tbl-opt-busy:hover { transform: none; }
.tbl-opt-busy .tbl-opt-status { color: var(--danger, #a3322a) !important; }

/* Walk-in-View Tab-Switch (Aktiv / Verlauf) */
.wi-tabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--border, #ddd6c5); }
.wi-tab {
  background: transparent; border: none; padding: 9px 14px;
  font-size: 13px; font-weight: 500; color: var(--text-mid, #5e6168);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wi-tab:hover { color: var(--text, #1c1f23); }
.wi-tab.is-active { color: var(--accent, #3a5a2a); border-bottom-color: var(--accent, #3a5a2a); font-weight: 600; }

.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 11.5px; font-weight: 600;
}
.status-pill-ok { background: #ecf3e4; color: #2f7d3f; }
.status-pill-off { background: #efebe2; color: #8a8a85; }

/* Zeitraum-Picker im NewReservationDialog: Von [→] Bis + Dauer-Quick-Picks */
.time-range-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.time-range-input { text-align: center; font-size: 14px; }
.time-range-arrow { color: var(--text-dim, #9a8e76); font-size: 16px; font-weight: 500; }
.time-duration-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.dur-pick {
  background: var(--bg, #f5f3ee);
  border: 1px solid var(--border, #ddd6c5);
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #1c1f23);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.12s;
}
.dur-pick:hover {
  border-color: var(--accent, #3a5a2a);
  color: var(--accent, #3a5a2a);
}
.dur-pick.is-active {
  background: var(--accent-soft, #eaefe2);
  border-color: var(--accent, #3a5a2a);
  color: var(--accent, #3a5a2a);
}
.dur-pick-time {
  font-size: 10.5px;
  color: var(--text-dim, #9a8e76);
  font-weight: 400;
}
.dur-pick.is-active .dur-pick-time { color: var(--accent, #3a5a2a); opacity: 0.85; }

/* EditReservationDialog: Gast-Sektion + Primary-Action im Detail-Drawer */
.rd-primary {
  background: var(--accent, #3a5a2a) !important;
  color: white !important;
  border-color: var(--accent, #3a5a2a) !important;
  font-weight: 600;
}
.rd-primary:hover { background: var(--accent-hi, #4a6f37) !important; }
.rd-primary svg { stroke: white; }

.edit-guest-row {
  background: var(--bg, #f5f3ee);
  border: 1px solid var(--border, #ddd6c5);
  border-radius: 7px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edit-guest-name {
  font-size: 14.5px;
  color: var(--text, #1c1f23);
}
.edit-guest-name strong { font-weight: 700; }

/* Source-Icon im Activity-Log (Sidebar + Overlay) */
.sb-act-source, .al-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.55;
  color: var(--text-mid, #5e6168);
}
.sb-act-source { opacity: 0.6; }
.sb-act-source svg, .al-source svg { vertical-align: middle; }

/* Custom Source-Icon-Tooltip (zuverlässiger als natives title-Attribut,
   das je nach Browser 600-1500ms verzögert reagiert) */
.src-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}
.src-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  color: var(--text-mid, #5e6168);
}
.src-tip-text {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: #1a1f24;
  color: white;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
  z-index: 200;
  font-weight: 500;
}
.src-tip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1f24;
}
.src-tip-wrap:hover .src-tip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.src-tip-wrap:hover .src-tip-icon { opacity: 0.9; }

/* Gäste-Tab Consent-Badge + Action-Buttons */
.consent-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 600;
}
.consent-ok      { background: #ecf3e4; color: #2f7d3f; }
.consent-pending { background: #fff7e6; color: #b8761f; }
.ga-actions {
  text-align: right;
  white-space: nowrap;
}
.ga-actions .btn-sm {
  padding: 5px 7px;
  margin-left: 4px;
}
.ga-actions .btn-sm svg { display: block; }
.rd-danger {
  background: #fef2f0;
  color: #a3322a;
  border-color: #f4c8c0;
}
.rd-danger:hover {
  background: #fce0db;
  color: #8a2820;
}

/* Versions-Anzeige unten in der Sidebar (dezent, klickbar für Popover) */
/* Hell/Dunkel-Umschalter — nutzt --sb-*-Variablen, daher in beiden Modi konsistent
   (die Sidebar bleibt bewusst immer dunkel). */
.sb-theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--sb-text-dim);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: color 0.15s, background 0.15s;
}
.sb-theme-toggle:hover { color: var(--sb-text); background: rgba(255,255,255,0.04); }
.sb-theme-ic {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--sb-bg-card);
  color: inherit;
}
.sb-theme-lbl { flex: 1; min-width: 0; }

.sb-account {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sb-account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--sb-bg-card);
  color: var(--sb-text-dim);
}
.sb-account-text { flex: 1; min-width: 0; line-height: 1.25; }
.sb-account-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sb-text-faint);
}
.sb-account-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sb-text);
}
.sb-account-logout {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 6px;
  color: var(--sb-text-dim);
  transition: color 0.15s, background 0.15s;
}
.sb-account-logout:hover { color: var(--gold); background: rgba(255,255,255,0.04); }

.sb-version {
  position: relative;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sb-version-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(213, 211, 204, 0.5);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.sb-version-btn:hover {
  color: rgba(213, 211, 204, 0.85);
  background: rgba(255,255,255,0.04);
}
.sb-version-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok, #4a7c3d);
  display: inline-block;
}
.sb-version-num {
  margin-left: auto;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.3px;
}

.sb-version-pop {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 14px;
  right: 14px;
  background: #1f2429;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  color: #d5d3cc;
  font-size: 12px;
  z-index: 50;
}
.sb-version-pop-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sb-version-pop-head strong { color: #fff; font-size: 13px; }
.sb-version-pop-head .dim { color: rgba(213, 211, 204, 0.45); font-size: 10.5px; }
.sb-version-pop-notes {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sb-version-pop-notes li {
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
  font-size: 11.5px;
  color: rgba(213, 211, 204, 0.85);
}
.sb-version-pop-notes li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--ok, #4a7c3d);
  font-weight: 700;
}
.sb-version-pop-foot {
  font-size: 10px;
  color: rgba(213, 211, 204, 0.4);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sb-version-pop-foot a {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(213, 211, 204, 0.7);
  text-decoration: none;
  transition: color 0.15s;
}
.sb-version-pop-foot a:hover { color: var(--gold); }

/* Monats-Picker im Statistik-Tab (period=month) */
.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-card, #fdfcf9);
  border: 1px solid var(--border, #ddd6c5);
  border-radius: var(--r-md, 8px);
}
.month-nav-label {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #1c1f23);
}
.month-nav-today {
  margin-left: 4px;
}

/* ============================================================
   MOBILE — Sidebar → schmale Icon-Leiste (≤640px = Handys)
   ------------------------------------------------------------
   Die volle 232px-Sidebar fraß auf einem 393px-iPhone ~60% der
   Breite und quetschte die Tabellen auf ~160px zusammen. Hier
   schrumpft sie auf eine 56px-Icon-Spalte (nur Icons, keine
   Labels). Desktop/Tablet (>640px) bleiben bewusst unverändert
   PC-first. Reines CSS, kein JS — kann den React-Bundle nicht
   brechen. Steht am Datei-Ende, damit die Overrides in der
   Quell-Reihenfolge NACH den Basis-Regeln greifen (Media-Queries
   erhöhen die Spezifität nicht — sonst würden die .sb-Regeln
   weiter oben gewinnen).
   ============================================================ */
@media (max-width: 640px) {
  .app { grid-template-columns: 56px 1fr; }

  /* Brand: nur das Logo zentriert, Restaurant-Text weg */
  .sb-brand { padding: 14px 0 12px; justify-content: center; }
  .sb-brand-text { display: none; }

  /* Nav: Icons zentriert; Section-Titel, Labels, Counts, Lock-Badges weg.
     Items 44×44px → erfüllt die Touch-Ziel-Mindestgröße. */
  .sb-scroll { padding: 8px 6px; }
  .sb-section-title { display: none; }
  .sb-section + .sb-section { margin-top: 10px; }
  .sb-item { justify-content: center; gap: 0; padding: 0; height: 44px; margin-bottom: 2px; }
  .sb-lbl,
  .sb-count,
  .sb-count-alert,
  .sb-item-lock { display: none; }
  .sb-item.is-active::before { display: none; }   /* grüner Hintergrund reicht als Aktiv-Marker */

  /* Sekundäres ausblenden: Live-Feed + Versions-Footer passen nicht in die schmale Leiste */
  .sb-act { display: none; }
  .sb-version { display: none; }

  /* Account-Zeile: Avatar oben, Logout-Icon darunter, zentriert */
  .sb-account { flex-direction: column; gap: 6px; padding: 10px 0; }
  .sb-account-text { display: none; }

  /* ============================================================
     Mobile-Sanity Runde 1 (v0.13.14) — alle Regeln NUR ≤640px,
     Desktop bleibt unberührt. Ziel: nichts wird mehr abgeschnitten
     und nichts erzeugt seitliches Scrollen der ganzen Seite.
     Feinpolish (Spalten ausblenden, Gantt-Breite, Tap-Targets)
     folgt nach Screenshot-Abgleich.
     ============================================================ */

  /* Topbar: umbrechen statt überlaufen */
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; min-height: auto; }
  .topbar-left, .topbar-right { flex-wrap: wrap; }
  .topbar-right { flex-shrink: 1; }
  .search { min-width: 0; }

  /* Inhalts-Gutter schmaler → mehr Platz für dichte Tabellen/Cards */
  .rv-content { padding: 14px 12px 48px; }

  /* KPI-Strips: 4–5 Spalten → 2; Trenner als Unterkante statt rechts */
  .stats, .stats--3col, .stats--4col, .stats--5col { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px 14px; border-right: none; border-bottom: 1px solid var(--border); }

  /* Charts: nebeneinander → gestapelt */
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card--wide { grid-column: auto; }
  .heatmap-wrap { overflow-x: auto; justify-content: flex-start; }

  /* Breite Tabellen & dichte Listen: horizontal scrollen statt clippen
     (Wrapper hatten overflow:hidden → Inhalte waren unsichtbar) */
  .ga-table-wrap, .ti-table-wrap { overflow-x: auto; }
  .ga-table { min-width: 560px; }
  .ti-table { min-width: 620px; }
  .wi-list  { overflow-x: auto; }
  .wi-table { min-width: 560px; }
  .timeline { overflow-x: auto; }
  .rr { min-width: 560px; }

  /* Tischplan: zweispaltig (Plan + Detail) → stapeln, Detail volle Breite */
  .tp-board { grid-template-columns: 1fr; }
  .tp-side { width: 100%; }
  .tp-content { padding: 14px 12px 24px; }
  .fp-svg { max-height: 60vh; }

  /* Lisa-Chat: 380px-Festbreite schoss über den Rand → Handy-Sheet */
  .ai-chat { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
  .ai-fab { right: 12px; bottom: 12px; }
  .ai-input { font-size: 16px; }            /* ≥16px verhindert iOS-Fokus-Zoom */
  .ld-body { max-height: 50vh; overflow-y: auto; }

  /* Modal-Innereien: Zwei-Spalten-Zeilen stapeln */
  .set-row-2 { grid-template-columns: 1fr; gap: 12px; }
  .block-row { grid-template-columns: 1fr auto; row-gap: 4px; }

  /* Kalender-/Datums-Popover: nicht breiter als der Screen */
  .cr-pop { max-width: calc(100vw - 24px); min-width: 0; }
  .df-pop { max-width: calc(100vw - 16px); min-width: 0; }
  .cal, .cal-grid { max-width: calc(100vw - 16px); }
}

/* ── Wetter-Widget + Prognose-Popover (v0.16.x) ──────────────────────────────
   Nutzt durchgehend CSS-Variablen → passt sich automatisch dem Dark Mode an. */
.weather-widget { position: relative; }
.weather-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px; font-weight: 600; line-height: 1;
}
.weather-btn:hover { border-color: var(--accent); }
.weather-ico { font-size: 16px; }
.weather-temp { font-variant-numeric: tabular-nums; }

.wx-pop {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  z-index: 50;
  width: min(300px, calc(100vw - 32px));
  max-height: 72vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.wx-pop-head { margin-bottom: 8px; }
.wx-pop-ort { font-size: 13px; font-weight: 700; color: var(--text); }

.wx-today {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.wx-today-ico { font-size: 34px; line-height: 1; }
.wx-today-temp { font-size: 22px; font-weight: 700; color: var(--text); }
.wx-today-tmin { font-size: 15px; font-weight: 500; color: var(--text-dim); }
.wx-today-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.wx-group { margin-top: 12px; }
.wx-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-dim); margin-bottom: 4px; font-weight: 700;
}
.wx-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px; color: var(--text);
}
.wx-wd { width: 22px; font-weight: 600; color: var(--text-dim); flex-shrink: 0; }
.wx-ico { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.wx-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.wx-rain { font-size: 11px; color: var(--accent); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wx-temps { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wx-tmin { color: var(--text-dim); font-weight: 500; }

/* 2-Spalten-Stat-Grid (Wetter-Korrelations-KPIs) */
.stats--2col { grid-template-columns: repeat(2, 1fr); }
