:root {
  --red: #c8102e; --red-dark: #9f0d24; --red-soft: #fdecee;
  --ink: #18181b; --ink-2: #3f3f46; --muted: #71717a; --line: #e4e4e7; --line-2: #f1f1f3;
  --bg: #f5f5f6; --card: #ffffff; --surface: #ffffff; --surface-2: #fafafa; --row-hover: #fcfcfd;
  --soft: #f4f4f5; --soft-2: #ececef; --soft-3: #e2e2e6; --input-line: #d4d4d8; --faint: #c4c4cc; --rank-bg: #3f3f46;
  --link: #c8102e; --red-ink: #9f0d24; --red-hover: #fff5f6; --orange: #c2410c; --orange-bg: #fff1e6;
  --ok-line: #c4ead2; --bad-line: #f5c2c2; --warn-line: #f4dcae; --info-line: #c8d8fb; --amber: #f59e0b; --side: #17181c; --side-2: #23252b; --side-ink: #c9cad1;
  --ok: #15803d; --ok-bg: #e7f6ec; --warn: #b45309; --warn-bg: #fdf3e2; --bad: #b91c1c; --bad-bg: #fde8e8;
  --info: #1d4ed8; --info-bg: #e8effd; --none: #71717a; --none-bg: #f1f1f3;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,16,20,.04), 0 4px 16px rgba(16,16,20,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* ---------- Dunkelmodus: System-Einstellung, per Schalter überschreibbar ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --red: #d61f3b; --red-dark: #b5142d; --red-soft: #3b1219; --link: #ff7084; --red-ink: #ff95a3; --red-hover: #26151a;
  --ink: #ececef; --ink-2: #c9cad1; --muted: #9a9ca5; --line: #2e3036; --line-2: #25272c;
  --bg: #0e0f11; --card: #17181b; --surface: #1e1f23; --surface-2: #1b1c20; --row-hover: #1d1e22;
  --soft: #25262b; --soft-2: #2c2d33; --soft-3: #35373e; --input-line: #3b3d45; --faint: #4b4d56; --rank-bg: #4a4c55;
  --side: #0a0b0d; --side-2: #1d1f24; --side-ink: #c9cad1;
  --ok: #4ade80; --ok-bg: #11291a; --ok-line: #1e4a30; --warn: #fbbf24; --warn-bg: #2d220a; --warn-line: #574214;
  --bad: #f87171; --bad-bg: #351416; --bad-line: #5c2427; --info: #93b4ff; --info-bg: #141e38; --info-line: #2a3c6b;
  --none: #a1a1aa; --none-bg: #26272c; --orange: #fb923c; --orange-bg: #33200f;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --red: #d61f3b; --red-dark: #b5142d; --red-soft: #3b1219; --link: #ff7084; --red-ink: #ff95a3; --red-hover: #26151a;
  --ink: #ececef; --ink-2: #c9cad1; --muted: #9a9ca5; --line: #2e3036; --line-2: #25272c;
  --bg: #0e0f11; --card: #17181b; --surface: #1e1f23; --surface-2: #1b1c20; --row-hover: #1d1e22;
  --soft: #25262b; --soft-2: #2c2d33; --soft-3: #35373e; --input-line: #3b3d45; --faint: #4b4d56; --rank-bg: #4a4c55;
  --side: #0a0b0d; --side-2: #1d1f24; --side-ink: #c9cad1;
  --ok: #4ade80; --ok-bg: #11291a; --ok-line: #1e4a30; --warn: #fbbf24; --warn-bg: #2d220a; --warn-line: #574214;
  --bad: #f87171; --bad-bg: #351416; --bad-line: #5c2427; --info: #93b4ff; --info-bg: #141e38; --info-line: #2a3c6b;
  --none: #a1a1aa; --none-bg: #26272c; --orange: #fb923c; --orange-bg: #33200f;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
}
:root[data-theme="light"] { color-scheme: light; }
body, .card, .btn, input, select, textarea, .sidebar { transition: background-color .15s, border-color .15s, color .15s; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5;
       -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 650; }
small, .muted { color: var(--muted); }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; vertical-align: -3px; flex: none; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
           position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px 18px; border-bottom: 1px solid #2b2d34; }
