/* ═══════════════════════════════════════════════════════════════
   RSV Roßwein – PWA CSS  (Mobile-first, dark + light mode)
   Designsprache identisch zur Mitgliederseite (base.min.css)
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Identisch mit base.min.css ── */
  --red:        #c0212b;
  --red-dark:   #8b0000;
  --gold:       #b8965a;
  --gold-light: #d4af70;
  --white:      #ffffff;

  /* Hintergründe – kühles Dunkel wie auf der Seite */
  --bg:         #111111;
  --bg2:        #161616;
  --bg3:        #1e1e1e;
  --bg4:        #252525;

  --border:     rgba(255,255,255,0.07);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.28);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.5);

  --radius:     4px;
  --radius-lg:  8px;

  --font-display: Georgia, 'Times New Roman', serif;
  --font-body:    system-ui, 'Segoe UI', Roboto, sans-serif;

  /* Text */
  --text:  #f0ece6;
  --text2: rgba(240,236,230,.55);
  --text3: rgba(240,236,230,.30);

  /* Karten */
  --card-bg:  rgba(255,255,255,.04);
  --card-bg2: rgba(255,255,255,.07);

  /* App-Shell */
  --nav-h:  60px;
  --hdr-h:  54px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ── System: Hellmodus (Fallback wenn kein data-theme gesetzt) ── */
@media (prefers-color-scheme: light) {
  :root {
    --bg:       #f4f0e8;
    --bg2:      #ece7e0;
    --bg3:      #e2ddd6;
    --bg4:      #d8d2ca;
    --border:   rgba(0,0,0,.10);
    --text:     #1a1510;
    --text2:    rgba(26,21,16,.55);
    --text3:    rgba(26,21,16,.32);
    --card-bg:  rgba(0,0,0,.03);
    --card-bg2: rgba(0,0,0,.06);
  }
}

/* ── Manueller Hellmodus (überschreibt OS-Einstellung) ── */
html[data-theme="light"] {
  --bg:       #f4f0e8;
  --bg2:      #ece7e0;
  --bg3:      #e2ddd6;
  --bg4:      #d8d2ca;
  --border:   rgba(0,0,0,.10);
  --text:     #1a1510;
  --text2:    rgba(26,21,16,.55);
  --text3:    rgba(26,21,16,.32);
  --card-bg:  rgba(0,0,0,.03);
  --card-bg2: rgba(0,0,0,.06);
}

/* ── Manueller Dunkelmodus (überschreibt OS-Einstellung) ── */
html[data-theme="dark"] {
  --bg:         #111111;
  --bg2:        #161616;
  --bg3:        #1e1e1e;
  --bg4:        #252525;
  --border:     rgba(255,255,255,0.07);
  --text:       #f0ece6;
  --text2:      rgba(240,236,230,.55);
  --text3:      rgba(240,236,230,.30);
  --card-bg:    rgba(255,255,255,.04);
  --card-bg2:   rgba(255,255,255,.07);
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
  z-index: 100;
}
.login-box {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.login-logo { margin-bottom: 20px; }

.login-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.login-sub {
  font-size: 13px; color: var(--text2);
  margin-bottom: 28px;
}
.login-box form { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 11px; font-weight: 600;
  color: var(--text3);
  letter-spacing: .12em; text-transform: uppercase;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: rgba(192,33,43,.6);
  box-shadow: 0 0 0 3px rgba(192,33,43,.1);
}

.login-err {
  font-size: 13px; color: #f87171;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--red) 0%, #a01a22 50%, var(--gold) 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  cursor: pointer;
  margin-top: 4px;
  transition: background-position .4s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(192,33,43,.3);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(192,33,43,.45);
}
.btn-primary:active  { transform: scale(1); }
.btn-primary:disabled { opacity: .5; pointer-events: none; }

/* ══════════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════════ */
.app-shell {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* ── Header ── */
.app-header {
  display: flex; align-items: center; gap: 4px;
  height: calc(var(--hdr-h) + var(--safe-t));
  padding: calc(var(--safe-t) + 8px) 12px 8px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  position: relative; z-index: 10;
}
/* Roter Akzentstreifen unten – wie auf der Website */
.app-header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 100%);
}
.hdr-back {
  width: 36px; height: 36px;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hdr-back:active { background: var(--card-bg2); }
.hdr-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.hdr-action {
  width: 36px; height: 36px;
  background: none; border: none;
  color: var(--text2); cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hdr-action:active { background: var(--card-bg2); }

/* ── Screen-Container ── */
.screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ── Bottom Nav ── */
.bottom-nav {
  display: flex;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  flex-shrink: 0; z-index: 10;
}
.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  background: none; border: none;
  color: var(--text3);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
  transition: color .15s;
  padding: 0;
  position: relative;
}
.nav-btn.active { color: var(--red); }
.nav-btn.active::before {
  content: '';
  position: absolute; top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 0 0 2px 2px;
}
.nav-btn:active { opacity: .7; }
.nav-ico { width: 22px; height: 22px; stroke: currentColor; }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 14px);
  min-width: 16px; height: 16px;
  background: var(--red);
  color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ══════════════════════════════════════════════════════════
   SCREENS – gemeinsame Elemente
   ══════════════════════════════════════════════════════════ */
