/* ==========================================================================
   WKBV Vereinsportal – modernes, eigenständiges Stylesheet
   ========================================================================== */
:root {
    --blue:      #163a8a;
    --blue-dark: #0f2a66;
    --red:       #c8102e;
    --ink:       #1f2733;
    --muted:     #5a6675;
    --line:      #e3e8ef;
    --bg:        #eef1f6;
    --card:      #ffffff;
    --ok:        #1d7a46;
    --ok-bg:     #e7f5ee;
    --err:       #b3261e;
    --err-bg:    #fdecea;
    --warn:      #8a5a00;
    --warn-bg:   #fff4e0;
    --info-bg:   #e9f0fb;
    --radius:    14px;
    --shadow:    0 6px 24px rgba(20, 40, 90, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

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

/* ---------- Kopfbereich oben fixieren ---------- */
.site-top { position: sticky; top: 0; z-index: 100; }

/* ---------- Top-Leiste (Datum/Uhrzeit) ---------- */
.topbar {
    background: var(--blue-dark);
    color: #fff;
    font-size: .78rem;
    letter-spacing: .02em;
}
.topbar span {
    display: block;
    max-width: 920px;
    margin: 0 auto;
    padding: 5px 20px;
    text-align: left;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--card);
    border-bottom: 3px solid var(--blue);
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.site-header__inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.site-header__brand {
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: var(--ink);
}
.site-header__logo { height: 52px; width: auto; display: block; }
.site-header__title { font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.site-header__title small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.site-header__nav { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.site-header__verein { font-weight: 600; color: var(--blue); }
.site-header__mail { font-weight: 400; color: var(--muted); }

/* ---------- Layout ---------- */
.container { max-width: 920px; margin: 28px auto; padding: 0 20px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 30px;
    margin-bottom: 22px;
}
.card--narrow { max-width: 440px; margin-left: auto; margin-right: auto; }

h1 { font-size: 1.55rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 26px 0 12px; color: var(--blue-dark); }
h2:first-child { margin-top: 0; }
.lead { color: var(--muted); margin-top: 0; }
.section-hint { color: var(--muted); font-size: .9rem; }
hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

.deadline {
    display: inline-block;
    background: var(--err-bg); color: var(--err);
    font-weight: 600; font-size: .9rem;
    padding: 6px 12px; border-radius: 8px; margin: 4px 0 6px;
}

/* Inaktivitäts-Countdown */
.session-timer {
    display: block; text-align: center;
    background: var(--warn-bg); color: var(--warn);
    border-bottom: 1px solid #f1d39a;
    font-size: .9rem; padding: 8px 12px;
}
.session-timer strong { font-variant-numeric: tabular-nums; }
.session-timer--warn {
    background: var(--err-bg); color: var(--err); border-color: var(--err);
}

/* ---------- Formulare ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .92rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }

input[type=text], input[type=password], input[type=email], input[type=number],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(22,58,138,.15);
}
input[readonly], input:disabled, select:disabled {
    background: #f4f6fa; color: var(--muted);
}
textarea { resize: vertical; min-height: 84px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-plz { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 14px; }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-plz { grid-template-columns: 1fr; } }

.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: auto; margin-top: 4px; }

/* Passwort-Vorgaben (Live-Checkliste) */
.pwd-rules { list-style: none; padding: 0; margin: 8px 0 16px; font-size: .88rem; }
.pwd-rules li { color: var(--muted); position: relative; padding-left: 24px; line-height: 1.8; }
.pwd-rules li::before {
    content: '\2717'; /* ✕ */
    position: absolute; left: 2px; color: var(--err); font-weight: 700;
}
.pwd-rules li.ok { color: var(--ok); }
.pwd-rules li.ok::before { content: '\2713'; color: var(--ok); } /* ✓ */

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--blue); color: #fff;
    border: none; border-radius: 9px;
    padding: 11px 20px; font: inherit; font-weight: 600;
    cursor: pointer; text-decoration: none; text-align: center;
    transition: background .15s ease;
}
.btn:hover { background: var(--blue-dark); }
.btn--block { display: block; width: 100%; }
.btn--ghost { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn--ghost:hover { background: var(--info-bg); }
.btn--sm { padding: 7px 14px; font-size: .85rem; }
.btn--danger { background: var(--red); }
.btn--danger:hover { background: #9c0c23; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.btn-row--split { justify-content: space-between; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .93rem; }
.alert--info    { background: var(--info-bg); }
.alert--success { background: var(--ok-bg);  color: var(--ok); }
.alert--error   { background: var(--err-bg); color: var(--err); }
.alert--warn    { background: var(--warn-bg);color: var(--warn); }
.alert a { color: inherit; font-weight: 600; }

/* ---------- Dashboard-Karten ---------- */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr; } }
.action {
    display: block; text-decoration: none; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.action:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.action[aria-disabled=true] { opacity: .5; pointer-events: none; }
.action__icon { font-size: 1.8rem; }
.action__title { font-weight: 700; font-size: 1.1rem; margin: 8px 0 4px; color: var(--blue-dark); }
.action__desc { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tbody tr:hover { background: #fafbfe; }
.table--compact th, .table--compact td { padding: 6px 8px; font-size: .9rem; }
.table input[type=text] { padding: 7px 9px; }

/* Spalte optisch von den Personendaten abtrennen (durchgehende schwarze Linie) */
.table .col-divider { border-left: 2px solid var(--ink); padding-left: 18px; }

/* Neumitglieder-Erfassung */
.neu-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 14px; }
@media (max-width: 480px) { .neu-grid { grid-template-columns: 1fr; } }
.neu-row { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--ink); }
.neu-row:first-child { border-top: none; margin-top: 0; }
.neu-row__title { font-weight: 600; color: var(--blue-dark); margin: 10px 0 6px; }

.rlk-status { display: flex; gap: 14px; flex-wrap: wrap; }
.rlk-status label { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; }
.rlk-status input { width: auto; }

/* ---------- Review / Zusammenfassung ---------- */
.summary { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.summary dl { display: grid; grid-template-columns: 200px 1fr; margin: 0; }
.summary dt { padding: 9px 14px; background: #f6f8fc; font-weight: 600; border-bottom: 1px solid var(--line); }
.summary dt::after { content: ':'; }
.summary dd { padding: 9px 14px; margin: 0; border-bottom: 1px solid var(--line); }
.summary--wide dl { grid-template-columns: 270px 1fr; }
.summary--wide dt { white-space: nowrap; }
@media (max-width: 560px) { .summary dl, .summary--wide dl { grid-template-columns: 1fr; } .summary dt { border-bottom: none; } }

/* ---------- Steps ---------- */
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 22px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); }
.steps__num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--line); color: var(--muted); font-weight: 700; font-size: .78rem;
}
.steps li.is-active { color: var(--blue); font-weight: 600; }
.steps li.is-active .steps__num { background: var(--blue); color: #fff; }
.steps li.is-done .steps__num { background: var(--ok); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: var(--muted); font-size: 1rem; padding: 24px 20px 40px; }
.site-footer a { color: var(--muted); }

/* ---------- Profil: zweispaltig mit Sprungmenü ---------- */
.profile-layout { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; }
.profile-nav { padding: 12px 10px; position: sticky; top: 116px; }
.profile-nav ul { list-style: none; margin: 0; padding: 0; }
.profile-nav a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.profile-nav a:hover { background: var(--info-bg); color: var(--blue); }
.profile-nav hr { border: none; border-top: 1px solid var(--line); margin: 6px 8px; }
.profile-content .card { margin-bottom: 22px; }
.profile-content .card:last-child { margin-bottom: 0; }
.profile-section { scroll-margin-top: 116px; }
@media (max-width: 720px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-nav { position: static; }
}

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
