/* ===========================================================================
   HeimFOrteil Einsammelseite
   Die Farben stehen alle hier oben. Wenn ihr die CI-Farben des Vereins
   habt, tauscht ihr nur diese sechs Werte aus.
   Bewusst keine externen Schriften: keine Anfrage an Google, kein Thema
   im Datenschutzhinweis.
   =========================================================================== */

:root {
  --tinte:        #1a201c;
  --tinte-leise:  #5c655f;
  --papier:       #edeee9;
  --karte:        #ffffff;
  --linie:        #d5d8d1;
  --primaer:      #14503a;
  --primaer-hell: #e2ede7;
  --offen:        #a8481c;
  --offen-hell:   #f7e9e1;
  --warnung:      #8a6100;

  --radius: 10px;
  --schrift: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.55;
  color: var(--tinte);
  background: var(--papier);
}

.rahmen { max-width: 54rem; margin: 0 auto; padding: 1.5rem 1.1rem 5rem; }
.rahmen-weit { max-width: 76rem; }

a { color: var(--primaer); }

/* --- Kopf ---------------------------------------------------------------- */

.kopf { padding: 1.6rem 0 1.2rem; }
.kopf .verein {
  font-size: 0.95rem;
  color: var(--tinte-leise);
  margin: 0 0 0.35rem;
}
.kopf h1 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
  font-weight: 700;
}
.kopf p.lead { margin: 0; max-width: 42rem; color: var(--tinte-leise); }

/* --- Fortschritt als Hero ------------------------------------------------ */

.stand {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.6rem;
}
.stand .zahl {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--primaer);
}
.stand .zahl small {
  font-size: 0.36em;
  font-weight: 600;
  color: var(--tinte-leise);
  letter-spacing: 0;
  margin-left: 0.5rem;
}
.balken {
  height: 10px;
  border-radius: 5px;
  background: var(--papier);
  overflow: hidden;
  margin: 0.9rem 0 0.6rem;
  border: 1px solid var(--linie);
}
.balken i { display: block; height: 100%; background: var(--primaer); transition: width .5s ease; }
.stand .neben { font-size: 0.92rem; color: var(--tinte-leise); margin: 0; }

/* --- Filterknöpfe -------------------------------------------------------- */

.filter { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.filter button {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--linie);
  background: var(--karte);
  color: var(--tinte-leise);
  cursor: pointer;
}
.filter button[aria-pressed="true"] {
  background: var(--tinte);
  border-color: var(--tinte);
  color: var(--karte);
}

/* --- Ladenliste ---------------------------------------------------------- */

.liste { display: flex; flex-direction: column; gap: 0.5rem; }

.zeile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--offen);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
}
.zeile.fertig { border-left-color: var(--primaer); }
.zeile.leer { border-left-color: var(--linie); }
a.zeile:hover { border-color: var(--tinte); }
a.zeile:hover.fertig { border-left-color: var(--primaer); }

.zeile .name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.zeile .unter { font-size: 0.86rem; color: var(--tinte-leise); }

/* die fünf Punkte: das eigentliche Statusbild */
.punkte { display: flex; gap: 4px; }
.punkte span {
  width: 15px; height: 15px;
  border-radius: 3px;
  border: 1.5px solid var(--linie);
  background: transparent;
}
.punkte span.voll { background: var(--primaer); border-color: var(--primaer); }
.punkte span.klein { background: var(--warnung); border-color: var(--warnung); }

.haken {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.86rem; color: var(--tinte-leise);
}
.haken b { color: var(--primaer); }

/* --- Bildplätze auf der Ladenseite -------------------------------------- */

.platz {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.3rem 0.9rem;
}
.platz.gefuellt { border-color: var(--primaer); background: var(--primaer-hell); }

.platz .nummer {
  grid-row: 1 / span 3;
  width: 3.2rem; height: 3.2rem;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 700;
  background: var(--papier);
  border: 1px solid var(--linie);
  overflow: hidden;
}
.platz.gefuellt .nummer { background: var(--primaer); color: #fff; border-color: var(--primaer); padding: 0; }
.platz .nummer img { width: 100%; height: 100%; object-fit: cover; display: block; }

.platz h3 { margin: 0; font-size: 1.05rem; }
.platz .hinweis { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--tinte-leise); }
.platz .aktion { grid-column: 2; margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.platz .datei-info { font-size: 0.83rem; color: var(--tinte-leise); font-family: var(--mono); word-break: break-all; }

/* --- Knöpfe -------------------------------------------------------------- */

.knopf {
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--primaer);
  background: var(--primaer);
  color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  text-decoration: none;
}
.knopf:hover { filter: brightness(1.12); }
.knopf[disabled] { opacity: 0.45; cursor: default; filter: none; }
.knopf.zweit { background: var(--karte); color: var(--primaer); }
.knopf.leise {
  background: transparent; border-color: transparent;
  color: var(--tinte-leise); font-weight: 500; padding: 0.5rem 0.4rem; min-height: 0;
  text-decoration: underline;
}
.knopf.klein { font-size: 0.9rem; padding: 0.4rem 0.75rem; min-height: 0; }

