/* Schwed Tools – mobil zuerst, große Bedienelemente */
:root {
  --bg: #f3f5f7; --card: #fff; --text: #1b2733; --muted: #5d6b78; --line: #dde3e8;
  --primary: #1f6f50; --primary-dark: #17573f; --primary-soft: #e3f2ea;
  --warn-bg: #fff4d6; --warn: #7a5600; --err-bg: #fde7e7; --err: #a12828; --ok-bg: #e3f2ea; --ok: #1f6f50;
  --radius: 14px; --tap: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 18px; line-height: 1.45; background: var(--bg); color: var(--text); }
a { color: var(--primary); }
.kopf { background: var(--primary); color: #fff; padding: .7rem 1rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.kopf .marke { font-weight: 700; font-size: 1.15rem; color: #fff; text-decoration: none; margin-right: auto; }
.kopf .wer { font-size: .9rem; opacity: .9; }
.kopf form { margin: 0; }
.kopf button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 10px; padding: .35rem .8rem; font-size: .95rem; min-height: 40px; cursor: pointer; }
nav.menue { background: #fff; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
nav.menue a { padding: .85rem 1rem; white-space: nowrap; text-decoration: none; color: var(--text); font-weight: 500; border-bottom: 3px solid transparent; }
nav.menue a.aktiv { border-bottom-color: var(--primary); color: var(--primary); }
main { max-width: 760px; margin: 0 auto; padding: 1rem; }
main.breit { max-width: 1100px; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.karte { background: var(--card); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.leise { color: var(--muted); font-size: .92rem; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); padding: .6rem 1.2rem; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--primary-dark); }
.btn.zweit { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn.gefahr { background: var(--err); }
.btn.klein { min-height: 42px; padding: .35rem .9rem; font-size: .95rem; }
.btn.voll { width: 100%; }
.kacheln { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .kacheln { grid-template-columns: 1fr 1fr; } }
.kachel { display: block; background: var(--card); border-radius: var(--radius); padding: 1.4rem 1.2rem; text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 2px solid transparent; }
.kachel:hover { border-color: var(--primary); }
.kachel .symbol { font-size: 2.2rem; line-height: 1; }
.kachel strong { display: block; font-size: 1.25rem; margin: .5rem 0 .2rem; color: var(--primary); }
.meldung { padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.meldung.success { background: var(--ok-bg); color: var(--ok); }
.meldung.warning, .meldung.hinweis { background: var(--warn-bg); color: var(--warn); }
.meldung.error { background: var(--err-bg); color: var(--err); }
.meldung.info { background: #e6f0fb; color: #1d4f86; }
form p { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=time], input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: .6rem .8rem; font-size: 1.1rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: 1.4rem; height: 1.4rem; vertical-align: middle; margin-right: .4rem; }
.feld-check label { display: inline; font-weight: 500; }
.hilfe { display: block; color: var(--muted); font-size: .88rem; margin-top: .25rem; font-weight: 400; }
.fehler { color: var(--err); font-size: .92rem; margin-top: .25rem; }
ul.errorlist { list-style: none; padding: 0; margin: .25rem 0; color: var(--err); font-size: .92rem; }
ul.radio, div.radio-liste { list-style: none; padding: 0; margin: 0; }
div.radio-liste label, ul.radio label { font-weight: 500; padding: .4rem 0; }
.knopfreihe { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
/* Bestellformular */
.menge { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.menge:last-child { border-bottom: 0; }
.menge .art { font-weight: 600; flex: 1; }
.zaehler { display: flex; align-items: center; gap: .35rem; }
.zaehler button { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 1.5rem; font-weight: 700; color: var(--primary); cursor: pointer; touch-action: manipulation; }
.zaehler input { width: 4.5rem; text-align: center; font-size: 1.3rem; font-weight: 700; padding: .4rem; }
.summe-zeile { display: flex; justify-content: space-between; font-weight: 700; padding-top: .6rem; }
.klebend { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0 .5rem; }
/* Tabellen */
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.etikett { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--text); }
.etikett.ok { background: var(--ok-bg); color: var(--ok); }
.etikett.warn { background: var(--warn-bg); color: var(--warn); }
.etikett.aus { background: #eceff2; color: var(--muted); }
.zahlen { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.zahlen span { background: var(--primary-soft); border-radius: 10px; padding: .2rem .6rem; font-size: .95rem; }
.zahlen b { font-variant-numeric: tabular-nums; }
.gross { font-size: 2rem; font-weight: 800; color: var(--primary); }
.tagwahl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tagwahl input { width: auto; min-width: 11rem; }
.zeile-bearbeiten { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 2.2rem; letter-spacing: .3em; font-weight: 700; }
.zettel { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; }
.zettel dt { color: var(--muted); font-size: .9rem; margin-top: .8rem; }
.zettel dd { margin: 0; font-size: 1.3rem; font-weight: 700; }
.fuss { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }
@media print {
  .kopf, nav.menue, .nicht-drucken, .meldung, .fuss { display: none !important; }
  body { background: #fff; }
  .zettel { border: 1px solid #999; }
}
.zettel-qr { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.zettel-qr .qr svg { width: 220px; height: 220px; display: block; }
.code { letter-spacing: .15em; }
@media print { .zettel { max-width: 18cm; } .zettel-qr .qr svg { width: 6cm; height: 6cm; } }

/* Küchenliste */
table.kueche th, table.kueche td { padding: .4rem .55rem; }
table.kueche tr.tourkopf td { background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; font-size: 1rem; padding-top: .6rem; }
table.kueche tr.toursumme td { font-weight: 700; border-bottom: 2px solid var(--text); background: #fafbfc; }
table.kueche tr.gesamt td { font-size: 1.1rem; background: #eef1f4; }
table.kueche tr.offen td { color: var(--muted); }
.nur-druck { display: none; }
@media print {
  body.druck-kueche main > *:not(#kueche) { display: none !important; }
  body.druck-kueche .nur-druck { display: inline; }
  body.druck-kueche main { max-width: none; padding: 0; }
  body.druck-kueche .karte { box-shadow: none; padding: 0; }
  body.druck-kueche table.kueche { font-size: 11pt; }
  body.druck-kueche table.kueche td, body.druck-kueche table.kueche th { border: 1px solid #999; padding: 2px 5px; }
  body.druck-kueche table.kueche tbody { break-inside: avoid; }
  body.druck-kueche table.kueche tr.tourkopf td { background: #e6e6e6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 portrait; margin: 12mm; }
}
.tourform { display: grid; gap: 0 .8rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: .5rem; }
.tourform p { margin: 0 0 .6rem; }
.tourform p.breit2 { grid-column: span 2; }
.tourform p.ganzzeile { grid-column: 1 / -1; border-top: 1px dashed #d8d2ca; padding-top: .5rem; }
@media (max-width: 420px) { .tourform p.breit2 { grid-column: 1 / -1; } }
main.ganzbreit { max-width: 1900px; }
.unterreiter { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.unterreiter a { padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.unterreiter a.aktiv { background: var(--primary); border-color: var(--primary); color: #fff; }
.gericht-zeile { display: flex; gap: .8rem; align-items: center; padding: .65rem 1rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.gericht-zeile:first-child { border-top: 0; }
.gericht-zeile:hover { background: #f7faf8; }
.gericht-zeile.aus { opacity: .5; }
.gericht-zeile .sym { font-size: 1.5rem; }
.gericht-zeile .txt { flex: 1; }
.gericht-zeile .kurz { font-size: .8rem; color: var(--muted); font-weight: 700; text-align: right; }
div.radio-liste { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
/* Speiseplan für Einrichtungen */
details.woche { background: #fff; border-radius: var(--radius); margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
details.woche > summary { padding: .9rem 1.1rem; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.sp-tag { border-top: 1px solid var(--line); padding: .8rem 1.1rem; }
.sp-tag.heute { background: var(--primary-soft); }
.sp-kopf { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.sp-kopf span { color: var(--muted); font-size: .9rem; }
.sp-haupt { display: flex; gap: .7rem; align-items: flex-start; }
.sp-haupt .sym { font-size: 1.8rem; line-height: 1; }
.sp-haupt b { font-size: 1.1rem; }
.sp-alt { margin-top: .6rem; background: #f3f8ef; border-radius: 12px; padding: .5rem .7rem; font-size: .95rem; }
.sp-alt small, .sp-nach small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #3f6b1f; }
.sp-nach { margin-top: .5rem; font-size: .95rem; }
.sp-nach small { color: var(--muted); }
.sp-zu { color: var(--err); font-weight: 700; padding: .3rem 0; }
.sp-allergene { margin-top: .5rem; font-size: .88rem; color: var(--muted); }
.sp-allergene summary { color: var(--primary); cursor: pointer; font-weight: 600; }

/* Aufklappbare Bereiche (Bestellübersicht) */
details.klapp { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .8rem; }
details.klapp > summary { list-style: none; cursor: pointer; padding: .95rem 1.1rem; font-weight: 700; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 54px; }
details.klapp > summary::-webkit-details-marker { display: none; }
details.klapp > summary::after { content: "▾"; color: var(--muted); font-size: 1.1rem; transition: transform .15s; margin-left: .4rem; }
details.klapp[open] > summary::after { transform: rotate(180deg); }
details.klapp > summary > span:first-child { flex: 1; }
.klapp-info { font-weight: 500; font-size: .9rem; color: var(--muted); }
.klapp-inhalt { padding: 0 1rem 1rem; }
.klapp-inhalt .karte:last-child { margin-bottom: 0; }
@media print { details.klapp { border: 0; } details.klapp > summary::after { display: none; } }

/* Benutzer */
.zugang-neu { border: 2px solid var(--primary); }
.zugang-daten { background: #f6f8f9; border-radius: 10px; padding: .7rem .9rem; line-height: 1.7; }
.zugang-daten .code { font-size: 1.25rem; letter-spacing: .06em; font-family: ui-monospace, Menlo, monospace; }
.karte.gesperrt { opacity: .6; }

.wer-link { color: inherit; text-decoration: none; }
.wer-link:hover { text-decoration: underline; }

/* Einrichtungen: Suche und Status */
.einr-werkzeug { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.einr-werkzeug input[type=search] { width: 260px; max-width: 100%; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .9rem; font-size: 1rem; }
@media (max-width: 640px) { .einr-werkzeug { width: 100%; } .einr-werkzeug input[type=search] { flex: 1; width: auto; } }
.etikett.aktiv { background: #dbeafe; color: #1d4ed8; }
.karte.blink { box-shadow: 0 0 0 3px var(--primary); transition: box-shadow .2s; }
