/* Vereinsfarben aus ~/DgB/Corporate Design/Farben.txt — Grundlage wie die PR-Seite */
:root {
  --rot: #8a1812; --blau: #29235c; --gruen: #076633; --hell: #e5e5e5; --grau: #7c7c7c;
  --grund: #f6f5f2; --karte: #fff; --text: #1e1d2b;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.35rem; margin: 0 0 8px; color: var(--blau); }
h2 { font-size: 1.05rem; margin: 20px 0 8px; color: var(--blau); }

.kopf { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff;
  border-bottom: 4px solid var(--rot); position: sticky; top: 0; z-index: 5; }
.kopf-logo { height: 34px; }
.kopf-titel { font-weight: 700; color: var(--blau); font-size: 1.1rem; }
.kopf-ich { margin-left: auto; font-size: .85rem; color: var(--grau); text-align: right; }
.leise-link { color: var(--blau); margin-left: 8px; }

.karte { background: var(--karte); border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 14px; }
.karte { scroll-margin-top: 72px; }   /* nicht unter die feste Kopfzeile scrollen */
.schmal { max-width: 380px; margin: 40px auto; }
label { display: block; margin: 0 0 12px; font-weight: 600; font-size: .92rem; }
/* 16 px in Feldern, sonst zoomt iOS beim Antippen */
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-size: 16px;
  border: 1px solid #c9c8d0; border-radius: 8px; background: #fff; min-width: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--hell); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px 0; min-width: 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--blau); padding: 4px 0; }
details[open] > summary { margin-bottom: 10px; }
.zeile2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button { font: inherit; border-radius: 8px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent; }
button.haupt { background: var(--blau); color: #fff; font-weight: 600; }
button.haupt:disabled { background: var(--grau); cursor: default; }
button.leise, a.knopf-link.leise { background: transparent; border: 1px solid #c9c8d0; color: var(--blau); }
button.weg { background: transparent; color: var(--rot); padding: 8px 10px; margin-right: auto; }
button.gross { width: 100%; padding: 16px; font-size: 1.1rem; }
a.knopf-link { display: inline-block; text-align: center; text-decoration: none; border-radius: 8px; padding: 10px 16px; }
a.knopf-link.haupt { display: block; background: var(--blau); color: #fff; font-weight: 600; }
a.knopf-link.gross { padding: 16px; font-size: 1.1rem; }
.knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.leiste select { flex: 1 1 220px; margin: 0; }
.leiste h2 { flex: 1; }

.fehler { color: var(--rot); font-weight: 600; margin: 4px 0; }
.fehler:empty { display: none; }
.rot { color: var(--rot); }
.hinweis { color: var(--grau); margin: 4px 0 10px; font-size: .92rem; }
.klein { color: var(--grau); font-size: .85rem; }
.status { background: #fff7d6; border-left: 4px solid #e0b100; padding: 8px 12px; border-radius: 6px; margin: 8px 0 12px; font-size: .92rem; }

.meldung { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--gruen); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: calc(100% - 32px); z-index: 10; }
.meldung.fehler-meldung { background: var(--rot); }

/* Summen für die Metzgerei */
.gerichte-text { margin: 0 0 12px; }
.summen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.summen > div { background: var(--grund); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; }
.summen .zahl { font-size: 1.8rem; font-weight: 700; color: var(--blau); line-height: 1.1; }
.summen .gesamt { background: var(--blau); color: #fff; }
.summen .gesamt .zahl, .summen .gesamt .klein { color: #fff; }

.liste { list-style: none; padding: 0; margin: 0 0 14px; }
.liste li { background: #fff; border-radius: 8px; padding: 12px 14px; margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.bestellungen li[data-bestellung] { cursor: pointer; }
.liste li.leer { color: var(--grau); }
.liste .rechts { text-align: right; }
label.haken { display: flex; gap: 10px; align-items: center; font-weight: 400; }
label.haken input { width: 22px; height: 22px; margin: 0; flex: none; }
.zu-bestaetigen { border-left: 5px solid #e0b100; }
.marke { color: #8a6a00; }
.grundlage { margin-bottom: 12px; }
.grundlage p.klein { margin: 0 0 4px; }

/* Vorschläge aus Mail und WhatsApp */
.vorschlag { border-left: 5px solid #e0b100; }
.vorschlag-kopf { margin-bottom: 6px; }
.original { margin: 0 0 10px; padding: 8px 12px; background: var(--grund); border-radius: 6px; font-size: .92rem;
  max-height: 14em; overflow: auto; overflow-wrap: anywhere; }
.erkannt { margin: 0 0 8px; }
.antwort { border-left: 5px solid var(--gruen); }
.gerichte-eingabe { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 1fr; gap: 6px 10px; align-items: center; margin-bottom: 12px; }
.gerichte-eingabe input { margin: 0; }
.gerichte-eingabe > span:not(.klein) { font-weight: 600; font-size: .92rem; }

/* Kasse */
.muenze { display: grid; grid-template-columns: 1fr 5.5em; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 400; }
.muenze input { margin: 0; padding: 6px 8px; text-align: right; }
.rechnung { width: 100%; border-collapse: collapse; margin: 10px 0; }
.rechnung td { padding: 6px 4px; border-bottom: 1px solid var(--hell); }
.rechnung td:last-child { text-align: right; }
.rechnung .fett td { font-weight: 700; }
.mail-entwurf { margin-top: 10px; }

@media (max-width: 560px) {
  .summen { grid-template-columns: 1fr 1fr; }
  .zeile2 { grid-template-columns: 1fr; gap: 0; }
  .kasse-zaehlung { gap: 0; }
  main { padding: 12px; }
}

/* Druckübersicht für den Mittagstisch-Tag */
.druck main { max-width: 900px; }
.druck h1 { color: #000; font-size: 1.6rem; }
.druck-summen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.druck-summen > div { border: 2px solid #000; border-radius: 6px; padding: 8px 10px; font-size: 1.05rem; }
.druck-summen .zahl { font-size: 2rem; font-weight: 700; }
.druck-summen .gesamt { background: #eee; }
.druck-hinweis { margin: 0 0 8px; font-size: .9rem; }
.druck-liste { width: 100%; border-collapse: collapse; font-size: 1.05rem; background: #fff; }
.druck-liste th, .druck-liste td { border: 1px solid #555; padding: 6px 8px; text-align: left; vertical-align: top; }
.druck-liste th { background: #eee; font-size: .85rem; }
.druck-liste .zahl { text-align: center; font-weight: 700; width: 4.5em; }
.druck-liste th.zahl { font-weight: 600; overflow-wrap: anywhere; }
.druck-liste .kasten { width: 2.4em; text-align: center; font-size: 1.3rem; }
.druck-liste tbody tr:nth-child(even) { background: #f6f6f6; }
.druck .fuss { font-size: .8rem; color: #555; margin-top: 10px; }
@media (max-width: 560px) {
  .druck-summen { grid-template-columns: 1fr 1fr; }
  .druck-liste { font-size: .9rem; }
  .druck-liste th, .druck-liste td { padding: 4px; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  .druck main { max-width: none; padding: 0; }
  .druck-liste tr { break-inside: avoid; }
  .druck-liste thead { display: table-header-group; }   /* Kopf auf jeder Seite wiederholen */
  .druck-liste tbody tr:nth-child(even) { background: #f6f6f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Eigenbeleg zum Drucken */
.beleg main { max-width: 720px; }
.eigenbeleg { background: #fff; padding: 24px; border: 1px solid #999; }
.eigenbeleg h1 { color: #000; font-size: 1.6rem; }
.eigenbeleg table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.eigenbeleg th, .eigenbeleg td { border: 1px solid #999; padding: 8px; text-align: left; vertical-align: top; }
.eigenbeleg th { width: 9em; font-weight: 600; background: #f3f3f3; }
.eigenbeleg .betrag { font-weight: 700; font-size: 1.2rem; }
.unterschriften { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.unterschriften .name { margin: 24px 0 0; min-height: 1.4em; }
.unterschriften .linie { border-top: 1px solid #000; margin: 2px 0 0; font-size: .8rem; }
.eigenbeleg .fuss { margin-top: 24px; font-size: .8rem; color: #555; }
@media print {
  .nicht-drucken { display: none; }
  body { background: #fff; }
  .eigenbeleg { border: 0; padding: 0; }
}
