@import url('fonts.css');   /* lokal gehostete Schriften – keine externe Quelle */

/* =====================================================================
   Meldeschein / Pre-CheckIn — Designsystem "Alpiner Morgen"
   Duoton: Alpin-Teal + Sonnenaufgang-Koralle. Bewusst helles Theme.
   ===================================================================== */
:root {
  color-scheme: light;

  /* Farben */
  --ink: #16201c;
  --muted: #5c6b64;
  --line: #e4e8e4;
  --bg: #f7f8f6;
  --panel: #ffffff;

  --teal-1: #DAA546;             /* Hauptfarbe (Standard: Gold) */
  --teal-2: #e0b364;
  --sun-1: #ff8a4c;
  --sun-2: #ffb020;

  --blue: var(--teal-1);         /* Rückwärtskompatible Aliase */
  --blue-dark: #b9832f;
  --blue-light: #e0b364;

  --good: #DAA546;
  --good-soft: #f6ecd6;          /* helle Tönung der Hauptfarbe (Hintergründe) */
  --warn: #b26a00;
  --bad: #d1493f;

  --grad-cool: linear-gradient(135deg, var(--teal-1) 0%, var(--teal-2) 100%);
  --grad-warm: linear-gradient(135deg, var(--sun-1) 0%, var(--sun-2) 100%);
  --grad-brand: linear-gradient(115deg, var(--teal-1) 0%, var(--teal-2) 45%, var(--sun-1) 115%);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 40px -20px rgba(16,32,28,.35);
  --shadow-soft: 0 6px 20px -12px rgba(16,32,28,.28);
  --ring: 0 0 0 4px rgba(18,165,148,.18);

  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(18,165,148,.14), transparent 60%),
    radial-gradient(900px 520px at 112% 4%, rgba(255,154,77,.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

::selection { background: rgba(18,165,148,.22); }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 18px 80px;
}

/* Breite Variante für datenreiche Admin-Seiten (Tabellen, Filter). */
.wrap.wide {
  max-width: min(1800px, 97vw);
}

.brand-logo { display: block; max-height: 68px; max-width: 70%; margin: 6px auto 10px; }

/* Pflicht-Hinweis (Banner oben) */
.mandatory-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff5e0; color: #7a4a00;
  border: 1px solid #f0c674; border-left: 4px solid #e0a800;
  border-radius: 12px; padding: 12px 14px; margin: 4px 0 16px;
  font-size: .95rem; line-height: 1.45; font-weight: 600;
}
.mandatory-banner .mandatory-icon {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: #e0a800; color: #fff; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem; line-height: 1; margin-top: 1px;
}
.mandatory-banner p { margin: 0; }

/* Sprachumschalter */
.langbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.langbar .lang {
  text-decoration: none; font-weight: 700; font-size: .82rem;
  color: var(--muted); padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); min-width: 44px; text-align: center;
}
.langbar .lang.active { color: #fff; background: var(--grad-cool); border-color: transparent; }

/* Wortmarke — der eine große Farb-Moment (Duoton-Verlauf) */
.brand {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 6px 0 4px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; letter-spacing: -.02em; }
h1 { font-weight: 800; font-size: clamp(1.7rem, 5.5vw, 2.15rem); margin: .5em 0 .3em; line-height: 1.12; }
h2 { font-weight: 700; font-size: 1.5rem; text-align: center; }
h3 { font-weight: 700; }
.lead { color: #38443e; }
.muted { color: var(--muted); }

/* Fortschritts-Schiene — warmer Verlauf mit Glow */
.progress {
  height: 8px;
  background: #e9ede9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: inset 0 1px 2px rgba(16,32,28,.08);
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-warm);
  box-shadow: 0 0 14px rgba(255,154,77,.55);
  transition: width .45s cubic-bezier(.22,.61,.36,1);
}

/* Cards mit feiner Verlaufskante oben */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(16,32,28,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px;
  margin-bottom: 18px;
}

.step { display: none; }
.step.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .step.active { animation: stepIn .4s cubic-bezier(.22,.61,.36,1); }
}

