/* Festkasse SG Tell -- Farben vom Plakat: Vereinsgrün und Jubiläumsgold. */
:root {
  --gruen: #1f5a2a; --gruen-hell: #eaf3de; --gruen-text: #27500a;
  --gold: #e3b62e; --gold-hell: #faeeda; --gold-text: #633806;
  --rot: #a32d2d; --rot-hell: #fcebeb;
  --grund: #f6f5ef; --flaeche: #ffffff; --text: #1d1d1b; --leise: #6b6a64; --linie: #d9d7cd;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, .knopf { font: inherit; min-height: 48px; border-radius: var(--radius); }
button, .knopf { border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); padding: 0 16px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:active { transform: scale(0.98); }
input, select { border: 1px solid var(--linie); padding: 0 12px; background: #fff; width: 100%; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--leise); }
label input, label select { margin-top: 4px; color: var(--text); font-size: 16px; }
h1 { font-size: 22px; margin: 8px 0 4px; } h2 { font-size: 18px; margin: 0 0 10px; }
.leise { color: var(--leise); } .klein { font-size: 13px; }
.haupt { background: var(--gruen); color: #fff; border-color: var(--gruen); font-weight: 600; }
.gefahr { background: var(--rot); color: #fff; border-color: var(--rot); }
.gefahr-leise { color: var(--rot); border-color: #f0b8b8; }
.leise-knopf { border: 0; background: transparent; color: var(--leise); }
.fehler { color: var(--rot); } .ok { color: var(--gruen); } .warnung { color: #854f0b; font-weight: 600; }
.hinweis { background: var(--gold-hell); color: var(--gold-text); padding: 10px 14px; border-radius: var(--radius); margin: 0 0 12px; }
.hinweis button { min-height: 40px; margin-left: 8px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
[hidden] { display: none !important; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; background: var(--gruen); color: #fff; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px 16px; padding: 6px 12px; }
.marke { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.marke img { border-radius: 6px; }
.marke b { background: var(--gold); color: #3a2a00; border-radius: 6px; padding: 2px 8px; }
.reiter { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.reiter button { background: transparent; color: #e4efd9; border: 0; white-space: nowrap; }
.reiter button.aktiv { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.status { display: flex; gap: 12px; font-size: 13px; align-items: center; }
.status .warnung { color: var(--gold); }
.punkt::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #aaa; margin-right: 5px; vertical-align: 0; }
.punkt.gruen::before { background: #7fd35a; } .punkt.rot::before { background: #ff6b5e; }

main { padding: 14px; max-width: 1400px; margin: 0 auto; }

/* Kasse */
.kasse { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vollbreit { grid-column: 1 / -1; }
.kachel { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; min-height: 140px;
  padding: 16px; border: 0; border-radius: 16px; background: var(--gruen-hell); color: var(--gruen-text); }
.kachel b { font-size: 20px; } .kachel span { font-size: 14px; opacity: .85; margin-top: 2px; }
.kachel em { font-style: normal; font-size: 28px; font-weight: 700; margin-top: auto; padding-top: 8px; }
.kachel.art-scheibe { background: var(--gold-hell); color: var(--gold-text); }
.kachel.art-mannschaft { background: #dfeee0; }
.korb { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 14px;
  position: sticky; top: 76px; display: flex; flex-direction: column; gap: 8px; }
.korb-liste { min-height: 120px; max-height: 42vh; overflow-y: auto; }
.zeile { width: 100%; justify-content: space-between; text-align: left; border: 0; border-bottom: 1px solid var(--linie);
  border-radius: 0; padding: 8px 2px; gap: 10px; }
.zeile small { color: var(--leise); }
.summe { display: flex; justify-content: space-between; font-size: 26px; font-weight: 700; padding: 6px 0; }
.gegeben { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gegeben input { grid-column: 1 / -1; }
.gegeben button.gewaehlt { background: var(--gruen-hell); border-color: var(--gruen); font-weight: 600; }
.rueckgeld { min-height: 34px; font-size: 24px; font-weight: 700; }
.rueckgeld.ok { color: var(--gruen); } .rueckgeld.fehlt { color: var(--rot); }
.gross { min-height: 64px; font-size: 19px; }

/* Listen */
.leiste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.leiste select, .leiste input { width: auto; min-width: 180px; }
.bonzeile { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.bonzeile .knoepfe { display: flex; gap: 6px; }
.bonzeile.storniert { opacity: .6; } .bonzeile.storniert .betrag { text-decoration: line-through; }
.betrag { font-weight: 700; font-size: 18px; }
.marke-storno { background: var(--rot-hell); color: var(--rot); border-radius: 6px; padding: 1px 8px; font-size: 13px; margin-left: 6px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kennzahlen div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px; }
.kennzahlen small { display: block; color: var(--leise); } .kennzahlen b { font-size: 24px; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.paar { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.artikelzeile { display: grid; grid-template-columns: 1.2fr 2fr 90px 1.4fr auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.haken { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.haken input { width: 22px; min-height: 22px; }
.abmelden { margin-top: 20px; }
.u-gruppe { margin: 14px 0 6px; font-weight: 700; color: var(--gruen); border-bottom: 2px solid var(--gruen-hell); padding-bottom: 4px; }
.u-zeile { display: grid; grid-template-columns: 70px 1fr 140px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.u-platz { font-weight: 700; }
.u-platz.p1 { color: #8a6512; } .u-platz.p2 { color: #5c6670; } .u-platz.p3 { color: #7a431e; }
.u-mitglieder { grid-column: 2 / -1; font-size: 13px; color: var(--leise); margin: -4px 0 6px; }
body[data-rolle="kasse"] .nur-admin, body[data-rolle="admin"] .nur-kasse { display: none; }
.hilfe li { margin-bottom: 8px; }

/* Umschalter (Altersklasse, Anmeldung) */
.umschalter { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.umschalter label { margin: 0; flex: 1; }
.umschalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.umschalter span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px;
  border: 1px solid var(--linie); border-radius: var(--radius); color: var(--text); background: #fff; font-size: 15px; cursor: pointer; }
.umschalter input:checked + span { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 600; }
.umschalter input:focus-visible + span { outline: 3px solid var(--gold); }

/* Dialog */
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(640px, 94vw); max-height: 92vh; }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg form { display: flex; flex-direction: column; max-height: 92vh; padding: 18px; }
.dlg-inhalt { overflow-y: auto; flex: 1; }
.dlg-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--linie); }
.dlg-knoepfe button { min-width: 120px; }
.mitglied { display: grid; grid-template-columns: 26px 1fr; gap: 4px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.mitglied .klassen { grid-column: 2; margin: 0; }
.mitglied .umschalter span { min-height: 44px; font-size: 14px; }
.gross-zahl { font-size: 34px; font-weight: 700; color: var(--gruen); margin: 6px 0; }

/* Anmeldung */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-karte { background: #fff; border-radius: 18px; padding: 28px; width: min(420px, 100%); text-align: center;
  border: 1px solid var(--linie); display: flex; flex-direction: column; gap: 10px; }
.login-karte img { margin: 0 auto; border-radius: 14px; }

@media (max-width: 900px) {
  .kasse { grid-template-columns: 1fr; }
  .korb { position: static; }
  .artikelzeile { grid-template-columns: 1fr 1fr; }
  .bonzeile { grid-template-columns: 1fr auto; } .bonzeile .knoepfe { grid-column: 1 / -1; }
}