:where(button, a, input, textarea, select):focus-visible {
  outline: 3px solid var(--offen);
  outline-offset: 2px;
}

/* --- Formular ------------------------------------------------------------ */

.block {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
  margin-bottom: 1.4rem;
}
.block > h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.block > p.einleitung { margin: 0 0 1rem; color: var(--tinte-leise); font-size: 0.94rem; }

label.feld { display: block; margin-bottom: 0.9rem; }
label.feld > span { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 0.25rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  font: inherit;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--karte);
  color: var(--tinte);
}
textarea { resize: vertical; line-height: 1.6; }

.werkzeuge { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.werkzeuge button {
  font: inherit; font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--linie); border-radius: 99px;
  background: var(--papier); color: var(--tinte-leise); cursor: pointer;
}
.werkzeuge button:hover { border-color: var(--tinte); color: var(--tinte); }

.zaehler { font-size: 0.85rem; color: var(--tinte-leise); text-align: right; margin: 0.3rem 0 0; }
.zaehler.eng { color: var(--offen); font-weight: 600; }

.vorschau-text {
  border: 1px dashed var(--linie);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 0.9rem;
  background: var(--papier);
}
.vorschau-text h4 { margin: 1rem 0 0.25rem; font-size: 1rem; }
.vorschau-text h4:first-child { margin-top: 0; }
.vorschau-text p { margin: 0 0 0.6rem; }
.vorschau-text ul { margin: 0 0 0.6rem; padding-left: 1.2rem; }

label.zustimmung {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  margin-bottom: 0.7rem;
  background: var(--papier);
  cursor: pointer;
}
label.zustimmung input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--primaer); }
label.zustimmung strong { display: block; margin-bottom: 0.15rem; }
label.zustimmung span.text { font-size: 0.92rem; line-height: 1.5; }
label.zustimmung:has(input:checked) { background: var(--primaer-hell); border-color: var(--primaer); }

/* --- Meldungen ----------------------------------------------------------- */

.hinweiskasten {
  border-left: 4px solid var(--warnung);
  background: #fdf6e3;
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 1.2rem;
  font-size: 0.93rem;
}
.hinweiskasten.gut { border-left-color: var(--primaer); background: var(--primaer-hell); }
.hinweiskasten.schlecht { border-left-color: var(--offen); background: var(--offen-hell); }
.hinweiskasten p { margin: 0 0 0.4rem; }
.hinweiskasten p:last-child { margin-bottom: 0; }

.meldung {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  background: var(--tinte); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: 99px;
  font-size: 0.93rem; z-index: 40;
  box-shadow: 0 6px 22px rgba(0,0,0,.22);
  max-width: calc(100vw - 2rem);
}
.meldung.fehler { background: var(--offen); }

.laedt { color: var(--tinte-leise); padding: 2rem 0; text-align: center; }

/* --- Tabelle in der Verwaltung ------------------------------------------ */

table.tabelle { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: var(--karte); }
table.tabelle th, table.tabelle td {
  text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--linie); vertical-align: middle;
}
table.tabelle th { font-size: 0.82rem; color: var(--tinte-leise); font-weight: 600; }
table.tabelle code { font-family: var(--mono); font-size: 0.85rem; }
.tabelle-huelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); }

.mini-galerie { display: flex; gap: 3px; }
.mini-galerie img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; border: 1px solid var(--linie); }
.mini-galerie span.fehlt { width: 34px; height: 34px; border-radius: 3px; border: 1.5px dashed var(--linie); display: block; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .rahmen { padding: 1rem 0.85rem 4rem; }
  .platz { grid-template-columns: 2.6rem 1fr; }
  .platz .nummer { width: 2.6rem; height: 2.6rem; font-size: 1.05rem; }
  .zeile { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
