/* Zettl – Gästeverzeichnis
   Gestaltung angelehnt an die Human Interface Guidelines: Systemschrift, ruhige Flächen,
   Haarlinien statt Rahmen, eine Akzentfarbe nur für Interaktion. Mobile first. */
:root {
  --accent: #1e4fa3;
  --accent-ink: #fff;
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d9d9de;
  --err: #d70015;
  --ok: #248a3d;
  --warn: #b25000;
  --radius: 18px;
  --r-ctl: 12px;
  --r-btn: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --head-bg: #ffffff;
  --head-ink: #1d1d1f;
  --head-line: 0.5px solid rgba(0,0,0,.14);
  --head-track: normal;
  --logo-h: 40px;
  /* abgeleitet */
  --fill: color-mix(in srgb, var(--ink) 5%, var(--card));
  --fill-2: color-mix(in srgb, var(--ink) 9%, var(--card));
  --hair: color-mix(in srgb, var(--ink) 12%, transparent);
  --ctl-line: color-mix(in srgb, var(--ink) 22%, var(--card));
  --tint: color-mix(in srgb, var(--accent) 11%, var(--card));
  --ease: cubic-bezier(.25, .1, .25, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font: 17px/1.47 var(--font); letter-spacing: -.022em; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, legend, .brand, .tile strong, .lead { font-family: var(--font-head); }
h1 { font-size: 1.75rem; line-height: 1.14; font-weight: 700; letter-spacing: -.028em; margin: .1em 0 .45em; }
h2 { font-size: 1.24rem; line-height: 1.2; font-weight: 600; letter-spacing: -.022em; margin: 0 0 .8em; }
h3 { font-size: 1.06rem; font-weight: 600; margin: 1.4em 0 .5em; }
p { margin: 0 0 1em; }
small, .small { font-size: .82rem; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; letter-spacing: 0; word-break: break-all; }
.big { font-size: 1.25rem; letter-spacing: .04em; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
code { background: var(--fill); padding: .1em .4em; border-radius: 6px; font-size: .88em; letter-spacing: 0; }
.ic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }
.wordmark { font-family: var(--font); font-weight: 700; letter-spacing: -.045em; font-size: 1.9rem; margin: 0 0 .1em; }
.wordmark::after, .logo::after { content: ""; display: inline-block; width: .22em; height: .22em; border-radius: 50%; background: var(--accent); margin-left: .06em; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 440px; }

/* ---------- Karten ---------- */
.card, .panel { background: var(--card); border-radius: var(--radius); padding: 22px 20px; margin: 0 0 14px; border: 0; }
fieldset.card { min-width: 0; }
legend { font-weight: 600; font-size: 1.24rem; letter-spacing: -.022em; padding: 0; float: left; width: 100%; margin-bottom: .75em; }
legend + * { clear: both; }

/* ---------- Formularfelder ---------- */
.fld { display: block; margin: 0 0 12px; min-width: 0; }
.fld > span { display: block; font-size: .8rem; font-weight: 500; letter-spacing: -.005em; margin: 0 0 6px 2px; color: var(--muted); }
.fld > span em { font-style: normal; font-weight: 400; opacity: .8; }
.fld small { display: block; color: var(--muted); margin: 6px 2px 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 17px; letter-spacing: -.022em; /* ≥16px: kein Zoom in iOS */
  color: var(--ink); background: var(--card); border: 1px solid var(--ctl-line);
  padding: 11px 14px; min-height: 50px; border-radius: var(--r-ctl); appearance: none; -webkit-appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input[type=date] { min-width: 0; display: block; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .45; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1.5 1.5l4.5 4.5 4.5-4.5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }
input[type=color] { width: 64px; height: 46px; border: 1px solid var(--ctl-line); border-radius: 10px; padding: 4px; background: var(--card); }
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
::placeholder { color: color-mix(in srgb, var(--ink) 35%, var(--card)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input[readonly] { background: var(--fill); color: var(--muted); }
[aria-invalid=true] { border-color: var(--err) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 10%, transparent); }
.ferr { display: block; color: var(--err); font-size: .8rem; margin: 6px 2px 0; font-weight: 500; }
.hint { color: var(--muted); font-size: .88rem; line-height: 1.42; margin: -.2em 0 1.1em; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Gästeseiten: Beschriftung im Feld (wie Apple-ID-Formulare) */
.guest .fld, .pv .fld { position: relative; }
.guest .fld > span, .pv .fld > span { position: absolute; z-index: 1; top: 8px; left: 15px; right: 40px; margin: 0; font-size: .74rem; line-height: 1.2;
  pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest .fld > :is(input, select, textarea), .pv .fld > :is(input, select) { min-height: 58px; padding-top: 25px; padding-bottom: 7px; }
.guest .fld > input[type=date] { line-height: 1.5; }

/* Checkbox & Radio – runde Häkchen wie in iOS */
.check, .confirm { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; cursor: pointer; line-height: 1.4; }
.check input, .confirm input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; flex: none; border-radius: 50%;
  border: 1.5px solid var(--ctl-line); background: var(--card) center / 14px no-repeat; transition: background-color .15s, border-color .15s; cursor: pointer; }
.check input:checked, .confirm input:checked { background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.3l2.6 2.6L11 4.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check input[type=radio]:checked { background-image: radial-gradient(circle, #fff 0 4px, transparent 4.5px); }
.check input:focus-visible, .confirm input:focus-visible { outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.check > span { padding-top: 1px; }
.confirm { background: var(--fill); border-radius: var(--r-ctl); padding: 16px; font-size: .94rem; }
.confirm input { margin-top: -1px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -.018em;
  min-height: 50px; padding: 10px 20px; border-radius: var(--r-btn); border: 0; background: var(--fill); color: var(--ink);
  text-decoration: none !important; cursor: pointer; touch-action: manipulation; transition: filter .15s var(--ease), opacity .15s, background-color .15s; white-space: nowrap; }
.btn:hover { filter: brightness(.96); }
.btn:active { opacity: .72; }
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn .ic { width: 1.25em; height: 1.25em; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-tinted { background: var(--tint); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--accent); padding-left: 12px; padding-right: 12px; }
.btn-ghost:hover { background: var(--tint); filter: none; }
.card > .btn-ghost:first-child, .card > .btn-ghost:last-child, .card > form > .btn-ghost { margin-left: -12px; }
.btn-danger { background: color-mix(in srgb, var(--err) 9%, var(--card)); color: var(--err); }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.06rem; }
.btn-sm { min-height: 34px; padding: 5px 14px; font-size: .88rem; border-radius: min(var(--r-btn), 99px); gap: .35em; }
.btn-x { display: grid; place-items: center; width: 44px; height: 58px; border: 0; background: transparent; color: var(--err); cursor: pointer; border-radius: 10px; padding: 0; }
.btn-x .ic { width: 24px; height: 24px; }
.btn-x:hover { background: color-mix(in srgb, var(--err) 8%, transparent); }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: 8px 0 24px; }
.actions.center { justify-content: center; }
form.inline, details.inline { display: inline-block; }

/* Aktionsleiste im Formular: bleibt am Handy unten sichtbar */
.actionbar { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--hair); flex-wrap: nowrap; }
.actionbar .btn-primary { flex: 1; }
@media (min-width: 680px) { .actionbar .btn-primary { flex: 0 0 auto; min-width: 220px; } .actionbar { border-top: 0; margin: 0; padding-left: 0; padding-right: 0; } }

/* ---------- Hinweise ---------- */
.alert { border-radius: 14px; padding: 13px 16px; margin: 0 0 14px; background: var(--tint); color: var(--ink); font-size: .94rem; line-height: 1.42; border: 0; }
.alert-ok { background: color-mix(in srgb, var(--ok) 11%, var(--card)); color: color-mix(in srgb, var(--ok) 75%, #000); }
.alert-err { background: color-mix(in srgb, var(--err) 8%, var(--card)); color: color-mix(in srgb, var(--err) 80%, #000); }
.alert-info { background: var(--tint); }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: -.005em; padding: 3px 8px; border-radius: 6px; background: var(--fill-2); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.st-vollstaendig, .st-eingecheckt { background: color-mix(in srgb, var(--ok) 13%, var(--card)); color: var(--ok); }
.st-offen, .st-due { background: color-mix(in srgb, var(--warn) 13%, var(--card)); color: var(--warn); }
.st-storno { background: color-mix(in srgb, var(--err) 10%, var(--card)); color: var(--err); }

/* ---------- Gäste: Kopfzeile ---------- */
.ghead { position: sticky; top: 0; z-index: 20; color: var(--head-ink); padding-top: env(safe-area-inset-top); border-bottom: var(--head-line);
  background: color-mix(in srgb, var(--head-bg) 84%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.ghead-in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 600; font-size: 1.06rem; letter-spacing: var(--head-track); overflow: hidden; white-space: nowrap; }
.brand .bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brandlogo { display: block; height: var(--logo-h); width: auto; max-width: 60vw; object-fit: contain; }
.langs { display: inline-flex; flex: none; padding: 2px; gap: 2px; border-radius: 9px; background: color-mix(in srgb, var(--head-ink) 9%, transparent); }
.langs a { color: var(--head-ink); text-decoration: none !important; font-weight: 600; font-size: .78rem; letter-spacing: .01em; padding: 5px 10px; border-radius: 7px; opacity: .6;
  min-height: 30px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
.langs a.on { opacity: 1; background: var(--head-bg); box-shadow: 0 1px 3px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.04); }
@media (max-width: 480px) { .ghead .brandlogo + .bn { display: none; } }

.gmain { padding-top: 22px; padding-bottom: 8px; }
.gfoot { padding: 16px 16px 44px; text-align: center; font-size: .8rem; color: var(--muted); line-height: 1.6; }
.gfoot a { color: var(--muted); }
.gfoot .contact { display: flex; gap: 4px 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.gfoot .ftext { margin: 0 0 8px; white-space: pre-line; }

.hero { padding: 6px 4px 12px; }
.hero h1 { font-size: 2rem; }
.hero p { color: var(--muted); font-size: 1.02rem; }
.resume { margin-bottom: 14px; }
details.card > summary { font-weight: 600; font-size: 1.06rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; width: 9px; height: 9px; border: solid var(--muted); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); margin-right: 4px; }
details.card[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.card[open] > summary { margin-bottom: 14px; }

/* Fortschritt */
.progress { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 22px; }
.progress li { flex: 1; font-size: .74rem; font-weight: 500; color: var(--muted); letter-spacing: -.005em; }
.progress li::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--fill-2); margin-bottom: 7px; transition: background .3s; }
.progress li.is-on, .progress li.is-done { color: var(--ink); }
.progress li.is-on::before, .progress li.is-done::before { background: var(--accent); }
.progress li.is-on { font-weight: 600; }
.progress span { display: none; }

/* Zusammenfassung (wie Einstellungs-Listen) */
.summary { margin: -6px 0 12px; }
.summary > div { display: grid; grid-template-columns: minmax(104px, 36%) 1fr; gap: 12px; padding: 11px 0; border-bottom: 0.5px solid var(--hair); font-size: .94rem; line-height: 1.4; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.summary dd { margin: 0; font-weight: 500; word-break: break-word; }

/* Mitreisende */
.mr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; padding: 14px 0 0; border-top: 0.5px solid var(--hair); }
.mr-row:first-child { border-top: 0; padding-top: 0; }
.mr-row .fld:nth-child(3) { grid-column: 1 / 2; }
.mr-row .btn-x { grid-column: 2 / 3; justify-self: end; }
@media (min-width: 640px) { .mr-row { grid-template-columns: 1fr 1fr 168px 44px; } .mr-row .fld:nth-child(3), .mr-row .btn-x { grid-column: auto; } }

/* Erfolg */
.done { text-align: center; padding: 36px 22px 28px; }
.okmark { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 0 16px;
  background: color-mix(in srgb, var(--ok) 13%, var(--card)); color: var(--ok); }
.okmark .ic { width: 32px; height: 32px; stroke-width: 2.4; }
.done .okmark { margin: 0 auto 18px; width: 72px; height: 72px; }
.done .okmark .ic { width: 38px; height: 38px; }
.lead { font-size: 1.24rem; font-weight: 600; margin: 0 0 .4em; }
.highlight { }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; font-size: .88rem; min-height: 46px; }
.copyrow .btn { min-height: 46px; }
.glist { list-style: none; padding: 0; margin: 0 0 14px; }
.glist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid var(--hair); }
.checkout { margin-top: 22px; padding-top: 18px; border-top: 0.5px solid var(--hair); }
.prose h2 { margin-top: 1.5em; }
.prose { line-height: 1.55; }
.staffbar { background: #1d1d1f; color: #f5f5f7; font-size: .8rem; padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.staffbar a { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }

/* ---------- Unterschrift ---------- */
.sigpad { position: relative; border: 1px solid var(--ctl-line); border-radius: var(--r-ctl); background: var(--card); margin: 0 0 12px; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.sigpad canvas { display: block; width: 100%; height: 220px; touch-action: none; cursor: crosshair; position: relative; z-index: 1; }
.sigline { position: absolute; left: 24px; right: 24px; bottom: 48px; border-bottom: 1px solid var(--ctl-line); pointer-events: none; }
.sigline::before { content: "×"; position: absolute; left: -2px; bottom: 2px; font-size: 1.1rem; color: var(--muted); line-height: 1; }
.sigline span { position: absolute; left: 0; top: 10px; font-size: .8rem; color: var(--muted); }
.sigclear { position: absolute; top: 10px; right: 10px; z-index: 2; }
.sigpad.signed { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.sigpad.signed .sigline span { visibility: hidden; }

/* ---------- Dokument-Scan ---------- */
.scanbox { margin: 0 0 18px; padding: 0 0 18px; border-bottom: 0.5px solid var(--hair); }
.scanbtn { background: var(--tint); color: var(--accent); }
.scanbox .hint { margin: 10px 2px 0; font-size: .8rem; }
.scanbar { height: 4px; background: var(--fill-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.scanbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.scanmsg { margin: 10px 2px 0; font-size: .88rem; font-weight: 500; }
.scanmsg.ok { color: var(--ok); }
.scanmsg.err { color: var(--err); }
input.scanned, select.scanned { border-color: color-mix(in srgb, var(--ok) 55%, var(--card)); background-color: color-mix(in srgb, var(--ok) 5%, var(--card)); }
input.needs { border-color: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 14%, transparent); }

/* ---------- Kiosk (iPad) ---------- */
body.mode-kiosk { font-size: 18px; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
body.mode-kiosk input, body.mode-kiosk select, body.mode-kiosk textarea { user-select: text; -webkit-user-select: text; font-size: 18px; }
body.mode-kiosk .wrap { max-width: 860px; }
body.mode-kiosk .sigpad canvas { height: 300px; }
body.mode-kiosk .btn { min-height: 56px; font-size: 1.04rem; }
body.mode-kiosk .actionbar { position: static; }
.kiosk-hero { text-align: center; padding: 34px 0 18px; }
.kiosk-hero h1 { font-size: 2.6rem; letter-spacing: -.035em; margin-bottom: .25em; }
.kiosk-hero p { font-size: 1.2rem; color: var(--muted); }
.kiosk-hero .brandlogo { height: calc(var(--logo-h) * 1.8); margin: 0 auto 22px; max-width: 70vw; }
.tiles { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 12px 0 20px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tiles form { display: contents; }
.tile { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px; min-height: 220px; padding: 28px; border-radius: calc(var(--radius) + 6px); border: 0;
  background: var(--card); font: inherit; text-align: left; cursor: pointer; color: var(--ink); width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.06); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tile:active { transform: scale(.985); }
.tile .tile-ic { width: 52px; height: 52px; padding: 12px; border-radius: 50%; background: var(--tint); color: var(--accent); margin-bottom: auto; stroke-width: 1.7; }
.tile strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -.028em; margin-top: 28px; }
.tile span { color: var(--muted); font-size: 1.02rem; }
.tile-primary { background: var(--accent); color: var(--accent-ink); }
.tile-primary span { color: var(--accent-ink); opacity: .78; }
.tile-primary .tile-ic { background: color-mix(in srgb, var(--accent-ink) 18%, transparent); color: var(--accent-ink); }

/* ---------- Verwaltung ---------- */
body.admin { --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --muted: #6e6e73; --radius: 16px; --r-ctl: 10px; --r-btn: 10px; --font-head: var(--font); font-size: 15px; letter-spacing: -.012em; }
body.admin input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]), body.admin select, body.admin textarea { font-size: 15px; min-height: 42px; padding: 9px 12px; }
body.admin select { padding-right: 36px; }
body.admin .btn { min-height: 40px; font-size: .94rem; padding: 8px 16px; }
body.admin .btn-sm { min-height: 30px; padding: 4px 11px; font-size: .84rem; }
body.admin h1 { font-size: 1.85rem; }
body.admin .check input, body.admin .confirm input { width: 20px; height: 20px; background-size: 12px; }
/* Kopfzeile: eine Zeile mit Logo, Hotel, Hauptmenü, Verwaltung und Konto */
.ahead { position: sticky; top: 0; z-index: 20; color: var(--ink); padding-top: env(safe-area-inset-top); border-bottom: 0.5px solid var(--hair);
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.ahead-in { display: flex; align-items: center; gap: 10px 14px; min-height: 60px; padding: 8px 24px; max-width: 1228px; margin: 0 auto; flex-wrap: wrap; }
.logo { color: var(--ink); font-weight: 700; font-size: 1.3rem; letter-spacing: -.045em; text-decoration: none !important; }
.bname { color: var(--muted); font-size: .9rem; padding-left: 14px; border-left: 1px solid var(--hair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.bsel select { min-height: 36px !important; padding: 4px 32px 4px 12px !important; font-size: .88rem !important; font-weight: 500; background-color: var(--fill); border: 0; max-width: 230px; }
.anav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.anav::-webkit-scrollbar { display: none; }
.anav a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none !important; padding: 0 13px; min-height: 40px; font-weight: 500; font-size: .9rem;
  white-space: nowrap; border-radius: 10px; transition: background .15s, color .15s; }
.anav a .ic, .menubtn .ic { width: 19px; height: 19px; flex: none; }
.anav a:hover { color: var(--ink); background: var(--fill); }
.anav a.on { color: var(--accent); background: var(--tint); font-weight: 600; }
.ahead-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menubtn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .9rem; white-space: nowrap; }
.menubtn:hover, .menu[open] > .menubtn { background: var(--fill); color: var(--ink); }
.menubtn.on { color: var(--accent); background: var(--tint); font-weight: 600; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fill-2); color: var(--ink); font-weight: 600; font-size: .9rem; }
.menu[open] > .avatar, .avatar:hover { background: color-mix(in srgb, var(--ink) 14%, var(--card)); }
.menupop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; background: var(--card); border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.08); z-index: 30; }
.menupop.right, .ahead-end .menupop { left: auto; right: 0; }
.menupop a, .menupop button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border-radius: 9px; color: var(--ink); text-decoration: none !important;
  font: inherit; font-size: .94rem; background: none; border: 0; cursor: pointer; text-align: left; }
.menupop a:hover, .menupop button:hover { background: var(--fill); }
.menupop a.on { color: var(--accent); font-weight: 600; }
.menupop .ic { width: 18px; height: 18px; color: var(--muted); }
.menupop form { margin: 0; border-top: 0.5px solid var(--hair); margin-top: 4px; padding-top: 4px; }
.menuhead { padding: 8px 12px 10px; display: flex; flex-direction: column; border-bottom: 0.5px solid var(--hair); margin-bottom: 4px; }
.menuhead span { color: var(--muted); font-size: .8rem; }
.menupop hr { border: 0; border-top: 0.5px solid var(--hair); margin: 4px 6px; }
/* schmaler: „Verwaltung“ nur als Zahnrad; am Handy rutscht das Hauptmenü in eine zweite Zeile */
@media (max-width: 999px) { .menubtn span { display: none; } .menubtn { padding: 0 10px; } .anav a .ic { display: none; } .anav a { padding: 0 11px; } .bsel select { max-width: 190px; } }
@media (max-width: 759px) { .ahead .anav { order: 9; flex-basis: 100%; margin: 0 -6px; } }
.awrap { max-width: 1228px; margin: 0 auto; padding: 28px 24px 40px; }
.afoot { text-align: center; color: var(--muted); font-size: .76rem; padding: 0 16px 32px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { margin: 0; }
.pagehead h1 small { font-size: .95rem; color: var(--muted); font-weight: 500; letter-spacing: -.01em; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow form { margin: 0; }
.panel { padding: 22px 24px; }
.panel h2 { font-size: 1.12rem; }
.panelhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panelhead h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: var(--radius); padding: 16px 18px 14px; }
.stat b { display: block; font-size: 2.1rem; line-height: 1.1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .82rem; }
.integrity { display: flex; align-items: center; gap: 6px; font-size: .84rem; margin: 0 0 16px 2px; color: var(--muted); }
.integrity .ic { width: 18px; height: 18px; }
.integrity.ok .ic { color: var(--ok); }
.integrity.bad { color: var(--err); font-weight: 600; }
.cols { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } }
.tabs { display: inline-flex; gap: 2px; margin: 0 0 16px; flex-wrap: wrap; padding: 2px; border-radius: 9px; background: var(--fill-2); }
.tabs a { padding: 5px 14px; border-radius: 7px; text-decoration: none !important; color: var(--ink); font-weight: 500; font-size: .86rem; }
.tabs a.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 170px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; border-bottom: 0.5px solid var(--hair); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th { font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: -.005em; padding-top: 8px; padding-bottom: 8px; }
.panel .tbl th:first-child, .panel .tbl td:first-child { padding-left: 0; }
.panel .tbl th:last-child, .panel .tbl td:last-child { padding-right: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--ink) 2.5%, var(--card)); }
.tbl td.r { text-align: right; }
.tbl td.r > * + * { margin-left: 4px; }
.tbl tr.storno td { color: var(--muted); text-decoration: line-through; }
.tbl tr.storno td:last-child, .tbl tr.storno td:first-child { text-decoration: none; }
.tbl tr.due td { background: color-mix(in srgb, var(--warn) 5%, var(--card)); }
.tbl tr.grp td { background: color-mix(in srgb, var(--ink) 2%, var(--card)); }
.tbl.small td { font-size: .84rem; }
.archv { margin: 2px 0; }
.sigview { background: var(--card); border: 0.5px solid var(--hair); border-radius: 12px; padding: 8px; margin-bottom: 10px; }
.sigview img { display: block; max-width: 100%; height: auto; max-height: 160px; margin: 0 auto; }
.notes { padding-left: 18px; }
.notes li { margin: 6px 0; }
.mrlist { padding-left: 22px; margin: 0; }
.subpanel { border-top: 0.5px solid var(--hair); padding-top: 14px; margin-top: 14px; }
.subpanel > summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.inlineform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inlineform .fld { margin: 0; flex: 1; min-width: 180px; }
.narrowfld input { max-width: 120px; }
.tpl { font-size: .84rem; font-family: var(--font); background: var(--fill); border-color: transparent; }
.steps li { margin: 6px 0; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; }
.checks li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .92rem; }
.checks .ok .ic { color: var(--ok); }
.checks .bad { color: var(--err); font-weight: 600; }
.fldlabel { margin: 0 0 10px; }

/* Anmeldung / Einrichtung */
body.minimal { padding-top: 7vh; }
body.minimal .card { padding: 32px 28px; }
body.minimal h1 { font-size: 1.5rem; }
.minlogo { display: flex; justify-content: center; margin: 0 0 22px; }
.minlogo .brandlogo { height: calc(var(--logo-h) * 1.2); }

/* Tabellen am Handy als Liste */
@media (max-width: 720px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { border-bottom: 0.5px solid var(--hair); padding: 10px 0; }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { border: 0; padding: 3px 0 !important; display: flex; gap: 10px; }
  .tbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: .8rem; min-width: 96px; flex: none; }
  .tbl td.r { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px !important; }
  .tbl:not(.panel .tbl) tr { padding-left: 16px; padding-right: 16px; }
  .awrap { padding: 18px 14px 30px; }
  .ahead-in { padding: 8px 14px; }
  .panel { padding: 20px 18px; }
}

@media print {
  .ahead, .anav, .btn, .afoot, .ghead, .gfoot { display: none !important; }
  body { background: #fff; }
}

/* ---------- Design-Editor ---------- */
.designgrid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .designgrid { grid-template-columns: minmax(0, 1fr) 380px; } }
.designpreview { position: sticky; top: 120px; }
@media (max-width: 999px) { .designpreview { position: static; order: -1; } }
.pvlabel { font-size: .74rem; font-weight: 600; color: var(--muted); margin: 0 0 8px 4px; }
.pv { font: 15px/1.45 var(--font); letter-spacing: -.018em; background: var(--bg); color: var(--ink); border-radius: 28px; overflow: hidden;
  box-shadow: 0 0 0 8px #1d1d1f, 0 20px 50px rgba(0,0,0,.22); margin: 8px; }
.pv .ghead { position: static; }
.pv .pvpad { padding-left: 16px; padding-right: 16px; min-height: 52px; }
.pv .pvbody { padding: 18px 16px 16px; }
.pv h1 { font-size: 1.45rem; }
.pv .card { padding: 18px 16px; }
.pv .card h2 { font-size: 1.05rem; }
.pv .gfoot { padding: 4px 0 0; color: var(--muted); text-align: center; }
.pv .brandlogo { max-width: 200px; }
.pv input, .pv select { font-size: 15px; }
.pv .btn { font-size: .94rem; min-height: 46px; }
.filerow { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; border-bottom: 0.5px solid var(--hair); padding-bottom: 14px; margin-bottom: 14px; }
.filerow .fld { flex: 1; min-width: 240px; margin: 0; }
.filerow input[type=file] { font-size: .86rem; margin-top: 6px; max-width: 100%; }
.filepreview { display: inline-flex; padding: 8px; border-radius: 10px; margin-bottom: 4px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 0.5px solid var(--hair); }
.filepreview.logo img { max-height: 64px; max-width: 260px; display: block; }
.filepreview.icon img { width: 56px; height: 56px; border-radius: 13px; display: block; object-fit: cover; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.swatch { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font: inherit; }
.swatch span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); transition: transform .15s var(--ease); }
.swatch i { width: 20px; height: 20px; border-radius: 50%; display: block; }
.swatch small { font-size: .7rem; color: var(--muted); }
.swatch:hover span { transform: scale(1.06); }
.colorfld input[type=color] { width: 100%; height: 42px; cursor: pointer; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill-2); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 6px 14px; border-radius: 7px; font-weight: 500; font-size: .86rem; }
.segmented input:checked + span { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.subpanel-top > summary { cursor: pointer; }
textarea.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; letter-spacing: 0; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.btn + .hint { margin-top: 10px; }
.panel > * + h2, .card > * + h2 { margin-top: 1.5em; }
input[type=file] { font: inherit; font-size: .86rem; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: .86rem; color: var(--accent); background: var(--tint); border: 0; border-radius: 8px; padding: 7px 14px; margin-right: 12px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 6px; }
body.minimal .card > .wordmark, body.minimal .card > .wordmark + h1, body.minimal .card > h1.wordmark + .muted { text-align: center; }
body.minimal .card > h1.wordmark { font-size: 2.2rem; margin-bottom: .2em; }
body.minimal .card > h1.wordmark + .muted { margin-bottom: 1.6em; font-size: .9rem; }
@media (max-width: 440px) {
  .brand { white-space: normal; font-size: .95rem; line-height: 1.2; }
  .brand .bn { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .langs a { min-width: 34px; padding: 5px 8px; }
}
/* Benutzer: Hotel-Zuordnung */
.hotelchecks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 6px 0 12px; }
.hotelchecks .check { margin: 0; align-items: center; }
.subform { margin-top: 8px; text-align: left; background: var(--fill); padding: 12px 14px; border-radius: 12px; white-space: normal; min-width: 240px; }
details.inline > summary { list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] { display: block; }
/* Fehlermeldung unter dem Feld (nicht als schwebende Beschriftung) */
.fld > .ferr, .guest .fld > .ferr, .pv .fld > .ferr { position: static; display: block; color: var(--err); font-weight: 500; margin: 6px 2px 0; font-size: .8rem; line-height: 1.3; white-space: normal; overflow: visible; pointer-events: auto; }
.fld:has([aria-invalid=true]) > span:first-child { color: var(--err); }

/* ---------- Übersicht ---------- */
.dashhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.dashhead h1 { margin: 0; font-size: 2.1rem !important; letter-spacing: -.035em; }
.dashhead p { margin: 2px 0 0; font-size: .95rem; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow form { margin: 0; }
body.admin .dashhead .btn { min-height: 46px; padding: 10px 18px; font-size: .98rem; border-radius: 12px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none !important; transition: transform .15s var(--ease), box-shadow .15s; }
a.kpi:hover { box-shadow: 0 4px 18px rgba(0,0,0,.06); }
a.kpi:active { transform: scale(.98); }
.kpi b { font-size: 2rem; line-height: 1.1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .84rem; }
.kpi.is-hot b { color: var(--accent); }
.dashgrid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .dashgrid { grid-template-columns: 1fr 1fr; } }
.dashgrid .panel { margin: 0; padding: 18px 20px 8px; scroll-margin-top: 90px; }
.dashgrid .panelhead { margin-bottom: 4px; }
.dashgrid .panelhead small { font-size: .9rem; font-weight: 500; margin-left: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; border-top: 0.5px solid var(--hair); }
.rows li:first-child { border-top: 0; }
.rows .av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 600; font-size: .86rem; text-decoration: none !important; }
/* Kästchen links: Personenzahl bzw. laufende Nummer */
.rows .av.num { flex-direction: column; gap: 0; width: 48px; height: 48px; border-radius: 12px; line-height: 1; place-content: center; }
.rows .av.num b { font-size: 1.12rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rows .av.num small { font-size: .62rem; font-weight: 500; opacity: .75; margin-top: 3px; letter-spacing: 0; }
.rows .av.nr { background: var(--fill); color: var(--ink); }
.rows .avlink { flex: none; text-decoration: none !important; }
.rows .chev { flex: none; color: var(--hair-strong, #c7c7cc); display: grid; place-items: center; }
.rows .chev .ic { width: 18px; height: 18px; }
.rows li:has(> a.who):hover .who b { color: var(--accent); }
.rows .act { display: flex; gap: 6px; align-items: center; }
.btn-icon { padding: 0 !important; width: 38px; }
.btn-icon .ic { width: 18px; height: 18px; }
.rows li.is-grp { padding-left: 22px; }
.rows li.is-storno .who b { text-decoration: line-through; color: var(--muted); }
.listpanel { padding: 14px 20px 6px; }
.listpanel .panelhead { margin: 4px 0 2px; }
.listpanel .panelhead small { font-size: .9rem; font-weight: 500; margin-left: 4px; }
.listnote { margin: 4px 2px 16px; }
.dashhead .filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.searchfld { position: relative; display: block; }
.searchfld .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
body.admin .searchfld input { padding-left: 36px !important; width: 220px; }
.rows .who { flex: 1; min-width: 0; color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; gap: 3px; }
.rows .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .who > span { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.rows .who .badge { margin-right: 4px; }
.nw { white-space: nowrap; }
.rows .act { flex: none; }
.rows .act form { margin: 0; }
body.admin .rows .act .btn { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.rows li.is-done { opacity: .6; }
.rows li.is-due .av.nr { background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--warn); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px 30px; color: var(--muted); text-align: center; }
.empty .ic { width: 30px; height: 30px; opacity: .55; }
.empty p { margin: 0; font-size: .92rem; }
.dashgrid + .integrity { margin-top: 18px; }
@media (max-width: 520px) {
  .dashhead .btnrow { width: 100%; } .dashhead .btnrow form { flex: 1; } .dashhead .btn { width: 100%; }
  .rows li { gap: 10px; }
  .rows .av.num { width: 42px; height: 42px; }
  .rows .act { flex-direction: column; align-items: stretch; }
  .dashhead .filters, .dashhead .filters select, .searchfld, body.admin .searchfld input { width: 100%; }
  .rows li.is-grp { padding-left: 0; }
}
.rows .av.unk { background: var(--fill); color: var(--muted); }

/* Abbrechen steht optisch links, im Code nach „Speichern“ */
.actions [data-forget] { order: -1; }

/* Übersicht: Anreisen der nächsten 7 Tage */
.weekpanel { margin-top: 16px; }
.dayhead { font-size: .95rem; font-weight: 600; margin: 14px 0 0; padding-top: 12px; border-top: 0.5px solid var(--hair); }
.weekpanel .panelhead + .dayhead { border-top: 0; padding-top: 0; margin-top: 6px; }
.dayhead .muted { font-weight: 500; }
