/* GastroControl — ein Stylesheet. Regeln des Benutzers: keine graue Schrift, Tabellen schwarz und groß.
   Breiten: Telefon ≤ 767 px · Tablet 768–1199 px · PC ≥ 1200 px (Bildschirm des Benutzers ≈ 1600 CSS-px). */

:root {
  --text: #000;
  --grund: #f3f5f4;
  --flaeche: #fff;
  --linie: #9aa59f;
  --marke: #0b5d3b;
  --marke-hell: #e3f1ea;
  --warn: #8a5300;
  --warn-grund: #fff3d6;
  --fehler: #a10f0f;
  --fehler-grund: #fde4e4;
  --ok: #0b5d3b;
  --ok-grund: #e3f1ea;
  --minus: #a10f0f;
  --test: #5b2a86;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--grund); overflow-wrap: break-word; }
[hidden] { display: none !important; }
a { color: var(--marke); }
h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 16px 0 8px; }

.testphase { background: var(--test); color: #fff; padding: 6px 16px; font-size: .9rem; text-align: center; }
.leiste { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--marke); color: #fff; flex-wrap: wrap; }
.leiste a, .leiste button { color: #fff; }
.marke { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.betrieb { font-weight: 600; }
.leiste-rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.benutzer { text-decoration: none; }
.abmelden button, .sprache { background: transparent; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; }
.sprachwahl { display: flex; gap: 6px; }
.sprache { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.sprache.aktiv { background: rgba(255,255,255,.2); border-color: #fff; }
.oeffentlich .sprache { color: #fff; }
.flagge { width: 22px; height: 15px; border: 1px solid rgba(0,0,0,.25); }
.menuknopf { display: none; background: transparent; color: #fff; border: 1px solid #fff; border-radius: 6px; font-size: 1.2rem; padding: 2px 10px; }
.demo-marke { display: inline-block; background: var(--test); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }

.rahmen { display: flex; min-height: calc(100vh - 100px); }
.menu { width: 240px; flex: none; background: var(--flaeche); border-right: 1px solid var(--linie); padding: 12px 0; }
.menu-bereich { margin-bottom: 14px; }
.menu-titel { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; padding: 4px 16px; }
.menu a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; }
.menu a:hover { background: var(--marke-hell); }
.menu a.aktiv { background: var(--marke); color: #fff; font-weight: 600; }
.inhalt { flex: 1; min-width: 0; padding: 20px 24px 40px; }
.fuss { padding: 10px 16px; font-size: .85rem; }

.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kachel { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.kacheln .kachel { margin-bottom: 0; }

.meldung { padding: 10px 14px; border-radius: 6px; margin: 0 0 14px; border: 1px solid; }
.meldung ul { margin: 0; padding-left: 18px; }
.meldung.ok { background: var(--ok-grund); border-color: var(--ok); }
.meldung.warn { background: var(--warn-grund); border-color: var(--warn); }
.meldung.fehler { background: var(--fehler-grund); border-color: var(--fehler); }
.hinweise { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.hinweise li { padding: 10px 14px; border-radius: 6px; border: 1px solid; font-weight: 600; }
.hinweise li.warn { background: var(--warn-grund); border-color: var(--warn); }
.hinweise li.ok { background: var(--ok-grund); border-color: var(--ok); }
.hinweise li.info { background: var(--flaeche); border-color: var(--linie); }
.hinweise a { color: var(--text); }

table { border-collapse: collapse; width: 100%; font-size: 1rem; color: var(--text); }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
thead th { border-bottom: 2px solid var(--text); white-space: nowrap; }
tfoot th, tfoot td { border-top: 2px solid var(--text); font-weight: 700; }
.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle { overflow-x: auto; }
.liste tbody tr:hover { background: var(--marke-hell); }
tr.ueberfaellig td { background: var(--fehler-grund); }
tr.inaktiv td { text-decoration: line-through; }
.minus, .minus .zahl { color: var(--minus); }
.verteilung th { font-weight: 400; }
.verteilung tr.summe th, .verteilung tr.summe td { font-weight: 700; font-size: 1.1rem; }
.verteilung tr.zwischen th, .verteilung tr.zwischen td, .werte tr.zwischen th, .werte tr.zwischen td { font-weight: 700; border-top: 2px solid var(--text); }
.verteilung tr.frei th, .verteilung tr.frei td, .werte tr.frei th, .werte tr.frei td, .werte tr.summe th, .werte tr.summe td { font-weight: 800; font-size: 1.2rem; background: var(--marke-hell); border-top: 2px solid var(--text); }
.verteilung tr.frei.minus th, .verteilung tr.frei.minus td { background: var(--fehler-grund); }
.klein { display: block; font-size: .85rem; font-weight: 400; }
td .klein, th .klein { margin-top: 2px; }

.formular label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin-bottom: 12px; }
.formular.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.formular.zeile label { flex-direction: row; align-items: center; margin: 0; gap: 6px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.raster .breit, .raster fieldset { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--linie); border-radius: 6px; margin: 0 0 12px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
legend { font-weight: 700; }
label.haken { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400; }
input, select, button, textarea { font: inherit; color: var(--text); }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; min-height: 40px; }
input[type=checkbox] { min-height: 0; width: 20px; height: 20px; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #f0b400; outline-offset: 1px; }
.knopf, .klein-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--marke); background: #fff; color: var(--marke); text-decoration: none; cursor: pointer; font-weight: 600; min-height: 40px; }
.knopf.haupt { background: var(--marke); color: #fff; }
.knopf.aktiv { background: var(--marke); color: #fff; }
.knopf.gefahr { border-color: var(--fehler); color: var(--fehler); }
.klein-knopf { padding: 2px 8px; min-height: 30px; font-size: .9rem; }
.zeilenform { display: inline; margin-left: 6px; }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; }
.stand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.stand label { display: flex; align-items: center; gap: 6px; }
.loeschen-form { margin-top: 12px; }
details > summary { cursor: pointer; list-style: revert; }
details > summary h2 { display: inline; }

.balken { width: 100%; height: auto; margin-top: 12px; }
.balken rect.ueber { fill: var(--marke); }
.balken rect.unter { fill: #d98a00; }
.balken rect.zu { fill: var(--linie); }
.balken line.ziel { stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 4; }
.balken text { font-size: 12px; fill: var(--text); }

.karte-mitte { max-width: 460px; margin: 32px auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 24px; }
.karte-mitte .formular button { width: 100%; justify-content: center; }
.unter { margin-top: 16px; }

@media (max-width: 1199px) {
  .kacheln { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .menuknopf { display: inline-block; }
  .menu { display: none; position: absolute; z-index: 10; left: 0; right: 0; width: auto; border-bottom: 2px solid var(--text); }
  body.menu-offen .menu { display: block; }
  .rahmen { position: relative; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .inhalt { padding: 14px 12px 32px; }
  h1 { font-size: 1.3rem; }
  .leiste { gap: 8px; padding: 8px 12px; }
  .leiste-rechts { margin-left: 0; width: 100%; justify-content: space-between; }
  th, td { padding: 6px 6px; }
  .karte-mitte { margin: 12px; padding: 16px; }
  .tabelle table th:first-child, .tabelle table td:first-child { position: sticky; left: 0; background: var(--flaeche); }
}
@media print {
  .leiste, .menu, .testphase, .stand, .fuss, form { display: none !important; }
  .rahmen { display: block; }
  .kachel { break-inside: avoid; border-color: #000; }
}
