:root {
  --rot: #e32c31;
  --graphit: #414141;
  --silber: #b9b9b9;
  --hell: #f5f5f4;
  --gruen: #1f7a3f;
  --gelb: #9a6700;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--graphit); background: var(--hell); }
a { color: var(--rot); }
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }

.kopf { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: .6rem 1.5rem; background: #fff; border-bottom: 3px solid var(--rot); }
.marke { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--graphit); font-weight: 600; }
.marke img { height: 40px; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.kopf nav a { color: var(--graphit); text-decoration: none; }
.kopf nav a:hover { color: var(--rot); }
.kopf nav form { margin: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.fuss { text-align: center; color: #888; font-size: .8rem; padding: 2rem 1rem; }

.karte { background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; }
.schmal { max-width: 480px; margin: 2rem auto; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.titelzeile { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.leise { color: #777; }
.leer { padding: 3rem; text-align: center; color: #777; background: #fff; border-radius: 8px; }
address { font-style: normal; font-size: 1.05rem; line-height: 1.6; margin-bottom: .75rem; }

label { display: block; margin-bottom: .9rem; font-weight: 600; }
label small { font-weight: 400; color: #777; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem; font: inherit; border: 1px solid var(--silber); border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rot); outline-offset: 0; border-color: var(--rot); }
fieldset { border: 1px solid #e3e3e3; border-radius: 6px; margin: 0 0 1rem; padding: 1rem; }
legend { font-weight: 600; padding: 0 .3rem; }
button, .knopf { display: inline-block; padding: .6rem 1.1rem; font: inherit; font-weight: 600; color: #fff; background: var(--rot); border: 0; border-radius: 6px; cursor: pointer; text-decoration: none; }
button:hover, .knopf:hover { filter: brightness(.92); }
button.warnung { background: var(--graphit); }
button.link { background: none; color: var(--graphit); padding: 0; font-weight: 400; text-decoration: underline; }
form.inline { display: flex; gap: .4rem; align-items: center; }
form.inline input { margin: 0; width: 10rem; }
details.nicht-lieferbar { margin-top: 1.25rem; border-top: 1px solid #eee; padding-top: 1rem; }
details summary { cursor: pointer; color: #777; margin-bottom: .75rem; }
.grund { background: var(--hell); padding: .75rem; border-radius: 6px; }

.meldung { padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1.25rem; background: #e7f4ec; color: var(--gruen); border: 1px solid #b8dcc4; }
.meldung.fehler { background: #fdecec; color: #a3191d; border-color: #f3b9bb; }

.reiter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.reiter > a { padding: .5rem .9rem; border-radius: 6px; text-decoration: none; color: var(--graphit); background: #fff; border: 1px solid #e3e3e3; }
.reiter > a.aktiv { background: var(--graphit); color: #fff; border-color: var(--graphit); }
.reiter .zahl { display: inline-block; min-width: 1.5em; margin-left: .3rem; padding: 0 .35rem; border-radius: 10px; background: var(--hell); color: var(--graphit); text-align: center; font-size: .85em; }
.suche { display: flex; gap: .4rem; margin-left: auto; }
.suche input, .suche select { margin: 0; width: auto; min-width: 14rem; }

table.liste { width: 100%; border-collapse: collapse; background: #fff; }
.liste th, .liste td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #eee; vertical-align: top; }
.liste th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #777; background: #fafafa; }
.liste tbody tr:hover { background: #fcf6f6; }
.zahl { text-align: right !important; }
.status { display: inline-block; padding: .15rem .6rem; border-radius: 12px; font-size: .85rem; font-weight: 600; }
.status.offen { background: #fff4d6; color: var(--gelb); }
.status.versendet { background: #e7f4ec; color: var(--gruen); }
.status.nicht_lieferbar { background: #fdecec; color: #a3191d; }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { padding: .3rem 0; border-bottom: 1px dashed #eee; }

/* ---------- delivery note, A4 (DIN 5008 form B address field) ---------- */
.lieferschein-seite { background: #888; }
.leiste { display: flex; gap: 1rem; align-items: center; padding: .75rem 1.5rem; background: var(--graphit); color: #fff; }
.lieferschein { position: relative; width: 210mm; min-height: 297mm; margin: 1.5rem auto; padding: 105mm 20mm 30mm 25mm; background: #fff; color: #000; font-size: 10pt; line-height: 1.4; }
.ls-logo { position: absolute; top: 15mm; right: 20mm; width: 42mm; }
.ls-absender { position: absolute; top: 46mm; left: 25mm; width: 85mm; font-size: 6.5pt; line-height: 1.25; color: #444; border-bottom: .2mm solid #999; padding-bottom: .5mm; }
.ls-empfaenger { position: absolute; top: 54mm; left: 25mm; width: 85mm; font-size: 11pt; line-height: 1.35; font-style: normal; }
.ls-info { position: absolute; top: 54mm; right: 20mm; border-collapse: collapse; font-size: 9pt; }
.ls-info th { text-align: left; font-weight: 400; color: #555; padding: .4mm 4mm .4mm 0; }
.ls-info td { text-align: right; font-weight: 600; }
.lieferschein h1 { font-size: 15pt; margin: 0 0 6mm; color: #000; }
.ls-positionen { width: 100%; border-collapse: collapse; }
.ls-positionen th { text-align: left; font-size: 8.5pt; border-bottom: .4mm solid #000; padding: 1.5mm 2mm 1.5mm 0; }
.ls-positionen td { border-bottom: .2mm solid #ccc; padding: 2mm 2mm 2mm 0; vertical-align: top; }
.ls-dank { margin-top: 10mm; }
.ls-fuss { position: absolute; bottom: 12mm; left: 25mm; right: 20mm; border-top: .2mm solid #999; padding-top: 2mm; font-size: 7.5pt; color: #555; text-align: center; }

@media print {
  @page { size: A4; margin: 0; }
  body, .lieferschein-seite { background: #fff; }
  .nur-bildschirm, .kopf, .fuss { display: none !important; }
  .lieferschein { margin: 0; box-shadow: none; }
}
@media (max-width: 700px) {
  .suche { margin-left: 0; width: 100%; }
  .suche input { min-width: 0; flex: 1; }
  main { padding: 1rem; }
}
