/* Mitgliederbereich + Verwaltung — dieselben Tokens wie die Website (src/styles/global.css), ohne Animationen-Bühne.
   Zielgruppe 45–70: große Schrift, Beschriftungen ÜBER den Feldern, Touch-Ziele ≥ 44 px, klare Kontraste. */

@font-face { font-family: 'Bodoni Moda Variable'; src: url('bodoni-moda-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk Variable'; src: url('hanken-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --night: oklch(0.135 0.012 60);
  --night-deep: oklch(0.095 0.010 60);
  --surface: oklch(0.185 0.014 58);
  --surface-2: oklch(0.235 0.016 56);
  --ink: oklch(0.955 0.012 80);
  --ink-soft: oklch(0.84 0.016 78);
  --muted: oklch(0.72 0.020 70);
  --ember: oklch(0.66 0.165 44);
  --ember-deep: oklch(0.54 0.16 40);
  --gold: oklch(0.88 0.10 88);
  --gold-soft: oklch(0.88 0.10 88 / 0.55);
  --ok: oklch(0.76 0.15 150);
  --no: oklch(0.66 0.19 25);
  --line: oklch(1 0 0 / 0.11);
  --line-strong: oklch(1 0 0 / 0.22);
  --font-display: 'Bodoni Moda Variable', 'Bodoni Moda', Georgia, serif;
  --font-body: 'Hanken Grotesk Variable', 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 14px; --r-md: 22px; --r-lg: 32px; --r-pill: 999px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Kopf ---------- */
.top { position: sticky; top: 0; z-index: 10; background: oklch(0.12 0.012 60 / 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 1rem; max-width: 76rem; margin: 0 auto; padding: 0.75rem var(--gutter); }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.2rem; }
.brand small { font-family: var(--font-body); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-top: 0.3rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.9rem; border-radius: var(--r-pill); color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav a:hover { background: oklch(1 0 0 / 0.07); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--gold); }

main { max-width: 76rem; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 4rem; }
.narrow { max-width: 30rem; margin-inline: auto; }
.mid { max-width: 46rem; }

/* ---------- Flächen ---------- */
.panel { background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2.25rem); }
.panel + .panel { margin-top: 1.25rem; }
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--side { grid-template-columns: 1fr 22rem; align-items: start; } }

/* ---------- Meldungen ---------- */
.flash { padding: 0.9rem 1.2rem; border-radius: var(--r-md); margin-bottom: 1.25rem; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); }
.flash--ok { box-shadow: inset 0 0 0 1px oklch(0.76 0.15 150 / 0.6); background: oklch(0.76 0.15 150 / 0.1); }
.flash--error { box-shadow: inset 0 0 0 1px oklch(0.66 0.19 25 / 0.6); background: oklch(0.66 0.19 25 / 0.12); }

/* ---------- Formulare: Beschriftung über dem Feld ---------- */
form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field > span { font-weight: 600; }
.field small { color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%; min-height: 3.1rem; padding: 0.7rem 1rem; border: 0; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); font: inherit; box-shadow: inset 0 0 0 1px var(--line);
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 4px oklch(0.88 0.1 88 / 0.15); }
input.code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.row { display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Häkchen-Felder als große Kacheln zum Antippen */
.checks { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.check { display: flex; align-items: center; gap: 0.7rem; min-height: 3rem; padding: 0.5rem 0.9rem; border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.check:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--gold); background: oklch(0.88 0.10 88 / 0.1); }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--gold); flex: none; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0.7rem 1.6rem; border: 0; border-radius: var(--r-pill);
  background: var(--ember); color: #fff; font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: background 0.2s; }
.btn:hover { background: var(--ember-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: oklch(1 0 0 / 0.07); color: var(--ink); }
.btn--gold { background: var(--gold); color: var(--night-deep); }
.btn--gold:hover { background: oklch(0.82 0.10 88); color: var(--night-deep); }
.btn--small { min-height: 2.6rem; padding: 0.4rem 1rem; font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; min-height: 44px; }

/* ---------- Tabellen (Verwaltung) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: oklch(1 0 0 / 0.03); }
.table a { text-decoration: none; font-weight: 600; }
.scroll-x { overflow-x: auto; }

.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.badge--ok { background: oklch(0.76 0.15 150 / 0.18); color: var(--ok); }
.badge--warn { background: oklch(0.88 0.10 88 / 0.16); color: var(--gold); }
.badge--off { background: oklch(0.66 0.19 25 / 0.16); color: oklch(0.78 0.12 25); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

.qr { background: #fff; border-radius: var(--r-md); padding: 0.75rem; width: min(15rem, 100%); }
.qr svg, .qr img { display: block; width: 100%; height: auto; }
.secret { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.1em; word-break: break-all; background: var(--surface-2); padding: 0.5rem 0.8rem; border-radius: var(--r-sm); }

.foot { max-width: 76rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Gast-Assistent ---------- */
.steps { margin: -0.5rem 0 1.75rem; overflow-x: auto; }
.steps ol { display: flex; gap: 0.4rem; list-style: none; margin: 0; padding: 0; min-width: max-content; }
.steps a { display: flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.35rem 0.95rem 0.35rem 0.4rem; border-radius: var(--r-pill);
  text-decoration: none; color: var(--ink-soft); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.steps__n { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: 0.9rem; }
.steps .is-done .steps__n { background: oklch(0.76 0.15 150 / 0.22); color: var(--ok); }
.steps .is-current a { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.steps .is-current .steps__n { background: var(--gold); color: var(--night-deep); }
@media (max-width: 699px) { .steps__l { display: none; } .steps .is-current .steps__l { display: inline; } }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 1.1rem; }
fieldset[disabled] { opacity: 0.75; }
.checks--2 { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.person { display: grid; gap: 0.6rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.weapon { padding: 0.9rem; border-radius: var(--r-md); background: oklch(1 0 0 / 0.025); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 0.6rem; }
.savebar { position: sticky; bottom: 0; z-index: 5; padding: 0.9rem 0; background: linear-gradient(transparent, var(--night) 35%); }
.consent .check { align-items: flex-start; padding-block: 0.9rem; line-height: 1.5; }
.consent .check input { margin-top: 0.2rem; }
small.err { color: oklch(0.78 0.12 25); }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--no); }
.big { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.3rem; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; margin: 1rem 0 1.25rem; }
.progress span { height: 0.4rem; border-radius: 99px; background: var(--surface-2); }
.progress .is-done { background: var(--ok); }
h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }

/* ---------- Druck (Küchenliste) ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .top, .foot, .noprint, .flash { display: none !important; }
  main { padding: 0; max-width: none; }
  .panel { background: none; padding: 0; border-radius: 0; }
  .table th, .table td { border-color: #bbb; color: #000; }
  .badge { background: none !important; color: #000 !important; padding: 0; }
  a { color: #000; text-decoration: none; }
}
/* Kurze Formulare im Panel: Speichern-Leiste normal am Ende, nur lange Seiten (Jagd, Küche) halten sie sichtbar */
form.panel .savebar { position: static; padding: 0.5rem 0 0; background: none; }

/* Preisübersicht */
.quote td.num, .quote th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote tfoot th { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: var(--ink); padding-top: 0.9rem; border-bottom: 0; }
