/* Passivantrag – Styles (keine externen Ressourcen, Hauptfarbe via --primary aus der .env) */
:root {
    --primary: #1a56db;
    --text: #1a1a2e;
    --muted: #5b6270;
    --border: #d9dde3;
    --bg-soft: #f6f7f9;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --ok: #12805c;
    --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text); background: #fff; line-height: 1.5; min-height: 100vh;
    display: flex; flex-direction: column;
}
a { color: var(--primary); }
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* Header */
.site-header { border-bottom: 1px solid #e8eaee; background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-logo { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.15rem; }

/* Karte */
.wrap { flex: 1; display: flex; justify-content: center; padding: 32px 16px 56px; background: var(--bg-soft); }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 36px 36px 32px; width: 100%; max-width: 640px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.12); height: fit-content; }
.card-center { text-align: center; }
.card-center p { margin-top: 12px; }
h1 { font-size: 1.55rem; line-height: 1.25; text-align: center; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: .92rem; text-align: center; margin-bottom: 24px; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; background: #e7f6f0; color: var(--ok); font-size: 2rem; display: flex; align-items: center; justify-content: center; }

/* Formular */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 8px; margin-bottom: 22px; min-width: 0; }
legend { font-weight: 700; font-size: .9rem; color: var(--primary); padding: 0 8px; }
.field { margin-bottom: 14px; }
label { display: block; font-size: .85rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select {
    width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg-soft);
    border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); background: var(--danger-bg); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-plz { display: grid; grid-template-columns: 120px 1fr; gap: 0 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--text);
    padding: 12px 14px; margin-bottom: 10px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg-soft); cursor: pointer; }
.choice:hover { border-color: var(--primary); background: #fff; }
.choice input { margin-top: 3px; flex-shrink: 0; accent-color: var(--primary); width: 18px; height: 18px; }
.fee { color: var(--muted); font-size: .85rem; margin-left: 4px; }
.amount-box { margin: 4px 0 14px; padding: 14px; background: var(--bg-soft); border-radius: 10px; }
.input-suffix { display: flex; align-items: center; gap: 10px; }
.input-suffix span { white-space: nowrap; color: var(--muted); }
.help, .legal { font-size: .8rem; color: var(--muted); margin-top: 6px; margin-bottom: 12px; }
.hint { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }

.field-error { color: var(--danger); font-size: .82rem; margin: -6px 0 12px; }
.alert { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecdca; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: .92rem; }
.alert ul { margin: 6px 0 0 20px; }
.alert a { color: inherit; }

/* Unterschrift */
.signature-preview { width: 100%; aspect-ratio: 2 / 1; max-height: 200px; border: 2px dashed #c3c9d2; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--bg-soft); cursor: pointer; margin-bottom: 14px; overflow: hidden; font: inherit; }
.signature-preview:hover, .signature-preview:focus-visible { border-color: var(--primary); background: #fff; outline: none; }
.signature-preview.has-signature { border-style: solid; border-color: var(--ok); background: #fff; }
.signature-preview .placeholder { color: var(--muted); }
.signature-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.signature-overlay { position: fixed; inset: 0; background: #fff; z-index: 9999; display: flex; flex-direction: column; }
.signature-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--text); color: #fff; }
.signature-header h2 { font-size: 1.05rem; }
.signature-actions { display: flex; gap: 8px; }
.sig-btn { padding: 9px 16px; border: 0; border-radius: 8px; background: rgba(255,255,255,.18); color: #fff; font: inherit; font-size: .9rem; cursor: pointer; }
.sig-btn.primary { background: var(--ok); }
.signature-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg-soft); }
/* Feste Querformat-Fläche 2:1 (auch auf dem Handy im Hochformat) -> Unterschrift wird nie hochkant */
#signature-pad { aspect-ratio: 2 / 1; width: min(100%, calc((100dvh - 190px) * 2)); max-width: 900px; touch-action: none; cursor: crosshair; background: #fff; display: block; border: 2px solid #c3c9d2; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.signature-hint { text-align: center; padding: 10px; color: var(--muted); font-size: .82rem; background: var(--bg-soft); border-top: 1px solid var(--border); }

.submit-btn { width: 100%; padding: 15px 20px; background: var(--primary); color: #fff; border: 0; border-radius: 12px; font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: filter .15s, transform .15s; }
.submit-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.submit-btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Footer */
.site-footer { border-top: 1px solid #e5e7eb; padding: 20px 0; background: #fff; font-size: .8rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: flex-start; }
.footer-club { flex: 1 1 220px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a, .vendor a { color: var(--muted); }
.footer-links a:hover, .vendor a:hover { color: var(--primary); }
.vendor { flex-basis: 100%; padding-top: 10px; border-top: 1px solid #eef0f3; font-size: .75rem; }

@media (max-width: 640px) {
    .card { padding: 24px 16px; border-radius: 14px; }
    .wrap { padding: 16px 10px 40px; }
    h1 { font-size: 1.3rem; }
    .grid-2, .grid-plz { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===== Fortschritt, Schritte, Zusammenfassung, Entwurf ===== */
.progress { position: sticky; top: 65px; z-index: 40; background: #fff; padding: 10px 0 12px; margin-bottom: 14px; }
.progress-text { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.progress-bar { height: 8px; border-radius: 99px; background: #e6e9ee; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--primary); border-radius: 99px; transition: width .25s ease; }
.notice { background: #eef4ff; border: 1px solid #cfe0ff; color: #1e3a8a; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: .88rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.actions .submit-btn { flex: 1; width: auto; min-width: 0; }
.back-btn { padding: 15px 20px; border: 1.5px solid var(--border); background: #fff; border-radius: 12px; font: inherit; font-size: 1rem; font-weight: 600; color: var(--text); cursor: pointer; }
.back-btn:hover { border-color: var(--primary); }
.submit-btn.final { background: var(--ok); }
.summary h2 { font-size: 1.25rem; text-align: center; margin-bottom: 6px; }
.sum-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.sum-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sum-head h3 { font-size: .9rem; color: var(--primary); }
.sum-list { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; font-size: .92rem; }
.sum-list dt { color: var(--muted); }
.sum-list dd { overflow-wrap: anywhere; font-weight: 500; }
.sum-sig { max-width: 100%; max-height: 120px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

@media (max-width: 640px) {
    .progress { top: 57px; margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 4px; }
    .wizard .actions { position: sticky; bottom: 0; background: #fff; padding: 12px 0 4px; margin-top: 10px; border-top: 1px solid #eef0f3; z-index: 30; }
    .sum-list { grid-template-columns: 1fr; gap: 0; }
    .sum-list dd { margin-bottom: 8px; }
    input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select { font-size: 16px; } /* verhindert Zoom auf iOS */
}

/* ===== Datenschutz-Seite ===== */
.legal-doc { max-width: 760px; }
.legal-doc h1 { margin-bottom: 4px; }
.legal-doc h2 { font-size: 1.02rem; color: var(--primary); margin: 22px 0 6px; }
.legal-doc p { margin-bottom: 10px; font-size: .95rem; }
.legal-doc ul { margin: 0 0 12px 20px; font-size: .95rem; }
.legal-doc li { margin-bottom: 5px; }
.legal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.legal-actions .back-btn { text-decoration: none; display: inline-block; font-size: .95rem; padding: 11px 18px; }
