/* ==========================================================
   FARBSCHEMA – zentral anpassbar
   Vereinsfarben: Weiß + Rot #f40a12
   ========================================================== */
:root {
  --c-primary:  #f40a12;
  --c-accent:   #f40a12;
  --c-accent-d: #c50810;
  --c-bg:       #f7f5f4;
  --c-card:     #ffffff;
  --c-border:   #e7e3e1;
  --c-text:     #23201f;
  --c-muted:    #6f6a68;
  --radius:     14px;
  --shadow:     0 1px 2px rgba(35,32,31,.05), 0 4px 14px rgba(35,32,31,.06);
  --shadow-lg:  0 4px 10px rgba(35,32,31,.08), 0 12px 28px rgba(35,32,31,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  font-size: 15.5px;
}
a { color: var(--c-accent); }
a:hover { color: var(--c-accent-d); }

/* ---------- Kopfzeile (rot, weiße Schrift, Pill-Navigation) ---------- */
.site-header {
  background: linear-gradient(180deg, var(--c-primary) 0%, #de0910 100%);
  color: #fff;
  padding: 18px 20px;
}
.header-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 20px; text-align: left;
}
.header-text { flex: 0 1 auto; min-width: 0; }
.site-logo {
  flex: 0 0 auto;
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: 7px 10px 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.site-logo:hover { transform: scale(1.05); }
.site-logo img { height: 46px; width: auto; display: block; }

.site-header h1 {
  margin: 0 0 6px; font-size: 26px; font-weight: 800;
  color: #fff; letter-spacing: -.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.site-header p { margin: 0; color: rgba(255,255,255,.95); }
.site-header p a {
  display: inline-block;
  color: #fff; text-decoration: none;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  padding: 5px 14px; margin: 3px 2px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
  transition: background .15s, color .15s, transform .1s;
}
.site-header p a:hover { background: #fff; color: var(--c-primary); transform: translateY(-1px); }

.container { max-width: 780px; margin: 30px auto 70px; padding: 0 18px; }
.container.wide { max-width: 1180px; }

/* ---------- Karten ---------- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.2px; }
.course-card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #f0b9bb; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.card-head h2 { font-size: 21px; }
.card-head h2 a { color: inherit; text-decoration: none; }
.card-head h2 a:hover { color: var(--c-accent); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

.eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 3px;
}
.price { font-size: 19px; font-weight: 800; color: var(--c-primary); white-space: nowrap; }
.meta { color: var(--c-muted); font-size: 14px; margin: 4px 0 10px; }
.empty { text-align: center; color: var(--c-muted); padding: 36px 0; }
.error {
  background: #fdecec; border: 1px solid #f2b8b5; color: #8c1d18;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
}
.notice { background: #fff6f6; border-color: #f6d3d4; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
}
.badge-free    { background: #e5f5e8; color: #1b6b2e; }
.badge-free::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2e9e46; }
.badge-full    { background: #fdecec; color: #8c1d18; }
.badge-full::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d33a34; }
.badge-neutral { background: #efedec; color: #5b5654; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  padding: 8px 18px; border: 1px solid var(--c-border); border-radius: 999px;
  background: #fff; color: var(--c-text); text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.tab:hover { border-color: var(--c-accent); color: var(--c-accent); box-shadow: var(--shadow); }
.tab-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 3px 10px rgba(244,10,18,.30); }
.tab-active:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 10px 20px;
  border: 1px solid var(--c-border); border-radius: 10px;
  background: #fff; color: var(--c-text);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s, border-color .15s;
}
.btn:hover { background: #f6f4f3; border-color: #d7d2cf; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
  box-shadow: 0 3px 10px rgba(244,10,18,.28);
}
.btn-primary:hover { background: var(--c-accent-d); border-color: var(--c-accent-d); }
.btn-danger { color: #a1221d; border-color: #ecc2c0; }
.btn-danger:hover { background: #fdf0ef; border-color: #dfa3a0; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; font-weight: 500; }
.btn-big { padding: 15px 34px; font-size: 17px; border-radius: 12px; }
.btn-disabled { background: #efedec; color: #9a9492; border-color: var(--c-border); cursor: not-allowed; box-shadow: none; }

/* ---------- Zeit & Ort Infobox ---------- */
.infobox-title {
  display: inline-block; border-bottom: 3px solid var(--c-primary);
  padding-bottom: 6px; margin-bottom: 6px !important;
}
.inforow { display: flex; gap: 16px; padding: 9px 0; border-bottom: 1px solid #f3f0ef; }
.inforow:last-child { border-bottom: none; }
.infolabel { flex: 0 0 96px; font-weight: 700; color: var(--c-primary); }

/* ---------- Freitext ---------- */
.hero-img {
  display: block; width: 100%; max-height: 380px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--c-border);
}
.card-img {
  display: block; width: calc(100% + 52px); margin: -24px -26px 16px;
  height: 180px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.content-text { font-size: 16.5px; }
.content-text p { margin: 0 0 14px; }
.content-text img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
.content-text ul, .content-text ol { padding-left: 24px; }

.cta-box { text-align: center; padding: 10px 0 34px; }
.cta-box .meta { margin-bottom: 12px; }

/* ---------- Tarife ---------- */
.tariff-list { margin-bottom: 20px; }
.tariff {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 10px; cursor: pointer; font-weight: 400;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.tariff:hover { border-color: #f0a5a8; box-shadow: var(--shadow); }
.tariff:has(input:checked) { border-color: var(--c-primary); background: #fff8f8; box-shadow: 0 0 0 1px var(--c-primary) inset; }
.tariff input { accent-color: var(--c-primary); width: 17px; height: 17px; }
.tariff-name { flex: 1; }
.tariff-price { font-weight: 800; color: var(--c-primary); }

/* ---------- Formulare ---------- */
.form label { display: block; margin-bottom: 15px; font-size: 14px; font-weight: 600; color: #3b3634; }
.form input[type=text], .form input[type=email], .form input[type=tel],
.form input[type=password], .form input[type=number], .form input[type=date],
.form input[type=datetime-local], .form textarea, .form select, .form input[type=file] {
  display: block; width: 100%; margin-top: 5px;
  padding: 10px 13px;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  font: inherit; font-weight: 400; background: #fff; color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
}
.form input:hover, .form textarea:hover, .form select:hover { border-color: #d3cecb; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(244,10,18,.14);
}
.form .checkbox { font-weight: 400; }
.form .checkbox input { margin-right: 7px; width: auto; display: inline; accent-color: var(--c-primary); }
.form h2 { margin-top: 24px; }
.form button { margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- Tabellen ---------- */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: 12px; overflow: hidden; font-size: 14px;
  box-shadow: var(--shadow);
}
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #f3f0ef; vertical-align: top; }
.table th {
  background: #faf6f5; font-weight: 700; color: var(--c-primary);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fbf9f8; }
.table tr:last-child td { border-bottom: none; }
.table .actions form { display: inline; }
.table .actions .btn { margin: 2px 2px 2px 0; }
.row-cancelled td { color: #aba5a2; }
.row-cancelled td:not(.actions) { text-decoration: line-through; }

.rte {
  border: 1.5px solid var(--c-border); border-radius: 10px;
  background: #fff; overflow: hidden; margin-bottom: 6px;
}
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px; background: #faf8f7; border-bottom: 1px solid var(--c-border);
}
.rte-toolbar button {
  border: 1px solid var(--c-border); background: #fff; border-radius: 6px;
  padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--c-text);
}
.rte-toolbar button:hover { border-color: var(--c-accent); color: var(--c-accent); }
.rte-area {
  min-height: 220px; padding: 12px 14px; outline: none; font-weight: 400; font-size: 15px;
}
.rte-area:focus { box-shadow: inset 0 0 0 2px rgba(244,10,18,.14); }
.rte-area h3 { margin: 10px 0 6px; }
.rte-area img { max-width: 100%; height: auto; }
.rte-source {
  display: none; width: 100%; border: 0; padding: 12px 14px; min-height: 220px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; outline: none;
}

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.stat-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat-card.stat-accent { border-color: var(--c-primary); background: #fff6f6; }
.stat-label { font-size: 13px; color: #666; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--c-text); letter-spacing: -.5px; }
.stat-sub { font-size: 12px; color: #999; margin-top: 3px; }
.filter-row {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end;
}
.filter-row label { margin: 0; }
.filter-row select, .filter-row input { min-width: 150px; }
.filter-actions { display: flex; gap: 8px; }

.checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 4px 16px; margin: 4px 0 6px;
  max-height: 280px; overflow-y: auto;
  padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 8px; background: #fafafa;
}
.checkbox-grid .checkbox { margin: 0; font-weight: 400; }
.extra-person {
  border: 1px solid var(--c-border); border-radius: 10px;
  padding: 14px 16px; margin: 12px 0; background: #fafafa;
}
.extra-person-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
#add-person { margin-top: 6px; }

.series-box {
  border: 1px solid var(--c-border); border-radius: 8px;
  padding: 12px 14px; margin: 4px 0 6px; background: #fafafa;
}

.codebox {
  display: block; background: #faf8f7; border: 1px solid var(--c-border);
  border-radius: 8px; padding: 9px 11px; font-size: 12px; margin-top: 5px;
  word-break: break-all; font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--c-border); box-shadow: var(--shadow); }

/* ---------- Fußzeile ---------- */
.site-footer {
  text-align: center; font-size: 13.5px; padding: 26px 18px;
  background: #fff; color: var(--c-muted);
  border-top: 3px solid var(--c-primary); margin-top: 50px;
}
.site-footer a { color: var(--c-accent); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header { padding: 12px 14px; }
  .site-header h1 { font-size: 19px; margin-bottom: 3px; }
  .site-header p { font-size: 13px; }
  .header-inner { gap: 12px; }
  .site-logo { padding: 5px 8px 3px; border-radius: 10px; }
  .site-logo img { height: 34px; }
  .card { padding: 18px 16px; }
  .card-head { flex-direction: column; align-items: flex-start; }
  .grid2 { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }

  /* Zeit & Ort: Label links (feste Breite), Wert rechts daneben */
  .inforow { flex-direction: row; gap: 10px; padding: 8px 0; }
  .infolabel { flex: 0 0 82px; font-size: 13.5px; }

  .btn-big { display: block; width: 100%; text-align: center; }
  /* 16px verhindert den Auto-Zoom von iOS beim Antippen von Feldern */
  .form input[type=text], .form input[type=email], .form input[type=tel],
  .form input[type=password], .form input[type=number], .form input[type=date],
  .form input[type=datetime-local], .form textarea, .form select { font-size: 16px; }
}


/* ===== Veranstaltungs-Ansicht mit Seitenleiste (Yolawo-Stil) ===== */
.course-shell { max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }

.course-bar {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  box-shadow: var(--shadow); margin: 18px 0 16px;
}
.course-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px; flex-wrap: wrap;
}
.course-bar-title h2 { margin: 0 0 3px; font-size: 21px; letter-spacing: -.3px; }
.course-bar-title p { margin: 0; font-size: 13.5px; color: #666; }
.course-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.course-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }

.course-side {
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 14px;
}
.course-side-item {
  display: block; padding: 12px 16px; font-size: 14.5px;
  color: var(--c-text); text-decoration: none;
  border-left: 3px solid transparent; border-bottom: 1px solid #f1f1f1;
  transition: background .12s ease, color .12s ease;
}
.course-side-item:last-child { border-bottom: 0; }
.course-side-item:hover { background: #fafafa; color: var(--c-primary); }
.course-side-item.is-active {
  background: #fff5f5; color: var(--c-primary); font-weight: 700;
  border-left-color: var(--c-primary);
}
.course-content { min-width: 0; }
.course-content .card:first-child { margin-top: 0; }

/* Tabs innerhalb eines Bereichs */
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subtab {
  padding: 8px 16px; border-radius: 8px 8px 0 0; text-decoration: none;
  background: #ececec; color: #444; font-size: 14px; font-weight: 600;
}
.subtab.is-active { background: #fff; color: var(--c-primary); box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .course-layout { grid-template-columns: 1fr; }
  .course-side { position: static; display: flex; overflow-x: auto; }
  .course-side-item {
    white-space: nowrap; border-bottom: 0; border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .course-side-item.is-active { border-left: 0; border-bottom-color: var(--c-primary); }
}


/* ===== Mitglieder-Prüfung & Nur-Mitglieder-Tarife (Frontend) ===== */
.member-warning {
  margin: 10px 0 4px; padding: 11px 14px; border-radius: 8px; font-size: 14px; line-height: 1.45;
}
.member-warning.is-warn { background: #fff4e5; border: 1px solid #ffcf8f; color: #8a4b00; }
.member-warning.is-ok   { background: #eafaef; border: 1px solid #9fdcb3; color: #1c7a3d; }

.tariff-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; vertical-align: middle;
  background: #eee; color: #666;
}
.tariff-locked {
  opacity: .5; filter: grayscale(1);
}
.tariff-locked .tariff-badge { background: var(--c-primary); color: #fff; }
