/* HERDRiCH Verkauf – Gestaltung nach dem HERDRiCH Designsystem */

@font-face { font-family: "Barlow"; font-weight: 300; font-style: normal; font-display: swap; src: url("/schrift/barlow-300.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/schrift/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/schrift/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/schrift/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("/schrift/barlow-700.woff2") format("woff2"); }

:root {
  --rot: #D52625;
  --rot-dunkel: #B31F1D;
  --anthrazit: #2B2D30;
  --grau-text: #5F6368;
  --hell-auf-dunkel: #DCDEE1;
  --grau-auf-dunkel: #A9ACB0;
  --linie: #DFE1E4;
  --stahl: #F1F2F3;
  --weiss: #FFFFFF;
  --schrift: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --rand: 16px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--weiss);
  color: var(--anthrazit);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.5;
}

:focus-visible { outline: 3px solid var(--rot); outline-offset: 3px; }

a { color: var(--rot-dunkel); }

.klein-i { text-transform: none; }

/* --- Obere Leiste --------------------------------------------------------- */
.leiste {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--rand);
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--anthrazit);
  border-bottom: 4px solid var(--rot);
}
.leiste__logo { display: block; height: 30px; width: auto; }
.leiste__knopf {
  appearance: none;
  background: transparent;
  color: var(--weiss);
  border: 2px solid rgba(255, 255, 255, 0.55);
  font: 600 13px/1 var(--schrift);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
}
.leiste__knopf:active { border-color: var(--weiss); }

/* --- Inhalt --------------------------------------------------------------- */
.inhalt {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--rand) calc(32px + env(safe-area-inset-bottom));
}

.abschnitt + .abschnitt { margin-top: 36px; }

.ueberzeile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--rot);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ueberzeile::before {
  content: "";
  flex: 0 0 34px;
  height: 12px;
  background: repeating-linear-gradient(-55deg, var(--rot) 0 10px, transparent 10px 18px);
}

h1, h2 {
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
h1 { font-size: 30px; }
h2 { font-size: 24px; }

.einleitung { margin: 0 0 24px; color: var(--grau-text); font-size: 18px; font-weight: 300; }

/* --- Knöpfe --------------------------------------------------------------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 28px;
  border: 2px solid var(--rot);
  background: var(--rot);
  color: var(--weiss);
  font: 600 16px/1.2 var(--schrift);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.knopf:active { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.knopf[disabled] { opacity: 0.6; cursor: progress; }
.knopf--breit { width: 100%; }
.knopf--neben { background: var(--weiss); color: var(--anthrazit); border-color: var(--anthrazit); }
.knopf--neben:active { background: var(--stahl); }

/* --- Hinweise ------------------------------------------------------------- */
.meldung {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--linie);
  border-left: 4px solid var(--rot);
  background: var(--stahl);
}
.meldung:empty { display: none; }
.hinweis { color: var(--grau-text); font-size: 15px; }

.laden { display: flex; align-items: center; gap: 10px; color: var(--grau-text); padding: 16px 0; }
.laden::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid var(--linie);
  border-top-color: var(--rot);
  animation: drehen 0.8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .laden::before { animation: none; } }

/* --- Belegliste ----------------------------------------------------------- */
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.beleg {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--linie);
  color: inherit;
  text-decoration: none;
}
.beleg__nummer { font-weight: 600; font-variant-numeric: tabular-nums; }
.beleg__betrag { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.beleg__kunde { grid-column: 1 / -1; overflow-wrap: anywhere; }
.beleg__neben { color: var(--grau-text); font-size: 15px; font-variant-numeric: tabular-nums; }
.beleg__status { justify-self: end; }

.etikett {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--anthrazit);
  color: var(--anthrazit);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.etikett--offen { border-color: var(--rot-dunkel); color: var(--rot-dunkel); }

/* --- Anmeldeseiten -------------------------------------------------------- */
.karte {
  margin-top: 8px;
  padding: 24px 20px;
  background: var(--weiss);
  border: 1px solid var(--linie);
}
