/* Volkslauf Organisator (Web) – Vereinsfarben wie die Website, schräge Knöpfe */
@font-face { font-family: Anton; src: url(../assets/fonts/anton-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Barlow; src: url(../assets/fonts/barlow-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url(../assets/fonts/barlow-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url(../assets/fonts/barlow-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --nacht: #1a3a8c; --indigo: #254aa5; --himmel: #1fa2e6; --lavendel: #b3b3e0; --zitrone: #ffd23f;
  --text: #1a1f33; --grau: #5b6078; --hell: #eeeef8; --rand: rgba(37, 74, 165, .16); --rot: #c62828;
  --anzeige: Anton, Impact, 'Arial Narrow Bold', sans-serif;
  --schrift: Barlow, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--schrift); color: var(--text); background: #f6f6fc; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--indigo); }
h1, h2, h3 { font-family: var(--anzeige); font-weight: 400; letter-spacing: .01em; color: var(--nacht); line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 .3em; }
h2 { font-size: 1.35rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }

/* Kopf */
.kopf { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 10px 24px; color: #fff;
  background: linear-gradient(100deg, var(--nacht), var(--indigo) 70%, #2f5cc4); box-shadow: 0 6px 24px -12px rgba(26, 58, 140, .6); }
.marke { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--anzeige); font-size: 1.3rem; letter-spacing: .02em; }
.marke b { font-weight: 400; color: var(--zitrone); }
.menue { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.menue a { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 16px; position: relative; z-index: 0; }
.menue a::before { content: ''; position: absolute; inset: 0; transform: skewX(-16deg); border-radius: 4px; z-index: -1; transition: background .15s; }
.menue a:hover::before { background: rgba(255, 255, 255, .12); }
.menue a.aktiv::before { background: rgba(255, 255, 255, .2); box-shadow: inset 0 -3px 0 var(--zitrone); }
.ich { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.ich form { margin: 0; }
.link { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.kopf .link { color: var(--lavendel); }
.link.gefahr { color: var(--rot); }

.inhalt { width: min(1240px, 100%); margin: 0 auto; padding: 28px 24px 48px; flex: 1; }

/* Knöpfe – schräg wie auf der Website */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; z-index: 0; border: 0; background: none;
  font: 600 1rem var(--schrift); color: #fff; padding: 11px 24px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf::before { content: ''; position: absolute; inset: 0; transform: skewX(-16deg); background: var(--indigo); border-radius: 4px; z-index: -1; transition: background .15s, transform .15s; }
.knopf:hover::before { background: var(--nacht); transform: skewX(-16deg) translateY(-1px); }
.knopf:focus-visible { outline: none; }
.knopf:focus-visible::before { box-shadow: 0 0 0 3px var(--zitrone); }
.knopf--rahmen { color: var(--indigo); }
.knopf--rahmen::before { background: #fff; box-shadow: inset 0 0 0 2px var(--indigo); }
.knopf--rahmen:hover::before { background: var(--hell); }
.knopf--leise { color: var(--grau); }
.knopf--leise::before { background: transparent; }
.knopf--leise:hover::before { background: var(--hell); }
.knopf--gefahr { color: var(--rot); }
.knopf--gefahr::before { background: #fff; box-shadow: inset 0 0 0 2px var(--rot); }
.knopf--gefahr:hover::before { background: #fdecec; }

/* Karten, Formulare */
.karte { background: #fff; border: 1px solid var(--rand); border-radius: 14px; padding: 24px 28px; margin: 0 0 22px; box-shadow: 0 14px 34px -26px rgba(26, 58, 140, .5); }
.karte.schmal { max-width: 480px; margin: 40px auto; }
.karte > h2:first-child, .karte > h1:first-child { margin-top: 0; }
.karte.leer { text-align: center; color: var(--grau); padding: 48px; }
fieldset.karte { min-width: 0; }
legend { font-family: var(--anzeige); font-size: 1.2rem; color: var(--nacht); padding: 0 6px; }
.formular label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
.formular label small { font-weight: 400; color: var(--grau); }
input, select, textarea { font: inherit; color: inherit; padding: 10px 12px; border: 1.5px solid #cfd2e6; border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(37, 74, 165, .15); }
input:disabled, select:disabled { background: var(--hell); color: var(--grau); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--indigo); transform: scale(1.15); }
.raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.raster .breit, .raster h2, .raster h3 { grid-column: 1 / -1; }
.knoepfe { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.loeschen { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--rand); }
td .loeschen { margin: 0; padding: 0; border: 0; }
.wahl { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 400 !important; padding: 6px 0; cursor: pointer; }
.anzahl { display: flex; align-items: center; gap: 10px; margin: 8px 0 0 28px; color: var(--grau); }
.anzahl input { width: 90px; }

.meldung { background: #e8f6ee; border-left: 5px solid #2e9d5b; padding: 12px 16px; border-radius: 6px; margin: 0 0 20px; }
.fehler { background: #fdecec; border-left: 5px solid var(--rot); padding: 12px 16px; border-radius: 6px; }
.leise { color: var(--grau); }
.kursiv { font-style: italic; }
mark { background: var(--zitrone); padding: 1px 6px; border-radius: 3px; font-weight: 600; }

/* Teilnehmerliste */
.leiste h1 { margin-bottom: 0; }
.zahl { display: inline-block; font-size: .7em; background: var(--zitrone); color: var(--nacht); padding: 0 12px; transform: skewX(-12deg); vertical-align: middle; margin-left: 6px; }
.leiste p { margin: 4px 0 18px; }
.werkzeuge { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.werkzeuge input[type=search] { flex: 1 1 260px; width: auto; }
.werkzeuge select { width: auto; }
.tabelle-rahmen { overflow-x: auto; background: #fff; border: 1px solid var(--rand); border-radius: 12px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .97rem; }
.tabelle th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); padding: 12px 14px; border-bottom: 2px solid var(--hell); background: #fbfbff; position: sticky; top: 0; }
.tabelle td { padding: 10px 14px; border-bottom: 1px solid var(--hell); vertical-align: middle; }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover { background: #f3f4fd; }
.tabelle tr.neu { background: #fff9dc; }
.tabelle td a { text-decoration: none; color: var(--text); }
.tabelle td:first-child, .tabelle th:first-child { width: 36px; }
.marke-neu { font-size: .72rem; font-weight: 800; text-transform: uppercase; background: var(--zitrone); padding: 1px 7px; border-radius: 3px; margin-left: 6px; }
.unter-tabelle { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--grau); margin-top: 12px; }

/* Statistik */
.kacheln { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kachel { position: relative; overflow: hidden; color: #fff; padding: 14px 18px 16px; border-radius: 8px; background: linear-gradient(110deg, var(--nacht), var(--indigo)); display: flex; flex-direction: column; }
.kachel:first-child { background: linear-gradient(110deg, var(--indigo), #2f5cc4); }
.kachel::after { content: ''; position: absolute; right: 30px; top: 0; bottom: 0; width: 14px; background: rgba(31, 162, 230, .25); transform: skewX(-16deg); }
.kachel b { font: 400 2.1rem var(--anzeige); }
.kachel span { font-weight: 800; }
.kachel small { color: var(--lavendel); min-height: 1.3em; }
.spalten3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.spalten2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.balken { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 34px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .93rem; }
.b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-spur { background: var(--hell); height: 16px; border-radius: 3px; overflow: hidden; }
.b-spur i { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--indigo), var(--himmel)); transform: skewX(-16deg); transform-origin: left; }
.b-zahl { text-align: right; font-weight: 600; }
.planung { background: var(--hell); border-left: 6px solid var(--zitrone); padding: 18px 24px; border-radius: 4px; }
.planwerte { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin: 12px 0; }
.planwerte b { display: block; font: 400 2rem var(--anzeige); color: var(--indigo); }
.planwerte span { font-size: .92rem; }

/* Fuß mit Herkunftshinweis */
.fuss { padding: 18px 24px 22px; border-top: 1px solid var(--rand); background: #fff; }
.herkunft { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-decoration: none; color: var(--grau); font-size: .85rem; text-align: center; opacity: .8; transition: opacity .2s; }
.herkunft img { height: 26px; width: auto; filter: grayscale(.6); transition: filter .2s; }
.herkunft:hover { opacity: 1; }
.herkunft:hover img { filter: none; }

@media (max-width: 1050px) {
  .ich { margin-left: auto; }
  .menue { order: 3; flex-basis: 100%; }
}
@media (max-width: 900px) {
  .kacheln, .planwerte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spalten3, .spalten2, .raster { grid-template-columns: 1fr; }
  .kopf { padding: 10px 16px; gap: 10px; }
  .inhalt { padding: 20px 16px 40px; }
  .karte { padding: 20px 18px; }
  #liste th:nth-child(4), #liste td:nth-child(4), #liste th:nth-child(7), #liste td:nth-child(7), #liste th:nth-child(8), #liste td:nth-child(8) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Löschen mit Bestätigung, Protokoll */
.knopf--gefahr-voll::before { background: var(--rot); }
.knopf--gefahr-voll:hover::before { background: #9e1c1c; }
.warnung { background: #fff4e5; border-left: 6px solid #e07b00; padding: 14px 18px; border-radius: 6px; margin: 0 0 18px; }
.warnung p { margin: 6px 0 0; }
.auswahl-person { font-size: 1.1rem; }
.gruende { border: 1px solid var(--rand); border-radius: 10px; padding: 12px 18px 4px; margin: 0 0 14px; }
.bestaetigen { font-weight: 600 !important; margin-bottom: 8px; }
.protokoll td { cursor: default; vertical-align: top; font-size: .92rem; }
.protokoll tbody tr { cursor: default; }
.protokoll small { color: var(--grau); }

/* Einladungen */
.status { display: inline-block; font-size: .8rem; font-weight: 600; background: #e7f0ff; color: var(--indigo); padding: 2px 9px; border-radius: 3px; }
.status--alt { background: #fdecec; color: var(--rot); }
td.aktionen { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
td.aktionen form { margin: 0; }
