/* generiert aus tokens.json - nicht von Hand ändern */
:root {
  --c-bg: #ffffff;
  --c-surface: #f5f6f8;
  --c-surface-2: #eceef2;
  --c-border: #dfe2e7;
  --c-border-input: #7d8591;
  --c-text: #15181d;
  --c-text-muted: #555d69;
  --c-accent: #2b5a8a;
  --c-accent-soft: #e6eef6;
  --c-on-accent: #ffffff;
  --c-focus: #2b5a8a;
  --c-danger: #b42318;
  --c-danger-soft: #fdecea;
  --c-success: #1d6b45;
  --c-success-soft: #e5f3eb;
  --c-warning: #8a5300;
  --c-warning-soft: #fdf1dc;
  --c-neutral-soft: #eceef2;
  --fs-xs: 12px; --lh-xs: 16px; --fw-xs: 500;
  --fs-sm: 14px; --lh-sm: 20px; --fw-sm: 400;
  --fs-base: 16px; --lh-base: 24px; --fw-base: 400;
  --fs-lg: 20px; --lh-lg: 28px; --fw-lg: 600;
  --fs-xl: 28px; --lh-xl: 34px; --fw-xl: 700;
  --s-0: 0px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;
  --sh-card: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --sh-pop: 0 12px 32px rgba(16,24,40,.16);
  --m-fast: 120ms;
  --m-base: 200ms;
  --m-ease: cubic-bezier(.2,.8,.2,1);
  --font-sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Nur Token-Rollen, keine Rohwerte außer Layout-Maßen. */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--font-sans); font-size: var(--fs-base); line-height: var(--lh-base); color: var(--c-text); background: var(--c-bg); }
body { margin: 0; }
a { color: var(--c-accent); }
.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: var(--s-4); top: var(--s-4); background: var(--c-bg); padding: var(--s-2) var(--s-4); z-index: 10; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.h-lg { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-xl); margin: 0 0 var(--s-2); }
.h-md { font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-lg); margin: var(--s-6) 0 var(--s-3); }
.muted { color: var(--c-text-muted); } .small { font-size: var(--fs-sm); }
.stack > * + * { margin-top: var(--s-4); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-5);
  border-radius: var(--r-md); border: 1px solid transparent; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  text-decoration: none; transition: filter var(--m-fast) var(--m-ease); }
.btn:hover:not(:disabled) { filter: brightness(.94); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 var(--s-3); }
.btn-lg { height: 48px; font-size: var(--fs-base); }
.btn-block { width: 100%; margin-top: var(--s-6); }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn-secondary { background: var(--c-bg); color: var(--c-text); border-color: var(--c-border-input); }
.btn-ghost { background: transparent; color: var(--c-accent); }
.btn-danger { background: var(--c-danger); color: var(--c-on-accent); }

/* Felder */
.field { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-4); font-size: var(--fs-sm); font-weight: 600; }
.field input, .field textarea, .field select, input[type=date] { font: inherit; font-weight: 400; min-height: 44px; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--c-border-input); border-radius: var(--r-sm); background: var(--c-bg); color: var(--c-text); }
.has-error input, .has-error textarea { border-color: var(--c-danger); }
.error { color: var(--c-danger); font-weight: 400; }
.check { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-accent); }
abbr { text-decoration: none; color: var(--c-danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); } .grid-2 .field { margin-top: 0; }
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }

/* Widget */
.public-page { background: var(--c-surface); }
.widget { max-width: 480px; margin: 0 auto; padding: var(--s-6) var(--s-5) var(--s-8); background: var(--c-bg); min-height: 100vh; }
@media (min-width: 520px) { .widget { margin: var(--s-6) auto; min-height: 0; border-radius: var(--r-lg); box-shadow: var(--sh-card); } }
.steps { display: flex; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-5); font-size: var(--fs-xs); color: var(--c-text-muted); }
.steps li { flex: 1; border-top: 3px solid var(--c-border); padding-top: var(--s-1); }
.steps li.done, .steps li[aria-current] { border-color: var(--c-accent); color: var(--c-text); font-weight: 600; }
.info { background: var(--c-surface); padding: var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-sm); }
fieldset { border: 0; padding: 0; margin: var(--s-5) 0 0; }
legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--s-2); }
.slot-group legend { color: var(--c-text-muted); font-weight: 500; }
.slots { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { min-width: 64px; height: 44px; padding: 0 var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--c-border-input);
  background: var(--c-bg); color: var(--c-text); font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.chip:hover { border-color: var(--c-accent); }
.chip.is-selected { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.chip-request { border-style: dashed; border-color: var(--c-warning); }
.chip.skeleton { width: 72px; background: var(--c-surface-2); border-color: transparent; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .chip.skeleton { animation: none; } }
.more select { height: 44px; border-radius: var(--r-pill); border: 1px solid var(--c-border-input); padding: 0 var(--s-3); font: inherit; background: var(--c-bg); }
.summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.done-box { text-align: center; padding: var(--s-6) 0; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-4); margin: var(--s-5) 0; }
.summary dt { color: var(--c-text-muted); } .summary dd { margin: 0; }

/* Banner, Leerzustände, Pills */
.banner { padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-size: var(--fs-sm); margin: var(--s-3) 0; }
.banner-info { background: var(--c-accent-soft); color: var(--c-accent); }
.banner-warn { background: var(--c-warning-soft); color: var(--c-warning); }
.banner-error { background: var(--c-danger-soft); color: var(--c-danger); }
.banner-ok { background: var(--c-success-soft); color: var(--c-success); }
.empty { color: var(--c-text-muted); padding: var(--s-5); text-align: center; background: var(--c-surface); border-radius: var(--r-sm); list-style: none; }
.pill { display: inline-block; padding: 2px var(--s-2); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.pill-request { background: var(--c-warning-soft); color: var(--c-warning); }
.pill-confirmed { background: var(--c-accent-soft); color: var(--c-accent); }
.pill-arrived { background: var(--c-success-soft); color: var(--c-success); }
.pill-completed { background: var(--c-neutral-soft); color: var(--c-text-muted); }
.pill-cancelled, .pill-declined, .pill-no_show { background: var(--c-danger-soft); color: var(--c-danger); }

/* Backoffice */
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.topbar { display: contents; }
.menu-btn { display: none; }
.nav-panel { display: flex; flex-direction: column; flex: 1; }
.sidebar { background: var(--c-surface); border-right: 1px solid var(--c-border); padding: var(--s-5) var(--s-3); display: flex; flex-direction: column; }
.brand { font-weight: 700; padding: 0 var(--s-3) var(--s-5); }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar a { display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); color: var(--c-text); text-decoration: none; }
.sidebar a[aria-current] { background: var(--c-accent-soft); color: var(--c-accent); font-weight: 600; }
.pause { margin-top: auto; padding: var(--s-3); }
.content { padding: var(--s-6) var(--s-8); max-width: 1280px; }
.day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.day-nav { display: flex; gap: var(--s-2); align-items: center; }
.list { list-style: none; padding: 0; margin: 0; }
.row, .row-head { display: grid; grid-template-columns: 64px 48px minmax(180px, 1fr) 88px 72px 128px 296px; gap: var(--s-3); align-items: center;
  padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm); }
.row-head { font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 600; padding: var(--s-2); border-bottom: 1px solid var(--c-border); }
.row-request { box-shadow: inset 3px 0 0 var(--c-warning); background: var(--c-surface); }
.row-done { color: var(--c-text-muted); }
.r-time { font-weight: 700; font-size: var(--fs-base); }
.r-actions { display: flex; gap: var(--s-1); flex-wrap: wrap; justify-content: flex-end; }
.r-actions form { margin: 0; }
.note { color: var(--c-text-muted); font-style: italic; }
.warn { color: var(--c-warning); font-weight: 600; }
.card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--s-4); margin-top: var(--s-4); }
.mail header { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-sans); font-size: var(--fs-sm); margin: var(--s-3) 0 0; }
.code { display: block; width: 100%; font-family: var(--font-mono); font-size: var(--fs-sm); background: var(--c-surface); padding: var(--s-3); border-radius: var(--r-sm); border: 1px solid var(--c-border); }
@media (max-width: 699px), (max-height: 500px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sidebar { position: sticky; top: 0; z-index: 40; flex-direction: column; border-right: 0; border-bottom: 1px solid var(--c-border); padding: var(--s-2) var(--s-4); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 40px; }
  .brand { padding: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: inline-flex; align-items: center; gap: var(--s-2); flex: none; }
  .menu-icon { width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
  .js .nav-panel:not(.is-open) { display: none; }
  .nav-panel { flex-direction: column; gap: var(--s-2); padding: var(--s-3) 0 var(--s-2); max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow: auto; }
  .sidebar ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; }
  .sidebar a { padding: var(--s-2) var(--s-3); }
  .sidebar .pause { margin: 0; padding: 0; }
  .content { padding: var(--s-4); }
  .row-head { display: none; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "time name status" "party table table" "act act act"; row-gap: var(--s-1); column-gap: var(--s-3); padding: var(--s-3) 0; }
  .r-time { grid-area: time; } .r-party { grid-area: party; font-weight: 600; } .r-name { grid-area: name; min-width: 0; overflow-wrap: anywhere; }
  .r-table { grid-area: table; } .r-status { grid-area: status; justify-self: end; } .r-source { display: none; }
  .r-actions { grid-area: act; justify-content: flex-start; margin-top: var(--s-1); }
}