.screen { padding: 14px; min-height: 100%; }

/* Screen-Titel mit Goldlinie – wie section-header auf der Website */
.screen-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.screen-rule {
  display: block; width: 40px; height: 1px;
  background: var(--gold);
  margin-bottom: 16px;
}

/* Lade-Spinner */
.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0; color: var(--text3);
}
.loader::after {
  content: '';
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Leer-Zustand */
.empty {
  text-align: center; padding: 40px 24px;
  color: var(--text3); font-size: 14px; line-height: 1.6;
}

/* Karten – wie section-block auf der Website */
.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.card:active {
  border-color: rgba(192,33,43,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; font-family: var(--font-display); }
.card-meta  { font-size: 12px; color: var(--text2); }
.card-body  { font-size: 13px; color: var(--text2); margin-top: 6px; line-height: 1.5; }

/* Chips */
.chip {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}
.chip-red    { background: rgba(192,33,43,.15); color: #f87171; border-color: rgba(192,33,43,.35); }
.chip-green  { background: rgba(74,222,128,.1);  color: #4ade80; border-color: rgba(74,222,128,.3); }
.chip-yellow { background: rgba(184,150,90,.12); color: var(--gold-light); border-color: rgba(184,150,90,.3); }
.chip-blue   { background: rgba(59,130,246,.12); color: #60a5fa; border-color: rgba(59,130,246,.3); }
.chip-gray   { background: rgba(107,114,128,.12);color: #9ca3af; border-color: rgba(107,114,128,.3);}

@media (prefers-color-scheme: light) {
  .chip-red    { color: #b91c1c; border-color: rgba(192,33,43,.4); }
  .chip-green  { color: #15803d; border-color: rgba(74,222,128,.4); }
  .chip-yellow { color: #92400e; border-color: rgba(184,150,90,.4); }
  .chip-blue   { color: #1d4ed8; border-color: rgba(59,130,246,.4); }
  .chip-gray   { color: #4b5563; border-color: rgba(107,114,128,.4);}
}

/* Liste */
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.list-row:active { opacity: .7; }

/* Progress-Bar */
.progress-wrap { height: 4px; background: var(--card-bg2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--red); border-radius: 2px; transition: width .4s ease; }

/* Stat-Zeilen */
.stat-row { display: flex; gap: 8px; margin-bottom: 12px; }
.stat-box {
  flex: 1;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.stat-n { font-size: 24px; font-weight: 600; line-height: 1; }
.stat-l { font-size: 11px; color: var(--text2); margin-top: 3px; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ══════════════════════════════════════════════════════════
   HOME-SCREEN  (Dashboard-Widgets)
   ══════════════════════════════════════════════════════════ */
.home-header {
  padding: 18px 14px 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}
.home-greet {
  font-size: 11px; color: var(--text2);
  letter-spacing: .12em; text-transform: uppercase;
}
.home-name {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; letter-spacing: -.01em;
  margin-top: 3px; margin-bottom: 6px;
}
.home-rule {
  display: block; width: 36px; height: 1px;
  background: var(--gold);
}

/* Dashboard-Wrap: 2-spaltig */
.dw-wrap {
  padding: 10px 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}
/* Content-Widgets und Edit-Button: volle Breite */
.dw-wrap > .dw-card,
.dw-wrap > .dw-edit-btn { grid-column: 1 / -1; }

/* Dashboard-Karte */
.dw-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  cursor: pointer;
}
.dw-card:active {
  border-color: rgba(192,33,43,.35);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transform: translateY(-2px);
}

/* Karten-Kopf */
.dw-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px 11px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.dw-ico   { font-size: 20px; flex-shrink: 0; }
.dw-title {
  flex: 1;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0; text-transform: none;
  color: var(--text);
}

/* "Öffnen →" Button */
.dw-open-btn {
  font-size: 11px; font-weight: 500;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: none; /* Klick geht an .dw-card */
}

/* Statistik-Kacheln unter dem Header */
.dw-stats {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.dw-stat {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
}
.dw-stat:last-child { border-right: none; }
.dw-stat-n {
  font-size: 22px; font-weight: 700;
  color: var(--text); line-height: 1;
}
.dw-stat-l {
  font-size: 10px; color: var(--text3);
  letter-spacing: .04em;
}

/* Karten-Inhalt */
.dw-body { padding: 8px 14px 12px; }

/* Zeile mit Punkt + Text + rechtem Label */
.dw-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.dw-row:last-child { border-bottom: none; }
.dw-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dw-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.dw-row-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dw-row-title { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-row-meta  { font-size: 10px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-row-rel   { font-size: 10px; font-weight: 600; flex-shrink: 0; }
.dw-unread    { font-weight: 700; color: var(--text); }
.dw-unread-dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }

/* Abstimmungs-Balken */
.dw-poll { padding: 6px 0; border-bottom: 1px solid var(--border); }
.dw-poll:last-child { border-bottom: none; }
.dw-bar-wrap { height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin: 5px 0 4px; }
.dw-bar-fill { height: 100%; background: var(--red); border-radius: 2px; transition: width .4s; }
.dw-poll-foot { display: flex; justify-content: space-between; }

/* Leer-Zustand in Widget */
.dw-empty { font-size: 12px; color: var(--text3); padding: 4px 0; }

/* Mehr-Link */
.dw-more { font-size: 11px; color: var(--gold); padding-top: 6px; }

/* Schnellzugriff-Label */
.dw-section-lbl {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(192,33,43,.7);
  margin-top: 4px;
}
.dw-section-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(192,33,43,.35), rgba(255,255,255,.03));
}

/* Nav-Kacheln-Grid */
.dw-qa-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dw-qa-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 14px 11px;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.dw-qa-item:active {
  border-color: rgba(192,33,43,.35);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transform: translateY(-2px);
}
.dw-qa-ico   { font-size: 20px; flex-shrink: 0; }
.dw-qa-label { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); }

/* ══════════════════════════════════════════════════════════
   TERMINE-SCREEN
   ══════════════════════════════════════════════════════════ */
.term-date-head {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--text);
  padding: 16px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.term-date-head::before {
  content: '';
  display: block; width: 3px; height: 14px;
  background: var(--red); border-radius: 2px;
  flex-shrink: 0;
}
.term-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.term-row:last-child { border-bottom: none; }
.term-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.term-info { flex: 1; min-width: 0; }
.term-title { font-size: 14px; font-weight: 500; }
.term-meta  { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   POSTFACH-SCREEN
   ══════════════════════════════════════════════════════════ */
.msg-row {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.msg-row:active { opacity: .7; }
.msg-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.msg-from   { font-size: 13px; font-weight: 600; }
.msg-time   { font-size: 11px; color: var(--text3); flex-shrink: 0; }
.msg-subj   { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.msg-prev   { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.msg-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   ABSTIMMUNG-SCREEN
   ══════════════════════════════════════════════════════════ */
.poll-row { margin-bottom: 10px; }

/* ══════════════════════════════════════════════════════════
   MEHR-SCREEN
   ══════════════════════════════════════════════════════════ */
.mehr-section { margin-bottom: 22px; }

/* Wie .doc-group-label auf der Website */
.mehr-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(192,33,43,.75);
  margin-bottom: 8px;
  white-space: nowrap;
}
.mehr-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(192,33,43,.35), rgba(255,255,255,.04));
}

.mehr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mehr-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px;
  cursor: pointer; text-align: center;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.mehr-item:active {
  border-color: rgba(192,33,43,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.mehr-ico   { font-size: 26px; }
.mehr-label { font-size: 11px; font-weight: 500; color: var(--text2); line-height: 1.2; letter-spacing: .02em; }

/* ══════════════════════════════════════════════════════════
   DETAIL-SCREENS
   ══════════════════════════════════════════════════════════ */
.detail-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.detail-card:active {
  border-color: rgba(192,33,43,.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.detail-title { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.3; font-family: var(--font-display); }
.detail-meta  { font-size: 12px; color: var(--text2); }
.detail-body  { font-size: 13px; color: var(--text2); line-height: 1.5; }

/* Leitungssitzung TOPs */
.si-top {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.si-top:last-of-type { border-bottom: none; }
.si-top-nr {
  color: var(--red); font-weight: 700; font-size: 13px;
  min-width: 20px; padding-top: 1px; flex-shrink: 0;
}
.si-top-body { flex: 1; min-width: 0; }
.si-top-title { font-size: 13px; font-weight: 600; color: var(--text); }
.si-top-desc  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.si-top-verantw { font-size: 11px; color: var(--text3); margin-top: 2px; }
.si-top-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.si-status-btn {
  background: none; border: none; font-size: 16px; cursor: pointer;
  padding: 2px 4px; line-height: 1;
}
.si-act-btn {
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 12px; padding: 4px 7px; cursor: pointer;
}

/* Profil */
.profil-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.profil-av {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profil-name { font-size: 18px; font-weight: 700; font-family: var(--font-display); }
.profil-rollen { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }

/* Ehrenamt */
.ea-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ea-row:last-child { border-bottom: none; }
.ea-date  { font-size: 12px; color: var(--text2); flex-shrink: 0; min-width: 72px; }
.ea-kat   { flex: 1; font-size: 13px; }
.ea-std   { font-size: 13px; font-weight: 600; flex-shrink: 0; }

/* Brett */
.brett-row {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .3s;
}
.brett-row:active { border-color: rgba(192,33,43,.4); }
.brett-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.brett-title { font-size: 14px; font-weight: 600; flex: 1; font-family: var(--font-display); }
.brett-meta  { font-size: 11px; color: var(--text2); }

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(22,22,22,.96);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════
   INSTALL SHEET (Bottom Sheet)
   ══════════════════════════════════════════════════════════ */
.install-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 7999; opacity: 0;
  transition: opacity .3s; pointer-events: none;
}
.install-backdrop.show { opacity: 1; pointer-events: auto; }

.install-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 0 24px calc(24px + env(safe-area-inset-bottom));
  z-index: 8000; opacity: 0;
  transform: translateY(100%);
  transition: opacity .35s, transform .35s cubic-bezier(.32,1,.28,1);
  text-align: center;
}
.install-banner.show { opacity: 1; transform: translateY(0); }
.install-handle {
  width: 40px; height: 4px;
  background: var(--border); border-radius: 2px;
  margin: 12px auto 20px;
}
.install-banner-ico {
  width: 80px; height: 80px; border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  margin-bottom: 14px;
}
.install-banner-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -.01em; margin-bottom: 4px;
}
.install-banner-sub {
  font-size: 13px; color: var(--text2);
  line-height: 1.5; margin-bottom: 24px;
}
.install-ios-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; text-align: left; }
.install-ios-step {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg4); border-radius: var(--radius-lg); padding: 10px 14px;
}
.install-ios-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.install-ios-text { font-size: 13px; line-height: 1.4; }
.install-banner-btn {
  display: block; width: 100%;
  background: linear-gradient(135deg, var(--red), #a01a22 50%, var(--gold));
  background-size: 200% 200%;
  color: #fff; border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 15px;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(192,33,43,.3);
}
.install-banner-btn:active { opacity: .85; }
.install-banner-close {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--text2); font-size: 14px;
  cursor: pointer; padding: 8px;
}

/* ══════════════════════════════════════════════════════════
   KALENDER (Monatsraster)
   ══════════════════════════════════════════════════════════ */
.kal-screen { padding: 8px !important; }

.kal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding: 4px 4px;
}
.kal-hdr-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: -.01em;
}
.kal-nav {
  background: none; border: none; color: var(--text);
  font-size: 18px; cursor: pointer;
  padding: 4px 10px; border-radius: var(--radius);
  line-height: 1;
}
.kal-nav:active { background: var(--card-bg2); }

.kal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);    /* erzeugt sichtbare Trennlinien via gap */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kal-wd {
  background: var(--bg3);
  text-align: center;
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text2);
  padding: 5px 0;
}
.kal-cell {
  min-height: 76px;
  background: var(--bg2);
  border: none; border-radius: 0;
  padding: 4px 3px 5px;
  display: flex; flex-direction: column; gap: 2px;
  overflow: hidden;
}
.kal-empty { background: var(--bg); }
.kal-cell-click { cursor: pointer; }
.kal-cell-click:active { background: var(--bg3); }

.kal-day-num {
  font-size: 12px; font-weight: 600;
  color: var(--text2);
  line-height: 1; padding: 1px 2px 2px;
  align-self: flex-start;
}
.kal-today {
  background: var(--red); color: #fff !important;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; padding: 0;
}
.kal-chip {
  font-size: 11px; font-weight: 600;
  border-radius: 3px;
  padding: 2px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.45;
}
.kal-more { font-size: 10px; color: var(--text3); padding: 0 3px; font-weight: 600; }
.kal-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 10px 4px 4px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.kal-leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); }
.kal-leg-dot  { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   FORMULAR (Ehrenamt, Abstimmung, …)
   ══════════════════════════════════════════════════════════ */
.form-row { margin-bottom: 10px; }
.form-label {
  display: block;
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 4px;
}
.form-input {
  display: block; width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px; font-family: var(--font-body);
  padding: 10px 12px;
  outline: none;
  appearance: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.form-input:focus { border-color: var(--gold); }
.form-input[type="date"] { cursor: pointer; }
.form-input option { background: var(--bg4); }

/* ══════════════════════════════════════════════════════════
   MINI-KALENDER (Home-Dashboard)
   ══════════════════════════════════════════════════════════ */
.mini-kal { padding: 0; }
.mini-kal-month {
  font-size: 13px; font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}
.mini-kal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mini-kal-hdr {
  background: var(--bg3);
  text-align: center;
  font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text2);
  padding: 4px 0;
}
.mini-kal-cell {
  background: var(--bg2);
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 3px 2px 4px;
  min-height: 52px;
  overflow: hidden;
}
.mini-kal-empty { background: var(--bg); }
.mini-kal-num {
  font-size: 11px; font-weight: 600; color: var(--text2);
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  line-height: 1;
  margin-bottom: 2px;
  flex-shrink: 0;
}
.mini-kal-today {
  background: var(--red) !important; color: #fff !important;
}
.mini-kal-chip {
  font-size: 9px; font-weight: 600; color: #fff;
  border-radius: 2px;
  padding: 1px 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
  width: 100%;
  display: block;
}
.mini-kal-more { font-size: 8px; color: var(--text3); padding: 0 2px; font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   ABSTIMMUNGS-BUTTONS
   ══════════════════════════════════════════════════════════ */
.poll-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.poll-vote-btn {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px; font-family: var(--font-body);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .15s;
}
.poll-vote-btn:active { border-color: var(--gold); background: rgba(184,150,90,.1); }
.poll-vote-btn:disabled { opacity: .5; pointer-events: none; }

/* ══════════════════════════════════════════════════════════
   HOME ANPASSEN – Edit-Button + Widget-Editor Sheet
   ══════════════════════════════════════════════════════════ */
.dw-edit-btn {
  display: block; width: 100%;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text2); font-size: 12px;
  padding: 10px; cursor: pointer;
  margin-top: 4px; text-align: center;
}
.dw-edit-btn:active { background: var(--card-bg2); }

.we-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 8100;
  opacity: 0; transform: translateY(100%);
  transition: opacity .3s, transform .3s cubic-bezier(.32,1,.28,1);
  max-height: 85vh; overflow-y: auto;
}
.we-sheet.show { opacity: 1; transform: translateY(0); }
.we-title {
  font-size: 17px; font-weight: 700;
  font-family: var(--font-display);
  text-align: center; padding: 4px 0 14px;
}
.we-group-hdr {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text3); padding: 10px 0 4px; margin-top: 4px;
}
.we-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.we-ico   { font-size: 18px; flex-shrink: 0; }
.we-label { flex: 1; font-size: 14px; font-weight: 500; }
.we-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.we-btn {
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 11px; padding: 5px 9px; cursor: pointer;
}
.we-btn:disabled { opacity: .3; pointer-events: none; }

/* Toggle-Switch */
.we-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.we-check  { position: absolute; opacity: 0; width: 0; height: 0; }
.we-slider {
  position: absolute; inset: 0;
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: background .2s;
}
.we-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 2px; top: 50%;
  transform: translateY(-50%);
  background: var(--text2); border-radius: 50%;
  transition: transform .2s, background .2s;
}
.we-check:checked + .we-slider { background: var(--gold); border-color: var(--gold); }
.we-check:checked + .we-slider::before {
  transform: translateX(18px) translateY(-50%);
  background: #fff;
}

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }
.text-red   { color: var(--red); }
.text-gold  { color: var(--gold); }
.text-green { color: #4ade80; }
.fw-600 { font-weight: 600; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
