/* Mitgliederportal — Design „Editorial Navy" (Variante 2, entschieden 22.08.2026).
   CI: Navy #1A2744 · Gold #C9A84C · Cream #F8F4ED · Playfair Display / Source Sans 3.
   Bewusst ohne Schatten und Animationen (CI-Vorgabe). */

:root {
  --navy: #1A2744; --gold: #C9A84C; --cream: #F8F4ED;
  --ink: #232a38; --muted: #6b7280; --line: #e6e1d5; --white: #fff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--cream); color: var(--ink); }
h1, h2, h3 { font-family: 'Playfair Display', serif; }
.muted { color: var(--muted); }
.wheel { width: 44px; height: 44px; flex: none; }

/* ── Login ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy); padding: 24px; }
.login-card { background: var(--white); border-top: 4px solid var(--gold); border-radius: 10px;
  padding: 40px 36px; max-width: 460px; width: 100%; text-align: center; }
.wheel-lg { width: 56px; height: 56px; margin-bottom: 14px; }
.login-card h1 { color: var(--navy); font-size: 28px; }
.login-sub { color: var(--gold); text-transform: uppercase; letter-spacing: 2.5px;
  font-size: 12px; font-weight: 700; margin: 6px 0 26px; }
.login-card label { display: block; text-align: left; font-size: 14px; font-weight: 600;
  color: var(--navy); margin-bottom: 6px; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; background: var(--cream); margin-bottom: 14px; }
.login-card button { width: 100%; padding: 13px; border: 0; border-radius: 6px;
  background: var(--navy); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.login-card button:disabled { opacity: .6; cursor: default; }
.login-info { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--gold);
  border-radius: 6px; background: #fdf9ee; font-size: 14.5px; text-align: left; }
.login-hint { margin-top: 18px; font-size: 13px; color: var(--muted); line-height: 1.55; text-align: left; }

/* ── Hero ── */
.hero { background: var(--navy); color: #fff; padding-bottom: 96px; }
.hero-top { max-width: 1160px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center;
  gap: 14px; border-bottom: 1px solid rgba(201,168,76,.35); }
.brand-club { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; }
.brand-sub { font-size: 11.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 2.5px; margin-top: 1px; }
.hero-nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.hero-nav a { color: #cfd4e0; text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 4px; }
.hero-nav a.active { color: var(--navy); background: var(--gold); }
.hero-nav a:hover { color: #fff; }
.hero-nav a.active:hover { color: var(--navy); }

.hero-greet { max-width: 1160px; margin: 0 auto; padding: 44px 24px 0; }
.hero-greet .kicker { color: var(--gold); text-transform: uppercase; letter-spacing: 3px;
  font-size: 12.5px; font-weight: 700; }
.hero-greet h1 { font-size: 40px; font-weight: 600; margin-top: 10px; color: #fff; }
.hero-greet h1 em { color: var(--gold); font-style: italic; }
.hero-greet p { color: #b9c0d2; margin-top: 10px; font-size: 16px; max-width: 640px; }

/* ── Karten ── */
main { max-width: 1160px; margin: -64px auto 0; padding: 0 24px 60px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 26px; }
.card.gold-top { border-top: 4px solid var(--gold); }
.card h2 { color: var(--navy); font-size: 20px; margin-bottom: 16px; }
.card-text { font-size: 14.5px; line-height: 1.55; margin-top: 12px; }
.span7 { grid-column: span 7; } .span5 { grid-column: span 5; } .span6 { grid-column: span 6; }
@media (max-width: 900px) {
  .span7, .span5, .span6 { grid-column: span 12; }
  .hero-greet h1 { font-size: 30px; }
  .hero-nav { flex-basis: 100%; order: 10; }
}

/* Termine: grosse Serifen-Ziffern */
.ev { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ev:last-of-type { border-bottom: 0; }
.ev .num { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700;
  color: var(--gold); flex: none; width: 58px; line-height: 1; }
.ev .num small { display: block; font-family: 'Source Sans 3', sans-serif; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.ev .t { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--navy); font-weight: 600; }
.ev .s { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* Kalender-Export: kleine Symbole unter jedem Termin */
.cal-add { display: flex; gap: 8px; margin-top: 7px; }
.cal-btn { display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Source Sans 3', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 9px; text-decoration: none; cursor: pointer; line-height: 1.6; }
.cal-btn:hover { color: var(--navy); border-color: var(--gold); }
.cal-btn svg { flex-shrink: 0; }

/* Abgesagte Termine: rot und durchgestrichen, deutlich als Absage erkennbar */
.ev-abgesagt .t, .ev-abgesagt .s, .ev-abgesagt .num { color: #b3261e; }
.ev-abgesagt .t, .ev-abgesagt .s { text-decoration: line-through; }
.ev-abgesagt-badge { display: inline-block; text-decoration: none; font-family: 'Source Sans 3', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: #b3261e; border-radius: 4px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }

/* Vorstand */
.off { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dotted var(--line); }
.off:last-of-type { border-bottom: 0; }
.pf { width: 46px; height: 46px; border-radius: 50%; background: var(--cream); border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy);
  flex: none; overflow: hidden; }
.pf img { width: 100%; height: 100%; object-fit: cover; }
.off .r { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.off .n { font-family: 'Playfair Display', serif; font-size: 17px; color: var(--navy); }

/* Zahlen + Zitat */
.stat { font-family: 'Playfair Display', serif; font-size: 34px; color: var(--navy); }
.stat small { display: block; font-family: 'Source Sans 3', sans-serif; font-size: 13.5px;
  color: var(--muted); margin-top: 2px; }
.quote { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px;
  font-family: 'Playfair Display', serif; font-style: italic; font-size: 17px;
  color: var(--navy); line-height: 1.5; }

/* Seiten (P2-P4) */
.page[hidden] { display: none; }
.span12 { grid-column: span 12; }
.more { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--navy);
  text-decoration: none; text-transform: uppercase; letter-spacing: 1.5px;
  border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.proto-line { display: flex; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; }
.proto-line:last-of-type { border-bottom: 0; }
.proto-line a { color: var(--navy); font-weight: 600; text-decoration: none; }
.proto-line span { color: var(--muted); font-size: 13px; }

/* Ueber den Club (serverseitig gerendertes Markdown) */
.about-content { font-size: 16.5px; line-height: 1.65; max-width: 760px; }
.about-content h1, .about-content h2 { font-family: 'Playfair Display', serif;
  color: var(--navy); margin: 22px 0 10px; }
.about-content h2 { font-size: 24px; border-bottom: 2px solid var(--gold);
  display: inline-block; padding-bottom: 6px; }
.about-content h3 { color: var(--navy); margin: 18px 0 8px; }
.about-content p { margin: 10px 0; }
.about-content ul, .about-content ol { margin: 10px 0 10px 22px; }
.about-content a { color: var(--navy); font-weight: 600; }

/* Mitgliederverzeichnis */
.toolbar { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 240px; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; background: var(--cream); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.member-card { display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); font: inherit; cursor: pointer; text-align: center; }
.member-card:hover { border-color: var(--gold); }
.mc-name { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: var(--navy); }
.mc-class { font-size: 12.5px; color: var(--muted); min-height: 16px; }
.pf-lg { width: 64px; height: 64px; font-size: 18px; }
.pf-xl { width: 96px; height: 96px; font-size: 24px; }

/* Detail-Overlay */
.overlay { position: fixed; inset: 0; background: rgba(26,39,68,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.overlay[hidden] { display: none; }
.detail-card { background: var(--white); border-top: 4px solid var(--gold); border-radius: 10px;
  padding: 26px; max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto; }
.dc-head { display: flex; gap: 16px; align-items: center; }
.dc-name { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--navy); }
.dc-badge { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700;
  color: var(--navy); background: #f3ead2; border: 1px solid var(--gold);
  border-radius: 4px; padding: 1px 8px; }
.dc-close { margin-left: auto; align-self: flex-start; border: 0; background: none;
  font-size: 26px; color: var(--muted); cursor: pointer; line-height: 1; }
.dc-rows { margin-top: 18px; }
.dc-rows > div { display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
.dc-rows dt { color: var(--muted); flex: none; }
.dc-rows dd { font-weight: 600; color: var(--navy); text-align: right; overflow-wrap: anywhere; }
.dc-rows dd a { color: var(--navy); }

/* Tableau + Termin-/Protokoll-Listen */
.tableau-year { color: var(--navy); font-size: 22px; margin-bottom: 6px; }
.tableau-group { color: var(--gold); text-transform: uppercase; letter-spacing: 2px;
  font-family: 'Source Sans 3', sans-serif; font-size: 13px; margin: 22px 0 6px; }
.tableau-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 26px; }
.monat-titel { color: var(--navy); font-size: 20px; margin: 24px 0 6px; }
.monat-titel:first-child { margin-top: 0; }
.ev .desc { margin-top: 4px; max-width: 640px; }
.proto-row { display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); }
.proto-row .t { font-weight: 600; color: var(--navy); }
.proto-row .s { font-size: 13.5px; color: var(--muted); }
.proto-actions { display: flex; gap: 8px; flex: none; }

/* Buttons + Kartei-Formular */
.btn { display: inline-block; border: 1px solid var(--navy); background: var(--white);
  color: var(--navy); font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 6px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--cream); }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #223154; }
.btn-block { width: 100%; margin-top: 22px; padding: 13px; font-size: 16px; }
.kartei-gruppe { color: var(--gold); text-transform: uppercase; letter-spacing: 2px;
  font-family: 'Source Sans 3', sans-serif; font-size: 13px; margin: 18px 0 8px; }
.kartei-gruppe:first-child { margin-top: 0; }
.kartei-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
@media (max-width: 640px) { .kartei-felder { grid-template-columns: 1fr; } }
.kartei-feld span { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.kartei-feld input { width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; background: var(--cream); }
.foto-row { display: flex; gap: 18px; align-items: center; }
.vis-row { display: flex; gap: 10px; align-items: center; padding: 7px 0;
  font-size: 15px; color: var(--ink); cursor: pointer; }
.vis-row input { width: 17px; height: 17px; accent-color: var(--navy); }

/* Untere Karten-Reihe der Uebersicht: immer gleichmaessig ueber die volle Breite */
.cards-3 { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

/* Zurueck-Link im Hero — [hidden] muss die eigene display-Regel schlagen,
   sonst steht der Link auch auf der Uebersicht */
.hero-back { display: inline-block; margin-top: 14px; color: var(--gold);
  text-decoration: none; font-size: 14.5px; font-weight: 700; }
.hero-back:hover { color: #fff; }
.hero-back[hidden] { display: none; }

/* Abmelden-Knopf im Header (ganz rechts) */
.logout-btn { flex: none; margin-left: 10px; width: 40px; height: 40px;
  border: 1px solid rgba(201,168,76,.45); border-radius: 8px; background: none;
  color: var(--gold); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.logout-btn svg { width: 20px; height: 20px; }
.logout-btn:hover { background: var(--gold); color: var(--navy); }

/* Untere Karten brechen frueher um — sonst quetschen drei span4 nebeneinander */
@media (max-width: 1150px) {
  .span4 { grid-column: span 6; }
  .span7, .span5 { grid-column: span 12; }
}
@media (max-width: 720px) { .span4 { grid-column: span 12; } }
.proto-line a { white-space: nowrap; }

/* Meine-Daten-Karte auf der Uebersicht */
.me-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.me-card-text { flex: 1; min-width: 240px; }
.me-card-name { font-family: 'Playfair Display', serif; font-size: 22px;
  font-weight: 600; color: var(--navy); margin-bottom: 4px; }

/* Read-only-Kasten + Anfrage-Banner in Meine Daten */
.readonly-box { background: var(--cream); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 16px; }
.ro-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0;
  border-bottom: 1px dotted var(--line); font-size: 14.5px; flex-wrap: wrap; }
.ro-row:last-child { border-bottom: 0; }
.ro-row > span:first-child { color: var(--muted); min-width: 170px; }
.ro-row b { color: var(--navy); }
.ro-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px;
  text-transform: uppercase; letter-spacing: 1px; }
.pending-banner { border: 1px solid var(--gold); background: #fdf9ee; border-radius: 8px;
  padding: 12px 16px; font-size: 14.5px; line-height: 1.5; margin-bottom: 16px; }

/* Praesenz + Club-Statistik */
.praesenz-ja { color: #2e7d46; font-weight: 700; white-space: nowrap; }
.praesenz-nein { color: var(--muted); white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 14px; }
.stat-tile { border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center; }
.stat-tile small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ev-web { flex: none; align-self: center; }

/* Footer + Toast */
footer { background: var(--navy); color: #b9c0d2; margin-top: 40px; }
footer .fi { max-width: 1160px; margin: 0 auto; padding: 20px 24px; font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer a { color: var(--gold); text-decoration: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; border-left: 4px solid var(--gold);
  padding: 12px 20px; border-radius: 6px; font-size: 14.5px; max-width: 90vw; }
