/* SELAH – gemeinsamer Stil (angelehnt an die WMH-App: Poppins, Karten, Listen, Pills, Tab-Leiste, Dunkelmodus).
   Farben stehen nur hier. Zum Angleichen an die WMH-App die Werte aus deren web/index.html übernehmen. */

@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #f5f2ed;
  --card: #ffffff;
  --text: #1f1d1a;
  --muted: #6f6a63;
  --line: #e7e2da;
  --field: #faf8f5;
  --primary: #e2683c;
  --primary-ink: #ffffff;
  --primary-soft: #fbe9e1;
  --ok: #23845a;      --ok-soft: #e1f3ea;
  --info: #2f6fc0;    --info-soft: #e3edfa;
  --warn: #9a6a08;    --warn-soft: #fbf1dc;
  --err: #c0392f;     --err-soft: #fbe4e2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31, 29, 26, .04), 0 8px 24px rgba(31, 29, 26, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110; --card: #1c1a18; --text: #f2efea; --muted: #a59f97; --line: #2f2b28; --field: #23201d;
    --primary: #f07a4f; --primary-soft: #3a2219;
    --ok: #5cc995; --ok-soft: #16301f; --info: #7fb0f0; --info-soft: #172638;
    --warn: #e8b551; --warn-soft: #33270f; --err: #f08378; --err-soft: #3a1b18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Poppins, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; }
.brand .org { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.brand .app { font-weight: 700; font-size: 17px; letter-spacing: .06em; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; }
.card > h2 { margin-bottom: 12px; }
.hero { background: linear-gradient(135deg, var(--primary) 0%, #c9513a 100%); color: #fff; }
.hero .muted, .hero .meta { color: rgba(255, 255, 255, .85); }
.hero h1 { margin-bottom: 10px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: var(--field); color: var(--text); white-space: nowrap;
}
.hero .pill { background: rgba(255, 255, 255, .18); color: #fff; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.mute { background: var(--field); color: var(--muted); }

/* Formular */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.zip { grid-template-columns: 110px 1fr; }
@media (max-width: 380px) { .row:not(.zip) { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password],
input[type=url], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--field);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; min-height: 46px;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input:focus-visible, button:focus-visible, a:focus-visible, label:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  padding: 9px 16px; border-radius: 999px; background: var(--field); border: 1.5px solid var(--line);
  cursor: pointer; font-size: 14px; font-weight: 500; margin: 0;
}
.choice input:checked + label { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; font-size: 14px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }

.terms {
  white-space: pre-wrap; font-size: 13px; line-height: 1.6; max-height: 220px; overflow: auto;
  background: var(--field); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  border: 0; border-radius: 999px; padding: 12px 22px; min-height: 48px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); text-decoration: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: var(--field); color: var(--text); }
.btn.danger { background: var(--err-soft); color: var(--err); }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--info-soft); color: var(--info); }

/* Schlüssel-Wert-Liste */
.kv { margin: 0 0 14px; border-radius: 14px; background: var(--field); overflow: hidden; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; display: flex; align-items: center; gap: 8px; }
.copy { white-space: nowrap; flex: none; border: 0; background: none; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px; }

.big-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.big-icon.ok { background: var(--ok-soft); color: var(--ok); }
.big-icon.info { background: var(--info-soft); color: var(--info); }
.big-icon.warn { background: var(--warn-soft); color: var(--warn); }

.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 8px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

footer.legal { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }
footer.legal a { color: var(--muted); margin: 0 8px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
