/* Kiosk-Portal — Design-System
 *
 * Leitidee: Feuerwehr-Gerätehaus. Marineblau der Einsatzkleidung, Feuerrot für
 * Aktionen, der gelb-silberne Reflexstreifen als Markenzeichen unter dem Kopf,
 * und der Einkauf als Kassenbon (Papier bleibt auch im Dunkelmodus weiß).
 * Schrift: Sofia Sans (+ Condensed) — DIN-nahe Formen wie Fahrzeugbeschriftung,
 * selbst gehostet (kein Google-Fonts-Aufruf).
 */

@font-face {
  font-family: "Sofia Sans";
  src: url("../fonts/sofia-sans-latin-wght-normal.b7a156073a42.woff2") format("woff2");
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Sans Condensed";
  src: url("../fonts/sofia-sans-condensed-latin-wght-normal.5ec7e03436cf.woff2") format("woff2");
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --grund: #eef1f5;
  --flaeche: #ffffff;
  --flaeche-2: #f4f6f9;
  --tinte: #121a26;
  --tinte-2: #46505f;
  --tinte-3: #677283;
  --linie: #d6dbe3;
  --linie-stark: #b4bcc8;
  --marine: #121a26;
  --rot: #c4112b;
  --rot-tief: #a20d22;
  --rot-flaeche: #fbe6e9;
  --gelb: #f4e91f;
  --silber: #bfc6d0;
  --gut: #17753f;
  --gut-flaeche: #e3f4ea;
  --warn: #8a5a00;
  --warn-flaeche: #fff3cf;
  --info: #1c5cab;
  --info-flaeche: #e1ecfa;
  --reihe-1: #2a78d6; /* Diagramm: Einnahmen */
  --reihe-2: #eb6834; /* Diagramm: Ausgaben */
  --papier: #ffffff;
  --papier-tinte: #121a26;
  --schatten: 0 1px 2px rgb(18 26 38 / 0.06), 0 8px 24px rgb(18 26 38 / 0.08);

  --schrift: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --schrift-eng: "Sofia Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --radius: 14px;
  --radius-klein: 10px;
  --breite: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --grund: #0e141c;
    --flaeche: #18202c;
    --flaeche-2: #1f2937;
    --tinte: #f2f5f9;
    --tinte-2: #c0c8d4;
    --tinte-3: #94a0b2;
    --linie: #2e3a4b;
    --linie-stark: #445266;
    --marine: #0a0f16;
    --rot: #d62b42;
    --rot-tief: #e5475b;
    --rot-flaeche: #401820;
    --gut: #5fd08f;
    --gut-flaeche: #12301f;
    --warn: #f2c24b;
    --warn-flaeche: #3a2e0b;
    --info: #7fb2f0;
    --info-flaeche: #142b48;
    --reihe-1: #3987e5;
    --reihe-2: #d95926;
    --schatten: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--schrift-eng);
  font-weight: 750;
  line-height: 1.1;
  margin: 0;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
}
h2 {
  font-size: 1.45rem;
}
h3 {
  font-size: 1.15rem;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  display: block;
}
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 2px;
  border-radius: 4px;
}

.nur-vorleser {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gedaempft {
  color: var(--tinte-3);
}
.klein {
  font-size: 0.875rem;
}
.ziffern {
  font-variant-numeric: tabular-nums;
}

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

.kopf {
  background: var(--marine);
  color: #fff;
}
.kopf__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--schrift-eng);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
  min-width: 0;
}
.marke__zeichen {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--rot);
  display: grid;
  place-items: center;
}
.marke__zeichen svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
.marke__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kopf__konto {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.konto-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
}
.konto-link:hover {
  background: rgb(255 255 255 / 0.1);
}
.konto-link__kreis {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.14);
  display: grid;
  place-items: center;
  font-family: var(--schrift-eng);
  font-weight: 700;
  font-size: 0.95rem;
}
@media (max-width: 560px) {
  .konto-link__name {
    display: none;
  }
  .konto-link {
    padding: 4px;
  }
}
.kopf__abmelden {
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 10px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.8;
}
.kopf__abmelden:hover {
  opacity: 1;
  background: rgb(255 255 255 / 0.1);
}

/* Reflexstreifen wie auf der Einsatzjacke: gelb – silber – gelb. */
.reflex {
  height: 9px;
  background: linear-gradient(
    to bottom,
    var(--gelb) 0 3px,
    var(--silber) 3px 6px,
    var(--gelb) 6px 9px
  );
}

/* --- Navigation ------------------------------------------------------------ */