/* Formularfelder — moderne gefüllte Boxen */
label.field { display: block; margin: 18px 0 0; }
label.field > span {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fcfdfc;
  font-size: 16px;               /* >=16px verhindert iOS-Auto-Zoom */
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #9aa8a1; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-2);
  background: #fff;
  box-shadow: var(--ring);
}
input[type=date], input[type=month], select { min-height: 52px; }
textarea { min-height: 96px; resize: vertical; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.req::after { content: " *"; color: var(--sun-1); }

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 28px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 54px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  color: #fff;
  background: var(--grad-cool);
  box-shadow: 0 12px 24px -10px rgba(14,124,107,.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -10px rgba(14,124,107,.7); }
.btn-ghost {
  background: #eef2ef;
  color: var(--teal-1);
  box-shadow: inset 0 0 0 1.5px rgba(14,124,107,.14);
}
.btn-ghost:hover { background: #e6ece8; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.actions { text-align: center; margin-top: 24px; }
.link-back {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 18px;
  min-height: 44px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}
.link-back:hover { color: var(--ink); }

/* Datumsbanner — Teal-Verlauf mit weißen Datums-Chips */
.dates {
  background: var(--grad-cool);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  justify-content: space-around;
  gap: 14px;
  text-align: center;
  margin: 20px 0;
  box-shadow: var(--shadow-soft);
}
.dates > div { flex: 1 1 0; min-width: 0; }
.dates .d-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; opacity: .92; margin-bottom: 8px; }
.dates strong { font-family: var(--font-display); font-size: 1.35rem; }
.dates input {
  width: 100%;
  min-width: 0;
  background: rgba(255,255,255,.96);
  border: none;
  border-radius: 12px;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 8px;
  min-height: 50px;
}

/* Eingabemethode — Karten, die auf Hover aufsteigen */
/* Kompakte, gut tippbare Auswahl-Kacheln (Schnellerfassung / manuell) */
.method {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  background: var(--panel);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.method::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--grad-warm); transform: scaleY(0); transform-origin: top; transition: transform .25s;
}
.method:hover { box-shadow: var(--shadow); border-color: transparent; }
.method:hover::before { transform: scaleY(1); }
.method:active { transform: scale(.99); }
.method .icon {
  order: -2; flex: none;
  width: 52px; height: 52px; margin: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--teal-1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(18,165,148,.14), rgba(255,154,77,.14));
}
.method h3 { order: -1; flex: 1 1 auto; text-align: left; font-size: 1.06rem; margin: 0; }
.method h3::after { content: "›"; float: right; color: var(--muted); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.method ul { display: none; }        /* Details ausgeblendet – kompakt */
.method .hint { order: 1; flex-basis: 100%; margin: 4px 0 0; text-align: left; font-size: .82rem; }
.method #ocrStatus { order: 2; flex-basis: 100%; }

/* Begleitpersonen */
.companion {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 14px;
  position: relative;
  background: #fcfdfc;
}
.companion .remove {
  position: absolute; top: 6px; right: 6px;
  width: 42px; height: 42px; line-height: 1;
  background: none; border: none; color: var(--bad); cursor: pointer; font-size: 1.7rem;
}

/* Zusammenfassung */
.summary dl { margin: 0; }
.summary dt {
  font-weight: 700; color: var(--muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em; margin: 0 0 2px;
}
.summary dd {
  margin: 0; padding: 2px 0 12px; margin-bottom: 12px;
  font-size: 1.12rem; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line); line-height: 1.35; word-break: break-word;
}
.summary dt:not(:first-child) { margin-top: 4px; }
.summary dd:last-of-type { border-bottom: none; margin-bottom: 0; }
.sig-box { border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 10px; text-align: center; background: #fcfdfc; }
.sig-box img { max-width: 100%; height: 90px; object-fit: contain; }

/* Status-Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
}
.badge-ok { background: var(--good-soft); color: var(--teal-1); }
.badge-open { background: rgba(255,138,76,.16); color: #c25a1e; }

/* Signatur-Modal (Glas-Overlay) */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(16,32,28,.5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal.open { display: flex; }
.modal-inner { background: #fff; border-radius: var(--radius); padding: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow); }
.modal-inner h3 { text-align: center; font-size: 1.3rem; margin-top: 4px; }
#sigpad { border: 2px solid var(--line); border-radius: var(--radius-sm); width: 100%; height: 250px; touch-action: none; background: #fff; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.text-green { color: var(--teal-1); background: none; border: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 1rem; padding: 12px 14px; min-height: 44px; }

/* Kleiner Button (gleiche Größe für Zeilen-Aktionen) */
.btn-sm { padding: 6px 14px; min-height: 0; font-size: .86rem; }
.btn-danger { color: var(--bad); }
.row-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions form { display: inline; margin: 0; }
/* Modal darf bei langen Formularen scrollen */
.modal-inner.modal-form { max-width: 560px; max-height: 90vh; overflow: auto; text-align: left; }
.modal-inner.modal-form h3 { text-align: left; }

.error { color: var(--bad); font-size: .92rem; margin-top: 6px; font-weight: 600; }
.hint { font-size: .86rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Spalten-Auswahl über der Tabelle */
.colcfg { position: relative; display: inline-block; margin: 0 0 10px; }
.colcfg > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .86rem;
  background: var(--panel); -webkit-tap-highlight-color: transparent; }
.colcfg > summary::-webkit-details-marker { display: none; }
.colcfg[open] > summary { border-color: var(--teal-1); color: var(--teal-1); }
.colcfg-body { position: absolute; z-index: 25; margin-top: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 10px 14px; min-width: 210px; }
.colcfg-body label { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: .9rem; white-space: nowrap; cursor: pointer; }
.colcfg-body label input { width: auto; min-height: 0; }

/* Akkordeon (aufklappbare Einstellungs-Gruppen) */
.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--panel); overflow: hidden; }
.acc > summary {
  cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  -webkit-tap-highlight-color: transparent;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "▸"; color: var(--muted); font-weight: 700; transition: transform .2s; }
.acc[open] > summary::after { transform: rotate(90deg); }
.acc > summary:hover { background: rgba(18,165,148,.05); }
.acc .acc-body { padding: 6px 18px 18px; border-top: 1px solid var(--line); }
.acc .acc-body .field:first-child { margin-top: 6px; }

/* HTML-Editor (WYSIWYG) für E-Mail-Vorlagen */
.rte { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; margin-top: 4px; }
.rte-tb { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f4f7f6; border-bottom: 1px solid var(--line); }
.rte-b { padding: 6px 11px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: .85rem; line-height: 1; color: var(--ink); }
.rte-b:hover { background: var(--panel); border-color: var(--teal-1); }
.rte-ed { min-height: 190px; max-height: 460px; overflow: auto; padding: 12px 14px; font-size: .95rem; line-height: 1.5; outline: none; color: var(--ink); }
.rte-ed:focus { box-shadow: inset 0 0 0 2px rgba(18,165,148,.25); }
.rte-ed h2 { font-size: 1.2rem; margin: .4em 0; }
.rte-ed p { margin: .5em 0; }
.rte-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); background: #fbfcfb; }
.rte-phb { font-family: monospace; font-size: .78rem; padding: 3px 8px; border: 1px dashed var(--teal-1); color: var(--teal-1); background: rgba(18,165,148,.06); border-radius: 6px; cursor: pointer; }
.rte-phb:hover { background: rgba(18,165,148,.14); }

/* Danke-Seite: Erfolgs-Häkchen + Konfetti.
   Konfetti liegt als Hintergrund HINTER dem Inhalt (z-index:-1), damit der
   Inhalt immer sichtbar bleibt. Einblendungen bewegen nur (keine Opacity-Falle). */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.pre-tag {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-1);
  background: rgba(18,165,148,.12); padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}