.brand-logo { width: 42px; height: 42px; border-radius: 10px; background: var(--red); display: grid; place-items: center;
              color: #fff; flex: none; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-logo svg.lucide { width: 24px; height: 24px; }
.brand b { color: #fff; display: block; font-size: .95rem; line-height: 1.2; }
.brand span { font-size: .75rem; color: #9a9ca5; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav .sect { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #74767f; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--side-ink);
         font-weight: 500; font-size: .92rem; }
.nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--red); color: #fff; }
.nav a.active svg { color: #fff; }
.sidebar .me { border-top: 1px solid #2b2d34; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #34363e; color: #fff; display: grid;
          place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.me .who { flex: 1; min-width: 0; }
.me .who b { color: #fff; display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who a { color: #9a9ca5; font-size: .75rem; }
.me button { background: none; border: 0; color: #9a9ca5; cursor: pointer; padding: 6px; border-radius: 8px; }
.me button:hover { background: var(--side-2); color: #fff; }
.main { min-width: 0; grid-column: 2; }
.scrim { display: none; }
.topbar { display: none; }
.content { max-width: 1280px; margin: 0 auto; padding: 28px 32px 60px; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards / Grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px;
          border-bottom: 1px solid var(--line-2); }
.card-h h2 { display: flex; align-items: center; gap: 9px; }
.card-h h2 svg { color: var(--link); }
.card-b { padding: 18px 20px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack > * + * { margin-top: 18px; }

.kpi { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--link); flex: none; }
.kpi .ico svg { width: 22px; height: 22px; }
.kpi .v { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .83rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th { text-align: left; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
        color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--row-hover); }
.t tr.month td { background: var(--red-soft); color: var(--red-ink); font-weight: 700; font-size: .8rem;
                 text-transform: uppercase; letter-spacing: .06em; padding: 7px 14px; }
.t tr.past td { opacity: .62; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t a.row-link { color: var(--ink); font-weight: 600; }
.nowrap { white-space: nowrap; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; padding: 3px 9px;
         border-radius: 999px; white-space: nowrap; background: var(--none-bg); color: var(--none); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.red { background: var(--red-soft); color: var(--link); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--none); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: #f59e0b; } .dot.bad { background: var(--bad); }
.rank { display: inline-block; font-size: .72rem; font-weight: 700; color: #fff; background: var(--rank-bg);
        padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #888); }

/* ---------- Forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
       padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
       text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--soft); border-color: var(--input-line); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad-line); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.btn.icon { padding: 6px; }
label { display: block; font-weight: 600; font-size: .83rem; margin-bottom: 5px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number],
input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: .92rem; padding: 9px 11px; border: 1px solid var(--input-line); border-radius: 10px;
  background: var(--surface); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.13); }
textarea { min-height: 90px; resize: vertical; }
select[multiple] { min-height: 160px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; margin: 0; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Datum/Uhrzeit-Paare bleiben auch am Handy nebeneinander */
.row.pair { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.row.pair > .field { min-width: 0; } .row.pair input { min-width: 0; }
@media (max-width: 640px) {
  .row.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row.pair:has(#enddate[style*="none"]) > .field:first-child { grid-column: 1 / -1; }  /* Termin: Datum | Beginn+Ende */
}
details.more-info { font-size: .85rem; color: var(--muted); margin-top: 10px; }
details.more-info summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more-info summary::-webkit-details-marker { display: none; }
details.more-info p { margin: 6px 0 0; line-height: 1.45; }
.dc-why { margin-top: 8px; width: max-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dc-why:hover { text-decoration: none; filter: brightness(.97); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters input[type=checkbox], .filters input[type=radio] { min-width: 0; }
.seg { display: inline-flex; background: var(--soft-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg label { padding: 6px 12px; border-radius: 8px; font-size: .83rem; font-weight: 600; color: var(--ink-2); margin: 0; cursor: pointer; }
.seg a:hover { text-decoration: none; background: var(--soft-3); }
.seg a.on, .seg label.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Anwesenheits-Schalter */
.att { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.att input { display: none; }
.att label { margin: 0; padding: 6px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer;
             border-right: 1px solid var(--line); background: var(--surface); user-select: none; }
.att label:last-of-type { border-right: 0; }
.att input:checked + label.a-anwesend { background: #15803d; color: #fff; }
.att input:checked + label.a-entschuldigt { background: #d97706; color: #fff; }
.att input:checked + label.a-unentschuldigt { background: #b91c1c; color: #fff; }
.att input:checked + label.a-none { background: var(--soft-2); color: var(--ink); }

/* Chips-Auswahl für Personen */
.picker { border: 1px solid var(--input-line); border-radius: 10px; background: var(--surface); }
.picker input[type=search] { border: 0; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.picker .opts { max-height: 230px; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
.picker .opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-weight: 500; font-size: .87rem; margin: 0; cursor: pointer; }
.picker .opt:hover { background: var(--soft); }
.picker .opt input { accent-color: var(--red); width: 16px; height: 16px; }
.picker .opt:has(input:checked) { background: var(--red-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }

/* ---------- Flash ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash.success { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.flash.warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.flash.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.datebox { width: 50px; text-align: center; border-radius: 10px; background: var(--soft); padding: 5px 0; flex: none; }
.datebox b { display: block; font-size: 1.15rem; line-height: 1.1; }
.datebox span { font-size: .68rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.datebox.uebung { background: var(--red-soft); color: var(--red-ink); }
.datebox.termin { background: var(--info-bg); color: var(--info); }
.datebox.einsatz { background: var(--orange-bg); color: var(--orange); }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 30px; height: 30px; color: var(--faint); display: block; margin: 0 auto 8px; }

dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--link); border-color: var(--red); }
.tab-pane { display: none; } .tab-pane.on { display: block; }

.progress { height: 8px; border-radius: 99px; background: var(--soft-2); overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: var(--red); border-radius: 99px; }

/* Qualifikationsmatrix */
.matrix th.rot { height: 150px; vertical-align: bottom; padding: 6px 4px; }
.matrix th.rot div { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: .75rem; text-transform: none; letter-spacing: 0; }
.matrix td.c { text-align: center; padding: 6px 4px; }
.matrix .yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ok-bg); color: var(--ok); }
.matrix .yes svg { width: 15px; height: 15px; }
.matrix .no { color: var(--faint); }
.matrix tbody tr:hover td { background: var(--red-hover); }

/* Kalender */
#calendar { --fc-border-color: var(--line); --fc-today-bg-color: var(--red-hover); --fc-button-bg-color: var(--surface); --fc-button-text-color: var(--ink);
            --fc-button-border-color: var(--line); --fc-button-hover-bg-color: var(--soft); --fc-button-hover-border-color: var(--input-line);
            --fc-button-active-bg-color: var(--red); --fc-button-active-border-color: var(--red); --fc-event-border-color: transparent; }
#calendar .fc-button { font-weight: 600; font-size: .85rem; border-radius: 9px; text-transform: none; box-shadow: none !important; }
#calendar .fc-button-active { color: #fff; }
#calendar .fc-toolbar-title { font-size: 1.2rem; font-weight: 700; }
#calendar .fc-daygrid-event { border-radius: 6px; padding: 1px 4px; font-size: .78rem; }
#calendar .fc-col-header-cell-cushion { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; }
#calendar a { color: inherit; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

code.copy { display: block; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
            font-size: .82rem; word-break: break-all; cursor: pointer; }
code.copy:hover { border-color: var(--red); }
.steps { margin: 0; padding-left: 20px; } .steps li { margin-bottom: 6px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(150deg, #c8102e 0%, #8f0b20 100%); color: #fff; padding: 48px; display: flex;
              flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
                     border: 60px solid rgba(255,255,255,.06); }
.login-hero h1 { font-size: 2.3rem; max-width: 460px; }
.login-hero p { opacity: .85; max-width: 420px; }
.login-hero .brand-logo { width: 64px; height: 64px; background: rgba(255,255,255,.14); border-radius: 16px; }
.login-hero .brand-logo svg.lucide { width: 34px; height: 34px; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-form .card { width: 100%; max-width: 400px; padding: 32px; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .main { grid-column: 1; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .topbar b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content { padding: 20px 16px 50px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; } .login-hero { padding: 28px; min-height: 0; } .login-hero h1 { font-size: 1.6rem; }
  .login-hero .hide-m { display: none; }
  dl.kv { grid-template-columns: 120px 1fr; }
  h1 { font-size: 1.35rem; }
  .hide-m { display: none; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; } .kpi { padding: 14px; } .kpi .ico { display: none; }
  .card-h, .card-b { padding-left: 14px; padding-right: 14px; }
  .card-h { flex-wrap: wrap; }
  .card-h input[type=search] { flex: 1 1 100% !important; max-width: none !important; min-width: 0; }
  .list li { padding: 12px 14px; gap: 10px; }
  .page-head { margin-bottom: 16px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .seg { max-width: 100%; }
  dl.kv { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); }
  .t th, .t td { padding: 10px 10px; }
}
/* Tabellen, die auf dem Handy zu Karten-Zeilen werden */
@media (max-width: 640px) {
  table.t.stack-m, .stack-m tbody, .stack-m tr { display: block; width: 100%; }
  .stack-m thead { display: none; }
  .stack-m tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  .stack-m tr:last-child { border-bottom: 0; }
  .stack-m td { display: block; padding: 0; border: 0 !important; }
  .stack-m td.m-full { flex: 1 1 100%; }
  .stack-m td.m-grow { flex: 1 1 auto; min-width: 0; white-space: normal; }
  .stack-m td.num { margin-left: auto; }
  .stack-m td:empty, .stack-m td.hide-m { display: none; }
  .att { display: flex; width: 100%; }
  .att label { flex: 1; text-align: center; padding: 8px 4px; }
}

@media print {
  .sidebar, .topbar, .actions, .no-print { display: none !important; }
  .layout { display: block; } .content { padding: 0; } .card { box-shadow: none; }
}

/* ---------- Web-App (installiert) ---------- */
.sidebar .brand { padding-top: calc(20px + env(safe-area-inset-top)); }
.sidebar .me { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: calc(16px + env(safe-area-inset-left)); }
  .content { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
}
.is-app body { overscroll-behavior-y: none; }
.td-btn { bottom: calc(22px + env(safe-area-inset-bottom)) !important; }

/* =====================================================================
   Design 2026 – modernerer Auftritt (Schrift, Seitenleiste, Karten, Handy-Navigation)
   ===================================================================== */
@font-face {
  font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../vendor/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../vendor/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --font: "Inter Var", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --bg: #f3f4f6; --line: #e6e7eb; --line-2: #eff0f3;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 32px -12px rgba(16,24,40,.22);
  --side: #121318; --side-2: #1c1e25; --side-ink: #a7a9b4;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0c0d10; --side: #08090b; --shadow-lg: 0 12px 32px -12px rgba(0,0,0,.6); } }
:root[data-theme="dark"] { --bg: #0c0d10; --side: #08090b; --shadow-lg: 0 12px 32px -12px rgba(0,0,0,.6); }

body { font-family: var(--font); font-size: 14.5px; font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -.003em; }
h1 { font-size: 1.75rem; font-weight: 750; letter-spacing: -.028em; }
h2 { letter-spacing: -.015em; }
.kpi .v, .t .num, .datebox b, .badge { font-variant-numeric: tabular-nums; }

/* ---- Seitenleiste ---- */
.sidebar { border-right: 1px solid rgba(255,255,255,.04); }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
         text-decoration: none !important; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 4px; box-sizing: border-box;
              box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 4px 12px -4px rgba(0,0,0,.5); }
.brand-logo img { background: transparent; border-radius: 0; }
.brand-logo:not(:has(img)) { background: var(--red); padding: 0; }
.brand-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.brand-text b { color: #fff; font-size: .95rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .74rem; color: #8b8e99; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { padding: 10px 10px 14px; gap: 1px; }
.nav .sect { padding: 18px 12px 6px; font-size: .66rem; font-weight: 650; letter-spacing: .09em; color: #5d606b; }
.nav a { padding: 8px 12px; gap: 11px; border-radius: 10px; font-size: .88rem; font-weight: 500; color: var(--side-ink);
         position: relative; transition: background .12s, color .12s; }
.nav a svg { color: #6f727e; width: 17px; height: 17px; transition: color .12s; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a:hover svg { color: #c9cbd3; }
.nav a.active { background: rgba(214,31,59,.16); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav a.active svg { color: #ff6b80; }
.sidebar .me { margin: 0 10px 10px; padding: 10px 10px 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
               background: rgba(255,255,255,.03); }
.avatar { background: linear-gradient(135deg, #e11d48, #9f0d24); font-size: .78rem; letter-spacing: .02em; }
.me button { color: #8b8e99; }

/* ---- Inhalt ---- */
.content { max-width: 1320px; padding: 32px 36px 64px; }
.page-head { margin-bottom: 24px; }
.page-head p { margin-top: 6px; font-size: .92rem; }
.card { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
.card-h { padding: 14px 20px; min-height: 58px; }
.card-h h2 { font-size: 1rem; font-weight: 650; gap: 10px; }
.card-h h2 svg { width: 16px; height: 16px; padding: 7px; box-sizing: content-box; border-radius: 9px; background: var(--red-soft); color: var(--link); }
.card-b { padding: 18px 20px; }
.grid { gap: 20px; }
.stack > * + * { margin-top: 20px; }

/* Kennzahlen mit farbigen Symbolen */
.kpi { padding: 18px 20px; gap: 14px; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.kpi .ico { width: 46px; height: 46px; border-radius: 13px; }
.kpi .v { font-size: 1.7rem; font-weight: 750; letter-spacing: -.03em; }
.kpi .l { font-size: .8rem; margin-top: 2px; }
.g4 > .kpi:nth-child(4n+2) .ico { background: var(--info-bg); color: var(--info); }
.g4 > .kpi:nth-child(4n+3) .ico { background: var(--ok-bg); color: var(--ok); }
.g4 > .kpi:nth-child(4n+4) .ico { background: var(--orange-bg); color: var(--orange); }

/* Knöpfe & Felder */
.btn { padding: 8px 14px; border-radius: 10px; font-size: .86rem; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 88%, #fff) 0%, var(--red) 100%);
               box-shadow: 0 1px 2px rgba(200,16,46,.25), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: var(--red-dark); }
.btn.ghost, .btn.ghost:hover { box-shadow: none; }
.btn.sm { padding: 5px 10px; border-radius: 8px; }
.btn:active { transform: translateY(1px); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number],
input[type=tel], input[type=search], select, textarea { border-radius: 10px; padding: 9px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
input[type=search] { padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9ca5' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
                     background-repeat: no-repeat; background-position: 11px 50%; }
.seg { border-radius: 11px; }
.seg a, .seg label { border-radius: 8px; }

/* Tabellen, Listen, Abzeichen */
.t th { background: transparent; font-size: .7rem; letter-spacing: .06em; font-weight: 650; padding: 10px 14px; }
.t td { padding: 11px 14px; }
.list li { transition: background .12s; }
.list li:hover { background: var(--row-hover); }
.badge { padding: 2px 9px; font-size: .74rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }
.rank { border-radius: 6px; font-size: .68rem; padding: 2px 6px; }
.datebox { width: 52px; border-radius: 12px; padding: 6px 0; }
.datebox b { font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; }
.flash { border-radius: 14px; }
.tabs a { font-size: .9rem; }
.empty { padding: 36px 20px; }

/* Nächster Dienst (Übersicht) */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px; margin-bottom: 20px; color: #fff;
        background: radial-gradient(120% 140% at 100% 0%, #e2354f 0%, #c8102e 45%, #8f0b20 100%); box-shadow: 0 14px 30px -14px rgba(200,16,46,.6); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
               border: 36px solid rgba(255,255,255,.07); pointer-events: none; }
.hero-row { position: relative; z-index: 1; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero-date { width: 72px; flex: none; text-align: center; border-radius: 16px; background: rgba(255,255,255,.14); padding: 8px 0;
             backdrop-filter: blur(4px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.hero-date span { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hero-date b { display: block; font-size: 1.9rem; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
.hero-main { flex: 1 1 260px; min-width: 0; }
.hero-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.hero-title { font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; margin: 3px 0 6px; color: #fff; display: block; }
.hero-title:hover { text-decoration: none; opacity: .92; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; opacity: .92; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; opacity: .85; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.hero .btn:hover { background: rgba(255,255,255,.24); }
.hero .btn.solid { background: #fff; color: var(--red); border-color: #fff; }
.hero .btn.solid:hover { background: #fff1f3; }
.hero .state { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 650; padding: 5px 11px;
               border-radius: 999px; background: rgba(255,255,255,.16); }

.hero-state { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 14px;
              background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); flex: 1 1 auto; min-width: 0; }
.hero-state > svg { width: 22px; height: 22px; flex: none; }
.hero-state > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.hero-state b { font-size: .95rem; }
.hero-state span { font-size: .8rem; opacity: .88; overflow-wrap: anywhere; }
.hero-state form { flex: none; }
.hero-state.zugesagt { background: rgba(255,255,255,.95); color: var(--ok); border-color: #fff; }
.hero-state.zugesagt .btn { background: transparent; color: var(--ink-2); border-color: var(--line); }
.hero .hero-state .btn { flex: none; }

/* Untere Navigation (Handy) */
.tabbar { display: none; }
.topbar-title { display: none; }

@media (max-width: 900px) {
  .content { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar { gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px calc(14px + env(safe-area-inset-left));
            background: color-mix(in srgb, var(--card) 82%, transparent); color: var(--ink);
            backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
            border-bottom: 1px solid var(--line); }
  .topbar .brand-logo.sm { width: 36px; height: 36px; border-radius: 10px; padding: 3px; flex: none; display: grid; place-items: center;
                           box-shadow: 0 0 0 1px var(--line); }
  .topbar-title { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
  .topbar-title b { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-title span { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar button { color: var(--ink-2); border-radius: 10px; padding: 8px; }
  .topbar button:hover { background: var(--soft); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
            padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
            background: color-mix(in srgb, var(--card) 86%, transparent); border-top: 1px solid var(--line);
            backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px;
                              font: inherit; font-size: .66rem; font-weight: 600; color: var(--muted); background: none; border: 0;
                              cursor: pointer; text-decoration: none !important; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--link); }
  .tabbar a.on svg { stroke-width: 2.4; }
  .tabbar a:active, .tabbar button:active { background: var(--soft); }
  body.nav-open .tabbar { z-index: 30; }
  .td-btn { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
  .page-head { margin-bottom: 18px; }
  h1 { font-size: 1.45rem; }
  .hero { padding: 18px; border-radius: 18px; }
  .hero-date { width: 62px; } .hero-date b { font-size: 1.6rem; }
  .hero-title { font-size: 1.12rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 520px) {
  .kpi .v { font-size: 1.45rem; }
  .card-h { padding: 12px 14px; min-height: 0; }
  .card-h h2 svg { padding: 6px; }
}
@media print { .tabbar, .hero .hero-actions { display: none !important; } }
.login-hero .brand-logo:has(img) { background: #fff; padding: 7px; width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
.login-form .card { border-radius: 20px; box-shadow: var(--shadow-lg); }
.layout { grid-template-columns: 268px 1fr; }
.brand { padding: 18px 14px 16px 16px; gap: 11px; }
.brand-logo { width: 42px; height: 42px; }
.brand-text b { font-size: .92rem; letter-spacing: -.015em; }
.flash a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .hero-row { flex-wrap: nowrap; align-items: flex-start; gap: 14px; }
  .hero-main { flex: 1 1 0; }
  .hero { display: flex; flex-direction: column; gap: 14px; }
  .hero > .hero-row { flex-wrap: wrap; }
  .hero > .hero-row > .hero-date { order: 0; }
  .hero > .hero-row > .hero-main { order: 1; flex: 1 1 calc(100% - 80px); }
  .hero > .hero-row > .hero-actions { order: 2; flex: 1 1 100%; }
}

/* ---- Kalender (FullCalendar) an Farbschema anbinden ---- */
#calendar { --fc-page-bg-color: var(--card); --fc-neutral-bg-color: var(--soft); --fc-neutral-text-color: var(--muted);
            --fc-list-event-hover-bg-color: var(--row-hover); --fc-highlight-color: var(--red-hover);
            --fc-button-text-color: var(--ink); --fc-border-color: var(--line); }
#calendar .fc-list { border-radius: 12px; overflow: hidden; }
#calendar .fc-list-day-cushion { background: var(--soft); color: var(--ink-2); font-size: .82rem; font-weight: 650; padding: 8px 14px; }
#calendar .fc-list-day-text, #calendar .fc-list-day-side-text { color: var(--ink-2); }
#calendar .fc-list-event td { background: var(--card); }
#calendar .fc-list-event:hover td { background: var(--row-hover); }
#calendar .fc-list-event-time { color: var(--muted); font-variant-numeric: tabular-nums; }
#calendar .fc-list-empty { background: var(--card); color: var(--muted); }
#calendar .fc-col-header-cell { background: var(--surface-2); }
#calendar .fc-daygrid-day-number { color: var(--ink-2); font-size: .85rem; padding: 6px 8px; }
#calendar .fc-day-other .fc-daygrid-day-number { color: var(--faint); }
#calendar .fc-day-today .fc-daygrid-day-number { color: var(--link); font-weight: 750; }
#calendar .fc-button { border-radius: 10px !important; }
#calendar .fc-button:disabled { opacity: .45; }
#calendar .fc-toolbar-title { letter-spacing: -.02em; }
#calendar .fc-daygrid-event-dot { border-color: var(--c, currentColor); }
#calendar .fc-daygrid-dot-event .fc-event-title { color: var(--ink); }
#calendar .fc-daygrid-dot-event:hover { background: var(--soft); }

/* ---- Terminliste: auf dem Handy als Karten-Zeilen ---- */
.m-only { display: none; }
.t tr.is-past td { color: var(--muted); }
.t tr.is-past .row-link { color: var(--ink-2); }
@media (max-width: 640px) {
  .evlist tr { gap: 4px 10px; padding: 12px 16px; }
  .evlist td.ev-title { order: -1; flex: 1 1 100%; }
  .evlist td.ev-title .row-link { font-size: .98rem; }
  .evlist td.ev-date { font-size: .8rem; color: var(--muted); }
  .evlist td.ev-date small { color: inherit; }
  .evlist td.ev-kind .kind { font-size: .76rem; color: var(--muted); }
  .evlist td.ev-count { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); }
  .evlist td.ev-count .m-only { display: inline-flex; }
  .evlist td.ev-count svg { width: 14px; height: 14px; }
  .evlist td.ev-count:empty { display: none; }
}
@media (max-width: 640px) {
  table.t.stack-m td { padding: 0; }
  table.t.stack-m tr { padding: 12px 16px; }
}

/* ---- Funktionen (mehrere pro Person) ---- */
.fn-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.fn-tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
          background: var(--info-bg); color: var(--info); white-space: nowrap; }
.fn-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-pick label { margin: 0; cursor: pointer; font-weight: 500; }
.fn-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fn-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .84rem;
                border: 1px solid var(--input-line); background: var(--surface); color: var(--ink-2); transition: all .12s; }
.fn-pick span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--input-line); flex: none; }
.fn-pick input:checked + span { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 45%, transparent); color: var(--link); font-weight: 600; }
.fn-pick input:checked + span::before { border-color: var(--red); background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat; }
.fn-pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(200,16,46,.2); }

/* ---- Kurze Meldungen (Toasts) ---- */
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column;
          gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
         background: #18181b; color: #f4f4f5; box-shadow: 0 12px 32px -8px rgba(0,0,0,.45); font-size: .88rem; font-weight: 500;
         animation: toast-in .22s ease-out; }
:root[data-theme="dark"] .toast { background: #2a2b31; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #2a2b31; } }
.toast > svg { flex: none; margin-top: 1px; }
.toast.success > svg { color: #4ade80; } .toast.error > svg { color: #f87171; } .toast.warning > svg { color: #fbbf24; } .toast.info > svg { color: #93b4ff; }
.toast .grow { line-height: 1.4; }
.toast button { background: none; border: 0; color: #a1a1aa; cursor: pointer; padding: 0 2px; font-size: 1.1rem; line-height: 1; }
.toast.out { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (max-width: 900px) { .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---- Ladezustand an Knöpfen ---- */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
                         border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) var(--muted);
                         animation: spin .7s linear infinite; }
.btn.primary.is-loading::after, .hero .btn.is-loading::after { border-color: #fff transparent #fff #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Leere Zustände ---- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 24px; text-align: center; color: var(--muted); }
.empty .empty-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 8px;
                    background: var(--soft); color: var(--muted); }
.empty .empty-ico svg { width: 24px; height: 24px; margin: 0; color: inherit; display: block; }
.empty b { color: var(--ink); font-weight: 650; font-size: .95rem; }
.empty p { margin: 0; max-width: 380px; font-size: .85rem; line-height: 1.45; }
.empty .btn { margin-top: 12px; }
.empty.ok .empty-ico { background: var(--ok-bg); color: var(--ok); }
.empty .btn svg { width: 16px; height: 16px; margin: 0; display: inline-block; color: inherit; }

/* ---- Initialen-Kreise ---- */
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; vertical-align: middle;
      font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: var(--av-fg); background: var(--av-bg); }
.av.sm { width: 24px; height: 24px; font-size: .6rem; }
.av.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.av-0 { --av-bg: #fde2e4; --av-fg: #9f1239; } .av-1 { --av-bg: #dbeafe; --av-fg: #1e40af; }
.av-2 { --av-bg: #dcfce7; --av-fg: #166534; } .av-3 { --av-bg: #fef3c7; --av-fg: #92400e; }
.av-4 { --av-bg: #ede9fe; --av-fg: #5b21b6; } .av-5 { --av-bg: #cffafe; --av-fg: #155e75; }
.av-6 { --av-bg: #ffedd5; --av-fg: #9a3412; } .av-7 { --av-bg: #fce7f3; --av-fg: #9d174d; }
:root[data-theme="dark"] .av { --av-fg: var(--av-d-fg); --av-bg: var(--av-d-bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { --av-fg: var(--av-d-fg); --av-bg: var(--av-d-bg); } }
.av-0 { --av-d-bg: #4c1d26; --av-d-fg: #fda4af; } .av-1 { --av-d-bg: #1e2f57; --av-d-fg: #93c5fd; }
.av-2 { --av-d-bg: #163a26; --av-d-fg: #86efac; } .av-3 { --av-d-bg: #43320d; --av-d-fg: #fcd34d; }
.av-4 { --av-d-bg: #33245c; --av-d-fg: #c4b5fd; } .av-5 { --av-d-bg: #133b45; --av-d-fg: #67e8f9; }
.av-6 { --av-d-bg: #4a2810; --av-d-fg: #fdba74; } .av-7 { --av-d-bg: #4a1a35; --av-d-fg: #f9a8d4; }
.who-cell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; vertical-align: middle; }
.who-cell .nm { min-width: 0; }

/* ---- Speichern-Leiste ---- */
.savebar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2);
           border-radius: 0 0 var(--radius) var(--radius); background: var(--card); }
.savebar-info { margin-right: auto; font-size: .85rem; color: var(--muted); }
.savebar.floating { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .savebar { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 20; padding: 10px 14px;
             background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
             box-shadow: 0 -8px 20px -12px rgba(0,0,0,.25); }
  .savebar .btn { padding: 10px 16px; }
  .savebar.floating { border-radius: 14px; }
}

/* ---- Diagramme ---- */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; --grid: var(--line-2); --axis: var(--muted);
            --st-ok: #16a34a; --st-warn: #f59e0b; --st-abm: #fcd34d; --st-bad: #dc2626; --st-none: var(--soft-2); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .viz-root { --series-1: #3987e5; --series-2: #d95926; --st-ok: #22c55e; --st-warn: #d97706; --st-abm: #a16207; --st-bad: #ef4444; } }
:root[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #d95926; --st-ok: #22c55e; --st-warn: #d97706; --st-abm: #a16207; --st-bad: #ef4444; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend .sw { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.viz-legend .sw.s1 { background: var(--series-1); } .viz-legend .sw.s2 { background: var(--series-2); }
.linechart { position: relative; height: 230px; touch-action: pan-y; }
.linechart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.linechart .gl { stroke: var(--grid); stroke-width: 1; }
.linechart .ax { fill: var(--axis); font-size: 11px; font-family: var(--font); }
.linechart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linechart .dot { stroke: var(--card); stroke-width: 2; }
.linechart .dl { fill: var(--ink-2); font-size: 11px; font-weight: 650; font-family: var(--font); }
.linechart .xh { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.linechart.hover .xh { opacity: .6; }
.viz-tip { position: fixed; z-index: 95; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
           border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: .8rem; min-width: 120px; opacity: 0;
           transition: opacity .1s; }
.viz-tip.on { opacity: 1; }
.viz-tip .tt { font-weight: 650; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.viz-tip .tr { display: flex; align-items: center; gap: 8px; }
.viz-tip .tr b { font-variant-numeric: tabular-nums; min-width: 38px; }
.viz-tip .tr i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.viz-table { margin-top: 10px; font-size: .85rem; }
.viz-table summary { cursor: pointer; color: var(--muted); font-size: .8rem; }
.viz-table .t td, .viz-table .t th { padding: 6px 8px; }

/* Wer war wann da (Heatmap) */
.heat-wrap { overflow-x: auto; padding: 4px 0 12px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: .78rem; margin: 0 14px; }
.heat th, .heat td { padding: 0; text-align: center; }
.heat thead th { height: 58px; vertical-align: bottom; font-weight: 600; color: var(--muted); }
.heat thead th span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .68rem; white-space: nowrap; }
.heat .hn { position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; padding-right: 10px; white-space: nowrap; font-weight: 500; }
.heat .hn a { color: var(--ink); }
.heat .hq { padding-left: 10px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.hc { display: block; width: 18px; height: 18px; border-radius: 4px; background: var(--st-none); outline: none; }
.viz-legend .hc { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.hc.st-anwesend { background: var(--st-ok); } .hc.st-entschuldigt { background: var(--st-warn); }
.hc.st-abgesagt { background: transparent; box-shadow: inset 0 0 0 2px var(--st-warn); } .hc.st-unentschuldigt { background: var(--st-bad); }
.heat td .hc:hover, .heat td .hc:focus { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink-2); }
.heat tbody tr:hover .hn a { color: var(--link); }

/* Übersicht: Trend & Ring */
.kpi .trend { display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; font-weight: 650; margin-top: 3px; }
.kpi .trend.up { color: var(--ok); } .kpi .trend.down { color: var(--bad); } .kpi .trend.flat { color: var(--muted); }
.kpi .trend svg { width: 13px; height: 13px; }
.kpi .spark { display: block; width: 100%; max-width: 160px; height: 26px; margin: 6px 0 2px; color: var(--series-1, #2a78d6); }
.kpi .spark path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi .spark circle { fill: currentColor; }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { fill: none; stroke: var(--soft-2); stroke-width: 9; }
.ring .fg { fill: none; stroke: var(--red); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; }
.kpi .trend { white-space: nowrap; }
@media (max-width: 900px) { .savebar-info { font-size: .8rem; line-height: 1.35; } .savebar .btn { flex: none; } }
.show-m { display: none; }
@media (max-width: 900px) { .show-m { display: inline; } }
.nav a .nav-n { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; line-height: 1.5; }

/* Allgemeiner Dialog: <dialog class="dlg"> mit .dlg-h / .dlg-b / .dlg-f, öffnen per data-open="#id" */
.dlg { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 24px)); background: var(--surface); color: var(--ink); }
.dlg::backdrop { background: rgba(10, 14, 20, .5); backdrop-filter: blur(2px); }
.dlg[open] > form, .dlg[open] > .dlg-in { display: flex; flex-direction: column; max-height: inherit; }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.dlg-h h3 { margin: 0; font-size: 1.02rem; }
.dlg-b { padding: 16px 18px; overflow: auto; flex: 1 1 auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); }

/* ---- Auswahlfenster von unten (z. B. Abmeldegrund) ---- */
dialog.sheet { border: 0; padding: 10px 18px 18px; border-radius: 20px; width: min(440px, calc(100vw - 24px)); background: var(--card); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.45); }
dialog.sheet::backdrop { background: rgba(0,0,0,.42); }
.sheet-grab { width: 40px; height: 4px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
.sheet-t { display: block; font-size: 1.08rem; }
.sheet-s { color: var(--muted); font-size: .85rem; margin: 2px 0 14px; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sheet-chip { display: inline-flex; gap: 6px; align-items: center; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 44px; }
.sheet-chip svg { width: 16px; height: 16px; }
.sheet-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.sheet-in { width: 100%; margin-bottom: 14px; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 900px) {
  dialog.sheet { margin: auto 0 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  dialog.sheet[open] { animation: sheetUp .22s ease-out; }
  .sheet-f .btn { flex: 1; justify-content: center; min-height: 46px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---- Untere Leiste: Zähler, Kopfzeile mit Glocke & Profil ---- */
.tb-i { position: relative; display: inline-flex; }
.tb-n { position: absolute; top: -5px; left: 14px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: .62rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); line-height: 1; }
.tb-bell, .tb-ava { display: none; }
@media (max-width: 900px) {
  .tb-bell { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 99px; color: var(--ink-2); position: relative; flex: none; }
  .tb-bell svg { width: 21px; height: 21px; }
  .tb-bell .tb-n { top: 2px; left: 20px; }
  .tb-ava { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 99px; background: var(--soft); color: var(--ink); font-weight: 800;
    font-size: .78rem; text-decoration: none !important; flex: none; border: 1px solid var(--line); }
  .btn, .btn.sm { min-height: 40px; }
  .btn.icon { min-width: 40px; }
}

/* ---- Design C: Startseite, Terminliste, Termin (gemeinsam) ---- */

.dc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.dc-head h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.dc-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.dc-actions { display: flex; gap: 8px; align-items: center; }
.dc-cols { display: grid; grid-template-columns: 1.15fr 1fr .95fr; gap: 18px; align-items: start; }
.dc-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dc-sec { display: flex; justify-content: space-between; align-items: baseline; font-size: .72rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin: 6px 2px 0; }
.dc-sec a { font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--link); font-weight: 700; }
.dc-hero { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.dc-hero small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.5; margin-top: 2px; }
.dc-hero a { color: var(--ink); text-decoration: none; }
.dc-ht { font-size: 1.08rem; display: block; line-height: 1.25; }
.dc-hd { width: 56px; flex: none; text-align: center; border-radius: 14px; background: var(--red); color: #fff !important; padding: 6px 0; text-decoration: none; }
.dc-hd small { display: block; color: rgba(255,255,255,.85); font-size: .66rem; font-weight: 800; margin: 0; }
.dc-hd b { font-size: 1.5rem; line-height: 1.1; }
.dc-stack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.dc-bar { display: flex; height: 7px; border-radius: 9px; overflow: hidden; gap: 2px; background: var(--soft); margin-top: 7px; }
.dc-list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dc-row { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; min-height: 56px; }
.dc-row:last-child { border-bottom: 0; }
a.dc-row:hover, .dc-row.ev:hover { background: var(--row-hover, var(--soft)); }
.dc-row .grow { min-width: 0; color: var(--ink); text-decoration: none; }
.dc-row b { display: block; font-size: .9rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-row small { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--soft); }
.dc-ic svg { width: 18px; height: 18px; }
.dc-go { width: 16px !important; height: 16px !important; color: var(--muted); flex: none; }
.dc-n { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; font-weight: 900; font-size: .8rem; flex: none; }
.dc-d { width: 40px; flex: none; text-align: center; color: var(--ink) !important; text-decoration: none; }
.dc-d small { font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.dc-d b { font-size: 1.1rem; }
.dc-tog { display: flex; gap: 6px; flex: none; }
.dc-tog.big { flex-direction: column; }
.dc-rb { min-width: 42px; height: 42px; border-radius: 12px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; padding: 0 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-weight: 700; font-size: .82rem; cursor: pointer; }
.dc-rb svg { width: 18px; height: 18px; }
.dc-rb:hover:not([disabled]) { border-color: var(--ink-2); color: var(--ink); }
.dc-rb.on-ok { background: var(--ok); border-color: var(--ok); color: #fff; opacity: 1; }
.dc-rb.on-no { background: var(--warn-bg); border-color: transparent; color: var(--warn); opacity: 1; }
.dc-tog.big .dc-rb { min-width: 108px; }
.dc-rb.wide { width: 100%; }
.dc-rb[disabled] { cursor: default; }
.dc-empty { padding: 14px; color: var(--muted); font-size: .86rem; display: flex; gap: 6px; align-items: center; }
.dc-more { display: block; padding: 8px 14px; font-size: .82rem; }
.dc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dc-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.dc-stats b { display: block; font-size: 1.3rem; letter-spacing: -.01em; }
.dc-stats b .muted { font-size: .95rem; font-weight: 600; }
.dc-stats small { font-size: .74rem; color: var(--muted); }
.dc-cal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.dc-cal-h { font-weight: 800; font-size: .92rem; margin-bottom: 6px; }
.dc-cal table { width: 100%; border-collapse: collapse; text-align: center; font-size: .8rem; }
.dc-cal th { color: var(--muted); font-weight: 700; font-size: .7rem; padding: 3px 0; }
.dc-cal td { padding: 5px 0 7px; position: relative; }
.dc-cal td.o { color: var(--line); }
.dc-cal td.t span { background: var(--ink); color: var(--card); border-radius: 8px; padding: 2px 6px; font-weight: 800; }
.dc-cal td i { position: absolute; left: 50%; bottom: 1px; width: 5px; height: 5px; border-radius: 9px; transform: translateX(-50%); }
.chip { display: inline-flex; font-size: .72rem; font-weight: 800; border-radius: 99px; padding: 4px 9px; white-space: nowrap; flex: none; }
.c-ok { background: var(--ok-bg); color: var(--ok); } .c-no { background: var(--warn-bg); color: var(--warn); }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--bad); } .t-red { color: var(--red); } .t-muted { color: var(--muted); }
.dc-ic.t-ok, .dc-n.t-ok { background: var(--ok-bg); } .dc-ic.t-warn, .dc-n.t-warn { background: var(--warn-bg); }
.dc-ic.t-info, .dc-n.t-info { background: var(--info-bg); color: var(--info); } .dc-ic.t-bad, .dc-n.t-bad { background: var(--bad-bg); }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg, #fff); }
@media (max-width: 1250px) and (min-width: 901px) { .dc-cols { grid-template-columns: 1fr 1fr; } .dc-col:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .dc-cols { grid-template-columns: 1fr; gap: 6px; }
  .dc-head h1 { font-size: 1.35rem; }
  .dc-actions .btn span { display: none; }
  .dc-actions .btn { padding: 9px; }
  .dc-hero { padding: 12px; gap: 12px; }
  .dc-tog.big .dc-rb { min-width: 46px; }
  .dc-tog.big .dc-rb span { display: none; }
  .dc-cal, .dc-cal-sec { display: none !important; }
  .dc-cols { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 0; }
  .dc-col { display: contents; }
  .dc-cols > .dc-col > * { min-width: 0; max-width: 100%; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; } .o8 { order: 8; }
  .dc-hero { flex-wrap: wrap; }
  .dc-hero > .grow { flex: 1 1 calc(100% - 80px); }
  .dc-stack { flex: 1 1 100%; flex-direction: row; }
  .dc-stack > form { flex: 1; display: flex; }
  .dc-tog.big { flex-direction: row; flex: 1; }
  .dc-tog.big .dc-rb { flex: 1; min-width: 0; height: 46px; }
  .dc-tog.big .dc-rb span { display: inline; }
  .dc-rb.wide { height: 46px; }
  .dc-head .bell-btn { display: none; }
}

/* ---- Terminliste ---- */
.fchips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; margin-bottom: 4px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-weight: 700; font-size: .86rem; white-space: nowrap; text-decoration: none !important; }
.fchip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.fc-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.kdot { display: inline-block; width: 7px; height: 7px; border-radius: 9px; margin-right: 5px; vertical-align: 1px; }
.dc-row.is-past { opacity: .62; }
.chip.c-open { background: var(--soft); color: var(--muted); } .chip.c-bad { background: var(--bad-bg); color: var(--bad); }
.dc-past { margin-top: 4px; }
.dc-past > summary { list-style: none; cursor: pointer; }
.dc-past > summary::-webkit-details-marker { display: none; }
.dc-past > summary span { display: inline-flex; align-items: center; gap: 4px; }
.dc-past > summary svg { width: 14px; height: 14px; transition: transform .15s; }
.dc-past[open] > summary svg { transform: rotate(90deg); }
.dc-past > .dc-list { margin-top: 8px; }
.dc-archive { margin: 16px 2px 4px; font-size: .82rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.dc-archive a.on { font-weight: 800; }
.dc-list + .dc-sec, .dc-list + details { margin-top: 10px; }
@media (max-width: 520px) { .hide-s { display: none !important; } }

/* ---- Termin-Seite ---- */
.ev-hero { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.ev-top { display: flex; gap: 14px; align-items: flex-start; }
.dc-hd.big { width: 66px; padding: 7px 0 6px; }
.dc-hd.big b { font-size: 1.75rem; display: block; }
.ev-kind { font-size: .78rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; }
.ev-hero h1 { margin: 2px 0 6px; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.2; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--ink-2); }
.ev-meta span { display: inline-flex; gap: 6px; align-items: center; }
.ev-meta svg { width: 16px; height: 16px; color: var(--muted); }
.ev-edit { display: flex; gap: 6px; flex: none; }
.ev-edit form { display: contents; }
.ev-acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ev-my { display: flex; gap: 12px; align-items: center; flex: 1 1 340px; flex-wrap: wrap; }
.ev-my-t { flex: 1 1 160px; }
.ev-my .dc-tog.big { flex-direction: row; }
.ev-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-who { margin-bottom: 14px; }
.ev-who details { border-bottom: 1px solid var(--line-2); }
.ev-who details:last-child { border-bottom: 0; }
.ev-who summary { display: flex; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none; min-height: 56px; }
.ev-who summary::-webkit-details-marker { display: none; }
.ev-who summary b { display: block; font-weight: 650; } .ev-who summary small { color: var(--muted); font-size: .78rem; }
.ev-who details[open] .dc-go { transform: rotate(180deg); }
.ev-names { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px 60px; }
.ev-names span { background: var(--soft); border-radius: 99px; padding: 4px 10px; font-size: .82rem; }
@media (max-width: 900px) {
  .ev-hero { padding: 14px; border-radius: 18px; }
  .ev-hero h1 { font-size: 1.2rem; }
  .ev-edit .btn { min-width: 40px; }
  .ev-my { flex-basis: 100%; }
  .ev-my .dc-tog.big { flex: 1 1 100%; }
  .ev-my .dc-tog.big .dc-rb { flex: 1; }
  .ev-links { flex: 1 1 100%; } .ev-links .btn { flex: 1; justify-content: center; }
}

/* ---- Profil: aufklappbare Bereiche ---- */
.acc-wrap { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
details.acc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
details.acc > summary { display: flex; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; min-height: 64px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary b { display: block; font-size: 1rem; font-weight: 700; }
details.acc > summary small { display: block; font-size: .8rem; color: var(--muted); }
details.acc > summary .dc-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); color: var(--ink-2); }
details.acc[open] > summary { border-bottom: 1px solid var(--line-2); }
details.acc[open] > summary .dc-go { transform: rotate(180deg); }
.acc-b > .card, .acc-b > style + .card { border: 0; box-shadow: none; border-radius: 0; margin: 0; background: transparent; }
.acc-b > .card + .card { border-top: 1px solid var(--line-2); }
.acc-b > .card > .card-h { padding-top: 14px; min-height: 0; border-bottom: 0; }
.acc-b > .card > .card-h h2 { font-size: .95rem; }

/* ---- Wischen in Terminzeilen ---- */
.dc-row.swipe { position: relative; --sx: 0px; transition: background .15s; }
.dc-row.swipe > * { transform: translateX(var(--sx)); transition: transform .2s ease; }
.dc-row.swipe.swiping > * { transition: none; }
.dc-row.sw-yes { background: var(--ok-bg) !important; } .dc-row.sw-no { background: var(--warn-bg) !important; }
.dc-row.sw-yes::before, .dc-row.sw-no::before { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: .85rem; }
.dc-row.sw-yes::before { content: "✓ dabei"; left: 14px; color: var(--ok); }
.dc-row.sw-no::before { content: "absagen ✕"; right: 14px; color: var(--warn); }
.dc-row.sw-go.sw-yes { background: color-mix(in srgb, var(--ok) 28%, var(--card)) !important; }
.dc-row.sw-go.sw-no { background: color-mix(in srgb, var(--warn) 28%, var(--card)) !important; }

/* ---- Ziehen zum Aktualisieren ---- */
.ptr { position: fixed; top: calc(env(safe-area-inset-top) + 64px); left: 50%; z-index: 60; width: 36px; height: 36px; border-radius: 99px;
  background: var(--card); color: var(--muted); display: grid; place-items: center; font-size: 20px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); transform: translate(-50%, -40px); }
.ptr.go { color: var(--red); }
.ptr.spin { animation: ptrspin .7s linear infinite; color: var(--red); }
@keyframes ptrspin { from { transform: translate(-50%, 40px) rotate(0); } to { transform: translate(-50%, 40px) rotate(360deg); } }

/* ---- Graue Platzhalter beim Laden ---- */
body.is-loading main.content { position: relative; }
body.is-loading main.content > *:not(.toasts) { opacity: 0; }
body.is-loading main.content::after { content: ""; position: absolute; inset: 18px 16px auto; height: 70vh; border-radius: 18px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent) 0 0 / 40% 100% no-repeat,
    linear-gradient(var(--soft) 0 0) 0 0 / 46% 30px no-repeat,
    linear-gradient(var(--soft) 0 0) 0 46px / 30% 16px no-repeat,
    linear-gradient(var(--soft) 0 0) 0 90px / 100% 110px no-repeat,
    linear-gradient(var(--soft) 0 0) 0 220px / 100% 64px no-repeat,
    linear-gradient(var(--soft) 0 0) 0 294px / 100% 64px no-repeat,
    linear-gradient(var(--soft) 0 0) 0 368px / 100% 64px no-repeat;
  animation: shimmer 1.1s infinite; }
@keyframes shimmer { from { background-position: -40% 0, 0 0, 0 46px, 0 90px, 0 220px, 0 294px, 0 368px; } to { background-position: 140% 0, 0 0, 0 46px, 0 90px, 0 220px, 0 294px, 0 368px; } }
@media (prefers-color-scheme: dark) { body.is-loading main.content::after { background-blend-mode: normal; } }

/* ---- Tabellen am Handy als Karten (Ergänzungen) ---- */
@media (max-width: 900px) {
  .stack-m tr { min-height: 60px; }
  .mcards tr { position: relative; }
  .mcards td.m-grow { flex: 1 1 calc(100% - 60px); }
  .mcards td.mc-call { display: block; position: absolute; right: 12px; top: 9px; }
  .mcards td.mc-call .btn { width: 42px; height: 42px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); border-color: transparent; }
  .mcards td:not(.m-grow):not(.mc-call) { font-size: .82rem; }
  .mcards td.m-grow + td { margin-left: 44px; }
  .hide-mc { display: none; }
  .inv-t td:first-child { order: -1; }
  .chg-t td:nth-child(2) { flex: 1 1 calc(100% - 50px); }
  .chg-t td.num { margin-left: auto; }
}

/* ---- Schnellsuche ---- */
.side-search { display: flex; align-items: center; gap: 9px; margin: 4px 12px 10px; padding: 9px 12px; border-radius: 11px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05); color: #a1a1aa; font: inherit; font-size: .88rem; cursor: pointer; width: calc(100% - 24px); text-align: left; }
.side-search span { flex: 1; } .side-search svg { width: 16px; height: 16px; }
.side-search kbd { font: inherit; font-size: .72rem; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 0 6px; }
.side-search:hover { background: rgba(255,255,255,.09); color: #fff; }
.tb-search { display: none; }
dialog.search-dlg { border: 0; padding: 0; border-radius: 18px; width: min(620px, calc(100vw - 24px)); margin-top: 10vh; background: var(--card); color: var(--ink);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.5); }
dialog.search-dlg::backdrop { background: rgba(0,0,0,.4); }
.sr-in { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.sr-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sr-in input { flex: 1; border: 0 !important; box-shadow: none !important; font-size: 1.05rem; padding: 8px 0; background: transparent; outline: none; }
.sr-list { max-height: 60vh; overflow-y: auto; padding: 6px 0 10px; }
.sr-hint { padding: 18px; color: var(--muted); font-size: .9rem; text-align: center; }
.sr-g { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 16px 4px; }
.sr-row { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.sr-a { flex: 1; display: flex; gap: 12px; align-items: center; padding: 9px 16px; color: var(--ink); text-decoration: none !important; min-width: 0; min-height: 54px; }
.sr-a:hover { background: var(--soft); }
.sr-a b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-a small { display: block; font-size: .78rem; color: var(--muted); }
.sr-tel { border-radius: 99px; background: var(--ok-bg); color: var(--ok); border-color: transparent; }
@media (max-width: 900px) {
  .tb-search { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 99px; color: var(--ink-2); background: none; border: 0; flex: none; }
  .tb-search svg { width: 21px; height: 21px; }
  dialog.search-dlg { margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .sr-list { max-height: calc(100dvh - 80px); }
}

/* Zu-/Absage: Rückmeldung beim Tippen + Hinweis mit „Rückgängig“ */
.dc-rb.pressed { transform: scale(.94); }
.dc-rb.pop { animation: rbpop .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes rbpop { 0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(22,163,74,.35); } 60% { transform: scale(1.07); box-shadow: 0 0 0 7px rgba(22,163,74,.18); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.dc-rb.on-no.pop { animation-name: rbpopno; }
@keyframes rbpopno { 0% { transform: scale(.9); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
.snack { position: fixed; z-index: 95; left: 50%; transform: translateX(-50%); bottom: 24px; width: min(460px, calc(100% - 24px));
  background: #18181b; color: #fff; border-radius: 14px; padding: 11px 12px 11px 14px; display: flex; gap: 11px; align-items: center;
  box-shadow: 0 12px 34px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.1); animation: snackin .22s ease-out; }
.snack.out { opacity: 0; transition: opacity .22s; }
.snack b { display: block; font-size: .95rem; } .snack small { display: block; font-size: .8rem; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snack .grow { min-width: 0; }
.snack-ic { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-weight: 900; flex: none; }
.snack-ic.ok { background: #16a34a; } .snack-ic.no { background: #d97706; }
.snack button { background: none; border: 0; color: #fca5a5; font: inherit; font-weight: 800; padding: 8px 6px; cursor: pointer; flex: none; }
@keyframes snackin { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 900px) { .snack { bottom: calc(84px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .dc-rb.pop, .snack { animation: none; } }

/* Hinweis „Als App speichern“ */
.inst-tip { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom)); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px; padding: 14px 40px 14px 14px; box-shadow: 0 14px 40px rgba(0,0,0,.22);
  display: flex; gap: 12px; align-items: flex-start; animation: snackin2 .25s ease-out; max-width: 520px; margin: 0 auto; }
.inst-tip[hidden] { display: none; }
.inst-tip img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.inst-tip b { display: block; font-size: 1rem; } .inst-tip p { margin: 3px 0 10px; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.inst-bt { display: flex; gap: 8px; }
.inst-x { position: absolute; right: 6px; top: 6px; background: none; border: 0; color: var(--muted); padding: 8px; cursor: pointer; }
.inst-x svg { width: 18px; height: 18px; }
@keyframes snackin2 { from { opacity: 0; transform: translateY(12px); } }
.inst-os { margin: 0 0 6px; }
.inst-os .fchip { font: inherit; font-weight: 700; cursor: pointer; background: var(--card); color: var(--ink); }
.inst-os .fchip.on { background: var(--red); border-color: var(--red); color: #fff; }
.inst-steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 14px; }
.inst-steps[hidden] { display: none; }
.inst-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.inst-steps li::before { content: counter(st); grid-row: span 2; width: 30px; height: 30px; border-radius: 99px; background: var(--soft); display: grid; place-items: center; font-weight: 900; align-self: center; }
.inst-steps b svg { width: 16px; height: 16px; vertical-align: -3px; }
.inst-steps small { color: var(--muted); }
@media (min-width: 901px) { .inst-tip { display: none !important; } }

/* Seitenleiste: Gruppen zum Auf-/Zuklappen, Zähler je Dringlichkeit */
.nv-g { margin: 0; }
.nv-h { display: flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; user-select: none;
  padding: 14px 12px 6px; font-size: .66rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: #6b6e79; border-radius: 9px; }
.nv-h::-webkit-details-marker { display: none; }
.nv-h:hover { color: #c9cbd3; }
.nv-c { width: 13px !important; height: 13px !important; transition: transform .15s; flex: none; }
.nv-g[open] > .nv-h .nv-c { transform: rotate(90deg); }
.nv-hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .72rem; color: #565964; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-g[open] > .nv-h .nv-hint { display: none; }
.nv-g:not([open]) > .nv-h { padding-bottom: 9px; }
.nav a .nav-n.warn { background: rgba(245,158,11,.2); color: #fbbf24; }
.nav a .nav-n.info { background: rgba(59,130,246,.2); color: #93c5fd; }
.nav a.active .nav-n.warn, .nav a.active .nav-n.info { background: rgba(255,255,255,.22); color: #fff; }

/* Mitgliederliste */
.show-m-flex { display: none !important; }
@media (max-width: 900px) { .show-m-flex { display: flex !important; } }
.ml-head { margin-bottom: 14px; }
.ml-head h1 .ml-n { font-size: .95rem; color: var(--muted); font-weight: 600; margin-left: 4px; }
.ml-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ml-kpi a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 15px; color: var(--muted); font-size: .8rem; }
.ml-kpi a:hover { text-decoration: none; border-color: var(--input-line); }
.ml-kpi b { display: block; font-size: 1.3rem; color: var(--ink); line-height: 1.25; } .ml-kpi b small { font-size: .85rem; color: var(--muted); }
.ml-kpi a.bad b { color: var(--bad); } .ml-kpi a.warn b { color: var(--warn); }
.ml-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ml-search { flex: 1; position: relative; margin: 0; }
.ml-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.ml-search input { padding-left: 38px; min-height: 42px; border-radius: 12px; }
.ml-bar select { width: auto; min-height: 42px; border-radius: 12px; }
.ml-menu { position: relative; }
.ml-menu summary { list-style: none; width: 44px; height: 44px; border-radius: 12px; position: relative; }
.ml-menu summary::-webkit-details-marker { display: none; }
.ml-dot { position: absolute; top: -6px; right: -6px; background: var(--warn); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 99px; padding: 1px 6px; }
.ml-pop { position: absolute; right: 0; top: 50px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.18); padding: 6px; min-width: 230px; }
.ml-pop > a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; }
.ml-pop > a:hover { background: var(--soft); text-decoration: none; } .ml-pop svg { width: 17px; height: 17px; color: var(--muted); }
.ml-sort { border-top: 1px solid var(--line); margin-top: 4px; padding: 10px 12px 6px; font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ml-sort a { padding: 4px 10px; border-radius: 99px; background: var(--soft); color: var(--ink); font-weight: 600; } .ml-sort a.on { background: var(--ink); color: var(--card); }
.ml-chips .fc-n { background: var(--soft-2); color: var(--ink-2); }
.ml-chips .fchip.on .fc-n { background: rgba(255,255,255,.2); color: inherit; }
.fchip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: var(--bad-bg); }
.fchip.bad .fc-n { background: var(--bad); color: #fff; }
.fchip.bad.on { background: var(--bad); color: #fff; border-color: var(--bad); }
.ml-t td { padding-top: 9px; padding-bottom: 9px; vertical-align: middle; }
.ml-t .who-cell { gap: 10px; } .ml-t .who-cell .rank { margin-left: 2px; }
.ml-st { font-size: .68rem; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 99px; padding: 1px 8px; }
.ml-fn { font-size: .85rem; color: var(--ink-2); }
.ml-more { margin-left: 6px; font-size: .7rem; font-weight: 800; color: var(--muted); background: var(--soft-2); border-radius: 99px; padding: 1px 7px; cursor: help; }
.ml-lic { display: inline-block; font-size: .72rem; font-weight: 800; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.ml-agt { font-size: .84rem; display: inline-flex; align-items: center; gap: 7px; }
.ml-agt.bad { color: var(--bad); font-weight: 600; } .ml-agt.warn { color: var(--warn); } .ml-agt.ok { color: var(--ok); }
.ml-cb { width: 36px; } .ml-cb input { width: 16px; height: 16px; accent-color: var(--red); }
.ml-act { text-align: right; white-space: nowrap; width: 1%; }
.ml-act .btn { opacity: 0; transition: opacity .12s; }
.ml-t tr:hover .ml-act .btn, .ml-act .btn:focus-visible { opacity: 1; }
.ml-t tr.sel td { background: color-mix(in srgb, var(--red) 6%, transparent); }
.ml-selbar { position: fixed; z-index: 70; bottom: 22px; left: 50%; transform: translateX(-50%); background: #18181b; color: #fff; border-radius: 16px;
  padding: 8px 8px 8px 18px; display: flex; gap: 10px; align-items: center; box-shadow: 0 14px 40px rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); }
.ml-selbar[hidden] { display: none; } .ml-selbar .btn.ghost { color: #e4e4e7; }
@media (min-width: 901px) { .ml-selbar { margin-left: 130px; } }
.fab { position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; width: 56px; height: 56px; border-radius: 18px;
  background: var(--red); color: #fff; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(200,16,46,.38); }
.fab svg { width: 24px; height: 24px; } .fab:hover { text-decoration: none; color: #fff; }
@media (max-width: 900px) {
  .ml-head .actions, .ml-kpi { display: none; }
  .ml-t td.mc-agt { margin-left: 0; }
  .ml-card { margin-bottom: 80px; }
}

/* Anwesenheit erfassen: Kurzknöpfe, Fortschritt, Notiz als Stift, Speichern-Leiste nur bei Änderungen */
#att .att { border: 0; gap: 4px; overflow: visible; }
#att .att label { border: 1px solid var(--line); border-radius: 9px; min-width: 38px; text-align: center; padding: 6px 9px; font-weight: 800; font-size: .82rem; }
#att .att label:last-of-type { border-right: 1px solid var(--line); }
#att .att input:checked + label.a-anwesend { background: var(--ok); border-color: var(--ok); }
#att .att input:checked + label.a-entschuldigt { background: #d97706; border-color: #d97706; }
#att .att input:checked + label.a-unentschuldigt { background: var(--bad); border-color: var(--bad); }
#att .a-long { display: none; }
.att-prog { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line-2); font-size: .84rem; }
.att-bar { flex: 1 1 140px; height: 8px; border-radius: 9px; background: var(--soft-2); display: flex; gap: 2px; overflow: hidden; min-width: 100px; }
.att-bar i { display: block; height: 100%; width: 0; transition: width .2s; }
.att-bar .b-ok { background: var(--ok); } .att-bar .b-ex { background: #d97706; } .att-bar .b-un { background: var(--bad); }
.att-why { margin: 0; } .att-why p { max-width: 520px; }
.att-note { width: 1%; white-space: nowrap; }
.att-note input { display: none; width: 112px; padding: 5px 8px; font-size: .82rem; }
.att-note.open input, .att-note.has input { display: inline-block; } .att-note.open .btn, .att-note.has .btn { display: none; }
.att-save { display: none; }
.att-save.show { display: flex; position: sticky; bottom: 16px; z-index: 25; margin: 0 14px 14px; border: 0; border-radius: 16px;
  background: #18181b; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.3); padding: 10px 10px 10px 18px; animation: snackin2 .2s ease-out; }
.att-save .savebar-info { color: #d4d4d8; } .att-save .savebar-info b { color: #4ade80; }
@media (max-width: 900px) { .att-save.show { bottom: calc(76px + env(safe-area-inset-bottom)); margin: 0 8px 10px; } }
@media (max-width: 640px) { #att .a-long { display: none; } #att .att label { padding: 9px 4px; } }

/* Termin-Seite: ⋯-Menü (Handy), Zeit/Ort als Chips, Anwesenheits-Karte */
.ev-more { display: none; position: relative; flex: none; }
.ev-more summary { list-style: none; width: 40px; height: 40px; border-radius: 11px; }
.ev-more summary::-webkit-details-marker { display: none; }
.ev-more .ml-pop { top: 46px; }
.ev-more form { margin: 0; }
.ml-del { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--bad); font: inherit; font-weight: 600; cursor: pointer; }
.ml-del:hover { background: var(--bad-bg); } .ml-del svg { width: 17px; height: 17px; }
.ev-attcard { display: none; }
@media (max-width: 900px) {
  .ev-attcard { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; color: var(--ink); }
  .ev-attcard:hover { text-decoration: none; }
  .ev-attcard b { display: block; } .ev-attcard small { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 7px; }
  .ev-attcard .att-bar { display: flex; }
}
@media (max-width: 640px) {
  .ev-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: start; }
  .ev-top > .grow { display: contents; }
  .ev-top .dc-hd { grid-row: 1 / span 2; grid-column: 1; }
  .ev-top .ev-kind { grid-column: 2; grid-row: 1; }
  .ev-top h1 { grid-column: 2; grid-row: 2; margin: 0; }
  .ev-top .ev-meta { grid-column: 1 / -1; grid-row: 3; margin-top: 12px; gap: 6px; }
  .ev-top .ev-meta span { background: var(--soft); border-radius: 99px; padding: 6px 11px; font-size: .84rem; font-weight: 600; }
  .ev-top .ev-edit { display: none; }
  .ev-top .ev-more { display: block; grid-column: 3; grid-row: 1 / span 2; }
  .ev-links-lead { display: none; }
}

/* Datei-Ablagefeld */
.fz { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--input-line); border-radius: 12px;
  background: var(--soft); color: var(--muted); cursor: pointer; margin: 0; font-weight: 500; flex-wrap: wrap; }
.fz:hover, .fz.drag { border-color: var(--red); background: color-mix(in srgb, var(--red) 5%, var(--card)); }
.fz svg { width: 22px; height: 22px; flex: none; }
.fz-t b { color: var(--red); }
.fz-f { flex-basis: 100%; font-weight: 700; color: var(--ink); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-f:empty { display: none; }
.fz.has { border-style: solid; border-color: var(--ok); }
.fz input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
@media (min-width: 641px) { #att td, #att th { padding-left: 10px; padding-right: 10px; } #att td:first-child, #att th:first-child { padding-left: 18px; } }
.ev-grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
.ev-grid > .span2 { grid-column: auto; }
#att td.m-grow { white-space: normal; }
.att-rs { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; vertical-align: 1px; }
.att-rs:empty { display: none; }
@media (max-width: 1200px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } }

/* ======================================================================
   Stil „Clean“: helle Seitenleiste, Karten ohne Rahmen, ruhige Schrift,
   Farbe nur für Dringendes. Dunkelmodus über dieselben Variablen.
   ====================================================================== */
:root {
  --bg: #f6f6f7; --line: #ebebee; --line-2: #f2f2f4; --soft: #f3f3f5; --soft-2: #ececf0;
  --cl-side: #ffffff; --cl-side-line: #ebebee; --cl-nav: #3f3f46; --cl-nav-ic: #a1a1aa; --cl-nav-h: #a1a1aa;
  --cl-glass: rgba(246,246,247,.82); --cl-tab: rgba(255,255,255,.9); --cl-ring: rgba(16,24,40,.045); --cl-drop: rgba(16,24,40,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cl-side: #121316; --cl-side-line: #23252a; --cl-nav: #c9cad1; --cl-nav-ic: #6f727e; --cl-nav-h: #6b6e79;
    --cl-glass: rgba(14,15,17,.82); --cl-tab: rgba(23,24,27,.92); --cl-ring: rgba(255,255,255,.06); --cl-drop: rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --cl-side: #121316; --cl-side-line: #23252a; --cl-nav: #c9cad1; --cl-nav-ic: #6f727e; --cl-nav-h: #6b6e79;
  --cl-glass: rgba(14,15,17,.82); --cl-tab: rgba(23,24,27,.92); --cl-ring: rgba(255,255,255,.06); --cl-drop: rgba(0,0,0,.3);
}
body { -webkit-font-smoothing: antialiased; }

/* Seitenleiste */
.sidebar { background: var(--cl-side); border-right: 1px solid var(--cl-side-line); }
.brand { border-bottom: 0; padding: 22px 18px 14px; }
.brand-logo { background: transparent; padding: 0; box-shadow: none; }
.brand-text b { color: var(--ink); } .brand-text span { color: var(--muted); }
.side-search { background: var(--soft); border-color: transparent; color: var(--muted); }
.side-search:hover { background: var(--soft-2); color: var(--ink-2); }
.side-search kbd { background: var(--card); border-color: var(--line); color: var(--muted); }
.nav a { color: var(--cl-nav); padding-top: 7px; padding-bottom: 7px; }
.nav a svg { color: var(--cl-nav-ic); }
.nav a:hover { background: var(--soft); color: var(--ink); } .nav a:hover svg { color: var(--ink-2); }
.nav a.active { background: var(--soft); color: var(--ink); font-weight: 650; box-shadow: none; }
.nav a.active svg { color: var(--red); }
.nav a.active::before { display: none; }
.nv-h { color: var(--cl-nav-h); font-weight: 600; letter-spacing: .01em; text-transform: none; font-size: .78rem; }
.nv-h:hover { color: var(--ink-2); }
.nv-hint { color: var(--faint); }
.nav a .nav-n, .nav a .nav-n.warn, .nav a .nav-n.info { background: var(--soft-2); color: var(--ink-2); }
.nav a .nav-n.red { background: var(--red); color: #fff; }
.nav a.active .nav-n.warn, .nav a.active .nav-n.info { background: var(--soft-3); color: var(--ink); }
.sidebar .me { border-color: var(--cl-side-line); background: transparent; }
.sidebar .me b { color: var(--ink); } .sidebar .me a { color: var(--muted); }
.sidebar .me button { color: var(--muted); } .sidebar .me button:hover { color: var(--ink); background: var(--soft); }
.sidebar .me .avatar { background: var(--soft-2); color: var(--ink); }

/* Kopf- und Tab-Leiste am Handy */
@media (max-width: 900px) {
  .topbar { background: var(--cl-glass); color: var(--ink); border-bottom: 0; box-shadow: none;
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
  .topbar button { color: var(--ink); }
  .tabbar { background: var(--cl-tab); border-top: 1px solid var(--line); box-shadow: none;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .tabbar a.on { color: var(--ink); } .tabbar a.on svg { color: var(--red); }
}

/* Karten ohne Rahmen */
.card, .dc-list, .dc-hero, .ml-kpi a, .ev-hero, .ev-attcard, details.acc {
  border-color: transparent; box-shadow: 0 1px 2px var(--cl-drop), 0 0 0 1px var(--cl-ring); border-radius: 20px; }
.card-h { border-bottom-color: var(--line-2); }
.dc-row { border-bottom-color: var(--line-2); }

/* Ruhige Schrift */
h1 { font-weight: 700; letter-spacing: -.03em; }
.dc-sec { text-transform: none; letter-spacing: -.005em; font-size: .95rem; font-weight: 700; color: var(--ink); margin-top: 6px; }
.dc-sec a { font-size: .85rem; font-weight: 600; }
.page-head p, .dc-head p { color: var(--muted); }
th { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; }
.t th { color: var(--muted); }

/* Symbole/Zähler neutral, Rot nur für Dringendes */
.dc-ic { border-radius: 12px; background: var(--soft); }
.dc-n { background: var(--soft); color: var(--ink-2); font-weight: 700; }
.dc-n.t-bad { background: var(--red); color: #fff; }

/* Flache Knöpfe */
.btn { border-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { box-shadow: none; }
.btn.primary { background: var(--red); border-color: var(--red); box-shadow: none; }
.btn.primary:hover { background: var(--red-dark); }
.dc-rb { border-color: transparent; background: var(--soft); }
.dc-rb:hover { background: var(--soft-2); }
.dc-rb.on-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.dc-rb.on-no { background: var(--warn-bg); }

/* Leise Kürzel und Chips */
.rank { background: var(--soft-2); color: var(--ink-2); }
.fchip { border-color: transparent; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.fchip.on { background: var(--ink); color: var(--card); box-shadow: none; }
.fchip.bad { box-shadow: none; }
.ml-lic { border-color: transparent; background: var(--soft); }

/* Verantwortliche: Chips-Feld + Auswahl (Gruppen und Personen) */
.who-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--input-line); background: var(--surface); min-height: 44px; }
.who-chips { display: contents; }
.wc { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 99px; background: var(--soft); font-size: .84rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.wc.g { background: var(--red-soft); color: var(--red-ink); }
.wc-x { border: 0; background: none; color: var(--muted); width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; cursor: pointer; padding: 0; }
.wc-x:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.wc.add { background: none; border: 0; color: var(--link); padding: 4px 8px; cursor: pointer; font: inherit; font-weight: 650; font-size: .84rem; }
.wc.add svg { width: 15px; height: 15px; }
.rp-sheet { max-height: 86vh; overflow: auto; }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rp-sec { font-size: .78rem; font-weight: 700; color: var(--muted); margin: 12px 2px 7px; }
.rp-groups { display: flex; flex-wrap: wrap; gap: 7px; }
.rp-g { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 99px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; font-weight: 600; font-size: .86rem; color: var(--ink); cursor: pointer; margin: 0; }
.rp-g small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.rp-g.on, .rp-g:has(input:checked) { background: var(--ink); color: var(--card); box-shadow: none; }
.rp-g.on small, .rp-g:has(input:checked) small { color: inherit; opacity: .6; }
.rp-g.rp-new { color: var(--link); box-shadow: inset 0 0 0 1px var(--line); }
.rp-g.rp-new:hover { text-decoration: none; }
.rp-search { position: relative; display: block; margin: 0 0 4px; }
.rp-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.rp-search input { padding-left: 36px; background: var(--soft); border-color: transparent; }
.rp-list { max-height: 42vh; overflow: auto; }
.rp-p { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.rp-p[hidden] { display: none; }
.rp-p small { color: var(--muted); font-size: .76rem; margin-left: auto; white-space: nowrap; }
.rp-cb { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--input-line); display: grid; place-items: center; flex: none; color: transparent; }
.rp-cb svg { width: 14px; height: 14px; stroke-width: 3; }
.rp-p.on .rp-cb { background: var(--red); box-shadow: none; color: #fff; }
.fm-groups { margin-bottom: 4px; }
/* Themen-Ideen-Knopf nicht über der Speichern-Leiste */
@media (max-width: 900px) { body .td-btn { bottom: calc(150px + env(safe-area-inset-bottom)) !important; } }

/* ======================= Anmeldung, Einladung, Einrichtung ======================= */
.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.ob-top { display: flex; align-items: center; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 20px 14px; }
.ob-top img { width: 36px; height: 36px; object-fit: contain; }
.ob-top b { font-size: .95rem; display: block; } .ob-top small { display: block; color: var(--muted); font-size: .75rem; }
.ob-prog { display: flex; gap: 6px; padding: 0 20px; margin: 2px 0 6px; }
.ob-prog i { flex: 1; height: 5px; border-radius: 9px; background: var(--soft-2); }
.ob-prog i.on { background: var(--red); }
.ob-step { padding: 0 20px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.ob-main { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 0; max-width: 480px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.ob-form { display: contents; }
.ob-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin: 8px 0 18px; }
.ob-ic svg { width: 30px; height: 30px; }
.ob h1 { font-size: 1.7rem; letter-spacing: -.03em; margin: 0 0 8px; }
.ob p.lead { color: var(--ink-2); font-size: 1rem; line-height: 1.5; margin: 0 0 18px; }
.ob-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }
.ob-li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--cl-ring); color: var(--ink); }
a.ob-li:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--line); }
.ob-li .d { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; flex: none; }
.ob-li .d svg { width: 17px; height: 17px; }
.ob-li b { display: block; font-size: .93rem; } .ob-li small { color: var(--muted); font-size: .82rem; line-height: 1.4; display: block; }
.ob-bottom { position: sticky; bottom: 0; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 26%);
  max-width: 480px; width: 100%; margin: 0 auto; box-sizing: border-box; z-index: 5; }
.ob-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 16px; background: var(--red); color: #fff !important;
  font: inherit; font-weight: 700; font-size: 1rem; border: 0; cursor: pointer; text-decoration: none !important; }
.ob-btn:hover { filter: brightness(.96); } .ob-btn[disabled] { opacity: .45; cursor: not-allowed; } .ob-btn[hidden] { display: none; }
.ob-btn.dark { background: var(--ink); color: var(--card) !important; }
.ob-btn svg { width: 19px; height: 19px; }
.ob-skip { display: block; width: 100%; text-align: center; color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem; margin-top: 12px; background: none; border: 0; cursor: pointer; }
.ob-skip[hidden] { display: none; }
.ob-field { margin-bottom: 14px; } .ob-field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.ob-in { position: relative; }
.ob-in input { min-height: 50px; border-radius: 14px; font-size: 1rem; padding: 12px 46px 12px 14px; width: 100%; box-sizing: border-box; }
.ob-in input.ro { background: var(--soft); border-color: transparent; }
.ob-in .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--muted); background: none; border: 0; padding: 8px; cursor: pointer; display: grid; place-items: center; }
.ob-in .eye svg { width: 19px; height: 19px; } .ob-in .eye.ok { color: var(--ok); } .ob-in .eye[hidden] { display: none; }
.ob-meter { display: flex; gap: 4px; margin-top: 8px; } .ob-meter i { flex: 1; height: 4px; border-radius: 9px; background: var(--soft-2); transition: background .2s; }
.ob-meter.s1 i:nth-child(-n+1) { background: var(--bad); } .ob-meter.s2 i:nth-child(-n+2) { background: var(--amber); }
.ob-meter.s3 i:nth-child(-n+3) { background: var(--ok); } .ob-meter.s4 i { background: var(--ok); }
.ob-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.ob-check { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 14px; margin: 0 0 10px; box-shadow: 0 0 0 1px var(--cl-ring);
  font-size: .9rem; line-height: 1.45; cursor: pointer; font-weight: 500; }
.ob-check input { position: absolute; opacity: 0; pointer-events: none; }
.ob-check .cb { width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--input-line); color: transparent; }
.ob-check .cb svg { width: 15px; height: 15px; stroke-width: 3; }
.ob-check input:checked + .cb { background: var(--red); box-shadow: none; color: #fff; }
.ob-check input:focus-visible + .cb { outline: 2px solid var(--red); outline-offset: 2px; }
details.ob-more { border-radius: 14px; background: var(--soft); margin-bottom: 14px; }
details.ob-more > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 600; font-size: .9rem; cursor: pointer; list-style: none; }
details.ob-more > summary::-webkit-details-marker { display: none; }
details.ob-more[open] > summary svg { transform: rotate(180deg); }
.ob-privacy { max-height: 50vh; overflow: auto; padding: 0 14px 14px; font-size: .88rem; }
.ob-seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; margin: 0 0 14px; }
.ob-seg button { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font: inherit; font-weight: 650; font-size: .88rem; color: var(--muted); border: 0; background: none; cursor: pointer; }
.ob-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ob-steps { display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: 0 0 0 1px var(--cl-ring); overflow: hidden; margin-bottom: 12px; }
.ob-steps[hidden] { display: none; }
.ob-steps > div { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line-2); font-size: .93rem; }
.ob-steps > div:last-child { border-bottom: 0; }
.ob-steps > div > i { font-style: normal; width: 28px; height: 28px; border-radius: 99px; background: var(--soft); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.ob-steps svg { width: 16px; height: 16px; vertical-align: -3px; }
.ob-push .push-box { margin-bottom: 8px !important; }
.ob .ob-done { width: 84px; height: 84px; border-radius: 99px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 30px auto 18px; }
.ob .ob-done svg { width: 42px; height: 42px; }
@media (min-width: 900px) {
  .ob { max-width: 560px; margin: 48px auto; min-height: 0; background: var(--card); border-radius: 26px; box-shadow: 0 0 0 1px var(--cl-ring), 0 30px 60px -30px rgba(16,24,40,.3); padding: 8px 8px 4px; }
  .ob-bottom { position: static; background: none; }
  .ob-main { padding-top: 24px; }
  .ob .ob-li, .ob .ob-check, .ob .ob-steps { box-shadow: 0 0 0 1px var(--line); }
}
/* Anmeldung */
.lg-wide { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.lg-side { background: #121316; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.lg-side::after { content: ""; position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(200,16,46,.35), transparent 65%); }
.lg-side-logo { width: 56px; height: 56px; background: #fff; border-radius: 14px; padding: 5px; box-sizing: border-box; display: grid; place-items: center; }
.lg-side-logo img { width: 100%; height: 100%; object-fit: contain; }
.lg-side h2 { font-size: 2.3rem; letter-spacing: -.03em; margin: 0 0 12px; line-height: 1.1; }
.lg-side p { color: #a1a1aa; max-width: 440px; line-height: 1.55; font-size: 1.02rem; }
.lg-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 480px; margin-top: 20px; position: relative; z-index: 1; }
.lg-feat div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 14px; font-size: .88rem; color: #d4d4d8; }
.lg-feat svg { width: 18px; height: 18px; color: #ff5a6e; display: block; margin-bottom: 8px; }
.lg-motto { font-size: .8rem; opacity: .5; }
.lg { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; box-sizing: border-box;
  background: radial-gradient(1200px 500px at 50% -180px, rgba(200,16,46,.12), transparent 70%), var(--bg); }
.lg-card { width: 100%; max-width: 400px; }
.lg-logo { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 14px; display: block; }
.lg h1 { text-align: center; font-size: 1.6rem; letter-spacing: -.03em; margin: 0; }
.lg .sub { text-align: center; color: var(--muted); margin: 4px 0 24px; }
.lg-box { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 0 0 1px var(--cl-ring), 0 20px 40px -24px rgba(16,24,40,.25); }
.lg-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 2px 0 18px; font-size: .88rem; }
.lg-row > label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 500; white-space: nowrap; }
.lg-row > label input { width: 18px; height: 18px; accent-color: var(--red); }
.lg-forgot { text-align: right; } .lg-forgot summary { color: var(--link); font-weight: 600; cursor: pointer; list-style: none; }
.lg-forgot summary::-webkit-details-marker { display: none; }
.lg-forgot div { text-align: left; margin-top: 8px; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.lg-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 22px; line-height: 1.5; }
.lg-foot b { color: var(--ink-2); }
@media (max-width: 900px) { .lg-wide { grid-template-columns: 1fr; } .lg-side { display: none; } .lg { min-height: 100vh; min-height: 100dvh; } }

/* Handy: Eingabe-Karte als Fenster von unten, geöffnet über „+“ */
.m-sheet-fab, .m-sheet-dim, .m-sheet-x { display: none; }
@media (max-width: 640px) {
  [data-m-sheet] { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 97; margin: 0 !important; max-height: 88vh; overflow: auto;
    border-radius: 24px 24px 0 0 !important; transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 40px rgba(0,0,0,.2) !important; }
  [data-m-sheet].open { transform: none; visibility: visible; }
  [data-m-sheet] .card-h { position: sticky; top: 0; background: var(--card); z-index: 1; }
  [data-m-sheet] .card-h::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 9px; background: var(--line); }
  .m-sheet-x { display: inline-flex; margin-left: auto; }
  .m-sheet-fab { display: flex; border: 0; cursor: pointer; }
  .m-sheet-dim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 96; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .m-sheet-dim.on { opacity: 1; pointer-events: auto; }
}
/* Face ID / Fingerabdruck */
.lg-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0 12px; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lg-pk[hidden], [data-pk-only][hidden] { display: none !important; }
.pk-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.pk-row > svg { width: 20px; height: 20px; color: var(--muted); }
.pk-row small, .pk-lock small { display: block; color: var(--muted); font-size: .8rem; }
.pk-row form { margin: 0; }
.pk-lock { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.ob-reco { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: .78rem; border-radius: 99px; padding: 4px 10px; margin: -6px 0 10px; }
.ob-reco svg { width: 14px; height: 14px; }
[data-pk-none][hidden] { display: none !important; }
/* Profil: Sperren / Abmelden */
.pf-actions { display: flex; gap: 8px; } .pf-actions form { margin: 0; }
.btn.danger-soft { color: var(--bad); }
@media (max-width: 640px) { .pf-head { flex-wrap: wrap; } .pf-actions { width: 100%; } .pf-actions form { flex: 1; } .pf-actions .btn { width: 100%; justify-content: center; min-height: 44px; } }

/* ---- Benachrichtigungen (Glocke) */
.bell-btn { position: relative; }
.bell-n { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg, #fff); }
.bell-dlg { width: min(460px, calc(100vw - 24px)); }
.bell-list { padding: 0 !important; max-height: 70vh; overflow-y: auto; }
.bell-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; position: relative; }
.bell-item:hover { background: var(--row-hover, var(--soft)); text-decoration: none; }
.bell-item.new { background: var(--red-soft, #fff1f3); }
.bell-item.new::after { content: ""; position: absolute; right: 14px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.bell-item b { display: block; font-weight: 650; padding-right: 14px; }
.bell-body { display: block; font-size: .82rem; white-space: pre-line; overflow-wrap: anywhere; }
.bell-ts { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.bell-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--ink-2); }
.bell-ico svg { width: 18px; height: 18px; }
.bell-ico.ok { background: var(--ok-bg); color: var(--ok); } .bell-ico.warn { background: var(--warn-bg); color: var(--warn); }
.bell-ico.info { background: var(--info-bg); color: var(--info); } .bell-ico.bad { background: var(--bad-bg); color: var(--bad); }

/* ==== Ohne Erklärung bedienbar (Rückmeldung in Worten, „+ Neu“, „Mehr“-Kacheln, Kurzanleitung, Zu tun) ==== */
/* 1 Terminzeilen: Titel zweizeilig, Stand als Wort, Knöpfe mit Text */
.dc-row.ev2 { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.dc-row.ev2 .dc-d { padding-top: 1px; }
.dc-row.ev2 .grow { flex: 1; }
.dc-row.ev2 .ev2-a { display: block; color: var(--ink); text-decoration: none; }
.dc-row.ev2 .ev2-a b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.dc-row.ev2 .ev2-a small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 1px; }
.ev-ans { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; }
.ev-st { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 650; border-radius: 99px; padding: 3px 10px 3px 8px; line-height: 1.35; max-width: 100%; }
.ev-st svg { width: 14px; height: 14px; flex: none; }
.ev-st.ok { background: var(--ok-bg); color: var(--ok); }
.ev-st.no { background: var(--warn-bg); color: var(--warn); }
.ev-st.bad { background: var(--bad-bg); color: var(--bad); }
.ev-st.open { background: var(--red-soft); color: var(--red-ink, var(--red)); }
.ev-chg > summary { list-style: none; cursor: pointer; font-size: .8rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; padding: 4px 2px; }
.ev-chg > summary::-webkit-details-marker { display: none; }
.ev-chg[open] { flex-basis: 100%; }
.ev-chg[open] > summary { display: none; }
.dc-tog.lbl { margin-top: 9px; width: 100%; max-width: 360px; }
.ev-chg .dc-tog.lbl { margin-top: 2px; }
.dc-tog.lbl .dc-rb { flex: 1; height: 40px; font-weight: 650; font-size: .86rem; white-space: nowrap; }
.dc-tog.lbl .dc-rb.yes:not([disabled]) { background: #15803d; border-color: #15803d; color: #fff; }
.dc-tog.lbl .dc-rb[disabled] { opacity: .55; }
.dc-tog.lbl .dc-rb.on-ok[disabled], .dc-tog.lbl .dc-rb.on-no[disabled] { opacity: 1; }
.dc-hero .ev-st { margin-top: 8px; }
.dc-hint { flex: 1 1 100%; display: flex; gap: 9px; align-items: flex-start; background: var(--info-bg); color: var(--info); border-radius: 12px; padding: 10px 12px; font-size: .84rem; line-height: 1.4; }
.dc-hint svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.dc-hint b { color: inherit; }
/* „Abwesend melden“ über der Terminliste */
.abw-cta { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 0 0 12px; background: var(--card); border: 1px dashed var(--input-line); border-radius: 14px; color: var(--ink); text-decoration: none !important; }
.abw-cta > svg:first-child { width: 20px; height: 20px; color: var(--warn); flex: none; }
.abw-cta b { display: block; font-size: .9rem; }
.abw-cta small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.abw-cta:hover { border-color: var(--ink-2); }
/* 2 „+ Neu“ – Beschriftung auch am Handy sichtbar */
@media (max-width: 900px) { .dc-actions .btn.keep { padding: 9px 14px; } .dc-actions .btn.keep span { display: inline; } }
.ns-list { display: flex; flex-direction: column; margin: 0 -6px 12px; }
.ns-opt { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 14px; color: var(--ink); text-decoration: none !important; }
.ns-opt + .ns-opt { border-top: 1px solid var(--line-2); }
.ns-opt:hover { background: var(--row-hover, var(--soft)); }
.ns-opt .dc-ic { width: 42px; height: 42px; border-radius: 13px; color: var(--ink-2); }
.ns-opt .dc-ic.t-bad { color: var(--bad); } .ns-opt .dc-ic.t-info { color: var(--info); } .ns-opt .dc-ic.t-warn { color: var(--warn); } .ns-opt .dc-ic.t-ok { color: var(--ok); }
.ns-opt b { display: block; font-size: .95rem; }
.ns-opt small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
/* 3 „Mehr“ als Kacheln (Handy) */
dialog.more-dlg { border: 0; padding: 0; margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; background: var(--bg); color: var(--ink); }
dialog.more-dlg[open] { display: flex; flex-direction: column; animation: sheetUp .22s ease-out; }
dialog.more-dlg::backdrop { background: rgba(0,0,0,.3); }
.more-h { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px 6px 18px; }
.more-h b { font-size: 1.25rem; letter-spacing: -.01em; }
.more-b { flex: 1; overflow-y: auto; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.more-me { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 11px 12px; color: var(--ink); text-decoration: none !important; }
.more-me .more-av { width: 42px; height: 42px; border-radius: 99px; background: var(--soft); display: grid; place-items: center; font-weight: 700; flex: none; }
.more-me b { display: block; } .more-me small { display: block; color: var(--muted); font-size: .8rem; }
.more-search { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 11px 14px; border-radius: 14px; border: 0; background: var(--soft-2); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.more-search svg { width: 18px; height: 18px; }
.more-g { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 18px 4px 8px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; color: var(--ink); text-decoration: none !important; min-height: 104px; }
.mt:active { transform: scale(.98); }
.mt .dc-ic { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 8px; color: var(--ink-2); }
.mt .dc-ic.t-bad { color: var(--bad); } .mt .dc-ic.t-info { color: var(--info); } .mt .dc-ic.t-warn { color: var(--warn); } .mt .dc-ic.t-ok { color: var(--ok); }
.mt b { display: block; font-size: .9rem; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.mt small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; margin-top: 2px; }
.mt-n { display: inline-block; background: var(--red); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .7rem; vertical-align: 2px; }
.more-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.more-f form { display: contents; }
.more-f .btn { flex: 1; justify-content: center; }
/* 4 Kurzanleitung + Teilnahme */
.tour { background: linear-gradient(135deg, #1f2937, #111827); color: #fff; border-radius: 18px; padding: 16px 18px; margin: 0 0 14px; max-width: 760px; transition: opacity .2s, transform .2s; }
.tour.out { opacity: 0; transform: translateY(-6px); }
.tour-h { display: flex; gap: 8px; align-items: center; font-size: 1.02rem; }
.tour-h svg { width: 18px; height: 18px; color: #fbbf24; }
.tour ol { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: s; }
.tour li { display: flex; gap: 10px; margin: 9px 0; font-size: .88rem; line-height: 1.4; color: #e5e7eb; }
.tour li::before { counter-increment: s; content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-weight: 700; font-size: .76rem; }
.tour li b { color: #fff; } .tour a { color: #fff; text-decoration: underline; }
.tour-f { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.tour-f .btn { background: #fff; color: #111; border-color: #fff; font-weight: 700; }
.tour-f .tour-l { color: #cbd5e1; font-weight: 600; font-size: .88rem; }
.dc-part { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; }
.dc-part > b { display: block; font-size: .93rem; }
.dc-bar.big { height: 8px; margin: 10px 0 7px; }
.dc-lg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--ink-2); margin-top: 6px; }
.dc-lg span { display: inline-flex; align-items: center; gap: 5px; }
.dc-lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dc-pnote { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: .85rem; font-weight: 600; color: var(--warn); text-decoration: none !important; }
.dc-pnote svg { width: 16px; height: 16px; } .dc-pnote .dc-go { margin-left: auto; color: var(--muted); }
/* 5 Zu tun: Knopf mit Tätigkeitswort, Erklärung darf umbrechen */
.dc-row.has-act small { white-space: normal; line-height: 1.35; }
.dc-row.has-act b { white-space: normal; line-height: 1.3; }
.dc-act { flex: none; border-radius: 10px; padding: 7px 12px; font-weight: 650; font-size: .8rem; background: var(--soft); color: var(--ink); }
.dc-act.primary { background: var(--red); color: #fff; }
a.dc-row:hover .dc-act:not(.primary) { background: var(--soft-2); }
/* Führung „Nächste Übung“: Zu-/Absage oben über die ganze Breite, darunter Erinnern + Anwesenheit */
.dc-stack > a.dc-rb { text-decoration: none !important; color: var(--ink); }
@media (max-width: 900px) {
  .dc-stack { flex-wrap: wrap; gap: 8px; }
  .dc-stack > form.dc-tog { flex: 1 1 100%; }
  .dc-stack > form:not(.dc-tog), .dc-stack > a.dc-rb { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .dc-stack .dc-rb.wide span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ==== Größere Umbauten 2 ==== */
/* Mitglied-Seite: kompakter Kopf, Schnellkontakt, vier Ampeln */
.mh2 { margin-bottom: 16px; }
.mh2-top { display: flex; gap: 16px; align-items: center; }
.av.xl { width: 72px; height: 72px; font-size: 1.45rem; border-radius: 22px; flex: none; }
.mh2-who { flex: 1; min-width: 0; }
.mh2-who h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.15; }
.mh2-who p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.mh2-act { display: flex; gap: 8px; align-items: center; flex: none; align-self: flex-start; }
.mh2-more { position: relative; }
.mh2-more summary { list-style: none; } .mh2-more summary::-webkit-details-marker { display: none; }
.mh2-more .ml-pop { top: 46px; }
.mh2-more form { margin: 0; }
.mh2-qa { display: flex; gap: 8px; margin-top: 14px; max-width: 560px; }
.mh2-qa a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: .78rem; font-weight: 650; text-decoration: none !important; }
.mh2-qa a svg { width: 19px; height: 19px; color: var(--red); }
.mh2-amp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.mh2-amp > * { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.mh2-amp a:hover { border-color: var(--ink-2); }
.mh2-amp b { display: flex; align-items: center; gap: 7px; font-size: .86rem; }
.mh2-amp small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; line-height: 1.3; }
.dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; flex: none; }
.dot.d-ok { background: #16a34a; } .dot.d-warn { background: #f59e0b; } .dot.d-bad { background: #dc2626; } .dot.d-no { background: var(--soft-3); }
@media (max-width: 900px) {
  .mh2-top { align-items: flex-start; gap: 12px; }
  .av.xl { width: 58px; height: 58px; font-size: 1.15rem; border-radius: 18px; }
  .mh2-who h1 { font-size: 1.3rem; }
  .mh2-who p { font-size: .8rem; }
  .mh2-act .btn.primary span { display: none; }
  .mh2-act .btn.primary { padding: 9px; }
  .mh2-amp { grid-template-columns: 1fr 1fr; }
}
/* Übungsplan als Zeitleiste */
.tl-prog { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; max-width: 760px; }
.tl-prog b { font-size: .92rem; }
.tl { position: relative; padding-left: 24px; max-width: 760px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tli { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; margin-bottom: 10px; color: var(--ink); text-decoration: none !important; }
.tli::before { content: ""; position: absolute; left: -23px; top: 15px; width: 12px; height: 12px; border-radius: 99px; background: var(--bg); border: 2.5px solid var(--red); }
.tli.past { opacity: .62; } .tli.past::before { border-color: var(--faint); }
.tli.next { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); opacity: 1; }
.tli.next::before { background: var(--red); }
.tli:hover { border-color: var(--ink-2); }
.tl-d { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tli.next .tl-d { color: var(--red); }
.tli b { display: block; font-size: .96rem; margin: 2px 0; line-height: 1.3; }
.tli small { display: block; color: var(--muted); font-size: .8rem; }
.tl-me { display: inline-block; margin-top: 6px; font-size: .74rem; font-weight: 650; border-radius: 99px; padding: 2px 9px; }
.tl-me.ok { background: var(--ok-bg); color: var(--ok); } .tl-me.no { background: var(--warn-bg); color: var(--warn); } .tl-me.bad { background: var(--bad-bg); color: var(--bad); }
.tl-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tl-tags span { font-size: .72rem; font-weight: 600; background: var(--soft); border-radius: 7px; padding: 2px 8px; color: var(--ink-2); }
/* Terminseite als Einladung (Mitglieder) */
.inv { max-width: 720px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.inv-hero { --k: var(--red); background: linear-gradient(155deg, color-mix(in srgb, var(--k) 88%, #fff 0%), color-mix(in srgb, var(--k) 62%, #000)); color: #fff; padding: 14px 18px 30px; }
.inv-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.inv-bar a { color: #fff; display: inline-flex; gap: 4px; align-items: center; font-size: .86rem; font-weight: 600; text-decoration: none !important; opacity: .92; }
.inv-bar svg { width: 18px; height: 18px; }
.inv-r { display: flex; gap: 6px; }
.inv-share { width: 36px; height: 36px; border-radius: 11px; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid !important; place-items: center; cursor: pointer; }
.inv-kind { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .82; }
.inv-hero h1 { margin: 4px 0 12px; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.015em; color: #fff; }
.inv-fact { display: flex; gap: 9px; align-items: center; font-size: .92rem; margin: 6px 0; }
.inv-fact svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.inv-pane { background: var(--card); border-radius: 22px 22px 0 0; margin-top: -16px; position: relative; padding: 16px 16px 18px; }
.inv-me { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 11px 12px; }
.inv-me > svg { width: 22px; height: 22px; flex: none; }
.inv-me b { display: block; font-size: .95rem; } .inv-me small { display: block; color: var(--ink-2); font-size: .78rem; margin-top: 1px; }
.inv-me.ok { background: var(--ok-bg); color: var(--ok); } .inv-me.no { background: var(--warn-bg); color: var(--warn); }
.inv-me.bad { background: var(--bad-bg); color: var(--bad); } .inv-me.open { background: var(--red-soft); color: var(--red-ink, var(--red)); }
.inv-chg { border: 0; background: none; color: inherit; font: inherit; font-weight: 650; font-size: .84rem; text-decoration: underline; cursor: pointer; padding: 6px; }
.inv-tog { margin-top: 10px; } .inv-tog.hidden { display: none; }
.inv-tog .dc-tog.lbl { max-width: none; margin-top: 0; } .inv-tog .dc-tog.lbl .dc-rb { height: 46px; font-size: .92rem; }
.inv-who { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
.inv-who > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.inv-who > summary::-webkit-details-marker { display: none; }
.inv-who[open] .dc-go { transform: rotate(180deg); }
.inv-avs { display: flex; flex: none; } .inv-avs .av { margin-left: -8px; border: 2px solid var(--card); width: 32px; height: 32px; font-size: .66rem; }
.inv-avs .av:first-child { margin-left: 0; } .inv-more { background: var(--soft-2) !important; color: var(--ink-2) !important; }
.inv-who b { display: block; font-size: .92rem; } .inv-who small { display: block; color: var(--muted); font-size: .78rem; }
.inv-names { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.inv-names b { flex-basis: 100%; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.inv-names span { background: var(--soft); border-radius: 8px; padding: 3px 9px; font-size: .84rem; }
.inv-kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 16px 2px 0; font-size: .9rem; }
.inv-kv dt { display: flex; gap: 7px; align-items: center; color: var(--muted); } .inv-kv dt svg { width: 16px; height: 16px; }
.inv-kv dd { margin: 0; }
.inv-tags { display: flex; flex-wrap: wrap; gap: 5px; } .inv-tags span { font-size: .76rem; font-weight: 600; background: var(--soft); border-radius: 7px; padding: 2px 8px; }
.inv-desc { white-space: pre-line; margin: 14px 2px 0; font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.inv-qa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.inv-qa > * { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 13px; background: var(--soft); border: 0; color: var(--ink-2); font: inherit; font-size: .78rem; font-weight: 650; text-decoration: none !important; cursor: pointer; }
.inv-qa svg { width: 20px; height: 20px; color: var(--ink); }
@media (max-width: 640px) {
  .inv { margin: -20px -16px 0; border-radius: 0; border: 0; background: var(--card); }
  .inv-pane { min-height: 50vh; }
}
/* Atemschutz: Leiste, Filter, Karten (Handy) / Tabelle (Rechner) */
.as-kpi { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 14px; max-width: 620px; }
.as-kpi > div { flex: 1; padding: 10px 8px; text-align: center; border-right: 1px solid var(--line-2); }
.as-kpi > div:last-child { border: 0; }
.as-kpi b { display: block; font-size: 1.4rem; line-height: 1.2; } .as-kpi small { font-size: .74rem; color: var(--muted); }
.as-bulk { margin-bottom: 14px; }
.as-chips { margin-bottom: 8px; } .as-chips button { font: inherit; cursor: pointer; }
.as-need .r-ok, .as-need .r-none { display: none; }
.as-cards { display: none; }
.as-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 11px 13px; margin-bottom: 8px; }
.as-ct { display: flex; align-items: center; gap: 8px; }
.as-ct a { color: var(--ink); text-decoration: none !important; } .as-ct b { font-size: .93rem; }
.as-ct .pick { width: 20px; height: 20px; flex: none; }
.as-st { margin-left: auto; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.as-st.bad { background: var(--bad-bg); color: var(--bad); } .as-st.warn { background: var(--warn-bg); color: var(--warn); }
.as-st.ok { background: var(--ok-bg); color: var(--ok); } .as-st.none { background: var(--soft); color: var(--muted); }
.as-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.as-trio > div { border-radius: 10px; padding: 6px 8px; font-size: .72rem; line-height: 1.3; background: var(--soft); }
.as-trio b { display: block; font-size: .78rem; }
.as-trio .bad { background: var(--bad-bg); color: var(--bad); } .as-trio .warn { background: var(--warn-bg); color: var(--warn); } .as-trio .ok { background: var(--ok-bg); color: var(--ok); }
.m-sheet-fab.wide { width: auto; padding: 0 18px; gap: 8px; border-radius: 16px; font: inherit; font-weight: 700; font-size: .9rem; }
@media (max-width: 760px) { .as-cards { display: block; padding-bottom: 70px; } .as-table { display: none; } }
/* Kalender am Handy: Wochenleiste + Liste */
.cal-m { display: none; }
@media (max-width: 699px) {
  .cal-m { display: block; } .cal-d, .cal-dhead { display: none !important; }
  .cw-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 10px; }
  .cw-head b { font-size: 1.25rem; letter-spacing: -.01em; } .cw-head span { display: flex; gap: 6px; align-items: center; }
  .cw-strip { display: flex; gap: 5px; margin-bottom: 14px; }
  .cw-d { flex: 1; text-align: center; border-radius: 14px; padding: 7px 0 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
  .cw-d small { display: block; font-size: .64rem; color: var(--muted); font-weight: 700; } .cw-d b { font-size: 1.05rem; }
  .cw-d i { display: flex; gap: 2px; justify-content: center; height: 6px; margin-top: 2px; } .cw-d em { width: 5px; height: 5px; border-radius: 9px; }
  .cw-d.on { background: var(--ink); border-color: var(--ink); color: var(--card); } .cw-d.on small { color: inherit; opacity: .7; }
  .cw-g { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 4px 7px; }
  .cw-i { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; color: var(--ink); text-decoration: none !important; scroll-margin-top: 80px; }
  .cw-bar { width: 4px; align-self: stretch; border-radius: 9px; flex: none; }
  .cw-i b { display: block; font-size: .92rem; line-height: 1.3; } .cw-i small { display: block; color: var(--muted); font-size: .78rem; }
  .cw-s { flex: none; font-size: .72rem; }
  .cw-abo { margin-top: 16px; background: var(--card); border: 1px dashed var(--input-line); border-radius: 14px; }
  .cw-abo > summary { list-style: none; display: flex; gap: 10px; align-items: center; padding: 11px 12px; cursor: pointer; }
  .cw-abo > summary::-webkit-details-marker { display: none; }
  .cw-abo > summary > svg:first-child { color: var(--info); width: 20px; height: 20px; flex: none; }
  .cw-abo b { display: block; font-size: .9rem; } .cw-abo small { display: block; color: var(--muted); font-size: .78rem; }
  .cw-abo[open] .dc-go { transform: rotate(180deg); }
  .cw-abo-b { padding: 0 6px 6px; } .cw-abo-b .card { border: 0; box-shadow: none; }
}
/* Umfragen: Antwort-Kacheln, Ergebnisbalken; Dienste: Schichten mit „Ich übernehme“ */
.pt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 16px 0; }
.pt-grid.n1 { grid-template-columns: 1fr; } .pt-grid.n2 { grid-template-columns: 1fr 1fr; } .pt-grid.n4 { grid-template-columns: 1fr 1fr; }
.pt { position: relative; display: block; text-align: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 8px; cursor: pointer; background: var(--card); transition: border-color .12s, background .12s; }
.pt input { position: absolute; opacity: 0; pointer-events: none; }
.pt b { display: block; font-size: .95rem; } .pt small { display: block; color: var(--muted); font-size: .74rem; margin-top: 2px; }
.pt:hover { border-color: var(--ink-2); }
.pt.sel { border-color: #15803d; background: var(--ok-bg); } .pt.sel b { color: var(--ok); }
form.busy .pt, form.busy .sf-b { opacity: .6; pointer-events: none; }
.pt-bar { display: flex; height: 7px; border-radius: 9px; overflow: hidden; gap: 2px; margin: 12px 16px 0; background: var(--soft-2); }
.pt-bar i { display: block; } .pt-bar .c0 { background: #15803d; } .pt-bar .c1 { background: #f59e0b; } .pt-bar .c2 { background: #94a3b8; } .pt-bar .c3 { background: #2563eb; } .pt-bar .c4 { background: #a855f7; }
.pt-who { margin: 8px 16px 0; font-size: .82rem; color: var(--muted); } .pt-who summary { cursor: pointer; } .pt-who p { margin: 5px 0; color: var(--ink-2); }
.pt-note { flex: 1 1 100%; } .pt-note > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: .84rem; color: var(--muted); font-weight: 600; }
.pt-note > summary::-webkit-details-marker { display: none; } .pt-note > summary svg { width: 15px; height: 15px; }
.pt-note-b { display: flex; gap: 8px; margin-top: 8px; } .pt-note-b input { flex: 1; width: auto; }
.sf { padding: 4px 16px 0; }
.sf-i { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.sf-i.sel { border-color: #15803d; background: var(--ok-bg); }
.sf-i b { display: block; font-size: .93rem; } .sf-i b small { font-weight: 500; color: var(--muted); }
.sf-i .grow > small { display: block; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.sf-slots { display: flex; gap: 3px; margin-top: 6px; } .sf-slots i { width: 18px; height: 6px; border-radius: 9px; background: var(--soft-3); } .sf-slots i.f { background: #15803d; }
.sf-b { flex: none; border: 0; border-radius: 11px; padding: 9px 13px; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; white-space: nowrap; }
.sf-b.in { background: #15803d; color: #fff; } .sf-b.out { background: var(--card); color: var(--bad); border: 1px solid var(--line); } .sf-b.full { background: var(--soft); color: var(--muted); cursor: default; }
@media (max-width: 520px) { .pt-grid { padding: 6px 12px 0; gap: 6px; } .pt { padding: 10px 4px; } .sf { padding: 4px 12px 0; } }
/* Abwesenheit: Schnellwahl, Monatskalender zum Antippen, Vorschau */
.ab-q { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ab-qb { text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.ab-qb b { display: block; font-size: .9rem; } .ab-qb small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.ab-qb.on { border-color: var(--red); background: var(--red-soft); }
.ab-cal { border: 1px solid var(--line); border-radius: 16px; padding: 6px 8px 10px; margin-bottom: 14px; background: var(--card); }
.ab-ch { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .ab-ch b { font-size: .95rem; }
.ab-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; text-align: center; }
.ab-g .w { font-size: .66rem; color: var(--muted); font-weight: 700; padding: 2px 0 4px; }
.ab-g button { position: relative; border: 0; background: none; font: inherit; font-size: .88rem; padding: 8px 0; cursor: pointer; color: var(--ink); }
.ab-g button i { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 9px; background: var(--red); }
.ab-g button.past { color: var(--faint); cursor: default; }
.ab-g button.t { font-weight: 800; text-decoration: underline; }
.ab-g button.in { background: var(--red-soft); color: var(--red-ink, var(--red)); }
.ab-g button.s, .ab-g button.e { background: var(--red); color: #fff; } .ab-g button.s i, .ab-g button.e i { background: #fff; }
.ab-g button.s { border-radius: 10px 0 0 10px; } .ab-g button.e { border-radius: 0 10px 10px 0; } .ab-g button.s.e { border-radius: 10px; }
.ab-tip { margin: 6px 4px 0; font-size: .76rem; color: var(--muted); }
.ab-eff { border-radius: 14px; padding: 10px 12px; font-size: .84rem; margin: 4px 0 12px; line-height: 1.45; }
.ab-eff b { display: block; } .ab-eff.has { background: var(--warn-bg); color: var(--warn); } .ab-eff.none { background: var(--soft); color: var(--ink-2); }
.pt-save[hidden], [data-pt-save][hidden] { display: none !important; }
.tl-older > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: .84rem; font-weight: 600; color: var(--muted); margin: 0 0 10px; padding: 6px 10px; border-radius: 10px; background: var(--soft); }
.tl-older > summary::-webkit-details-marker { display: none; } .tl-older > summary svg { width: 15px; height: 15px; }
.tl-older[open] > summary { display: none; }

/* ==== Rechner-Umbauten ==== */
/* Mitglieder: Teilnahme-Spalte und Seitenpanel */
.ml-rate { white-space: nowrap; font-size: .8rem; color: var(--ink-2); }
.pbar { width: 64px; height: 6px; border-radius: 9px; background: var(--soft-2); display: inline-block; vertical-align: middle; overflow: hidden; margin-right: 7px; }
.pbar i { display: block; height: 100%; border-radius: 9px; } .pbar i.ok { background: #16a34a; } .pbar i.warn { background: #f59e0b; } .pbar i.bad { background: #dc2626; }
@media (min-width: 1100px) { tr[data-mp] { cursor: pointer; } tr[data-mp].mp-sel td { background: var(--red-soft) !important; } }
.mpanel { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; z-index: 60; background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px -24px rgba(0,0,0,.28); padding: 16px 18px 24px; overflow-y: auto; transform: translateX(105%); transition: transform .22s ease; }
.mpanel.on { transform: none; } .mpanel.loading .mp-in { opacity: .45; }
.mp-bar { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.mpanel .mh2 { margin-bottom: 4px; } .mpanel .mh2-who h1 { font-size: 1.25rem; } .mpanel .av.xl { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 17px; }
.mpanel .mh2-act { display: none; } .mpanel .mh2-amp { grid-template-columns: 1fr 1fr; }
.mp-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 2px 0; font-size: .86rem; }
.mp-kv dt { color: var(--muted); } .mp-kv dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 1100px) { body.mp-open .content { padding-right: 420px; } }
/* Übungsplan der Führung: Jahresraster (Rechner) */
.yr-wrap { margin-bottom: 18px; }
.yr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.yr-m { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px; min-height: 120px; }
.yr-t { display: flex; justify-content: space-between; align-items: baseline; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px 7px; }
.yr-e { display: block; border-radius: 9px; padding: 6px 8px; background: var(--soft); margin-bottom: 5px; color: var(--ink); text-decoration: none !important; font-size: .78rem; line-height: 1.3; border: 1.5px solid transparent; }
.yr-e:hover { border-color: var(--ink-2); }
.yr-e b { display: block; font-size: .8rem; } .yr-e small { display: block; color: var(--muted); font-size: .72rem; }
.yr-e.k-termin { background: var(--info-bg); } .yr-e.past { opacity: .55; }
.yr-e.empty { background: none; border: 1.5px dashed var(--input-line); color: var(--muted); text-align: center; } .yr-e.empty b { display: inline; color: var(--red); }
.yr-e.empty:hover { border-color: var(--red); }
.yr-none { color: var(--faint); font-size: .76rem; text-align: center; padding: 14px 0; }
.pl-viewseg a { display: inline-flex; gap: 5px; align-items: center; } .pl-viewseg svg { width: 15px; height: 15px; }
html:not([data-plview="table"]) #planTableCard.has-ev, html:not([data-plview="table"]) #bulk, html:not([data-plview="table"]) .plan-hint { display: none !important; }
html[data-plview="table"] .yr-wrap { display: none; }
@media (max-width: 1200px) { .yr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .yr-wrap, .pl-viewseg { display: none !important; } html:not([data-plview="table"]) .plan-hint { display: none; } }
/* Seitenleiste als schmale Symbolleiste (Rechner) – Knopf als eigene, beschriftete Zeile über dem Profil */
.rail-toggle { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 12px; border-radius: 11px; cursor: pointer; width: calc(100% - 24px);
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 600; text-align: left; transition: background .12s, border-color .12s; }
.rail-toggle:hover { background: var(--soft-2); border-color: var(--input-line); color: var(--ink); }
.rail-toggle svg { width: 18px; height: 18px; flex: none; } .rail-toggle .rt-open { display: none; }
@media (min-width: 901px) {
  html.nav-rail .layout { grid-template-columns: 68px 1fr; }
  html.nav-rail .sidebar { overflow-x: hidden; }
  html.nav-rail .brand { justify-content: center; padding-left: 0; padding-right: 0; } html.nav-rail .brand-text { display: none; }
  html.nav-rail .side-search { justify-content: center; margin-left: 10px; margin-right: 10px; width: auto; padding-left: 0; padding-right: 0; } html.nav-rail .side-search span, html.nav-rail .side-search kbd { display: none; }
  /* gleiche Höhen wie ausgeklappt, damit beim Umschalten nichts springt: Gruppenüberschrift wird zur Trennlinie */
  html.nav-rail .nv-h { color: transparent; pointer-events: none; position: relative; }
  html.nav-rail .nv-h > * { visibility: hidden; }
  html.nav-rail .nv-h::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; border-top: 1px solid var(--line); }
  html.nav-rail .nav a { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
  html.nav-rail .nav a .nl { display: none; }
  html.nav-rail .nav a .nav-n { position: absolute; top: 3px; right: 4px; font-size: .6rem; padding: 0 5px; line-height: 1.5; }
  html.nav-rail .nav a.active::before { left: -10px; }
  html.nav-rail .rail-toggle { justify-content: center; margin-left: 10px; margin-right: 10px; width: auto; padding-left: 0; padding-right: 0; background: var(--red); border-color: var(--red); color: #fff; }
  html.nav-rail .rail-toggle:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
  html.nav-rail .rail-toggle span, html.nav-rail .rail-toggle .rt-close { display: none; } html.nav-rail .rail-toggle .rt-open { display: block; }
  html.nav-rail .sidebar .me { flex-direction: column; margin: 0 8px 10px; padding: 8px 0; gap: 6px; }
  html.nav-rail .me .who, html.nav-rail .me [data-theme-toggle], html.nav-rail .me form { display: none; }
}
@media (max-width: 900px) { .rail-toggle { display: none; } }
/* Schnellsuche: markierte Zeile, Tastenhinweis */
#searchOut .sr-a.sel { background: var(--red-soft); }
.sr-k { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
/* Kalender (Rechner): Monat + Tagesdetails rechts, Abwesenheiten dezent, Abo im Fenster */
.cal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cal-side { position: sticky; top: 16px; }
.cs-h { font-weight: 700; font-size: .92rem; margin-bottom: 10px; }
.cs-empty { color: var(--muted); font-size: .86rem; margin-bottom: 12px; }
.cs-ev { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.cs-ev b { display: block; font-size: .93rem; } .cs-ev small { display: block; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.cs-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; } .cs-acts .ev-st { font-size: .74rem; }
.cs-abs { margin: 0; padding-left: 16px; font-size: .84rem; color: var(--ink-2); } .cs-abs li { margin: 3px 0; }
.cs-new { margin-top: 12px; width: 100%; justify-content: center; }
.fc .fc-daygrid-day.cal-sel { background: var(--red-soft) !important; }
.fc .fc-daygrid-day { cursor: pointer; }
.fc .fc-abs { background: #f59e0b !important; opacity: .07 !important; pointer-events: none; }
.fc .fc-daygrid-event-harness, .fc .fc-daygrid-event { min-width: 0; max-width: 100%; }
.fc .fc-daygrid-event { white-space: normal !important; overflow: hidden; }
.fc .fc-daygrid-dot-event { flex-wrap: wrap; align-items: center; row-gap: 1px; padding: 2px 4px; }
.fc .fc-daygrid-dot-event .fc-event-title { flex: 1 1 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; font-size: .78rem; }
.fc .fc-daygrid-block-event .fc-event-title { white-space: normal; overflow-wrap: break-word; hyphens: auto; }
.fc-abs-key { opacity: .85; }
.abo-dlg { width: min(980px, calc(100vw - 32px)); } .abo-dlg .dlg-b { max-height: 75vh; overflow: auto; }
@media (max-width: 1350px) { .cal-grid { grid-template-columns: 1fr; } .cal-side { position: static; } }

/* Seitenwechsel: Inhalt blendet sanft ein – ohne „View Transitions“, die das Einrichten der Seite um ~300 ms verzögert haben */
@media (prefers-reduced-motion: no-preference) {
  main.content > *:not(.toasts) { animation: fw-in .16s ease-out both; }
}
@keyframes fw-in { from { opacity: 0; } }
@media (min-width: 700px) { #calendar { min-height: 640px; } }
.fc .fc-daygrid-block-event .fc-event-main-frame { flex-wrap: wrap; } .fc .fc-daygrid-block-event .fc-event-time { flex: none; overflow: visible; }
.fc .fc-daygrid-block-event .fc-event-title-container { flex: 1 1 100%; min-width: 0; }
@media (min-width: 901px) { .side-search { height: 40px; box-sizing: border-box; } .rail-toggle { height: 38px; box-sizing: border-box; } }
@media (min-width: 901px) { .sidebar > *, .sidebar .nav > *, .sidebar .nv-b > * { flex-shrink: 0; } }
@media (min-width: 901px) { .sidebar .nav a { min-height: 35px; } }
/* Seitenleiste: nur die Menüliste scrollt (Wappen, Knopf, Suche und Profil bleiben stehen), Scrollleiste dezent bzw. unsichtbar */
@media (min-width: 901px) {
  .sidebar { overflow: hidden; }
  .sidebar .nav { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: transparent transparent; }
  .sidebar .nav:hover { scrollbar-color: var(--soft-3) transparent; }
  .sidebar .nav::-webkit-scrollbar { width: 6px; } .sidebar .nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 9px; }
  .sidebar .nav:hover::-webkit-scrollbar-thumb { background: var(--soft-3); }
  html.nav-rail .sidebar .nav { scrollbar-width: none; } html.nav-rail .sidebar .nav::-webkit-scrollbar { display: none; }
  .sidebar .me .avatar { text-decoration: none !important; }
  /* eingeklappt: nur ein rundes Kürzel, ohne Rahmen */
  html.nav-rail .sidebar .me { border: 0; background: none; box-shadow: none; margin: 6px 0 12px; padding: 0; justify-content: center; }
  html.nav-rail .sidebar .me .avatar { width: 40px; height: 40px; font-size: .82rem; transition: box-shadow .12s; }
  html.nav-rail .sidebar .me .avatar:hover { box-shadow: 0 0 0 3px var(--red-soft), 0 0 0 4px var(--red); }
}
.sidebar .me .who b { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }

/* ==== Prüfdurchlauf: Korrekturen ==== */
/* Startseite: Hinweis „automatisch abgesagt“ in eigener Zeile, Titel/Knöpfe bleiben in der ersten Zeile */
.dc-hero:has(.dc-hint) { flex-wrap: wrap; }
.dc-hero > .grow { min-width: 0; }
@media (min-width: 901px) { .dc-hero .dc-hint { order: 5; } .dc-hero:has(.dc-hint) > .grow { flex: 1 1 0; } }
/* Datum mit Uhrzeit (z. B. „Antworten bis“) wie alle anderen Felder */
input[type=datetime-local], input[type=month], input[type=week] { width: 100%; font: inherit; font-size: .92rem; padding: 9px 12px; border: 1px solid var(--input-line);
  border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
/* Handy: Kästchen und kleine Textlinks gut tippbar */
@media (max-width: 700px) {
  input[type=checkbox]:not([hidden]), input[type=radio]:not([hidden]) { width: 20px; height: 20px; flex: none; }
  .dc-sec a, .dc-archive a, .back-link, a.more-link { display: inline-block; padding: 8px 6px; margin: -8px -6px; }
}
/* Schwebende Plus-Knöpfe verdecken am Listenende nichts mehr */
@media (max-width: 900px) { body:has(.fab:not([hidden])) main.content, body:has(.m-sheet-fab) main.content { padding-bottom: 120px; } }
/* Hilfe zu jeder Seite */
.side-help { display: flex; align-items: center; gap: 9px; margin: -4px 12px 10px; padding: 8px 12px; border-radius: 11px; border: 0; background: none; color: var(--ink-2);
  font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; width: calc(100% - 24px); text-align: left; height: 36px; box-sizing: border-box; }
.side-help span { flex: 1; } .side-help svg { width: 17px; height: 17px; color: var(--info); flex: none; }
.side-help kbd { font: inherit; font-size: .72rem; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; color: var(--muted); background: var(--card); }
.side-help:hover { background: var(--soft-2); color: var(--ink); }
@media (min-width: 901px) { html.nav-rail .side-help { justify-content: center; margin-left: 10px; margin-right: 10px; width: auto; padding: 0; }
  html.nav-rail .side-help span, html.nav-rail .side-help kbd { display: none; } }
@media (max-width: 900px) { .side-help { display: none; } }
.tb-help svg { color: var(--info); }
dialog.help-sheet { width: min(560px, calc(100vw - 24px)); max-height: 86vh; display: none; flex-direction: column; padding-bottom: 14px; }
dialog.help-sheet[open] { display: flex; }
.hs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.hs-head small { display: block; font-size: .7rem; font-weight: 700; color: var(--info); text-transform: uppercase; letter-spacing: .07em; }
.hs-head b { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.hs-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); flex: none; }
.hs-ic svg { width: 21px; height: 21px; }
.hs-body { overflow-y: auto; margin: 0 -18px; padding: 0 18px 4px; flex: 1; }
.hs-intro { color: var(--ink-2); margin: 8px 0 12px; line-height: 1.45; }
.hs-sec { background: var(--soft); border-radius: 14px; padding: 11px 14px 4px; margin-bottom: 10px; }
.hs-sec h3 { margin: 0 0 6px; font-size: .86rem; letter-spacing: .01em; }
.hs-sec ul, .hs-gen ul { margin: 0; padding-left: 18px; }
.hs-sec li, .hs-gen li { margin: 0 0 8px; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
.hs-sec li b, .hs-gen li b { color: var(--ink); }
.hs-gen { margin: 4px 2px 6px; } .hs-gen > summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: .84rem; font-weight: 650; color: var(--muted); list-style: none; padding: 4px 0 8px; }
.hs-gen > summary::-webkit-details-marker { display: none; } .hs-gen > summary svg { width: 15px; height: 15px; }
.help-sheet .sheet-f { margin-top: 10px; }
@media (min-width: 901px) { .help-sheet .sheet-grab { display: none; } }

/* Einheiten: Umschalter (Stadtrechte) und Kürzel an Listeneinträgen – erscheinen erst ab zwei Einheiten */
.unit-switch { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 10px; border-radius: 10px;
  background: var(--soft); border: 1px solid var(--line); }
.unit-switch i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.unit-switch select { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink); padding: 2px 0; }
html.nav-rail .unit-switch select { display: none; }
.u-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  line-height: 1.5; vertical-align: middle; white-space: nowrap; color: var(--u, #64748b);
  background: color-mix(in srgb, var(--u, #64748b) 12%, transparent); border: 1px solid color-mix(in srgb, var(--u, #64748b) 30%, transparent); }
.u-badge.city { --u: #b45309; }
.sidebar .unit-switch { margin: -2px 12px 10px; box-sizing: border-box; }
.unit-switch svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.more-b .unit-switch { margin: 0 0 12px; padding: 10px 12px; }
html.nav-rail .sidebar .unit-switch { justify-content: center; margin-left: 10px; margin-right: 10px; }

/* FWbase-Marke: dezenter Hinweis auf der Anmeldeseite, Symbol als Ersatz für ein fehlendes Wappen */
.lg-powered { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; font-size: .74rem;
  color: var(--muted); text-decoration: none; --fwbase-accent: #E1251B; --fwbase-ink: var(--ink); opacity: .85; }
.lg-powered:hover { opacity: 1; text-decoration: none; }
.lg-powered .fwbase-logo { height: 15px; width: auto; display: block; }
.brand-logo img[src$="fwbase-icon.svg"], .lg-side-logo img[src$="fwbase-icon.svg"] { object-fit: contain; border-radius: 22%; }