.nav {
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.nav__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 8px;
  position: relative;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__innen::-webkit-scrollbar {
  display: none;
}
.nav__link {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  min-height: 48px;
  text-decoration: none;
  font-weight: 600;
  color: var(--tinte-2);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.nav__link:hover {
  color: var(--tinte);
}
.nav__link[aria-current="page"] {
  color: var(--tinte);
  border-bottom-color: var(--rot);
}
.nav__trenner {
  flex: none;
  width: 1px;
  margin: 12px 6px;
  background: var(--linie);
}
.zaehlmarke {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gelb);
  color: #121a26;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

/* --- Seite ----------------------------------------------------------------- */

.seite {
  flex: 1;
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.seite--schmal {
  max-width: 640px;
}
.seitenkopf {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}
.seitenkopf p {
  color: var(--tinte-2);
  margin-top: 6px;
  max-width: 60ch;
}
.seitenkopf__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.abschnitt {
  margin-top: 32px;
}
.abschnitt > h2 {
  margin-bottom: 12px;
}
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--tinte-2);
  text-decoration: none;
}
.zurueck:hover {
  color: var(--tinte);
}

.fuss {
  max-width: var(--breite);
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  color: var(--tinte-3);
  font-size: 0.85rem;
}

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

.meldungen {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.meldung {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-klein);
  background: var(--info-flaeche);
  color: var(--tinte);
  border-left: 4px solid var(--info);
  font-weight: 500;
}
.meldung--success {
  background: var(--gut-flaeche);
  border-left-color: var(--gut);
}
.meldung--error {
  background: var(--rot-flaeche);
  border-left-color: var(--rot);
}
.meldung--warning {
  background: var(--warn-flaeche);
  border-left-color: var(--warn);
}

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

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-klein);
  background: var(--rot);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s;
}
.knopf:hover {
  background: var(--rot-tief);
}
.knopf:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.knopf--hell {
  background: var(--flaeche);
  color: var(--tinte);
  border-color: var(--linie-stark);
}
.knopf--hell:hover {
  background: var(--flaeche-2);
}
.knopf--still {
  background: transparent;
  color: var(--tinte-2);
  padding: 0 12px;
}
.knopf--still:hover {
  background: var(--flaeche-2);
  color: var(--tinte);
}
.knopf--warnend {
  background: transparent;
  color: var(--rot);
  border-color: currentColor;
}
@media (prefers-color-scheme: dark) {
  .knopf--warnend {
    color: #ff8a98;
  }
}
.knopf--warnend:hover {
  background: var(--rot-flaeche);
}
.knopf--gross {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.05rem;
}
.knopf--klein {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
}
.knopf--block {
  width: 100%;
}
.knopfzeile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* --- Formulare ------------------------------------------------------------- */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 20px;
}
.karte + .karte {
  margin-top: 16px;
}
.karte > h2 {
  margin-bottom: 14px;
}

.formular {
  display: grid;
  gap: 16px;
}
.formular__zeile {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.feld label,
.feld__titel {
  display: block;
  font-weight: 650;
  margin-bottom: 6px;
}
.feld__hilfe {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--tinte-3);
}
.feld__fehler {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rot);
}
@media (prefers-color-scheme: dark) {
  .feld__fehler {
    color: #ff8a98;
  }
}
.eingabe {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--linie-stark);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--tinte);
  font: inherit;
}
.eingabe:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 0;
  border-color: var(--info);
}
.feld--fehler .eingabe {
  border-color: var(--rot);
}
input[type="file"].eingabe {
  padding: 8px;
}
.feld--haken label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
}
.haken {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--rot);
}
.fehlertext {
  margin-top: 10px;
  font-weight: 600;
  color: var(--rot);
}
@media (prefers-color-scheme: dark) {
  .fehlertext {
    color: #ff8a98;
  }
}
/* Trenner „oder“ zwischen Passwort- und Passkey-Anmeldung */
.oder {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--tinte-3);
  font-size: 0.9rem;
}
.oder::before,
.oder::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--linie);
}
/* Honeypot der Registrierung */
.feld--falle {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Auswahlkarten (Zahlart, Buchungsart) */
.wahl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding: 0;
  border: 0;
}
.wahl legend {
  font-weight: 650;
  margin-bottom: 8px;
  padding: 0;
}
.wahl__option {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1.5px solid var(--linie-stark);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  cursor: pointer;
}
.wahl__option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--rot);
}
.wahl__option strong {
  display: block;
}
.wahl__option span {
  display: block;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--tinte-2);
}
.wahl__option:has(input:checked) {
  border-color: var(--rot);
  box-shadow: inset 0 0 0 1px var(--rot);
}
.wahl__option:has(input:focus-visible) {
  outline: 3px solid var(--info);
  outline-offset: 2px;
}
/* Djangos RadioSelect rendert <div><div><label><input> Text</label></div></div> */
.wahl--django > div {
  display: contents;
}
.wahl--django > div > div label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--linie-stark);
  border-radius: var(--radius-klein);
  font-weight: 650;
  cursor: pointer;
}
.wahl--django input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--rot);
}
.wahl--django label:has(input:checked) {
  border-color: var(--rot);
  box-shadow: inset 0 0 0 1px var(--rot);
}