.pre-done {
  display: inline-block; margin-top: 16px; font-weight: 700; font-size: .95rem;
  color: var(--teal-1); background: rgba(18,165,148,.10);
  padding: 10px 18px; border-radius: 999px;
}
.success-check { width: 104px; height: 104px; margin: 10px auto 20px; filter: drop-shadow(0 8px 22px rgba(18,165,148,.28)); }
.success-check svg { width: 100%; height: 100%; }
.success-check .sc-ring { fill: rgba(18,165,148,.10); stroke: var(--teal-1); stroke-width: 3; stroke-dasharray: 166; stroke-dashoffset: 166; animation: sc-ring .6s cubic-bezier(.65,0,.45,1) forwards; }
.success-check .sc-tick { fill: none; stroke: var(--teal-1); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: sc-tick .38s .55s cubic-bezier(.65,0,.45,1) forwards; }
@keyframes sc-ring { to { stroke-dashoffset: 0; } }
@keyframes sc-tick { to { stroke-dashoffset: 0; } }
.thankyou h1 { animation: sc-pop .5s .3s both; }
.thankyou .lead { animation: sc-pop .5s .45s both; }
/* Nur Bewegung, keine Opacity -> Inhalt bleibt immer sichtbar. */
@keyframes sc-pop { from { transform: translateY(10px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .success-check .sc-ring, .success-check .sc-tick { animation: none; stroke-dashoffset: 0; }
  .thankyou h1, .thankyou .lead { animation: none; }
}

/* Kalenderansicht der Aufenthalte */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-wd { text-align: center; font-weight: 700; font-size: .8rem; color: var(--muted); text-transform: uppercase; }
.cal-cell {
  min-height: 92px; border: 1px solid var(--line); border-radius: 10px;
  padding: 5px; background: var(--panel); display: flex; flex-direction: column; gap: 3px;
}
.cal-empty { border: none; background: transparent; }
.cal-today { border-color: var(--teal-1); box-shadow: 0 0 0 2px rgba(18,165,148,.18); }
.cal-num { font-weight: 700; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; }
.cal-count { background: var(--teal-1); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; }
.cal-chip {
  display: block; font-size: .74rem; line-height: 1.25; text-decoration: none;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid transparent;
}
.cal-chip.ok   { background: var(--good-soft); color: var(--teal-1); border-left-color: var(--teal-1); }
.cal-chip.open { background: rgba(255,138,76,.16); color: #c25a1e; border-left-color: #ff8a4c; }
@media (max-width: 640px) {
  .cal-cell { min-height: 64px; }
  .cal-chip { font-size: .66rem; }
}

/* OCR-Scan-Overlay – deutlich sichtbarer Fortschritt der Texterkennung */
.ocr-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16,32,28,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ocr-overlay[hidden] { display: none; }
.ocr-box {
  background: #fff; border-radius: var(--radius); padding: 30px 26px 24px;
  width: 100%; max-width: 440px; text-align: center; box-shadow: var(--shadow);
  animation: stepIn .3s ease both;
}
.ocr-box h3 { font-size: 1.32rem; margin: 4px 0 0; }
.ocr-spinner {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border: 6px solid rgba(18,165,148,.18); border-top-color: var(--teal-1);
  border-radius: 50%; animation: ocrspin 1s linear infinite;
}
@keyframes ocrspin { to { transform: rotate(360deg); } }
.ocr-progress {
  height: 12px; background: #e9ede9; border-radius: 999px; overflow: hidden;
  margin: 18px 0 8px; box-shadow: inset 0 1px 2px rgba(16,32,28,.1);
}
.ocr-progress > span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--grad-warm); transition: width .3s ease;
}
.ocr-pct { font-weight: 800; font-size: 1.1rem; color: var(--teal-1); }
#ocrPreview {
  display: none; max-width: 100%; max-height: 150px; margin: 14px auto 0;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
#ocrPreview[src] { display: block; }
.ocr-actions { margin-top: 18px; }
.ocr-box.is-error .ocr-spinner { display: none; }
.ocr-box.is-error .ocr-progress, .ocr-box.is-error .ocr-pct { display: none; }

.consent-text {
  max-height: 320px; overflow: auto; font-size: .92rem;
  background: #fbfcfb; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
}
.checkbox-row { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.checkbox-row input { width: auto; }
.checkbox-row input[type=checkbox] {
  width: 24px; height: 24px; min-height: 0; padding: 0; flex: none;
  accent-color: var(--teal-1);
}
.checkbox-row label, .checkbox-row { font-size: 1rem; }

footer {
  text-align: center; color: var(--muted); font-size: .9rem;
  padding: 28px; margin-top: 34px;
  border-top: 1px solid var(--line);
}
footer strong { color: var(--ink); font-family: var(--font-display); }
.footer-logo { margin: 0 0 10px; }
.brand-logo-footer { display: inline-block; height: 26px; width: auto; max-height: 26px; max-width: 130px; opacity: .85; }

/* Tabellen (Admin) */
table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f2f5f2; font-family: var(--font-display); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

a { color: var(--teal-1); }

/* KPI-Kacheln (Statistik) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  background: var(--panel); border: 1px solid rgba(16,32,28,.06);
  border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow-soft);
}
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; }
.stat.accent { background: var(--grad-cool); color: #fff; border: none; }
.stat.accent .lbl { color: rgba(255,255,255,.85); }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.bar-row .name { flex: 0 0 40%; }
.bar-track { flex: 1; background: #eef2ef; border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad-cool); border-radius: 999px; }
.bar-row .val { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }

/* =====================================================================
   Handy-Optimierung
   ===================================================================== */
@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .wrap { padding: 18px 12px 96px; }
  .card { padding: 20px 16px; }

  .step .actions .btn { display: block; width: 100%; margin: 0; }
  .step .actions .btn + .btn { margin-top: 12px; }
  #addCompanion { width: 100%; }

  /* Datumsfelder am Handy untereinander (voll breit, gut tippbar) */
  .dates { flex-direction: column; gap: 16px; padding: 18px 16px; }
  .dates > div { width: 100%; }
  .dates strong { font-size: 1.2rem; }
  #sigpad { height: 260px; }
  .modal-actions .btn { flex: 1 1 100%; order: -1; }

  .topbar { flex-direction: column; align-items: stretch; }
  .topbar > div { display: flex; gap: 8px; }
  .topbar .btn { flex: 1; text-align: center; }

  /* Admin-Tabelle -> Karten je Zeile */
  .resp-table thead { display: none; }
  .resp-table, .resp-table tbody, .resp-table tr, .resp-table td { display: block; width: 100%; }
  .resp-table tr {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-bottom: 12px; padding: 8px 14px; background: #fff; box-shadow: var(--shadow-soft);
  }
  .resp-table td {
    border: none; padding: 8px 0; white-space: normal;
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
  }
  .resp-table td::before {
    content: attr(data-label); font-weight: 700; color: var(--muted);
    flex: 0 0 42%; text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .02em;
  }
  .resp-table td:empty { display: none; }
  .resp-table td .btn { width: auto; padding: 11px 20px; min-height: 46px; }
}