/* Backoffice: Formulare, Tische, Einstellungen */
.toolbar { display: flex; gap: var(--s-2); margin: var(--s-4) 0; flex-wrap: wrap; }
.form-grid { display: grid; gap: var(--s-4); max-width: 880px; }
.form-grid .card, .content > form.card, .content > .card, .content > details.card { margin-top: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); align-items: end; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); align-items: end; }
.grid-3 .field, .grid-4 .field { margin-top: 0; }
.field select { font: inherit; font-weight: 400; min-height: 44px; padding: var(--s-2); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); background: var(--c-bg); }
.field-group { margin-top: var(--s-4); }
.tp-area { margin-top: var(--s-2); }
.chip-check { display: inline-flex; align-items: center; gap: var(--s-1); height: 40px; cursor: pointer; font-weight: 500; }
.chip-check input { accent-color: var(--c-accent); width: 18px; height: 18px; }
.chip-check:has(input:checked) { background: var(--c-accent-soft); border-color: var(--c-accent); color: var(--c-accent); }
.chip-check:has(input:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.is-off { opacity: .55; }
.hits { list-style: none; padding: 0; margin: var(--s-1) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.hits .btn { background: var(--c-surface); }
.row-btns { display: flex; gap: var(--s-1); align-items: center; flex-wrap: wrap; }
.weekdays { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 0; }
.period { margin-top: var(--s-3); }
details.card > summary { cursor: pointer; font-weight: 600; }
details.card > form.card { border: 0; padding: 0; }
.t-row, .a-row { display: grid; gap: var(--s-2); align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--c-border); }
.t-row { grid-template-columns: 1fr 1.2fr 72px 72px 64px 80px 72px 200px; }
.a-row { grid-template-columns: 1fr 88px 96px 200px; }
.t-row input, .t-row select, .a-row input { font: inherit; width: 100%; min-height: 40px; padding: var(--s-1) var(--s-2); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); background: var(--c-bg); }
.t-row .check input, .a-row .check input { width: 18px; min-height: 0; }
.t-head { font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: 600; border-bottom: 1px solid var(--c-border); }
.r-link { color: inherit; text-decoration: none; } .r-link:hover strong { text-decoration: underline; }
@media (max-width: 699px), (max-height: 500px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .t-row { grid-template-columns: 1fr 1fr 1fr; } .t-head { display: none; }
  .a-row { grid-template-columns: 1fr auto; }
}
.t-row > *, .a-row > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.card > .h-md:first-child, .card > h2:first-of-type { margin-top: 0; }

/* Raumplan, Zeitleiste, Gästeliste, Team – nur Token-Rollen. */
.plan-scroll { overflow: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); max-width: 100%; }
.plan-board { position: relative; background-image:
  linear-gradient(to right, var(--c-border) 1px, transparent 1px),
  linear-gradient(to bottom, var(--c-border) 1px, transparent 1px); touch-action: none; }
.plan-board:not(.is-edit) { touch-action: auto; }
.plan-empty { position: absolute; inset: var(--s-4); }
.plan-table { position: absolute; margin: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--c-bg); border: 2px solid var(--c-border-input); border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: var(--lh-xs);
  color: var(--c-text); text-decoration: none; user-select: none; text-align: center; overflow: hidden; padding: 2px;
  transition: box-shadow var(--m-fast) var(--m-ease); }
.plan-board.is-edit .plan-table { cursor: grab; }
.plan-table.is-dragging { cursor: grabbing; box-shadow: var(--sh-pop); z-index: 5; transition: none; }
.plan-table strong { font-size: var(--fs-sm); }
.shape-round { border-radius: var(--r-pill); }
.shape-rect { border-radius: var(--r-sm); }
.plan-seats { color: var(--c-text-muted); }
.plan-occ { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.occ-free { border-color: var(--c-success); }
.occ-busy { background: var(--c-accent-soft); border-color: var(--c-accent); }
.occ-soon { background: var(--c-warning-soft); border-color: var(--c-warning); }
.occ-request { border-style: dashed; border-color: var(--c-warning); }
.plan-save { margin-left: auto; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-sm); margin: var(--s-3) 0; }
.legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: var(--s-1); vertical-align: -1px; border: 2px solid var(--c-border-input); }
.legend .l-free::before { border-color: var(--c-success); }
.legend .l-busy::before { background: var(--c-accent-soft); border-color: var(--c-accent); }
.legend .l-soon::before { background: var(--c-warning-soft); border-color: var(--c-warning); }

/* Zeitleiste */
.tl { display: grid; grid-template-columns: 64px 1fr; gap: 0; margin-top: var(--s-4); font-size: var(--fs-xs); }
.tl-head { position: relative; height: 20px; color: var(--c-text-muted); }
.tl-head span { position: absolute; transform: translateX(-50%); }
.tl-name { padding: var(--s-1) var(--s-2); border-top: 1px solid var(--c-border); font-weight: 600; font-size: var(--fs-sm); }
.tl-lane { position: relative; height: 36px; border-top: 1px solid var(--c-border); background: var(--c-bg); }
.tl-bar { position: absolute; top: 4px; bottom: 4px; border-radius: var(--r-sm); background: var(--c-accent-soft); border: 1px solid var(--c-accent);
  color: var(--c-accent); padding: 0 var(--s-1); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; line-height: 26px; }
.tl-bar.st-arrived { background: var(--c-success-soft); border-color: var(--c-success); color: var(--c-success); }
.tl-bar.st-request { background: var(--c-warning-soft); border-color: var(--c-warning); color: var(--c-warning); border-style: dashed; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--c-danger); z-index: 2; }
.tl-wrap { overflow-x: auto; }
.tl-inner { min-width: 720px; }

/* Tabellen (Gäste, Team, Postausgang) */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-top: var(--s-3); }
.table th, .table td { text-align: left; padding: var(--s-2); border-bottom: 1px solid var(--c-border); vertical-align: top; }
.table th { font-size: var(--fs-xs); color: var(--c-text-muted); }
.search { display: flex; gap: var(--s-2); margin: var(--s-4) 0; max-width: 560px; }
.search input { flex: 1; font: inherit; min-height: 40px; padding: var(--s-1) var(--s-3); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); }
.status-sent { color: var(--c-success); } .status-failed { color: var(--c-danger); } .status-queued { color: var(--c-text-muted); }

