:root {
  --brand: #1f6f43;      /* Vereinsfarbe – hier anpassen */
  --brand-dark: #16532f;
  --brand-soft: #e8f2ec;
  --ink: #1c2321;
  --muted: #66706c;
  --line: #e1e6e3;
  --bg: #f6f8f7;
  --warn: #b4232a;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
h1 { font-size: 1.7rem; margin: .2em 0 .5em; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 1.8em 0 .6em; }
h3 { margin: 0; font-size: 1.1rem; }
h4 { margin: 0; font-size: 1rem; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; }

/* Kopf */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.brand img { height: 36px; }
.crest { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; flex-shrink: 0; }
.top nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.top nav a:hover { color: var(--brand); }
body.admin .top { background: var(--ink); }
body.admin .top a, body.admin .brand, body.admin .top .link { color: #fff; }

/* Buttons & Formulare */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.ghost { background: transparent; color: var(--warn); border: 1px solid #e5c3c5; }
.btn.small { padding: 5px 12px; font-size: .85rem; }
.btn.big { padding: 14px 28px; font-size: 1.05rem; }
.link { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #c9d1cd; border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .95rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.narrow { max-width: 420px; }

/* Karten & Listen */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.narrow-card { max-width: 560px; margin: 24px auto; }
.danger { border-color: #f0d6d8; }
.hero { padding: 22px 0 6px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 20px; }
.filters input[type=search] { max-width: 240px; }
.filters select { max-width: 320px; }
.filters label.check { white-space: nowrap; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); }
.flash { padding: 12px 16px; border-radius: 8px; margin: 16px 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }
.flash.err { background: #fbeaea; color: var(--warn); }

.event { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.event-head { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.daybox { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 6px 4px; border-radius: 10px; background: var(--brand); color: #fff; line-height: 1.1; }
.daybox .dd { font-size: 1.5rem; font-weight: 700; }
.daybox .mm { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.block { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.open { text-align: center; font-size: .72rem; color: var(--muted); text-transform: uppercase; line-height: 1.1; }
.open span { display: block; font-size: 1.4rem; font-weight: 700; color: var(--brand); }
.open.zero span { color: var(--muted); }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin: 6px 0; border-radius: 8px; background: var(--bg); text-decoration: none; color: var(--ink); }
.item:hover { background: var(--brand-soft); }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.go { color: var(--brand); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; white-space: nowrap; font-weight: 600; }
.badge.value { background: #eef0ff; color: #3b4699; }
.badge.free { background: var(--brand-soft); color: var(--brand-dark); }
.badge.full { background: #f0f0f0; color: var(--muted); }
.badge.mine { background: var(--brand); color: #fff; }
.kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.desc { background: var(--bg); padding: 12px 16px; border-radius: 8px; margin: 12px 0 18px; }
.mine-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.mine-item .actions { display: flex; gap: 8px; align-items: center; }
.progress { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.progress div { height: 100%; background: var(--brand); }

/* Admin */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat .num { font-size: 1.8rem; font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--bg); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tbl form { display: flex; gap: 6px; align-items: center; }
.fill { font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #fff4d6; color: #8a5a00; }
.fill.full { background: var(--brand-soft); color: var(--brand-dark); }
.fill.empty0 { background: #fbeaea; color: var(--warn); }
details.card summary { cursor: pointer; }
details.mail pre { white-space: pre-wrap; font-size: .85rem; }
.foot { color: var(--muted); font-size: .85rem; padding: 30px 16px 40px; }

.print { padding: 20px; background: #fff; }
@media print { .print .tbl { font-size: 11pt; } }

@media (max-width: 640px) {
  .row2, .row3, .stats { grid-template-columns: 1fr; }
  .item, .mine-item { flex-direction: column; align-items: flex-start; }
  .meta { justify-content: flex-start; }
  .tbl { display: block; overflow-x: auto; }
  .top nav { order: 3; width: 100%; padding-bottom: 8px; }
  .top .right { margin-left: auto; }
  .hide-sm { display: none; }
  .facts { grid-template-columns: 100px 1fr; }
}

/* Plattform-Startseite */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.club-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c, var(--brand)); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); }
.club-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.club-card img { height: 40px; }
.club-card .crest { background: var(--c, var(--brand)); }
