:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --text: #1f2421;
  --muted: #66706a;
  --line: #e3e0d8;
  --brand: #2f6b3b;
  --brand-soft: #e6f0e7;
  --warn: #b4531a;
  --warn-soft: #fbeee4;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --ok: #1f7a3a;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}
a {
  color: var(--brand);
}
button,
input,
select,
textarea {
  font: inherit;
}
.layout {
  display: flex;
  min-height: 100vh;
}
nav.side {
  width: 230px;
  background: #1f2b23;
  color: #dfe7e1;
  padding: 18px 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
nav.side .logo {
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  padding: 4px 10px 2px;
}
nav.side .betrieb {
  font-size: 12px;
  color: #9fb0a4;
  padding: 0 10px 16px;
}
nav.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dfe7e1;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 8px;
  margin-bottom: 2px;
}
nav.side .recht {
  margin: 18px 10px 6px;
  font-size: 12px;
  color: #9fb0a5;
}
nav.side .recht a {
  display: inline;
  padding: 0;
  color: inherit;
  text-decoration: underline;
}
nav.side .recht a:hover {
  background: none;
  color: #fff;
}
nav.side a:hover {
  background: #2c3b31;
}
nav.side a.aktiv {
  background: var(--brand);
  color: #fff;
}
nav.side .badge {
  margin-left: auto;
  background: #e0662b;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 7px;
}
nav.side .gruppe {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7f9286;
  padding: 14px 10px 4px;
}
main {
  flex: 1;
  padding: 26px 30px 60px;
  max-width: 1150px;
  min-width: 0;
}
h1 {
  font-size: 24px;
  margin: 0 0 4px;
}
h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
h3 {
  font-size: 15px;
  margin: 0 0 6px;
}
.sub {
  color: var(--muted);
  margin: 0 0 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.grid {
  display: grid;
  gap: 14px;
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi .zahl {
  font-size: 28px;
  font-weight: 700;
}
.kpi .label {
  color: var(--muted);
  font-size: 13px;
}
.kpi .trend {
  font-size: 13px;
  margin-top: 2px;
}
.plus {
  color: var(--ok);
}
.minus {
  color: var(--bad);
}
.btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.zweit {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn.klein {
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
}
.btn.gefahr {
  background: #fff;
  color: var(--bad);
  border: 1px solid #e7b4ae;
}
.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.reihe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.zwischen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 4px;
}
input[type='text'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='email'],
input[type='tel'],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfcabe;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  margin: 4px 12px 4px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eee;
  color: #444;
  white-space: nowrap;
}
.tag.gruen {
  background: var(--brand-soft);
  color: var(--brand);
}
.tag.orange {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag.rot {
  background: var(--bad-soft);
  color: var(--bad);
}
.hinweis {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.hinweis.warn {
  border-color: var(--warn);
  background: var(--warn-soft);
}
.hinweis.rot {
  border-color: var(--bad);
  background: var(--bad-soft);
}
.leise {
  color: var(--muted);
  font-size: 13px;
}
.gericht {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.gericht:last-child {
  border-bottom: 0;
}
.gericht.inaktiv {
  opacity: 0.5;
}
.preis {
  font-weight: 700;
  white-space: nowrap;
}
.balken {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 150px;
  padding-top: 10px;
}
.balken .s {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  font-size: 12px;
  color: var(--muted);
}
.balken .b {
  width: 100%;
  background: var(--brand);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.balken .b.schwach {
  background: #e0662b;
}
.sterne {
  color: #e0a11b;
  letter-spacing: 1px;
}
.post {
  white-space: pre-wrap;
}
.schritt {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.schritt .punkt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #c9c4b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.schritt.fertig .punkt {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.tischplan {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.tisch {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  min-height: 80px;
}
.tisch.belegt {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.tisch .nr {
  font-weight: 700;
}
.modal-hg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 50;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  width: 100%;
  max-width: 560px;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2b23;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 99;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.ki-label {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  background: #efe7fb;
  color: #5b3a9c;
}
.qr {
  background: #fff;
  padding: 10px;
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 10px;
}
pre.export {
  background: #f7f6f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 320px;
  overflow: auto;
}
.menu-toggle {
  display: none;
}
/* Betriebszentrale */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 18px;
}
.topbar select {
  padding: 5px 8px;
}
.topbar a.leise {
  text-decoration: none;
}
.umschalter {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
}
.umschalter a {
  padding: 5px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.umschalter a.an {
  background: var(--brand);
  color: #fff;
}
.mini-titel {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.zahl-m {
  font-size: 22px;
  font-weight: 700;
}
.card.mini h3 {
  margin: 6px 0 8px;
}
.card.mini > a {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
}
.zeile {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  gap: 8px;
}
.zeile:last-child {
  border-bottom: 0;
}
.card.verlinkt {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card.verlinkt:hover {
  border-color: var(--brand);
}
.card.aufgabe {
  border-left: 4px solid var(--brand);
}
.card.aufgabe.rot {
  border-left-color: var(--bad);
}
.card.aufgabe.rot .mini-titel {
  color: var(--bad);
}
.card.aufgabe.warn {
  border-left-color: var(--warn);
}
.card.aufgabe.warn .mini-titel {
  color: var(--warn);
}
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  background: var(--bg);
}
.kachel span {
  font-size: 24px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  border-radius: 50%;
}
.kachel:hover {
  border-color: var(--brand);
}
.pillen {
  display: inline-flex;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 4px;
  margin: 6px 0 16px;
}
.pillen button {
  border: 0;
  background: none;
  padding: 7px 16px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.pillen button.an {
  background: var(--brand);
  color: #fff;
}
.pillen.klein {
  margin: 0;
}
.pillen.klein button {
  padding: 4px 10px;
  font-size: 13px;
}
.rezeptkarten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.rezeptkarte {
  cursor: pointer;
  margin: 0;
}
.rezeptkarte:hover {
  border-color: var(--brand);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
/* Team-Ansicht (Handy) */
body.teamansicht nav.side,
body.teamansicht .menu-toggle {
  display: none;
}
body.teamansicht main {
  max-width: 560px;
  margin: 0 auto;
}
.teamtabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 6px 0 18px;
}
.teamtabs button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 10px 4px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text);
}
.teamtabs button span {
  font-size: 20px;
}
.teamtabs button.an {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 40;
}
.btn.gross {
  font-size: 22px;
  padding: 6px 18px;
}
.terminal {
  max-width: 900px;
  margin: 0 auto;
}
.terminalgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.terminalknopf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 10px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
}
.terminalknopf.an {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.pinanzeige {
  font-size: 32px;
  letter-spacing: 12px;
  margin: 12px 0;
  color: var(--brand);
}
.pinpad {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 10px;
  justify-content: center;
}
.pinpad button {
  height: 64px;
  font-size: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}
.stempeluhr {
  font-size: 46px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
@media (max-width: 860px) {
  .layout {
    flex-direction: column;
  }
  nav.side {
    width: 100%;
    height: auto;
    position: static;
    display: none;
  }
  nav.side.offen {
    display: block;
  }
  .menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f2b23;
    color: #fff;
    padding: 12px 16px;
  }
  .menu-toggle button {
    background: none;
    border: 1px solid #5d6f63;
    color: #fff;
    border-radius: 8px;
    padding: 4px 10px;
  }
  main {
    padding: 18px 16px 50px;
  }
  .g2,
  .g3,
  .g4 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .g2,
  .g3 {
    grid-template-columns: 1fr;
  }
  .kpi .zahl {
    font-size: 22px;
  }
}

/* Website gestalten */
.ws-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}
.ws-layout > * {
  min-width: 0;
}
.ws-aktion {
  position: sticky;
  top: 8px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 2px solid var(--brand);
}
.ws-vorschau {
  position: sticky;
  top: 8px;
}
.ws-vorschau-leiste {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-weight: 600;
}
.ws-vorschau-leiste .btn {
  margin-left: 4px;
}
.ws-rahmen {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto;
  transition: max-width 0.2s;
}
.ws-rahmen.handy {
  max-width: 390px;
  border: 8px solid #1f2421;
  border-radius: 28px;
}
.ws-rahmen iframe {
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 520px;
  border: 0;
  display: block;
}
.ws-vorlagen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ws-vorlage {
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.ws-vorlage.aktiv {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.ws-vorlage strong,
.ws-vorlage small {
  display: block;
}
.ws-vorlage small {
  color: var(--muted);
  font-size: 12px;
}
.ws-muster {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  border-radius: 6px;
  padding: 0 10px;
  margin-bottom: 6px;
  font-family: Georgia, serif;
  font-size: 20px;
  border: 1px solid var(--line);
}
.ws-muster i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.ws-farben {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ws-farbe {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}
.ws-farbe.aktiv {
  box-shadow: 0 0 0 2px var(--text);
}
.ws-farben input[type='color'] {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ws-bild {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  margin-bottom: 14px;
  align-items: start;
}
.ws-bild img,
.ws-leer {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.ws-leer {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.ws-bild p {
  margin: 2px 0 6px;
  font-size: 13px;
}
.ws-abschnitt {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: var(--card);
}
.ws-abschnitt.aus {
  opacity: 0.55;
}
.ws-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.ws-kopf button,
.ws-galerie button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  margin-left: 2px;
}
.ws-kopf button:disabled {
  opacity: 0.35;
  cursor: default;
}
.ws-abschnitt input,
.ws-abschnitt textarea {
  margin-top: 6px;
}
.ws-mini {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
}
.ws-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.ws-galerie div {
  position: relative;
}
.ws-galerie img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.ws-galerie button {
  position: absolute;
  top: 4px;
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.ws-galerie button:first-of-type {
  left: 4px;
}
.ws-galerie button:last-of-type {
  right: 4px;
}
@media (max-width: 1000px) {
  .ws-layout {
    grid-template-columns: 1fr;
  }
  .ws-vorschau {
    position: static;
  }
  .ws-rahmen iframe {
    height: 640px;
  }
}
details.rechtstext {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}
details.rechtstext summary {
  cursor: pointer;
}
details.rechtstext textarea {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  min-height: 180px;
}
.ws-wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.ws-wahl button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--text);
}
.ws-wahl button.aktiv {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}