/* PHP-Version: Ergänzungen */
.public-page { margin: 0; min-height: 100vh; }
.list { list-style: none; padding: 0; margin: 0; }
.row { padding: var(--s-3) var(--s-2); border-bottom: 1px solid var(--c-border); }
.empty { color: var(--c-text-muted); padding: var(--s-4) 0; }
.legal { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: center; padding: var(--s-4); font-size: var(--fs-sm); }
.legal a { color: var(--c-text-muted); }
.logout { padding: var(--s-3); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); word-break: break-all; }
.day-nav form { margin: 0; }
.day-nav input[type=time] { font: inherit; min-height: 32px; padding: var(--s-1) var(--s-2); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); }
details summary { cursor: pointer; }
@media (max-width: 699px), (max-height: 500px) { .logout { flex-direction: row; align-items: center; justify-content: space-between; padding: 0; word-break: normal; } .logout > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Feiertage, besondere Tage, Monatskalender */
.banner-holiday { background: var(--c-danger-soft); color: var(--c-danger); }
.banner-notable { background: var(--c-warning-soft); color: var(--c-warning); }
.banner-special { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); background: var(--c-accent-soft); color: var(--c-text); border-left: 4px solid var(--c-accent); }
.banner-special.kind-closed { background: var(--c-surface-2); border-left-color: var(--c-text); }
.banner-special.kind-info { background: var(--c-surface); border-left-color: var(--c-border-input); }
.kind-pill { display: inline-block; padding: 2px var(--s-2); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: var(--c-accent-soft); color: var(--c-accent); }
.kind-pill.kind-closed { background: var(--c-surface-2); color: var(--c-text); }
.kind-pill.kind-info { background: var(--c-surface); color: var(--c-text-muted); border: 1px solid var(--c-border); }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-3); }
.kind-choice { display: flex; gap: var(--s-2); align-items: flex-start; border: 1px solid var(--c-border-input); border-radius: var(--r-md); padding: var(--s-3); cursor: pointer; }
.kind-choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.kind-choice input { margin-top: 4px; accent-color: var(--c-accent); }
.warn-red { color: var(--c-danger); font-weight: 600; }
.cal { position: relative; }
.cal > summary { list-style: none; }
.cal > summary::-webkit-details-marker { display: none; }
.cal-pop { position: absolute; right: 0; top: calc(100% + var(--s-2)); z-index: 30; width: 340px; max-width: calc(100vw - 32px); background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-pop); padding: var(--s-3); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd { font-size: var(--fs-xs); color: var(--c-text-muted); text-align: center; font-weight: 600; padding-bottom: var(--s-1); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 40px; border-radius: var(--r-sm);
  text-decoration: none; color: var(--c-text); font-size: var(--fs-sm); border: 1px solid transparent; }
.cal-day:hover { border-color: var(--c-accent); }
.cal-n { font-weight: 600; line-height: 1; }
.cal-g { font-size: 10px; line-height: 1; color: var(--c-text-muted); margin-top: 2px; }
.cal-day.is-sunday .cal-n { color: var(--c-danger); }
.cal-day.is-closed { color: var(--c-text-muted); background: repeating-linear-gradient(135deg, transparent 0 5px, var(--c-surface-2) 5px 6px); }
.cal-day.is-holiday { background: var(--c-danger-soft); }
.cal-day.is-holiday .cal-n { color: var(--c-danger); }
.cal-day.is-notable { background: var(--c-warning-soft); }
.cal-day.has-special { box-shadow: inset 0 0 0 2px var(--c-accent); }
.cal-day.has-special.kind-closed { box-shadow: inset 0 0 0 2px var(--c-text); }
.cal-dot { position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
.cal-day.kind-closed .cal-dot { background: var(--c-text); }
.cal-day.is-today { border-color: var(--c-border-input); }
.cal-day.is-selected { background: var(--c-accent); }
.cal-day.is-selected .cal-n, .cal-day.is-selected .cal-g { color: var(--c-on-accent); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); list-style: none; padding: 0; margin: var(--s-3) 0 0; font-size: var(--fs-xs); color: var(--c-text-muted); }
.cal-legend li::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cal-legend .l-holiday::before { background: var(--c-danger-soft); border: 1px solid var(--c-danger); }
.cal-legend .l-notable::before { background: var(--c-warning-soft); border: 1px solid var(--c-warning); }
.cal-legend .l-special::before { box-shadow: inset 0 0 0 2px var(--c-accent); }
.cal-legend .l-closed::before { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--c-border-input) 3px 4px); }
.cal-legend .l-guests::before { display: none; }
.cal-legend .l-guests span { font-size: 10px; }
.cal-list { list-style: none; padding: var(--s-2) 0 0; margin: var(--s-2) 0 0; border-top: 1px solid var(--c-border); font-size: var(--fs-sm); display: grid; gap: 2px; max-height: 160px; overflow: auto; }
.cal-list a { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: var(--s-1); }
@media (max-width: 600px) { .cal-pop { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; } }

/* Zeitraum in der Übersicht */
.day-sep { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); margin-top: var(--s-5); padding: var(--s-2);
  background: var(--c-surface); border-radius: var(--r-sm); font-size: var(--fs-sm); }
.day-sep:first-child { margin-top: var(--s-2); }
.day-sep a { color: var(--c-text); text-decoration: none; } .day-sep a:hover { text-decoration: underline; }
.day-sep-note { margin-left: auto; color: var(--c-accent); font-weight: 600; font-size: var(--fs-xs); }
.cal-mode { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1); margin-bottom: var(--s-2); }
.cal-hint { margin: 0 0 var(--s-2); font-size: var(--fs-sm); background: var(--c-accent-soft); padding: var(--s-2); border-radius: var(--r-sm); }
.cal-day.is-inrange { background: var(--c-accent-soft); }
.cal-presets { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--c-border); }
.cal-range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); align-items: end; margin-top: var(--s-3); }
.cal-range label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); font-weight: 600; }
.cal-range input[type=date] { min-height: 32px; padding: var(--s-1); width: 100%; min-width: 0; box-sizing: border-box; }
.cal-range button { grid-column: 1 / -1; }
.test-mail { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: flex-end; }
.test-mail label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); font-weight: 600; flex: 1 1 260px; max-width: 420px; }
.test-mail input { font: inherit; font-weight: 400; min-height: 32px; padding: var(--s-1) var(--s-2); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); }
/* Diktat im Formular „Reservierung eintragen“ */
.dictate { border-left: 4px solid var(--c-accent); }
.dictate.is-recording { border-left-color: var(--c-danger); }
.dictate-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.dictate-head .h-md { margin: 0; }
.dictate .btn { display: inline-flex; align-items: center; gap: var(--s-2); }
.dictate-dot { width: .7em; height: .7em; border-radius: 50%; background: currentColor; opacity: .85; }
.dictate.is-recording .dictate-dot { animation: pulse 1s infinite; }
.dictate textarea[readonly] { background: var(--c-surface); }
.dictate-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); }
.dictate-ok { color: var(--c-success); } .dictate-err { color: var(--c-danger); } .dictate-rec { color: var(--c-danger); font-weight: 600; }
.field.is-filled input, .field.is-filled textarea { background: var(--c-success-soft); border-color: var(--c-success); }
@media (prefers-reduced-motion: reduce) { .dictate.is-recording .dictate-dot { animation: none; } }

/* Datumsfeld mit Monatskalender (Reservierung eintragen / ändern) */
.cal-field { position: relative; }
.cal-field .cal-pop { left: 0; right: auto; }
.date-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; min-height: 40px; padding: var(--s-2) var(--s-3);
  font: inherit; font-weight: 400; text-align: left; color: var(--c-text); background: var(--c-bg); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); cursor: pointer; }