/* --- Anmeldung / Registrierung --------------------------------------------- */

.tor {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.tor__schild {
  background: var(--marine);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.tor__schild-innen {
  flex: 1;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}
.tor__name {
  font-family: var(--schrift-eng);
  font-weight: 850;
  font-size: clamp(2.6rem, 1.6rem + 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.tor__satz {
  color: #c0c8d4;
  max-width: 34ch;
  font-size: 1.05rem;
}
.tor__inhalt {
  padding: 28px 20px 40px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  align-self: center;
}
.tor__inhalt h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}
.tor__inhalt .formular {
  margin-top: 22px;
}
.tor__wechsel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--linie);
  color: var(--tinte-2);
}
.tor__wechsel a {
  font-weight: 700;
  color: var(--tinte);
}
@media (min-width: 900px) {
  .tor {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
  .tor__schild {
    flex-direction: row;
  }
  .tor__schild .reflex {
    order: 2;
    width: 9px;
    height: auto;
    background: linear-gradient(
      to right,
      var(--gelb) 0 3px,
      var(--silber) 3px 6px,
      var(--gelb) 6px 9px
    );
  }
  .tor__schild-innen {
    padding: 56px 48px;
  }
}

/* --- Kiosk: Produkte ------------------------------------------------------- */

.hinweis {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  color: var(--tinte-2);
  margin-bottom: 20px;
}
.hinweis--offen {
  background: var(--warn-flaeche);
  border-color: transparent;
  color: var(--tinte);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.regal + .regal {
  margin-top: 28px;
}
.regal > h2 {
  margin-bottom: 12px;
}
.produkte {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}
@media (min-width: 700px) {
  .produkte {
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  }
}
.produkt {
  display: flex;
  flex-direction: column;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.produkt.ist-gewaehlt {
  border-color: var(--rot);
  box-shadow: 0 0 0 1px var(--rot);
}
.produkt__bild {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: var(--flaeche-2);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.produkt__bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.produkt__bild:focus-visible {
  outline-offset: -3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.produkt__ersatz {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--marine);
  color: var(--gelb);
  font-family: var(--schrift-eng);
  font-weight: 850;
  font-size: 5rem;
  line-height: 1;
}
.produkt__anzahl {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--gelb);
  color: #121a26;
  font-family: var(--schrift-eng);
  font-weight: 800;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}
.produkt__text {
  padding: 10px 12px 0;
  flex: 1;
}
.produkt__text h3 {
  font-family: var(--schrift);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}
.produkt__text p {
  font-size: 0.85rem;
  color: var(--tinte-3);
  margin-top: 2px;
}
.produkt__preis {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 10px 2px;
  border-radius: 8px;
  background: #fff;
  color: #121a26;
  font-family: var(--schrift-eng);
  font-weight: 750;
  font-size: 1.3rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
}
.produkt__fuss {
  padding: 10px 12px 12px;
}
.produkt__dazu {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--linie-stark);
  border-radius: var(--radius-klein);
  background: var(--flaeche);
  color: var(--tinte);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.produkt__dazu:hover {
  background: var(--flaeche-2);
}
.zaehler {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zaehler__knopf {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--linie-stark);
  background: var(--flaeche);
  color: var(--tinte);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
}
.zaehler__knopf--plus {
  background: var(--rot);
  border-color: var(--rot);
  color: #fff;
}
.zaehler__knopf--plus:hover {
  background: var(--rot-tief);
}
.zaehler__menge {
  font-family: var(--schrift-eng);
  font-weight: 750;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}
.produkt.ist-gewaehlt .produkt__dazu,
.produkt:not(.ist-gewaehlt) .zaehler {
  display: none;
}

.leer {
  text-align: center;
  padding: 48px 20px;
  background: var(--flaeche);
  border: 1px dashed var(--linie-stark);
  border-radius: var(--radius);
  color: var(--tinte-2);
}
.leer h2 {
  margin-bottom: 8px;
  color: var(--tinte);
}
.leer .knopf {
  margin-top: 16px;
}

/* Bon-Leiste unten */
.bonleiste-platz {
  height: 96px;
}
.bonleiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--marine);
  color: #fff;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgb(0 0 0 / 0.18);
}
.bonleiste__innen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 10px 16px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bonleiste__stand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.bonleiste__summe {
  font-family: var(--schrift-eng);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bonleiste__text {
  color: #c0c8d4;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kassen-Dialog */
.dialog {
  width: min(480px, 100%);
  max-width: 100%;
  max-height: 92dvh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--grund);
  color: var(--tinte);
  box-shadow: var(--schatten);
  overflow: auto;
}
.dialog::backdrop {
  background: rgb(10 15 22 / 0.6);
}
.dialog__innen {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.dialog__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 560px) {
  .dialog {
    margin: auto 0 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] {
    animation: dialog-auf 0.18s ease-out;
  }
  @keyframes dialog-auf {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }
}

/* --- Bon (Kassenzettel) ----------------------------------------------------- */

.bon-huelle {
  filter: drop-shadow(0 2px 3px rgb(18 26 38 / 0.14));
}
.bon {
  background: var(--papier);
  color: var(--papier-tinte);
  padding: 18px 18px 30px;
  /* Abrisskante unten */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px
    100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.bon__kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px dashed #b4bcc8;
  font-family: var(--schrift-eng);
  font-weight: 750;
  font-size: 1.2rem;
}
.bon__kopf small {
  font-family: var(--schrift);
  font-weight: 500;
  font-size: 0.85rem;
  color: #46505f;
}
.bon__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.bon__zeile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.bon__menge {
  flex: none;
  min-width: 2.2em;
  font-weight: 700;
}
.bon__name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bon__punkte {
  flex: 1;
  min-width: 12px;
  border-bottom: 2px dotted #b4bcc8;
  transform: translateY(-4px);
}
.bon__betrag {
  flex: none;
  white-space: nowrap;
}
.bon__summe {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px dashed #b4bcc8;
  font-family: var(--schrift-eng);
  font-weight: 800;
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
}
.bon__summe span:first-child {
  font-size: 1.2rem;
}
.bon__fuss {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #46505f;
}

/* --- Kauf-Seite ------------------------------------------------------------ */

.kauf {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (min-width: 860px) {
  .kauf {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}
.zahlen h2 {
  font-size: 1.7rem;
}
.zahlen__betrag {
  font-family: var(--schrift-eng);
  font-weight: 850;
  font-size: clamp(3rem, 2rem + 6vw, 4.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 14px;
}
.zahlen__weg {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 560px) {
  .zahlen__weg {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
  }
}
.qr {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: var(--radius-klein);
  padding: 6px;
  width: 220px;
  max-width: 100%;
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.schritte {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 8px;
  color: var(--tinte-2);
}
.schritte strong {
  color: var(--tinte);
}
.zahlen__ende {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--linie);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.zahlen__ende form {
  display: contents;
}

/* --- Status ---------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--flaeche-2);
  color: var(--tinte-2);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status--offen {
  background: var(--warn-flaeche);
  color: var(--warn);
}
.status--gemeldet {
  background: var(--info-flaeche);
  color: var(--info);
}
.status--bezahlt {
  background: var(--gut-flaeche);
  color: var(--gut);
}
.status--storniert::before {
  border-radius: 1px;
  height: 2px;
  width: 10px;
}
.etikett {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--linie-stark);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tinte-2);
  white-space: nowrap;
}

/* --- Listen ---------------------------------------------------------------- */

.liste {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
}
.liste__zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 16px;
}
.liste__zeile + .liste__zeile {
  border-top: 1px solid var(--linie);
}
.liste__haupt {
  flex: 1 1 240px;
  min-width: 0;
}
.liste__titel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-weight: 700;
}
.liste__titel a {
  text-decoration: none;
}
.liste__titel a:hover {
  text-decoration: underline;
}
.liste__unter {
  color: var(--tinte-2);
  font-size: 0.925rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.liste__betrag {
  font-family: var(--schrift-eng);
  font-weight: 750;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}
.liste__betrag--minus {
  color: var(--tinte-2);
}
.liste__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.liste__aktionen form {
  display: contents;
}
.liste__zeile.ist-inaktiv .liste__haupt,
.liste__zeile.ist-inaktiv .daumen {
  opacity: 0.55;
}
.daumen {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--marine);
  color: var(--gelb);
  display: grid;
  place-items: center;
  font-family: var(--schrift-eng);
  font-weight: 850;
  font-size: 1.6rem;
}
.daumen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filterzeile {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 16px;
}
.reiter {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 12px;
}
.reiter a {
  padding: 0 14px;
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
  color: var(--tinte-2);
  white-space: nowrap;
}
.reiter a[aria-current="true"] {
  background: var(--marine);
  color: #fff;
}
.suche {
  display: flex;
  gap: 8px;
  flex: 1 1 220px;
  max-width: 360px;
}
.suche .eingabe {
  min-height: 46px;
}
.filterzeile select.eingabe {
  width: auto;
}
.filterzeile__rechts {
  margin-left: auto;
}

.blaettern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--tinte-2);
}

/* --- Kasse ----------------------------------------------------------------- */

.kennzahlen {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.kennzahl {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kennzahl__titel {
  font-weight: 650;
  color: var(--tinte-2);
}
.kennzahl__wert {
  font-family: var(--schrift-eng);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  white-space: nowrap;
}
.kennzahl__zusatz {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--tinte-3);
}
.kennzahl--haupt {
  background: var(--marine);
  border-color: var(--marine);
  color: #fff;
}
.kennzahl--haupt .kennzahl__titel,
.kennzahl--haupt .kennzahl__zusatz {
  color: #c0c8d4;
}

.kasse-raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.kasse-raster > .karte {
  margin-top: 0;
}
@media (min-width: 900px) {
  .kasse-raster {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.diagramm {
  position: relative;
}
.diagramm__kopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.legende {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--tinte-2);
}
.legende li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legende i,
.tipp i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.farbe-1 {
  background: var(--reihe-1);
  fill: var(--reihe-1);
}
.farbe-2 {
  background: var(--reihe-2);
  fill: var(--reihe-2);
}
.diagramm svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
/* Zwei Zeichnungen derselben Daten: breit ab 640 px, sonst die Handy-Variante. */
.diagramm svg.diagramm__svg--breit {
  display: none;
}
@media (min-width: 640px) {
  .diagramm svg.diagramm__svg--breit {
    display: block;
  }
  .diagramm svg.diagramm__svg--schmal {
    display: none;
  }
}
.diagramm__gitter {
  stroke: var(--linie);
  stroke-width: 1;
}
.diagramm__achse {
  fill: var(--tinte-3);
  font-family: var(--schrift);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.diagramm__treffer {
  fill: transparent;
  cursor: default;
  outline: none;
}
.diagramm__gruppe:hover .diagramm__treffer,
.diagramm__gruppe:focus-within .diagramm__treffer {
  fill: var(--tinte);
  fill-opacity: 0.06;
}
.tipp {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--flaeche);
  border: 1px solid var(--linie-stark);
  box-shadow: var(--schatten);
  font-size: 0.875rem;
}
.tipp__titel {
  font-weight: 700;
  margin-bottom: 4px;
}
.tipp__zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tinte-2);
}
.tipp__zeile strong {
  margin-left: auto;
  padding-left: 12px;
  color: var(--tinte);
  font-variant-numeric: tabular-nums;
}
.tipp i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.aufklapp {
  margin-top: 12px;
}
.aufklapp summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--tinte-2);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabelle-huelle {
  overflow-x: auto;
}
.tabelle {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.tabelle th,
.tabelle td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--linie);
  white-space: nowrap;
}
.tabelle th:first-child,
.tabelle td:first-child {
  text-align: left;
}
.tabelle thead th {
  font-size: 0.875rem;
  color: var(--tinte-2);
  font-weight: 650;
}
.tabelle tfoot td {
  font-weight: 750;
  border-bottom: 0;
}

.rangliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.rangliste li {
  display: grid;
  gap: 4px;
}
.rangliste__kopf {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}
.rangliste__kopf span:last-child {
  color: var(--tinte-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rangliste__balken {
  height: 8px;
  border-radius: 0 4px 4px 0;
  background: var(--reihe-1);
  min-width: 4px;
}

/* --- Sonstiges ------------------------------------------------------------- */

.kopierfeld {
  display: flex;
  gap: 8px;
}
.kopierfeld .eingabe {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}
.bildvorschau {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-klein);
  object-fit: cover;
  border: 1px solid var(--linie);
  margin-bottom: 10px;
}
.fehlerseite {
  text-align: center;
  padding: 64px 20px;
}
.fehlerseite__zahl {
  font-family: var(--schrift-eng);
  font-weight: 850;
  font-size: 6rem;
  line-height: 1;
  color: var(--rot);
}
.fehlerseite p {
  margin: 8px auto 20px;
  max-width: 44ch;
  color: var(--tinte-2);
}

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