/* Men's Day – Oberfläche. Mobil zuerst, ab 760px breiteres Raster. Hell/Dunkel nach Systemeinstellung. */
:root {
  /* Farben nach Golfclub Heidelberg-Lobenfeld: Clubblau #00A0E4 (gchl.de/Logo), Waldgrün #244B2E (Kickoff-Präsentation), Anthrazit #141617.
     Für Schrift und Buttons ein dunkleres Clubblau – das helle Blau erreicht auf Weiß nicht den nötigen Kontrast. */
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #141617;
  --muted: #5b6168;
  --line: #e1e4e8;
  --accent: #0072a8;
  --accent-soft: #e3f3fb;
  --on-accent: #ffffff;
  --brand: #00a0e4;
  --green: #244b2e;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warn: #8a5a00;
  --warn-soft: #fdf1d8;
  --ok: #1e7a46;
  --tone-plan: #e3f3fb; --tone-plan-ink: #0072a8;
  --tone-people: #e6f4ec; --tone-people-ink: #1e5a33;
  --tone-talk: #fdf1d8; --tone-talk-ink: #8a5a00;
  --tone-files: #eef0f2; --tone-files-ink: #41474d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 23, .06), 0 2px 8px rgba(20, 22, 23, .04);
  color-scheme: light;
}
/* Dunkel: nach Systemeinstellung – außer der Nutzer hat im Menü „Hell“ gewählt – oder ausdrücklich „Dunkel“ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141617;
    --surface: #1b1e20;
    --surface-2: #232629;
    --text: #edeff1;
    --muted: #9aa1a8;
    --line: #2c3034;
    --accent: #3db8f0;
    --accent-soft: #0f2d3b;
    --on-accent: #06121a;
    --brand: #00a0e4;
    --green: #5fae7c;
    --danger: #f2887f;
    --danger-soft: #3a1f1c;
    --warn: #f0c060;
    --warn-soft: #362b14;
    --ok: #5cc08b;
    --tone-plan: #0f2d3b; --tone-plan-ink: #7fcbf2;
    --tone-people: #1a3324; --tone-people-ink: #8fd4a6;
    --tone-talk: #362b14; --tone-talk-ink: #f0c060;
    --tone-files: #2a2e33; --tone-files-ink: #c3ccd6;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141617;
  --surface: #1b1e20;
  --surface-2: #232629;
  --text: #edeff1;
  --muted: #9aa1a8;
  --line: #2c3034;
  --accent: #3db8f0;
  --accent-soft: #0f2d3b;
  --on-accent: #06121a;
  --brand: #00a0e4;
  --green: #5fae7c;
  --danger: #f2887f;
  --danger-soft: #3a1f1c;
  --warn: #f0c060;
  --warn-soft: #362b14;
  --ok: #5cc08b;
  --tone-plan: #0f2d3b; --tone-plan-ink: #7fcbf2;
  --tone-people: #1a3324; --tone-people-ink: #8fd4a6;
  --tone-talk: #362b14; --tone-talk-ink: #f0c060;
  --tone-files: #2a2e33; --tone-files-ink: #c3ccd6;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a, button, summary, label[for], select, input[type="submit"], input[type="checkbox"] { cursor: pointer; }
h1, h2, h3 { line-height: 1.25; margin: 0; }

/* Grundlayout: Seitenleiste links, Inhalt rechts. Am Handy klappt die Leiste über das Menü-Symbol auf. */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.brand:hover { text-decoration: none; }
/* Club-Logo: weiß hinterlegtes Oval, damit es auch im Dunkelmodus sauber steht */
.brand-mark { width: 34px; height: 38px; flex: none; display: block; object-fit: contain; background: #fff; border-radius: 50%; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.2; }
.icon { flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}

.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 12px 18px; }
.sb-close { display: none; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 10px 8px; }
.sb-group { margin-bottom: 10px; }
.sb-title {
  font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 8px 10px 4px;
}
.sb-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 10px; border-radius: 9px; border: 0; background: none;
  font: inherit; font-size: 15px; color: var(--text); text-align: left;
}
.sb-item .icon { color: var(--muted); }
.sb-item:hover { background: var(--surface-2); text-decoration: none; }
.sb-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.sb-item.active .icon { color: var(--accent); }
/* Seitenleiste A: farbige Symbol-Kachel je Gruppe, Schloss für Vertrauliches, Zähler */
.sb-ico { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.sb-item .sb-ico .icon, .sb-item.active .sb-ico .icon { color: inherit; }
.tone-plan { background: var(--tone-plan); color: var(--tone-plan-ink); }
.tone-people { background: var(--tone-people); color: var(--tone-people-ink); }
.tone-talk { background: var(--tone-talk); color: var(--tone-talk-ink); }
.tone-files { background: var(--tone-files); color: var(--tone-files-ink); }
.sb-nav .sb-item, .sb-bottom .sb-item { padding: 4px 8px; gap: 10px; }
.sb-label { flex: 1; min-width: 0; }
.sb-lock { display: inline-grid; color: var(--muted); }
.sb-badge { font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px;
  background: var(--danger-soft); color: var(--danger); }
.sb-bottom { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sb-userrow { display: flex; align-items: center; gap: 4px; }
.sb-userrow .sb-user { flex: 1; }
.sb-foot { border-top: 1px solid var(--line); padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px 8px; min-width: 0; }
.sb-user div { min-width: 0; }
.sb-user b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-backdrop { display: none; }
.app-main { margin-left: 256px; min-width: 0; }
.mobilebar { display: none; }

@media (max-width: 959px) {
  .app-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .sb-close { display: inline-grid; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  body.nav-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .35); }
  body.nav-open { overflow: hidden; }
  .mobilebar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30;
    padding: calc(6px + env(safe-area-inset-top)) 10px 6px; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .mobilebar .brand-mark { width: 28px; height: 31px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* Reiter innerhalb eines Bereichs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; }
.tabs a {
  padding: 8px 12px; color: var(--muted); font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Inhalt */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 16px 48px; }
@media (min-width: 960px) { .page { padding: 28px 32px 56px; } }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .span-2 { grid-column: span 2; }
}
@media (min-width: 1320px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
}
/* Übersicht ohne Lücken: Men's Day oben über die ganze Breite, links „Offene Punkte“, rechts gestapelt */
.dash { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) {
  .dash { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero { grid-column: 1 / -1; }
  .dash.has-open { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .dash.has-open .dash-open { grid-row: span 2; align-self: stretch; }
}
.card-note { margin: -6px 0 10px; font-size: 13px; color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; font-weight: 650; }
.card-head .count {
  margin-left: auto; font-size: 13px; font-weight: 600; padding: 1px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.card.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.card.danger .card-head h2, .card.danger .count { color: var(--danger); }
.card.danger .count { background: var(--danger-soft); }

.empty { color: var(--muted); font-size: 14px; margin: 0; }

/* Nächster Men's Day */
.hero .hero-date { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero .hero-date strong { font-size: 26px; font-weight: 700; }
.hero h3 { font-size: 17px; font-weight: 600; margin-top: 4px; }
.hero .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap;
}
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.progress { margin-top: 14px; }
.progress-bar { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; appearance: none; -webkit-appearance: none; }
.progress-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.progress-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.progress-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .main { min-width: 0; flex: 1; }
.list .title { display: block; font-size: 15px; overflow-wrap: anywhere; }
.list a.title { color: var(--text); }
.list .sub { display: block; font-size: 13px; color: var(--muted); }
.list .aside { flex: none; }
.more { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.dateblock {
  flex: none; width: 46px; text-align: center; border-radius: 10px; background: var(--surface-2);
  padding: 4px 0; line-height: 1.15;
}
.dateblock b { display: block; font-size: 17px; }
.dateblock span { font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* Budget */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat.pos b { color: var(--ok); }
.stat.neg b { color: var(--danger); }
.season { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.group-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 12px 0 4px; }
.group-label:first-child { margin-top: 0; }

.notice {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 18px; color: var(--muted);
}

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { justify-content: center; margin-bottom: 20px; font-size: 18px; }
.auth-card .brand-mark { width: 50px; height: 56px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.btn {
  display: inline-block; width: 100%; font: inherit; font-weight: 600; font-size: 16px;
  padding: 12px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent);
}
.btn:hover { filter: brightness(1.05); }
.errors {
  background: var(--danger-soft); color: var(--danger); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 14px;
}
.errors p { margin: 0; }

@media (max-width: 759px) {
  .page-head h1 { font-size: 21px; }
}

/* ===== Module: Listen, Formulare, Details ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.h2 { font-size: 20px; margin-bottom: 8px; }
.h3 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.head-actions { display: flex; gap: 8px; flex: none; }
.crumb { margin: 0 0 8px; font-size: 14px; }
.crumb a { color: var(--muted); }
.sub-head { margin-top: 28px; }
.sub-head h2 { font-size: 17px; }

.btn { width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-sm { font-size: 14px; padding: 8px 14px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.danger-text { color: var(--danger); }
.warn-text { color: var(--warn); }
.auth .btn { width: 100%; }

.messages { display: grid; gap: 8px; margin-bottom: 16px; }
.msg { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg.warning { background: var(--warn-soft); color: var(--warn); }
.msg.info { background: var(--surface-2); color: var(--text); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.banner.info { background: var(--surface-2); color: var(--text); }
.banner form { margin: 0; flex: none; }

/* Werkzeugleiste */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar input[type="search"], .toolbar select {
  font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.toolbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.toolbar .select { flex: 0 1 auto; min-width: 0; }
.toolbar select { max-width: 100%; }
.stats-bar { margin-bottom: 14px; }

/* Tabelle (am Handy als Karten) */
.card.flush { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table td.first a { color: var(--text); font-weight: 550; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { width: 1%; white-space: nowrap; text-align: right; }
.table tr.is-overdue td[data-label="Fällig"] { color: var(--danger); font-weight: 600; }
.table tr.is-done td.first a { color: var(--muted); text-decoration: line-through; }
.check {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  color: transparent; font-size: 15px; font-weight: 700; line-height: 1;
}
.check:hover { border-color: var(--accent); color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.check.htmx-request { opacity: .5; }
.actions form { display: inline; }

@media (max-width: 759px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { position: relative; padding: 12px 56px 12px 14px; border-top: 1px solid var(--line); }
  .table tbody tr:first-child { border-top: 0; }
  .table td { padding: 0; border: 0; text-align: left !important; font-size: 14px; color: var(--muted); }
  .table td.first { font-size: 15px; color: var(--text); margin-bottom: 2px; }
  .table td:not(.first):not(.actions):not(.m):not(:empty)::before { content: attr(data-label) ": "; }
  .table td:empty { display: none; }
  .table td.actions { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: auto; }
  .table .num { white-space: normal; }
}

.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 14px 0; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin: 20px 0 0; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links .danger-link { color: var(--danger); }

/* Detail */
.fields { display: grid; grid-template-columns: 1fr; gap: 12px 24px; margin: 0; }
@media (min-width: 760px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fields .wide { grid-column: 1 / -1; } }
.fields dt { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fields dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.fields dd.pre { white-space: pre-wrap; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.section-head .count, .count { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* Formulare */
.form { max-width: 720px; }
.form-group { margin-bottom: 14px; }
.field select, .field textarea, .field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="number"], .field input[type="date"], .field input[type="time"], .field input[type="password"],
.field input[type="file"] {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.field textarea { resize: vertical; min-height: 96px; }
.field select:focus, .field textarea:focus, .field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field-check label, .field-multi .multi label { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; }
.field-check input, .field-multi input { width: 20px; height: 20px; accent-color: var(--accent); }
.field-multi .multi { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.req { color: var(--danger); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.field-error { font-size: 13px; color: var(--danger); margin: 6px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.narrow { max-width: 560px; }

/* Einheitliche Felder (Wunsch Nutzer 27.10.2026): Eingabe- und Auswahlfelder überall gleich hoch, auch in Filtern */
:root { --field-h: 44px; }
.field select, .field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="number"], .field input[type="date"], .field input[type="time"], .field input[type="password"],
.toolbar input[type="search"], .toolbar select {
  height: var(--field-h); padding-top: 0; padding-bottom: 0; line-height: 1.2;
}
.field select, .toolbar select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9199' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field input[type="file"] { height: var(--field-h); padding: 5px 8px; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-size: 14px; font-weight: 600; border: 0; border-radius: 8px; padding: 6px 12px; margin-right: 10px;
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
/* Anzeige = gleich großer Kasten wie das Eingabefeld: beim Bearbeiten verschiebt sich nichts */
.fields dd.value {
  min-height: var(--field-h); margin: 4px 0 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px;
  background: var(--surface-2);
}
.edit-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; background: var(--accent-soft); color: var(--accent);
}
.btn-danger-ghost { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.edit-bar {
  position: sticky; bottom: 0; z-index: 20; align-items: center; flex-wrap: nowrap;
  margin-top: 16px; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line);
}
.edit-bar button[type="submit"] { margin-left: auto; min-width: 128px; }
tr[data-href] { cursor: pointer; }
@media (min-width: 760px) {
  .toolbar { flex-wrap: nowrap; align-items: center; }
  .toolbar .select { flex: 0 0 auto; }
}

/* Verlauf */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline > li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tl-head { font-size: 14px; }
.changes { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.changes s { color: var(--muted); }

@media (max-width: 759px) { .row-head { flex-wrap: wrap; } }

/* Umschalter Hell / Dunkel / Automatisch */
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; margin: 4px 0 8px;
  background: var(--surface-2); border-radius: 10px; }
.theme-switch button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px;
  border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.auth-theme { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 220px; }

/* Mein Konto / 2FA */
a.sb-user { color: var(--text); border-radius: 9px; }
a.sb-user:hover { background: var(--surface-2); text-decoration: none; }
.auth-wide { max-width: 520px; }
.steps { padding-left: 20px; display: grid; gap: 12px; }
.qr { display: inline-block; background: #fff; padding: 8px; border-radius: 12px; margin: 10px 0; line-height: 0; }
.qr svg { width: 200px; height: 200px; display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; }
.field input[type="text"] { max-width: 100%; }

/* Schnellschalter in Listen (z. B. Termin veröffentlichen) */
.pill-toggle { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; }
.pill-toggle:hover { border-color: var(--accent); color: var(--accent); }
.pill-toggle.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pill-toggle.htmx-request { opacity: .5; }


/* Jahreswertung: Tabellen mit Eingabefeldern, Preisträger, Spaltenzuordnung */
.in-num { width: 76px; max-width: 100%; font: inherit; font-size: 16px; padding: 7px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.in-num:focus, .table-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.in-check { width: 22px; height: 22px; accent-color: var(--accent); }
.table-form select { max-width: 260px; width: 100%; font: inherit; font-size: 15px; padding: 7px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.table tr.is-prize td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.table tr.is-warn td { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin-top: 0; z-index: 5; }
.form-wide { max-width: none; }
.colmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.colmap-item label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 4px; overflow-wrap: anywhere; }
.colmap-item select { width: 100%; font: inherit; font-size: 15px; padding: 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); }
.rules { margin-top: 8px; font-size: 14px; color: var(--muted); }
.rules summary { font-weight: 600; }
.rules ul { margin: 6px 0 0; padding-left: 20px; }
.section-head { flex-wrap: wrap; }
.section-head h2 { flex-wrap: wrap; min-width: 0; }
.section-head .head-actions { align-items: center; flex-wrap: wrap; flex: 0 1 auto; min-width: 0; }
.head-actions { flex-wrap: wrap; }
.link-danger { font: inherit; font-size: 14px; color: var(--danger); background: none; border: 0; padding: 0; text-decoration: underline; }
a.pill-toggle { display: inline-block; text-decoration: none; }
@media (max-width: 759px) {
  .table-form td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
  .table-form td:not(.first)::before { flex: none; }
  .table-form tr { padding-right: 14px; }
  .table-form select { max-width: 60%; }
}
@media print {
  .sidebar, .mobilebar, .no-print, .messages, .tabs { display: none !important; }
  .app-main { margin-left: 0; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}

/* Name des Tools in der Kopfzeile am Handy: zweizeilig, damit er vollständig lesbar bleibt */
.mobilebar .brand small { font-size: 11px; }
.auth-card .brand small { font-size: 13px; }

/* Bearbeiten direkt aus der Zeile */
.table .actions { display: table-cell; }
.actions > * { vertical-align: middle; }
.row-edit { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--muted); margin-left: 4px; }
.row-edit:hover { background: var(--surface-2); color: var(--accent); text-decoration: none; }
@media (max-width: 759px) {
  .table td.actions { display: flex; align-items: center; gap: 6px; }
  .table tr:has(.row-edit) { padding-right: 64px; }
  .table tr:has(.check):has(.row-edit) { padding-right: 104px; }
  /* Zeilen mit Schalter: Knöpfe unter den Text statt daneben – so bleibt der Text in voller Breite lesbar */
  .table tr:has(.pill-toggle) { padding-right: 14px; }
  .table tr:has(.pill-toggle) td.actions { position: static; transform: none; margin-top: 8px; justify-content: flex-start; }
  .table tr:has(.pill-toggle) .pill-toggle { min-height: 36px; }
  .row-edit { width: 40px; height: 40px; margin-left: 0; }
}

/* Bearbeiten an Ort und Stelle: dieselbe Feldanordnung wie in der Anzeige, nur mit Eingabefeldern */
.fields .slot { min-width: 0; }
.fields.is-edit { gap: 14px 24px; }
.fields.is-edit dt label { cursor: pointer; }
.fields dd.field { margin: 4px 0 0; }
.fields dd.field-check { display: flex; align-items: center; min-height: var(--field-h); }
.fields .hint { margin-top: 4px; }
.card-edit { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 3px var(--accent-soft); }
.fields dd.field input[type="file"] { padding: 5px 8px; }
.fields dd.field a { overflow-wrap: anywhere; }
#record.htmx-swapping { opacity: .6; }

/* ===== Handy: kürzere Wege ===== */
/* Filter: am Handy hinter einem Knopf, am großen Bildschirm wie bisher nebeneinander */
.filter-toggle { display: none; }
.filter-set { display: contents; }
.jump { display: none; }
.tabbar { display: none; }

@media (max-width: 759px) {
  .toolbar.has-filters { flex-wrap: wrap; }
  .toolbar input[type="search"] { flex: 1 1 0; }
  .filter-toggle {
    display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 42px; padding: 0 12px;
    font: inherit; font-size: 15px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text);
  }
  .filter-toggle.on { border-color: var(--accent); color: var(--accent); }
  .filter-toggle .count { background: var(--accent); color: var(--on-accent); }
  .filter-toggle .count[hidden] { display: none; }
  .filter-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex: 1 1 100%; }
  .filter-set .select, .filter-set select { width: 100%; }
  .filter-set .select:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .js .toolbar:not(.filters-open) .filter-set { display: none; }

  /* Listenzeilen: Überschrift, darunter die Angaben als eine fortlaufende Zeile statt je Angabe eine Zeile */
  .table td.m { display: inline; }
  .table td.m:empty, .table td.m-hide { display: none; }
  .table td.m.m-sep::before { content: "· "; }
  .table td.m.m-label::before { content: attr(data-label) ": "; }
  .table td.m.m-sep.m-label::before { content: "· " attr(data-label) ": "; }
  .table td.m a { overflow-wrap: anywhere; }

  /* Detailseite: kurze Angaben zweispaltig, lange über die volle Breite */
  .fields:not(.is-edit) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .fields:not(.is-edit) .wide { grid-column: 1 / -1; }
  .jump { display: flex; gap: 8px; overflow-x: auto; margin: -6px -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
  .jump::-webkit-scrollbar { display: none; }
  .jump a {
    flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px;
  }
  .jump a:hover { text-decoration: none; border-color: var(--accent); }
  .section { scroll-margin-top: 64px; }

  /* Bearbeiten: Speichern bleibt am unteren Rand erreichbar, egal wie lang das Formular ist */
  .card-edit ~ .form-actions {
    position: sticky; bottom: 0; z-index: 20; margin: 16px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); flex-wrap: nowrap;
  }
  .card-edit ~ .form-actions .btn { flex: 1; }
  form:has(> .card-edit) .head-actions { display: none; }
}

/* Leiste am unteren Rand: die vier meistgenutzten Bereiche und das vollständige Menü */
@media (max-width: 959px) {
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0;
    min-height: 56px; padding: 6px 2px; border: 0; background: none; font: inherit; font-size: 11px; color: var(--muted);
  }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--accent); font-weight: 600; }
  .page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* Beim Bearbeiten tritt die Speichern-Leiste an ihre Stelle */
  body:has(.card-edit) .tabbar { display: none; }
  body:has(.card-edit) .page { padding-bottom: 0; }
  .mobilebar > .icon-btn { display: none; }
  .mobilebar { padding-left: 16px; }
}
@media print { .tabbar, .jump, .filter-toggle { display: none !important; } }

/* Nutzer & Rechte (Entscheidung Nutzer 27.10.2026, Entwurf auf der Leinwand „Entwurf Nutzer & Rechte“) */
.viewswitch { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); align-self: flex-end; }
.viewswitch a { padding: 8px 16px; border-radius: 9px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.viewswitch a:hover { color: var(--text); text-decoration: none; }
.viewswitch a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.viewswitch .count { color: var(--muted); font-weight: 400; }
.explain { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.explain h2, .explain p { margin: 0; }
.explain p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.explain-levels { display: grid; gap: 8px; }
.explain-levels > div { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; color: var(--muted); }
.explain-levels > div > b { flex: none; min-width: 5.5em; color: var(--text); }
@media (min-width: 760px) { .explain-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lvl { flex: none; padding: 2px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.lvl.l0 { background: var(--danger-soft); color: var(--danger); }
.lvl.l1 { background: var(--accent-soft); color: var(--accent); }
.lvl.l2 { background: var(--tone-people); color: var(--tone-people-ink); }
.rights-card { overflow: hidden; }
.rights-scroll { overflow-x: auto; }
.rights-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.rights-table th[scope="row"] { min-width: 200px; width: 220px; }
.rights-table thead th { text-align: left; padding: 14px 8px; background: var(--surface-2); font-size: 13px; color: var(--muted); font-weight: 600; }
.rights-table thead th:first-child, .rights-table th[scope="row"] { padding-left: 20px; }
.rights-table .role-name { display: block; font-size: 15px; color: var(--text); }
.rights-table .role-sub { display: block; font-size: 12px; font-weight: 400; }
.rights-table .group-row th { text-align: left; padding: 16px 20px 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rights-table tbody tr:not(.group-row) { border-top: 1px solid var(--line); }
.rights-table th[scope="row"] { text-align: left; font-weight: 400; padding-top: 10px; padding-bottom: 10px; }
.rights-table td { padding: 6px 8px; }
.rights-table td:last-child { padding-right: 16px; }
.rights-table .area { display: flex; align-items: center; gap: 10px; }
.rights-table .area b { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-weight: 600; }
.rights-table .area small { display: block; font-size: 12px; color: var(--muted); }
.rights-table .sb-ico { font-size: 13px; font-weight: 700; }
.chip.conf { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; }
.never { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
/* Rechte-Matrix: zwei Haken je Zelle (Lesen, Schreiben). Bewusst ohne eigene Farben – der Haken allein sagt
   genug (Wunsch Nutzer 16.11.2026). Nur eine geänderte, noch nicht gespeicherte Zelle wird umrandet. */
.rw-cell { display: grid; gap: 5px; padding: 4px 2px; border-radius: 9px; border: 1px solid transparent; }
.rw-cell.is-changed { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.seg { display: inline-flex; gap: 0; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid transparent; }
.seg.is-changed { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { display: inline-flex; align-items: center; height: 34px; padding: 0 7px; border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg-opt:hover span { color: var(--text); }
.seg-opt:has(input:focus-visible) span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-opt.l0:has(input:checked) span { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.seg-opt.l1:has(input:checked) span { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.seg-opt.l2:has(input:checked) span { background: var(--tone-people); color: var(--tone-people-ink); font-weight: 600; }
.seg-opt.inherit:has(input:checked) span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.person-rights tr.is-own .seg-opt:not(.inherit):has(input:checked) span { background: var(--warn-soft); color: var(--warn); }
.person-rights tr.is-own { background: color-mix(in srgb, var(--warn-soft) 45%, transparent); }
.bar-status { flex: 1 1 auto; font-size: 14px; color: var(--muted); }
.people-table .person { display: flex; align-items: center; gap: 12px; }
.people-table .person small { display: block; font-size: 12px; color: var(--muted); }
.people-table .avatar { width: 36px; height: 36px; }
.people-table tr.is-inactive { opacity: .6; }
.chip.ok { background: var(--tone-people); color: var(--tone-people-ink); }
.ok-text { color: var(--ok); }
.person-head { display: flex; align-items: center; gap: 16px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card-pad { padding: 18px 20px 10px; }
.card-pad h2 { margin: 0 0 6px; }
.rights-card + .edit-bar, form .rights-card { margin-top: 16px; }
.sec-stats { margin-bottom: 14px; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-actions form { margin: 0; }
.h4 { font-size: 14px; margin: 18px 0 6px; color: var(--muted); }
.login-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

/* Flightplanung (27.10.2026): Wunschgruppen und Übersicht – vertraulich, nur Tool */
.toolbar.compact { margin: 0; }
.wish-groups { display: grid; gap: 10px; }
@media (min-width: 760px) { .wish-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wish-group { padding: 12px 14px; }
.wish-group p { margin: 4px 0 0; font-size: 14px; }
.wish-group .wg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.wish-group.has-problem { border-color: var(--warn); }
.flight-table td { font-size: 14px; }
/* Sponsor-Logo als Vorschau im Tool */
.logo-preview { display: block; margin-bottom: 8px; max-width: 220px; max-height: 110px; object-fit: contain; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Captains-Tool am Handy (Entwurf 27.10.2026): Handy-Start, Info senden, Aufgaben abhaken, Teilnehmer nachschlagen */
.m-quick, .m-only { display: none; }
@media (max-width: 959px) {
  .m-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; }
  .m-only { display: block; }
  .dash .dash-side { display: none; }   /* Budget und weitere Termine bleiben am PC */
  .dash-open .list li { align-items: center; gap: 12px; }
}
.m-quick-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.m-quick-btn:hover { text-decoration: none; }
.m-quick-btn b { font-size: 15px; }
.m-quick-btn small { font-size: 12px; color: var(--muted); }
.m-quick-btn.tone-talk { background: var(--tone-talk); border-color: transparent; }
.m-quick-btn.tone-talk .icon { color: var(--tone-talk-ink); }
.m-wide { width: 100%; justify-content: center; min-height: 48px; }
.m-form { display: flex; flex-direction: column; gap: 18px; }
.m-block { display: flex; flex-direction: column; gap: 8px; }
.m-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.m-label { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.m-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.m-chip { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.m-chip:hover { border-color: var(--accent); }
.m-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 16px; line-height: 1.4; resize: vertical; background: var(--surface); color: var(--text); }
.m-count { align-self: flex-end; font-size: 12px; color: var(--muted); }
.m-seg { display: flex; }
.m-seg .seg-opt { flex: 1; }
.m-seg .seg-opt span { width: 100%; justify-content: center; height: 42px; font-size: 15px; }
.m-preview { padding: 12px; }
.m-notice { background: #fff3c4; color: #3d2f00; border: 1px solid #f0d77a; border-radius: 10px; padding: 12px 14px;
  font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.m-current { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.m-current-head { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.m-current .card-note { margin: 0; }
.m-switch { margin-bottom: 14px; display: inline-flex; }
.m-group { margin-bottom: 16px; }
.m-group-title { margin: 0 4px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.m-group-title.late { color: var(--danger); }
.m-tasks { list-style: none; margin: 0; padding: 0; }
.m-task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.m-task:first-child { border-top: 0; }
.m-task form { margin: 0; }
.m-task .check { width: 36px; height: 36px; }
.m-task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-task-title { font-size: 15px; }
.m-task-meta { font-size: 12px; color: var(--muted); }
.m-task.is-done .m-task-title { text-decoration: line-through; color: var(--muted); }
.m-person { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.m-person-head { display: flex; align-items: center; gap: 12px; }
.m-person-head h2 { margin: 0; font-size: 19px; }
.m-person-head p { margin: 2px 0 0; font-size: 13px; }
.m-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-kv { margin: 0; }
.m-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.m-kv dt { color: var(--muted); }
.m-kv dd { margin: 0; text-align: right; }
.m-kv-switch { align-items: center; }
.m-kv-switch form { margin: 0; }
.m-confidential { background: var(--warn-soft); border-radius: 12px; padding: 12px; }
.m-confidential .m-kv > div:first-child { border-top: 0; }
.m-conf-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warn); }
.m-switch-btn { position: relative; width: 52px; height: 32px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; }
.m-switch-btn span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.m-switch-btn.on { background: var(--accent); }
.m-switch-btn.on span { left: 23px; }
.m-people { list-style: none; margin: 0; padding: 0; }
.m-people li + li { border-top: 1px solid var(--line); }
.m-person-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); }
.m-person-row:hover { text-decoration: none; background: var(--surface-2); }
.m-person-row.active { background: var(--accent-soft); }
.m-person-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.m-person-main small { font-size: 12px; color: var(--muted); }
.m-empty { padding: 14px; }
/* 2FA-Pflicht je Person (27.10.2026) */
.twofa-duty { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0 14px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.twofa-duty p { margin: 4px 0 0; }
.twofa-duty form { margin: 0; flex: none; }
.m-switch-btn.is-locked { display: inline-block; opacity: .55; cursor: not-allowed; flex: none; }

/* ---------------------------------------------------------------------------
   Club-Baukasten (15.11.2026): Farbe je Bereich, Umschalter „Meine Bereiche“, kurze Seitenleiste mit Reitern,
   Monatskalender. Die Farbe des Bereichs steht in --area (gesetzt über die Klasse area-… am <body>).
   --------------------------------------------------------------------------- */
:root {
  --area-gruen: #244b2e; --area-pink: #c2185b; --area-blau: #0072a8; --area-ocker: #7a4a00; --area-anthrazit: #3d4650;
  --cal-task: #8a5a00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --area-gruen: #8fd4a6; --area-pink: #f48fb1; --area-blau: #3db8f0; --area-ocker: #e8b36a; --area-anthrazit: #c3ccd4;
    --cal-task: #e8b36a;
  }
}
:root[data-theme="dark"] {
  --area-gruen: #8fd4a6; --area-pink: #f48fb1; --area-blau: #3db8f0; --area-ocker: #e8b36a; --area-anthrazit: #c3ccd4;
  --cal-task: #e8b36a;
}
body, .area-blau { --area: var(--area-blau); }
.area-gruen { --area: var(--area-gruen); }
.area-pink { --area: var(--area-pink); }
.area-ocker { --area: var(--area-ocker); }
.area-anthrazit { --area: var(--area-anthrazit); }
body { --area-soft: color-mix(in srgb, var(--area) 13%, transparent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--area); flex: none; }

/* Umschalter */
.sb-switch { padding: 0 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sb-area {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; color: var(--text); font-size: 15px;
}
.sb-area:hover { background: var(--surface-2); text-decoration: none; }
.sb-area.active { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.sb-area small { font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.sb-switch-select { display: flex; align-items: center; gap: 9px; padding: 0 2px 0 10px; }
.sb-switch-select select {
  flex: 1; min-width: 0; height: 40px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; padding: 0 8px;
}
.sb-switch .hint { display: block; padding: 0 10px; }

/* Seitenleiste: fünf große Punkte in der Farbe des Bereichs */
.sb-nav .sb-item, .sb-bottom .sb-item { padding: 8px 8px; gap: 11px; font-size: 16px; }
.sb-item.active { background: var(--area-soft); color: var(--area); box-shadow: inset 3px 0 0 var(--area); }
.sb-item.active .icon { color: var(--area); }

/* Reiter (Unterseiten eines Menüpunkts) und zweite Ebene */
.tabs a { display: inline-flex; align-items: center; gap: 6px; }
.tabs a.active { color: var(--area); border-bottom-color: var(--area); }
.tab-tag { font-size: 11px; font-weight: 400; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.subtabs a { font-size: 14px; padding: 5px 12px; border-radius: 999px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.subtabs a:hover { color: var(--text); text-decoration: none; }
.subtabs a.active { color: var(--area); border-color: var(--area); background: var(--area-soft); font-weight: 600; }

/* Monatskalender */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav a:first-child .icon { transform: rotate(180deg); }
.cal-month { font-size: 18px; min-width: 9.5em; text-align: center; }
.cal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-filter .hint { margin: 0; }
.fchip {
  font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
}
.fchip[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.kind-termin { --kind: var(--area); }
.kind-aufgabe { --kind: var(--cal-task); }
/* Aufgaben sind keine Termine: eigener Farbton, heller Grund und ein Balken links – auch ohne Farbsehen trennbar
   (Wunsch Nutzer 16.11.2026). */
.cal-ev.kind-aufgabe { background: var(--surface); border: 1px solid color-mix(in srgb, var(--kind) 45%, var(--line));
  border-left: 4px solid var(--kind); border-radius: 4px; font-weight: 500; }
.cal-ev.kind-aufgabe:hover { background: color-mix(in srgb, var(--kind) 12%, var(--surface)); }
.fchip.kind-aufgabe .dot { border-radius: 2px; }
.fchip .dot { background: var(--kind); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { font-size: 12px; font-weight: 650; color: var(--muted); padding: 7px 8px; background: var(--surface-2); }
.cal-cell { min-height: 92px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal > .cal-cell:nth-child(7n + 1) { border-left: 0; }
.cal-cell.off { background: var(--surface-2); }
.cal-cell.off .cal-dn { opacity: .55; }
.cal-dn { font-size: 12px; color: var(--muted); align-self: flex-start; min-width: 22px; text-align: center; border-radius: 999px; padding: 1px 5px; }
.cal-cell.today .cal-dn { background: var(--area); color: var(--surface); font-weight: 700; }
.cal-ev {
  display: block; font-size: 12px; line-height: 1.3; font-weight: 600; border-radius: 6px; padding: 3px 6px;
  color: var(--kind); background: color-mix(in srgb, var(--kind) 14%, transparent); overflow-wrap: anywhere;
}
.cal-ev:hover { text-decoration: none; background: color-mix(in srgb, var(--kind) 24%, transparent); }
.cal-ev.done { text-decoration: line-through; opacity: .6; }
.cal-ev[hidden] { display: none; }
/* Doppelte Platzbelegung (16.11.2026): auffällig, aber keine Fehlermeldung – es ist ein Hinweis */
.clash-card { border-left: 4px solid var(--warn); margin-bottom: 14px; }
.clash-card .card-head h2 { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.clash-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.clash-list li { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 10px; align-items: baseline; }
.clash-list li > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-cell.clash { background: color-mix(in srgb, var(--warn) 9%, transparent); }
.cal-cell.clash .cal-dn { background: var(--warn); color: var(--surface); font-weight: 700; }
@media (max-width: 719px) { .clash-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.cal-agenda { display: none; }
.cal-day { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cal-day:last-child { border-bottom: 0; }
.cal-day > div { display: flex; flex-direction: column; gap: 4px; }
.cal-day.today b { color: var(--area); }
.cal-agenda .cal-ev { font-size: 14px; padding: 7px 9px; }
@media (max-width: 719px) {
  .cal-wrap { display: none; }
  .cal-agenda { display: block; }
  .cal-month { min-width: 0; flex: 1; }
}

/* Mannschaft (Club-Baukasten, Stufe 5): Spieltag-Seite und Übersicht */
.md-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 18px; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.checks input { width: 19px; height: 19px; accent-color: var(--area); flex: none; }
.md-table select { font: inherit; font-size: 15px; height: 38px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); max-width: 100%; }
.md-table select.answer-ja { color: var(--ok); font-weight: 650; }
.md-table select.answer-nein { color: var(--danger); font-weight: 650; }
.md-table select.answer-vielleicht { color: var(--warn); font-weight: 650; }
.chip.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.team-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 18px; }
.team-hero { grid-column: 1 / -1; }
.big-num { font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.kind-spieltag { --kind: var(--area); }
.cal-ev.heim { background: var(--area); color: var(--surface); }
.cal-ev.heim:hover { background: color-mix(in srgb, var(--area) 85%, var(--text)); }
@media (max-width: 899px) { .md-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 759px) { .md-table td::before { display: inline-block; min-width: 6.5em; } .md-table tr { padding-right: 14px; } }

/* Posteingang der Redaktion: Zulieferungen der Mannschaften (16.11.2026) */
.post-in { display: grid; gap: 12px; margin-bottom: 14px; }
.post-head b { display: block; font-size: 17px; font-weight: 650; margin-top: 6px; }
.post-head small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.post-body { font-size: 15px; max-height: 15em; overflow-y: auto; }
.post-body p { margin: 0 0 .7em; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0;
  padding-top: 12px; border-top: 1px solid var(--line); }
.post-actions input[type="text"] { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 15px; height: 38px;
  padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }

/* Zugänge: Zahlenleiste als Filter (Wunsch Nutzer 16.11.2026 – eine Liste statt dreier Abschnitte) */
.acc-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.acc-num { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.acc-num:hover { text-decoration: none; border-color: var(--area); }
.acc-num.is-on { border-color: var(--area); box-shadow: var(--shadow), 0 0 0 1px var(--area); }
.acc-num b { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.acc-num span { font-size: 13px; color: var(--muted); }

/* Club-Verwaltung (Stufe 4) */
.club-card .card-head { gap: 9px; }
.club-card h2 a { color: var(--text); }
.attention { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.attention a { font-weight: 600; white-space: nowrap; }
.role-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip .dot { margin-right: 6px; width: 8px; height: 8px; }
.club-ev { --kind: var(--area); }
.fchip.club-ev .dot { background: var(--area); }
.mod-group { margin-bottom: 14px; }
.mod-title { display: block; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pick { display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pick:has(input:checked) { border-color: var(--area); box-shadow: inset 0 0 0 1px var(--area); }
.pick small { color: var(--muted); font-size: 13px; }
.pick input, .mod-matrix input, .check-line input { width: 18px; height: 18px; accent-color: var(--area); vertical-align: -3px; }
.mod-matrix th.c, .mod-matrix td.c { text-align: center; }
.mod-matrix th { white-space: nowrap; }
.mod-matrix tr.sec td { background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.role-table td:nth-child(2) { white-space: nowrap; }
.role-table select { font: inherit; font-size: 15px; height: 38px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.check-line { display: flex; gap: 10px; align-items: flex-start; }
/* Auswahl mit Punkten (Farbe eines Bereichs): nebeneinander statt untereinander */
.field div:has(> div > label > input[type="radio"]) { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.field input[type="radio"] { width: 17px; height: 17px; accent-color: var(--area); vertical-align: -3px; margin-right: 4px; }
.field label > input[type="radio"] { margin-right: 6px; }

/* Mannschaft, Ausbau (Stufe 6): Ergebnisse am Spieltag, Training */
.md-table input.mini { width: 5.5em; font: inherit; font-size: 15px; height: 38px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: right; }
.md-table .check-line { justify-content: center; }
.kind-training { --kind: var(--ok); }

/* Wechsel zwischen Bereichen (Entscheidung Nutzer 16.11.2026): Wechsler in der Kopfzeile + Seite „Meine Bereiche“ */
.areabar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 28px;
  border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 20; }
.areabar-sub { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-switch { position: relative; min-width: 0; }
.switch-btn { font: inherit; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px;
  padding: 7px 12px; min-height: 40px; max-width: 100%; min-width: 0; }
.switch-btn:hover { background: var(--surface-2); }
.switch-btn .sw-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-btn .icon { color: var(--muted); flex: none; transform: rotate(90deg); }
.switch-btn[aria-expanded="true"] .icon { transform: rotate(-90deg); }
.switch-btn[aria-expanded="true"] { border-color: var(--area); box-shadow: inset 0 0 0 1px var(--area); }
.switch-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 310px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: 0 12px 34px rgba(20, 22, 23, .16); display: flex; flex-direction: column; }
.switch-menu input[type="search"] { font: inherit; font-size: 15px; width: 100%; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); }
/* [hidden] vor der Klassenregel: sonst gewinnt display:flex und das Menü steht offen */
.switch-menu[hidden], .switch-empty[hidden] { display: none; }
.switch-list { display: flex; flex-direction: column; gap: 1px; max-height: 60vh; overflow-y: auto; }
.switch-menu .sb-title { padding: 8px 9px 2px; }
.sw-item { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; color: var(--text); font-size: 15px; }
.sw-item:hover { background: var(--surface-2); text-decoration: none; }
.sw-item[aria-current="true"] { background: var(--area-soft); color: var(--area); font-weight: 600; }
.sw-item .icon { color: var(--muted); flex: none; }
.sw-item[hidden], .switch-menu .sb-title[hidden] { display: none; }
.area-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.atile { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-left: 4px solid var(--area);
  border-radius: 11px; padding: 14px 15px; background: var(--surface); color: var(--text); min-width: 0; }
.atile:hover { text-decoration: none; box-shadow: var(--shadow); border-color: var(--area); }
.atile b { font-size: 17px; line-height: 1.2; }
.atile .k { font-size: 12px; color: var(--muted); }
.atile .st { font-size: 14px; color: var(--muted); }
.atile .warn-text { color: var(--warn); font-weight: 600; }
.group-head { display: flex; align-items: baseline; gap: 9px; margin: 4px 0 10px; }
.group-head h2 { font-size: 13px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 959px) {
  .areabar { padding: 9px 16px; }
}

/* Redaktion (Stufe 7): Platz-Seite, Rechte je Baustein */
.course-table select, .course-table input[type="text"] { font: inherit; font-size: 15px; height: 38px; padding: 0 9px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); max-width: 100%; }
.course-table input[type="text"] { width: 100%; min-width: 12em; }
.course-table .state-ok { color: var(--ok); font-weight: 650; }
.course-table .state-warn { color: var(--warn); font-weight: 650; }
.course-table .state-danger { color: var(--danger); font-weight: 650; }
.mod-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5em, 1fr)); gap: 5px 14px; }
.chip-check { display: flex; align-items: center; gap: 7px; font-size: 14px; min-height: 26px; }
.chip-check > span { overflow-wrap: anywhere; }
.chip-check input { width: 17px; height: 17px; accent-color: var(--area); }

/* Redaktion, Teil 2: Seiten aus Abschnitten, Menü der Homepage, Vorschau */
.table input.mini[type="number"] { width: 4.5em; font: inherit; font-size: 15px; height: 36px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: right; }
.add-section { margin-top: 18px; }
.row-form { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.row-form select { font: inherit; font-size: 15px; height: 40px; padding: 0 9px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); flex: 1 1 14em; min-width: 0; }
.preview { max-width: 46rem; display: flex; flex-direction: column; gap: 14px; }
.preview-title { font-size: 25px; }
.preview h3 { font-size: 18px; margin-top: 6px; }
.preview-img { max-width: 100%; border-radius: 10px; }
.preview-table td { padding: 8px 10px; }
.preview .prose { display: flex; flex-direction: column; gap: 10px; }
.preview .prose ul { margin: 0; padding-left: 1.2em; }
.menu-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.menu-group ul { margin: 6px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 3px; }
.menu-group b { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* Testphase (vorübergehend, 17.11.2026): Band „Rückmeldung geben“ über jeder Seite und die Sammelstelle.
   Fällt mit der Feedback-Funktion wieder weg (siehe menstag/rueckmeldung.py). */
.testband {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); font-size: .9rem;
}
.testband-tag {
  font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--muted);
}
.testband-text { color: var(--muted); }
.testband-link { font-weight: 600; margin-left: auto; }
