* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f3f5f8;
    color: #1d2530;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header { margin-bottom: 16px; }

h1 {
    margin: 0 0 4px;
    font-size: 1.8rem;
    color: var(--akzent);
}

.verein {
    margin: 0;
    font-weight: 600;
    color: #4a5565;
}

.card {
    background: #fff;
    border: 1px solid #d9dfe7;
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 16px;
}

fieldset.card { min-width: 0; }

legend {
    padding: 0 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--akzent);
}

label {
    display: block;
    margin: 0 0 14px;
    font-weight: 600;
    font-size: 0.95rem;
}

label:last-child { margin-bottom: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #b9c2ce;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--akzent);
    outline-offset: 1px;
    border-color: var(--akzent);
}

.grid { display: grid; gap: 0 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.plzort { grid-template-columns: 120px 1fr; }

@media (max-width: 560px) {
    .grid.two,
    .grid.plzort { grid-template-columns: 1fr; }
}

.req { color: #c0262d; }

.radios { display: grid; gap: 8px; }

.radio,
.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
}

.radio { font-weight: 600; }

.radio input,
.check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    accent-color: var(--akzent);
}

.check { margin-bottom: 14px; }

.note {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #eef3f9;
    border-radius: 6px;
    font-size: 0.95rem;
}

.errors {
    margin: 0 0 16px;
    padding: 14px 18px;
    background: #fdecec;
    border: 1px solid #e5a0a3;
    border-radius: 8px;
    color: #7a1418;
}

.errors ul { margin: 6px 0 0; padding-left: 20px; }

.button {
    display: inline-block;
    padding: 12px 28px;
    border: 0;
    border-radius: 8px;
    background: var(--akzent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { filter: brightness(0.92); }

.submit { margin: 8px 0 0; text-align: right; }

.thanks { text-align: center; padding: 36px 20px; }

footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
}

footer a { margin: 0 10px; color: #4a5565; }

a { color: var(--akzent); }

/* Honeypot: für Menschen unsichtbar */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

[hidden] { display: none !important; }

/* --- PIN-Bestätigung --- */
.summary {
    margin: 12px 0 20px;
    padding: 14px 16px;
    background: #eef3f9;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

input.pin {
    max-width: 220px;
    font-size: 1.6rem;
    letter-spacing: 0.4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.button.secondary {
    background: #fff;
    color: var(--akzent);
    border: 2px solid var(--akzent);
    padding: 10px 26px;
}

.confirm h1 { font-size: 1.5rem; }

/* --- Antragsseite und Verwaltung --- */
h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--akzent); }
h3 { margin: 18px 0 6px; font-size: 1rem; }
code { background: #eef3f9; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps li {
    counter-increment: step;
    flex: 1 1 130px;
    padding: 8px 10px;
    border: 1px solid #d9dfe7;
    border-radius: 8px;
    background: #fff;
    color: #6b7686;
    font-size: 0.9rem;
}
.steps li::before { content: counter(step) ". "; font-weight: 700; }
.steps li.done { color: #1b6b34; border-color: #a6d3b3; background: #f0faf3; }
.steps li.done::before { content: "\2713  "; }
.steps li.active { color: var(--akzent); border: 2px solid var(--akzent); font-weight: 700; }

.note.ok { background: #e9f7ee; border: 1px solid #a6d3b3; color: #14502a; }

input[type="file"] { display: block; width: 100%; margin-top: 6px; }
input[type="password"] {
    display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
    border: 1px solid #b9c2ce; border-radius: 6px; font: inherit;
}

.adminbar { margin: 0 0 16px; font-size: 0.95rem; color: #4a5565; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e8ecf2;
    color: #2b3440;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
}
.badge.s-offen { background: #fff3d6; color: #7a5300; }
.badge.s-unterschrieben, .badge.s-original { background: #dbeafe; color: #123c78; }
.badge.s-aufgenommen { background: #dcf3e3; color: #14502a; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e3e8ef; text-align: left; white-space: nowrap; }
th { color: #4a5565; font-size: 0.85rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.filters a { padding: 4px 12px; border: 1px solid #d9dfe7; border-radius: 999px; text-decoration: none; font-size: 0.9rem; }
.filters a.on { background: var(--akzent); border-color: var(--akzent); color: #fff; }

.log { margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.log li { padding: 5px 0; border-bottom: 1px solid #eef1f5; }
.log span { display: inline-block; min-width: 9.5em; color: #6b7686; }

form.inline p { margin: 0 0 12px; }

/* --- Unterschrift am Bildschirm --- */
.sigfield { margin: 0 0 18px; }
.siglabel { margin: 0 0 6px; font-weight: 600; }
canvas.sigpad {
    display: block;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 3 / 1;
    background: #fff;
    border: 2px dashed #8a97a8;
    border-radius: 8px;
    touch-action: none;       /* Wischen soll zeichnen, nicht die Seite scrollen */
    cursor: crosshair;
}
canvas.sigpad.bad { border-color: #c0262d; background: #fff6f6; }
.sigtools { margin: 6px 0 0; font-size: 0.9rem; }
.linkbutton { padding: 0; border: 0; background: none; color: var(--akzent); font: inherit; text-decoration: underline; cursor: pointer; }
details.again { padding: 14px 20px; }
details.again > summary { cursor: pointer; font-weight: 600; color: var(--akzent); }
details.again[open] > summary { margin-bottom: 14px; }
details.again .card { border-color: #e3e8ef; }