.date-btn::after { content: ''; width: 16px; height: 16px; flex: none; background: currentColor; opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1v2H2.5A1.5 1.5 0 0 0 1 4.5v9A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 13.5 3H12V1h-1.5v2h-5V1zM2.5 6.5h11v7h-11z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1v2H2.5A1.5 1.5 0 0 0 1 4.5v9A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 13.5 3H12V1h-1.5v2h-5V1zM2.5 6.5h11v7h-11z'/%3E%3C/svg%3E") center / contain no-repeat; }
.date-btn:hover, .date-btn[aria-expanded="true"] { border-color: var(--c-accent); }
.date-info { display: block; margin-top: var(--s-2); color: var(--c-text-muted); }
.date-info:empty { display: none; }
.date-info.warn-red { color: var(--c-danger); font-weight: 600; }
.field.is-filled .date-btn { background: var(--c-success-soft); border-color: var(--c-success); }

/* Handy: Kopfzeilen umbrechen, Tabellen seitlich wischen, Tischplan einpassen */
.plan-fit { display: none; }
@media (max-width: 699px), (max-height: 500px) {
  .day-nav, .day-nav form { flex-wrap: wrap; }
  .day-head > .day-nav { width: 100%; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { white-space: nowrap; }
  .plan-fit { display: inline-flex; }
  .plan-scroll.is-fit { overflow: hidden; }
  .plan-scroll.is-fit .plan-board { transform-origin: 0 0; }
}
@media (max-width: 600px) {
  .h-lg { font-size: var(--fs-lg); line-height: var(--lh-lg); }
  .content { padding: var(--s-3) var(--s-4) var(--s-6); }
}
@media (max-width: 480px) {
  .grid-3 > .cal-field, .grid-4 > .cal-field { grid-column: 1 / -1; }
  .r-actions .btn { min-height: 40px; }
}
.search input { min-width: 0; }
.search .btn { flex: none; }
@media (max-height: 500px) { .h-lg { font-size: var(--fs-lg); line-height: var(--lh-lg); } }

/* Auswertung: Farben je Jahr (geprüft auf Farbenblindheit; Werte zusätzlich in der Tabelle) */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; flex: none; }
.swatch.s1, .bar.s1 { background: var(--series-1); fill: var(--series-1); }
.swatch.s2, .bar.s2 { background: var(--series-2); fill: var(--series-2); }
.swatch.s3, .bar.s3 { background: var(--series-3); fill: var(--series-3); }
.swatch.s4, .bar.s4 { background: var(--series-4); fill: var(--series-4); }
.stats-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-5); margin: var(--s-4) 0; }
.stats-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.stats-group legend { padding: 0; margin-bottom: var(--s-1); }
.stats-filter .chip-check { height: 36px; }
.stats-filter .chip-check input { width: 16px; height: 16px; margin: 0 4px 0 0; }
.stats-selects { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.stats-selects .field { margin-top: 0; }
.js .stats-go { display: none; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-3); }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3) var(--s-4); border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-bg); }
.stat-year { font-size: var(--fs-sm); font-weight: 600; display: flex; align-items: center; }
.stat-num { font-size: var(--fs-xl); line-height: var(--lh-xl); font-variant-numeric: tabular-nums; }
.chg-up { color: var(--c-success); font-weight: 600; } .chg-down { color: var(--c-danger); font-weight: 600; }
.stats-card { position: relative; }
.stats-legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); list-style: none; padding: 0; margin: 0 0 var(--s-2); font-size: var(--fs-sm); }
.stats-legend li { display: flex; align-items: center; }
.stats-chart { width: 100%; }
.stats-chart svg { display: block; overflow: visible; }
.ax-grid { stroke: var(--c-border); stroke-width: 1; }
.ax-base { stroke: var(--c-text-muted); stroke-width: 1; }
.ax-label { fill: var(--c-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-hit { fill: transparent; cursor: pointer; }
.stats-chart svg:has(.bar-group.is-active) .bar-group:not(.is-active) { opacity: .35; }
.stats-tip { position: absolute; top: 0; z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: var(--s-2) var(--s-3); background: var(--c-bg);
  border: 1px solid var(--c-border); border-radius: var(--r-sm); box-shadow: var(--sh-pop); font-size: var(--fs-sm); pointer-events: none; white-space: nowrap; }
.stats-tip span { display: flex; align-items: center; }
.stats-tip b { font-variant-numeric: tabular-nums; margin-left: 4px; }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table tfoot th, .stats-table tfoot td { font-weight: 700; border-top: 2px solid var(--c-border); }
.stats-table tbody th { font-weight: 400; }
.bar.is-open { fill-opacity: .4; }
.stats-table td.is-open { color: var(--c-text-muted); font-style: italic; }
.stats-tip i { color: var(--c-text-muted); font-size: var(--fs-xs); }
.stats-note { margin: 0 0 var(--s-2); }
@media (max-width: 600px) {
  .stats-tip { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin-top: var(--s-2); box-shadow: none; white-space: normal; }
  .stats-tip strong { width: 100%; }
}

/* Import aus DISH */
.import-sum { list-style: none; padding: 0; margin: var(--s-3) 0; display: grid; gap: var(--s-2); }
.import-sum strong { display: inline-block; min-width: 4.5ch; text-align: right; margin-right: var(--s-2); font-variant-numeric: tabular-nums; }
.import-list { margin: var(--s-2) 0 var(--s-3); padding-left: var(--s-5); max-height: 16rem; overflow-y: auto; }

/* ===== Version B: dunkle Seitenleiste, Wochenleiste, Schichten (Desktop + Handy) ===== */
:root { --c-nav: #1f3550; --c-nav-2: #2f4d70; --c-nav-text: #dfe7f0; --c-nav-muted: #b9c8da; --c-cta: #b8501a; --c-bar: #d0692a; }
.sidebar { background: var(--c-nav); color: var(--c-nav-text); border-right: 0; }
.sidebar .brand, .brand-in { color: #fff; }
.sidebar a { color: var(--c-nav-text); }
.sidebar a:hover { background: var(--c-nav-2); }
.sidebar a[aria-current] { background: var(--c-nav-2); color: #fff; }
.sidebar .muted { color: var(--c-nav-muted); }
.sidebar .btn-secondary { background: transparent; color: #fff; border-color: #5a7697; }
.sidebar .btn-primary { background: #fff; color: var(--c-nav); }
.sidebar .btn-ghost { color: #fff; }
.sidebar :focus-visible { outline-color: #fff; }
.nav-panel-head, .nav-backdrop, .menu-current { display: none; }
.logout { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3) 0; }
.btn-cta { background: var(--c-cta); color: #fff; font-weight: 700; }

.page-overview .content { max-width: none; padding: 0; }
.ov-hero { background: #fbfbfc; border-bottom: 1px solid var(--c-border); padding: var(--s-5) var(--s-6) var(--s-4); display: flex; flex-direction: column; gap: var(--s-4); }
.ov-head { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.ov-title { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; min-width: 0; }
.ov-title h1 { margin: 0; font-size: var(--fs-xl); line-height: var(--lh-xl); }
.ov-sub { color: var(--c-text-muted); font-size: 15px; }
.ov-tools { display: flex; gap: var(--s-2); align-items: center; }
.ov-actions { display: flex; gap: var(--s-2); margin-left: auto; flex-wrap: wrap; }
.ov-actions .btn, .ov-tools .btn, .ov-tools .cal > summary { height: 44px; }
.week { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--s-2); align-items: stretch; }
.week-arrow { display: flex; align-items: center; justify-content: center; border: 1px solid #c9ced6; border-radius: var(--r-md); background: #fff; color: var(--c-text); text-decoration: none; font-size: 22px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; color: var(--c-text); text-decoration: none; min-width: 0; }
.week-day:hover { border-color: var(--c-nav); }
.wd-name { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; }
.wd-n { font-size: 22px; line-height: 26px; font-weight: 700; }
.wd-info { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wd-bar { display: block; width: 70%; height: 4px; border-radius: 2px; background: var(--c-border); margin-top: 4px; overflow: hidden; }
.wd-bar > span { display: block; height: 100%; background: var(--c-accent); }
.week-day.is-closed { background: var(--c-surface); color: var(--c-text-muted); }
.week-day.is-holiday .wd-n { color: var(--c-danger); }
.week-day.is-today:not(.is-selected) { border-color: var(--c-nav); box-shadow: inset 0 0 0 1px var(--c-nav); }
.week-day.is-selected { background: var(--c-nav); border-color: var(--c-nav); color: #fff; }
.week-day.is-selected .wd-n { color: #fff; }
.week-day.is-selected .wd-bar { background: rgba(255,255,255,.25); }
.week-day.is-selected .wd-bar > span { background: var(--c-bar); }

.ov-body { display: flex; gap: var(--s-6); padding: var(--s-5) var(--s-6) var(--s-7); align-items: flex-start; }
.ov-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.ov-main > .banner { margin: 0; }
.ov-side { width: 300px; flex: none; display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: var(--s-4); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid #c9ced6; background: #fff; color: var(--c-text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip.is-on { background: var(--c-nav); border-color: var(--c-nav); color: #fff; }
.ov-day { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-2); margin: var(--s-3) 0 calc(-1 * var(--s-3)); font-size: var(--fs-lg); }
.ov-day a { color: var(--c-text); text-decoration: none; } .ov-day a:hover { text-decoration: underline; }
.ov-day .muted { font-size: var(--fs-sm); font-weight: 500; }
.ov-day-note { font-size: var(--fs-xs); font-weight: 700; color: var(--c-accent); background: var(--c-accent-soft); padding: 2px var(--s-2); border-radius: var(--r-pill); }
.shift-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding-bottom: 10px; border-bottom: 2px solid var(--c-nav); }
.shift-head h2, .shift-head h3 { margin: 0; font-size: var(--fs-lg); line-height: var(--lh-lg); }
.shift-head h2 span, .shift-head h3 span { font-size: 15px; font-weight: 500; color: var(--c-text-muted); }
.shift-sum { font-size: var(--fs-sm); font-weight: 600; }
.res-list { list-style: none; margin: 0; padding: 0; }
.res { display: grid; grid-template-columns: 56px 40px minmax(0, 1fr) 90px 110px 256px; grid-template-areas: "time party name table status act"; gap: var(--s-4); align-items: center; padding: 14px var(--s-1); border-bottom: 1px solid var(--c-border); }
.res-time { grid-area: time; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.res-party { grid-area: party; width: 40px; height: 40px; border-radius: 50%; background: #eef1f4; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.res-name { grid-area: name; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-name strong { font-size: var(--fs-base); }
.res-meta { font-size: var(--fs-sm); color: var(--c-text-muted); overflow-wrap: anywhere; }
.res-meta a { color: inherit; }
.res-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.res-note { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--fs-sm); line-height: 18px; color: #5c3a00; background: var(--c-warning-soft); border-radius: var(--r-sm); padding: 4px 8px; overflow-wrap: break-word; min-width: 0; }
.res-note-info { background: var(--c-surface-2); color: #3a414b; }
.res-note-l { flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-warning); }
.res-note-info .res-note-l { color: var(--c-text-muted); }
.res-table { grid-area: table; font-size: var(--fs-sm); font-weight: 600; color: #3a414b; }
.res-status { grid-area: status; display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 600; }
.res-actions { grid-area: act; display: flex; gap: var(--s-1); justify-content: flex-end; flex-wrap: wrap; }
.res-actions form { margin: 0; }
.more { position: relative; }
.more > summary { list-style: none; font-size: 20px; letter-spacing: 1px; }
.more > summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--sh-pop); padding: var(--s-1); display: flex; flex-direction: column; }
.more-pop .btn { width: 100%; justify-content: flex-start; height: 40px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c-text-muted); }
.dot-request { background: #d99a1e; } .dot-confirmed { background: var(--c-accent); } .dot-arrived { background: #1f8a4c; }
.dot-completed { background: #8a919c; } .dot-cancelled, .dot-declined, .dot-no_show { background: var(--c-danger); }
.res-request { background: #fffaf0; box-shadow: inset 4px 0 0 #d99a1e; padding-left: var(--s-3); }
.res-off { opacity: .5; }
.res-completed .res-time, .res-completed strong { color: var(--c-text-muted); }

.side-card { border: 1px solid var(--c-border); border-radius: 14px; padding: 18px 20px; background: #fff; }
.side-card h2 { margin: 0 0 var(--s-3); font-size: 15px; line-height: 20px; }
.side-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); font-size: var(--fs-sm); }
.side-card li a { font-weight: 600; }
.side-stats dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin: 0; }
.side-stats dl div { display: flex; flex-direction: column-reverse; }
.side-stats dt { font-size: 13px; color: var(--c-text-muted); }
.side-stats dd { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.side-req { background: #fff7e8; border-color: #f0d49a; }
.side-req h2, .side-req a { color: #7a4b00; }
.side-req li { color: #5c3a00; }
.side-link { display: inline-block; margin-top: var(--s-2); font-size: var(--fs-sm); font-weight: 700; }
.side-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: var(--s-3) 0 0; font-size: var(--fs-sm); font-weight: 600; }
.mobile-bar { display: none; }
.wd-short { display: none; }

@media (max-width: 1380px) and (min-width: 700px) {
  .ov-side { width: 250px; }
  .res { grid-template-columns: 56px 40px minmax(0, 1fr) auto; grid-template-areas: "time party name status" ". . table act"; row-gap: var(--s-2); }
}

/* Handy und kleines Tablet: Menü nur auf Wunsch, Kopf dunkel, Knöpfe unten */
@media (max-width: 699px), (max-height: 500px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .content { padding: var(--s-4); }
  .sidebar { position: sticky; top: 0; z-index: 40; background: var(--c-nav); border-bottom: 0; padding: 10px var(--s-4); }
  .topbar { display: flex; align-items: center; justify-content: flex-start; gap: var(--s-3); min-height: 44px; }
  .topbar .brand { color: #fff; font-size: var(--fs-base); }
  .menu-current { display: block; margin-left: auto; color: var(--c-nav-muted); font-size: var(--fs-sm); }
  .menu-btn { order: -1; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--c-nav-2); color: #fff; cursor: pointer; flex: none; }
  .menu-icon { width: 20px; height: 14px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
  .nav-panel, .js .nav-panel:not(.is-open) { display: flex; }
  .nav-panel { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(300px, 85vw); max-height: none; background: var(--c-nav); padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); gap: 2px;
    box-shadow: 8px 0 32px rgba(0,0,0,.35); overflow-y: auto; transform: translateX(-105%); transition: transform var(--m-base) var(--m-ease); visibility: hidden; }
  .nav-panel.is-open { transform: none; visibility: visible; }
  .nav-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 14px; }
  .brand-in { font-weight: 700; font-size: 17px; }
  .menu-close { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--c-nav-2); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10,20,35,.45); }
  .nav-open, .nav-open body { overflow: hidden; }
  .sidebar ul { display: flex; flex-direction: column; gap: 2px; }
  .sidebar a { padding: 13px 12px; font-size: var(--fs-base); }
  .sidebar .pause { margin-top: auto; padding: var(--s-4) 0 0; border-top: 1px solid var(--c-nav-2); }
  .sidebar .pause .btn { width: 100%; height: 44px; }
  .logout { padding: var(--s-3) 4px 0; }
  @media (prefers-reduced-motion: reduce) { .nav-panel { transition: none; } }

  .page-overview .sidebar { padding-bottom: 0; }
  .ov-hero { background: var(--c-nav); color: #fff; border: 0; padding: var(--s-2) var(--s-4) var(--s-4); gap: var(--s-3); }
  .ov-head { flex-wrap: nowrap; align-items: center; }
  .ov-title { flex-direction: column; gap: 0; flex: 1; }
  .ov-title h1 { font-size: var(--fs-lg); line-height: var(--lh-lg); }
  .ov-sub { color: var(--c-nav-muted); font-size: 13px; }
  .ov-actions { display: none; }
  .ov-tools .btn, .ov-tools .cal > summary { height: 40px; background: var(--c-nav-2); color: #fff; border-color: transparent; }
  .week { grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 4px; }
  .week-arrow { background: transparent; border: 0; color: #fff; font-size: 24px; }
  .week-days { gap: 4px; }
  .week-day { height: 62px; justify-content: center; padding: 4px 0; border: 0; border-radius: 12px; background: var(--c-nav-2); color: #fff; }
  .week-day .wd-info { display: none; }
  .week-day { height: 72px; }
  .wd-short { display: block; font-size: 11px; line-height: 14px; font-weight: 600; white-space: nowrap; color: var(--c-nav-muted); }
  .week-day.is-selected .wd-short { color: var(--c-text-muted); }
  .week-day.is-closed .wd-short { color: #8ea3bb; }
  .wd-name { font-size: 11px; } .wd-n { font-size: 18px; line-height: 22px; }
  .wd-bar { width: 60%; height: 3px; background: rgba(255,255,255,.2); }
  .wd-bar > span { background: var(--c-bar); }
  .week-day.is-closed { background: transparent; color: #8ea3bb; }
  .week-day.is-holiday .wd-n { color: #ffb4a8; }
  .week-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 2px #8ea3bb; }
  .week-day.is-selected { background: #fff; color: var(--c-nav); }
  .week-day.is-selected .wd-n { color: var(--c-nav); }
  .week-day.is-selected .wd-bar { background: var(--c-border); }

  .page-overview .content { background: var(--c-nav); }
  .ov-body { flex-direction: column; gap: var(--s-4); padding: var(--s-4) var(--s-4) 120px; background: var(--c-surface); border-radius: 22px 22px 0 0; align-items: stretch; }
  .ov-side { display: contents; }
  .side-stats { order: -2; padding: 0; border: 0; background: transparent; }
  .side-stats h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .side-stats dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
  .side-stats dl div { background: #fff; border-radius: 14px; padding: 10px; }
  .side-stats dd { font-size: 22px; line-height: 28px; }
  .side-stats dt { font-size: 11px; }
  .side-req { order: -1; }
  .ov-main { order: 0; gap: var(--s-4); }
  .side-week { order: 1; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4) 2px; scrollbar-width: none; }
  .shift-head { border-bottom: 0; padding: 4px 2px 8px; }
  .shift-head h2, .shift-head h3 { font-size: 17px; } .shift-sum { font-size: 13px; }
  .res-list { display: flex; flex-direction: column; gap: var(--s-2); }
  .res { grid-template-columns: 52px 36px minmax(0, 1fr) auto; grid-template-areas: "time party name status" "table . name status" "act act act act"; gap: 2px var(--s-3);
    background: #fff; border: 1px solid var(--c-border); border-radius: 16px; padding: 12px 14px; }
  .res-request { background: #fff; border-color: #f0d49a; padding-left: 14px; }
  .res-time { font-size: 17px; }
  .res-party { width: 36px; height: 36px; font-size: 15px; }
  .res-table { font-size: var(--fs-xs); color: var(--c-text-muted); align-self: start; }
  .res-status { font-size: var(--fs-xs); align-self: start; position: absolute; top: 14px; right: 14px; }
  .res { position: relative; grid-template-areas: "time party name name" "table . name name" "act act act act"; }
  .res-name > .r-link { margin-right: 96px; }
  .res-actions { justify-content: stretch; margin-top: var(--s-2); }
  .res-actions:empty { display: none; }
  .res-actions form, .res-actions > a { flex: 1; }
  .res-actions .btn { width: 100%; height: 44px; }
  .res-actions .more { flex: none; } .res-actions .more > summary { width: 44px; height: 44px; }
  .more-pop .btn { height: 44px; }
  .res-off .res-actions, .res-completed .res-actions { display: none; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--c-border); }
  .mobile-bar .btn { height: 50px; border-radius: 14px; font-size: var(--fs-base); font-weight: 700; }
}
/* Aufgeklapptes Falt-Handy, kleines Tablet: Liste links, Überblick rechts */
@media (min-width: 10000px) {
  .ov-body { flex-direction: row; align-items: flex-start; gap: var(--s-5); padding: var(--s-5) var(--s-5) 120px; }
  .ov-side { display: flex; width: 250px; position: static; }
  .side-stats { order: 0; padding: 14px 16px; background: #fff; border: 1px solid var(--c-border); }
  .side-req { order: 1; } .side-week { order: 2; }
  .side-stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-stats dl div { padding: 0; }
  .res { grid-template-columns: 52px 36px minmax(0, 1fr) auto; grid-template-areas: "time party name status" "table . name status" "act act act act"; }
}
.chip { flex: none; }
.cal-lbl-more { display: inline; }
@media (max-width: 699px) { .cal-lbl-more { display: none; } }
@media (max-width: 359px) {
  .side-stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-tools .ov-today { display: none; }
}

/* Wochenleiste: vergangene Tage weiß, heute grün, kommende Tage blau; gewählter Tag mit orangem Ring */
.week-day, .week-day:not(.is-selected) { background: var(--c-nav-2); border: 1px solid var(--c-nav-2); color: #fff; box-shadow: none; opacity: 1; }
.week-day .wd-n, .week-day .wd-short { color: #fff; }
.week-day .wd-bar { background: rgba(255,255,255,.2); }
.week-day .wd-bar > span { background: var(--c-bar); }
.week-day.is-closed, .week-day.is-closed:not(.is-selected) { opacity: 1; }
.week-day.is-closed .wd-short, .week-day.is-closed .wd-info { color: inherit; }
.week-day.is-past { background: #fff; border-color: #c9ced6; color: var(--c-text); }
.week-day.is-past .wd-n { color: var(--c-text); }
.week-day.is-past .wd-short { color: var(--c-text-muted); }
.week-day.is-past .wd-bar { background: var(--c-border); }
.week-day.is-past .wd-bar > span { background: #8a919c; }
.week-day.is-today { background: #2a7d4f; border-color: #2a7d4f; color: #fff; opacity: 1; }
.week-day.is-today .wd-n, .week-day.is-today .wd-short { color: #fff; }
.week-day.is-today .wd-bar { background: rgba(255,255,255,.3); }
.week-day.is-today .wd-bar > span { background: #fff; }
.week-day.is-holiday .wd-n { color: #ffb4a8; }
.week-day.is-past.is-holiday .wd-n { color: var(--c-danger); }
.week-day.is-selected { box-shadow: 0 0 0 3px var(--c-bar); opacity: 1; }
@media (max-width: 699px), (max-height: 500px) {
  .week-day.is-past { border: 0; }
  .week-day.is-selected { box-shadow: 0 0 0 3px #f2a65a; }
}
.week-day.is-today:not(.is-selected) { box-shadow: none; }
/* Hover nur mit Maus (auf dem Handy bleibt sonst ein angetippter Tag dunkler) */
.week-day:hover { border-color: var(--c-border); }
@media (hover: hover) {
  .week-day:not(.is-past):not(.is-today):hover { filter: brightness(1.12); }
  .week-day.is-past:hover { border-color: var(--c-nav); }
}
.week-day.is-past, .week-day.is-past:not(.is-selected) { background: #fff; color: var(--c-text); }
/* Gewählter Tag behält seine Farbe (weiß / grün / blau), nur der orange Rahmen zeigt die Auswahl */
.week-day.is-selected:not(.is-past):not(.is-today) { background: var(--c-nav-2); border-color: var(--c-nav-2); color: #fff; }
.week-day.is-selected:not(.is-past):not(.is-today) .wd-n, .week-day.is-selected:not(.is-past):not(.is-today) .wd-short { color: #fff; }
.week-day.is-selected:not(.is-past):not(.is-today) .wd-bar { background: rgba(255,255,255,.2); }
.week-day.is-selected.is-past { background: #fff; color: var(--c-text); }
.week-day.is-selected.is-past .wd-n { color: var(--c-text); }
.week-day.is-selected.is-past .wd-short { color: var(--c-text-muted); }
.week-day.is-selected.is-past .wd-bar { background: var(--c-border); }
.week-day.is-selected.is-today { background: #2a7d4f; color: #fff; }
.week-day.is-selected.is-today .wd-n, .week-day.is-selected.is-today .wd-short { color: #fff; }
.week-day.is-selected.is-today .wd-bar { background: rgba(255,255,255,.3); }
.week-day.is-today:not(.is-selected) { border-color: #2a7d4f; box-shadow: none; }

/* KI-Tischplan */
.ai-start { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.ai-start form { margin: 0; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-5); align-items: start; }
.ai-board { min-width: 0; }
.ai-assign { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-2); }
.ai-assign li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border: 1px solid var(--c-border); border-radius: var(--r-md); background: #fff; font-size: var(--fs-sm); }
.ai-sw { width: 16px; height: 16px; border-radius: 4px; flex: none; margin-top: 2px; border: 2px solid; }
.ai-apply { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.occ-g0 { background: #dbe8f6; border-color: #2b5a8a; } .occ-g1 { background: #fde5d2; border-color: #b8501a; }
.occ-g2 { background: #dcefe3; border-color: #1d6b45; } .occ-g3 { background: #ece0f3; border-color: #6b3d8a; }
.occ-g4 { background: #fbe9b8; border-color: #8a6400; } .occ-g5 { background: #d6eff0; border-color: #1f6f6a; }
.occ-g6 { background: #f6dde4; border-color: #9b2c4f; } .occ-g7 { background: #e6e3dc; border-color: #5a5248; }
.occ-reserve { border-style: dashed; border-color: #1d6b45; background: #fff; }
@media (max-width: 1100px) { .ai-grid { grid-template-columns: minmax(0, 1fr); } }

/* Grundriss (Tischplan wie die Vorlage: dunkle Tische, Raumteiler) */
.room-wrap { width: 100%; max-width: 1200px; margin: var(--s-3) 0 var(--s-5); }
.room { display: block; width: 100%; height: auto; font-family: var(--font-sans); }
.room-bg { fill: #F4F3EF; }
.room-wall { fill: #A3A3A3; }
.rt rect { fill: #2B2B2B; }
.rt text { fill: #fff; text-anchor: middle; }
.rt .rt-n { font-size: 30px; font-weight: 700; }
.rt .rt-s { font-size: 13px; font-weight: 500; fill: #E2E2E2; }
.rt .rt-l { font-size: 12px; font-weight: 700; }
.rt-busy .rt-s { fill: #fff; opacity: .85; }
.rt-soon rect { fill: #fff; stroke: #b8501a; stroke-width: 3; stroke-dasharray: 8 5; }
.rt-soon text, .rt-soon .rt-s { fill: #6b2f0e; }
.rt-request rect { fill: #fff3dc; stroke: #8a5300; stroke-width: 3; stroke-dasharray: 8 5; }
.rt-request text, .rt-request .rt-s { fill: #5c3a00; }
.rt-reserve rect { fill: #DAD8D2; }
.rt-reserve text { fill: #3A3A3A; } .rt-reserve .rt-s { fill: #555; }
.room a:hover rect, .room a:focus rect { filter: brightness(1.15); }
.room a:focus-visible { outline: none; } .room a:focus-visible rect { stroke: #f2a65a; stroke-width: 4; }
.room-legend span::before { border: 0; }
.rl-free::before { background: #2B2B2B; }
.rl-busy::before { background: linear-gradient(90deg, #A33A3A 33%, #3C6E2F 33% 66%, #2F5D8A 66%); }
.rl-soon::before { background: #fff; outline: 2px dashed #b8501a; }
.rl-request::before { background: #fff3dc; outline: 2px dashed #8a5300; }
.room-group { fill-opacity: .14; stroke-opacity: .5; stroke-width: 2; }
.room-chip text { fill: #fff; font-size: 13px; font-weight: 700; }
.ai-ask { margin-top: var(--s-3); }
.ai-ask textarea { width: 100%; font: inherit; padding: var(--s-2) var(--s-3); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); }
.ai-ask p { margin: var(--s-3) 0 0; }
.shift-empty { padding: var(--s-3) var(--s-1); color: var(--c-text-muted); font-size: var(--fs-sm); list-style: none; }
select[data-time-select] { width: 100%; }

/* Formular „Wann und wie viele“: Datum, Uhrzeit, Personen gleich groß in einer Zeile */
.grid-3 .field input, .grid-3 .field select, .grid-3 .date-btn,
.grid-4 .field input, .grid-4 .field select, .grid-4 .date-btn { height: 48px; min-height: 48px; box-sizing: border-box; padding: 0 var(--s-3); font-size: var(--fs-base); }
.grid-3 .field select, .grid-4 .field select { padding-right: var(--s-2); }
.grid-3 .field > span, .grid-4 .field > span { min-height: 24px; display: block; }
/* Tisch zum Aufklappen */
.tbl-fold { margin-top: var(--s-4); border: 1px solid var(--c-border-input); border-radius: var(--r-sm); }
.tbl-fold > summary { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-3); cursor: pointer; list-style: none; }
.tbl-fold > summary::-webkit-details-marker { display: none; }
.tbl-fold > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--m-fast); }
.tbl-fold[open] > summary::after { transform: rotate(-135deg); }
.tbl-fold-l { font-weight: 700; }
.tbl-fold-v { color: var(--c-text-muted); font-size: var(--fs-sm); }
.tbl-fold > .field-group { margin: 0; padding: 0 var(--s-3) var(--s-3); border: 0; }
/* Diktat: anfangs nur der Knopf */
.dictate.is-compact { padding-top: var(--s-3); padding-bottom: var(--s-3); }
.dictate .dictate-head { justify-content: flex-start; }
.dictate-tip { flex: 1 1 200px; }
.dictate-body { margin-top: var(--s-3); }
.dictate-body[hidden] { display: none; }

/* Sehr schmale Displays (Außendisplay faltbares iPhone, kleine Handys) */
.t-short { display: none; }
@media (max-width: 400px) {
  .menu-current { display: none; }
  .t-long { display: none; } .t-short { display: inline; }
  .ov-title h1 { font-size: 19px; line-height: 24px; }
  .ov-hero { padding: var(--s-1) var(--s-3) var(--s-3); }
  .ov-tools .btn, .ov-tools .cal > summary { height: 36px; padding: 0 10px; font-size: 14px; }
  .week { grid-template-columns: 20px minmax(0, 1fr) 20px; gap: 2px; }
  .week-arrow { font-size: 20px; }
  .week-days { gap: 3px; }
  .week-day { height: 64px; border-radius: 10px; }
  .wd-name { font-size: 10px; } .wd-n { font-size: 16px; line-height: 20px; }
  .wd-short { font-size: 9.5px; line-height: 12px; }
  .ov-body { padding: var(--s-3) var(--s-3) 110px; gap: var(--s-3); }
  .side-stats dl, .side-stats dl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .side-stats dl div { padding: 6px 4px; text-align: center; border-radius: 10px; }
  .side-stats dd { font-size: 18px; line-height: 22px; }
  .side-stats dt { font-size: 9.5px; line-height: 12px; overflow-wrap: anywhere; }
  .side-card { padding: 12px 14px; }
  .shift-head { flex-wrap: wrap; row-gap: 0; }
  .shift-head h2, .shift-head h3 { font-size: 16px; line-height: 22px; }
  .shift-head h2 span, .shift-head h3 span { font-size: 13px; }
  .res { grid-template-columns: 50px minmax(0, 1fr); grid-template-areas: "time name" "party name" "table status" "act act"; padding: 10px 12px; column-gap: 10px; }
  .res-status { position: static; align-self: center; }
  .res-name > .r-link { margin-right: 0; }
  .res-party { width: 30px; height: 30px; font-size: 13px; }
  .res-table { align-self: center; }
  .res-actions .btn { height: 42px; font-size: 14px; }
  .mobile-bar { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .mobile-bar .btn { height: 46px; font-size: 15px; }
  .content { padding: var(--s-3); }
  .page-overview .content { padding: 0; }
  .card { padding: var(--s-3); }
  .dictate-tip { display: none; }
  .tbl-fold-v { font-size: 12px; }
}
.l-short { display: none; }
.cal:not([open]) > .cal-pop { display: none; }
@media (max-width: 400px) {
  .l-long { display: none; } .l-short { display: inline; }
  .side-stats dt { overflow-wrap: normal; }
  .res { grid-template-areas: "time name" "party name"; }
  .res-table { grid-area: 3 / 1 / 4 / 3; margin-top: 6px; }
  .res-status { grid-area: 3 / 2 / 4 / 3; justify-self: end; margin-top: 6px; }
  .res-actions { grid-area: 4 / 1 / 5 / 3; }
}
@media (max-width: 400px) { .filters { margin: 0 calc(-1 * var(--s-3)); padding: 0 var(--s-3) 2px; } }

/* Notiz/Info als Knopf: am Computer voll lesbar, am Handy einzeilig mit Aufklappen */
button.res-note { font: inherit; font-size: var(--fs-sm); text-align: left; border: 0; width: 100%; cursor: default; }
.res-note-t { min-width: 0; }
@media (max-width: 699px), (max-height: 500px) {
  button.res-note { align-items: center; }
  .res-note-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .res-note.is-long { cursor: pointer; }
  .res-note.is-long::after, .res-note.is-open::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 2px 3px 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .7; }
  .res-note.is-open { align-items: flex-start; }
  .res-note.is-open .res-note-t { white-space: normal; overflow: visible; }
  .res-note.is-open::after { transform: rotate(-135deg); margin-top: 6px; margin-bottom: 0; }
}

/* SMS im Postausgang */
.status-sending { color: var(--c-text-muted); }
.sms-ok { color: var(--c-success); font-weight: 600; margin: 0 0 var(--s-2); }
.mail header form.inline { margin-left: auto; }
.summary dd { overflow-wrap: anywhere; min-width: 0; }

/* automatische Aktualisierung */
.live-toast { position: fixed; left: 50%; bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--c-text); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .875rem; box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: opacity .5s; }
.live-toast.is-gone { opacity: 0; }
@media (max-width: 760px) { .live-toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Diktat-Einstellungen */
fieldset.card-sub { border: 1px solid var(--c-border); border-radius: 10px; padding: var(--s-3) var(--s-4); }
fieldset.card-sub legend { font-weight: 600; padding: 0 var(--s-1); }

/* Gästeformular: besondere Tage als Schnellwahl */
.events { margin: var(--s-2) 0 var(--s-4); }
.events > p { margin: 0 0 var(--s-1); }
.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.event-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid #e0b25c; background: #fdf4e3; color: var(--c-text); font: inherit; text-align: left; min-height: 44px; }
.event-chip .ev-title { font-weight: 600; font-size: .9375rem; }
.event-chip .ev-date { font-size: .8125rem; color: var(--c-text-muted); }
.event-chip:hover { background: #fbe9c8; }
.event-chip.is-selected { border-color: #b7791f; box-shadow: 0 0 0 2px #b7791f inset; }
.event-chip:focus-visible { outline: 3px solid var(--c-focus, #2563eb); outline-offset: 2px; }

/* eingebettet (iframe auf der Hotel-Website) */
.in-frame body { background: transparent; }
.in-frame .widget { min-height: 0; margin: 0 auto; box-shadow: none; }

/* Gästeformular: Kalender wie im Backoffice, aber fest eingebaut */
.gcal { border: 1px solid var(--c-border); border-radius: var(--r-md, 12px); padding: var(--s-3); background: var(--c-bg); }
:where(.gcal) button.cal-day { font: inherit; font-size: var(--fs-sm); background: var(--c-bg); cursor: pointer; min-height: 44px; }
.gcal .cal-day.is-off { cursor: default; opacity: .45; }
.gcal .cal-day.is-off:hover { border-color: transparent; }
.gcal .cal-day:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 1px; }
.gcal .cal-head strong { font-size: 1.0625rem; }
.gcal .cal-list { max-height: none; }
.gcal .cal-date { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: var(--s-1); }
.gcal-events { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.gcal-event { display: block; width: 100%; box-sizing: border-box; margin: 0; text-align: center; padding: 10px 14px; border-radius: 10px; border: 1px solid #e0b25c; background: #fdf4e3;
  color: var(--c-text); font: inherit; cursor: pointer; line-height: 1.35; }
.gcal-event:hover { background: #fbe9c8; }
.gcal-event.is-selected { border-color: #b7791f; box-shadow: 0 0 0 2px #b7791f inset; }
.gcal-event:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.party-hint { margin: var(--s-2) 0 0; }

/* Gästeformular: Datumsfeld, aus dem sich der Kalender aufschiebt */
.date-toggle { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--c-border-input); border-radius: 10px;
  background: var(--c-bg); color: var(--c-text); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.date-toggle .ico { width: 20px; height: 20px; color: var(--c-accent); flex: none; }
.date-toggle span:not(.chev) { flex: 1; font-weight: 600; }
.date-toggle .chev { transition: transform .2s; color: var(--c-text-muted); }
.date-toggle.is-open { border-color: var(--c-accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.date-toggle.is-open .chev { transform: rotate(180deg); }
.date-toggle:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.gcal-panel .gcal { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-color: var(--c-accent); }
.gcal-panel.slide-in { animation: gcal-slide .25s ease-out; transform-origin: top; overflow: hidden; }
@keyframes gcal-slide { from { opacity: 0; transform: scaleY(.6); } to { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .gcal-panel.slide-in { animation: none; } }

/* Gästeformular: Uhrzeit als aufklappbare Liste */
.time-toggle small { font-weight: 400; }
.time-panel { border: 1px solid var(--c-accent); border-top: 0; border-radius: 0 0 10px 10px; background: var(--c-bg); }
.time-panel.slide-in { animation: gcal-slide .25s ease-out; transform-origin: top; }
.time-list { position: relative; list-style: none; margin: 0; padding: var(--s-1) 0; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.time-group { position: sticky; top: 0; z-index: 1; background: var(--c-surface-2, #f3f4f6); color: var(--c-text-muted); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 14px; }
.time-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 14px; border: 0; background: transparent;
  color: var(--c-text); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.time-opt:hover { background: var(--c-accent-soft); }
.time-opt.is-selected { background: var(--c-accent); color: var(--c-on-accent, #fff); font-weight: 700; }
.time-opt.is-request small { color: var(--c-text-muted); border: 1px dashed currentColor; border-radius: 6px; padding: 0 6px; font-size: .75rem; }
.time-opt.is-selected small { color: inherit; }
.time-opt:focus-visible { outline: 3px solid var(--c-accent); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .time-panel.slide-in { animation: none; } }

/* Monatskalender an allen Datumsfeldern */
.cal-field .date-clear { position: absolute; right: 40px; bottom: 8px; z-index: 1; min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--c-border-input); background: var(--c-bg);
  color: var(--c-text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.cal-field .date-clear:hover { color: var(--c-danger); border-color: var(--c-danger); }
.cal-field .field { position: relative; }
.cal-inline { display: inline-block; vertical-align: middle; }
.cal-inline .date-btn { min-height: 36px; }
.day-nav .date-info, .ov-hero .date-info { display: none; }
#party-panel .time-list { max-height: none; }   /* 1–8 Personen ganz zeigen */

/* Gast suchen (Kopfzeile der Übersicht) */
.ov-search { position: relative; min-width: 220px; flex: 0 1 260px; }
.ov-search input[type=search] { width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px 0 36px; border: 1px solid var(--c-border-input); border-radius: 10px;
  font: inherit; background: var(--c-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center / 18px; color: var(--c-text); }
.ov-search input[type=search]:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.ov-hits { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
  background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; }
.ov-hit { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.ov-hit:hover, .ov-hit:focus { background: var(--c-accent-soft); outline: none; }
.ov-hit-when { font-weight: 600; }
.ov-hit-who { grid-column: 1; color: var(--c-text-muted); font-size: var(--fs-sm); }
.ov-hit .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ov-hit-none { margin: 8px 10px; color: var(--c-text-muted); font-size: var(--fs-sm); }
.search-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.search-list a { display: block; padding: var(--s-3); border: 1px solid var(--c-border); border-radius: 10px; text-decoration: none; color: inherit; background: var(--c-bg); }
.search-list a:hover { border-color: var(--c-accent); }
.card .ov-search { max-width: 420px; }
/* Handy/Tablet: Knöpfe stehen unten in der Leiste, die Suche bleibt oben sichtbar */
@media (max-width: 699px), (max-height: 500px) {
  .page-overview .ov-actions { display: flex; order: 9; width: 100%; margin: 0; }
  .page-overview .ov-actions > .btn { display: none; }
  .page-overview .ov-search { flex: 1 1 auto; min-width: 0; }
  .page-overview .ov-head { flex-wrap: wrap; }
  .ov-hits { left: 0; right: auto; width: 100%; }
}

/* Kopfzeile am großen Bildschirm in einer Linie: Titel · Kalender · Suche (dehnbar) · Walk-in · + Reservierung ganz rechts */
@media (min-width: 700px) and (min-height: 501px) {
  .page-overview .ov-head { flex-wrap: nowrap; }
  .page-overview .ov-title { flex: none; }
  .page-overview .ov-tools { flex: none; }
  .page-overview .ov-actions { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-end; min-width: min-content; }
  .page-overview .ov-actions > .btn { flex: none; white-space: nowrap; }
  .page-overview .ov-search { flex: 0 1 280px; min-width: 110px; }
}
@media (min-width: 700px) and (max-width: 1440px) {
  .page-overview .cal-lbl-more { display: none; }
  .page-overview .ov-sub { display: none; }   /* wenig Platz: „2026 · heute · KW 45“ weglassen */
  .page-overview .ov-title .t-long { display: none; }
  .page-overview .ov-title .t-short { display: inline; }
  .page-overview .ov-title h1 { white-space: nowrap; }
}

/* Karten-Knöpfe: Platzhalter halten „Ändern“ und „⋯“ am Handy/Tablet immer an derselben Stelle */
.act-ph, .more-ph { display: none; }
@media (max-width: 699px), (max-height: 500px) {
  .res-actions .act-ph { display: block; flex: 1; }
  .res-actions .more-ph { display: block; flex: none; width: 44px; }
  .res { grid-template-areas: "time party name name" "table table name name" "act act act act"; }
  .res-table { white-space: nowrap; }
}
@media (max-width: 400px) {
  .res { grid-template-areas: "time name" "party name"; }
}

/* Aufgeklapptes Falt-Handy und Tablet (700–1180 px): Ansicht wie am Rechner, nur kleiner skaliert */
@media (min-width: 700px) and (max-width: 779px) and (min-height: 501px) { body.app-page { zoom: .66; } body.app-page .app-shell { min-height: calc(100vh / .66); } }
@media (min-width: 780px) and (max-width: 849px) and (min-height: 501px) { body.app-page { zoom: .72; } body.app-page .app-shell { min-height: calc(100vh / .72); } }
@media (min-width: 850px) and (max-width: 1024px) and (min-height: 501px) { body.app-page { zoom: .82; } body.app-page .app-shell { min-height: calc(100vh / .82); } }
@media (min-width: 1025px) and (max-width: 1180px) and (min-height: 501px) { body.app-page { zoom: .92; } body.app-page .app-shell { min-height: calc(100vh / .92); } }
