/* ═══════════════════════════════════════════════
   Zeiterfassung – Stylesheet (ab Version 2.0)
   Klarer Apple-Stil · Marineblau aus dem Lang-Logo
   Hell und dunkel automatisch nach Geräteeinstellung.
   Keine externen Schriften oder Dateien (Datenschutz):
   es wird immer die Systemschrift des Geräts benutzt.
   ═══════════════════════════════════════════════ */

:root {
  color-scheme: light dark;

  /* Seiten- und Flächenfarben */
  --seite:        #F2F2F7;   /* Hintergrund der ganzen Seite */
  --weiss:        #FFFFFF;   /* Karten / Flächen (Name historisch) */
  --creme:        #F2F2F7;   /* leicht abgesetzte Fläche innerhalb von Karten */
  --creme-dunkel: #E5E5EA;   /* Trennlinien, Rahmen */
  --fuellung:     #EFEFF4;   /* graue Knöpfe, Eingabefelder */
  --seitenleiste: #FBFBFD;

  /* Text */
  --kohle:        #1C1C1E;   /* Haupttext */
  --grau:         #6E6E73;   /* Nebentext */
  --grau-hell:    #AEAEB2;   /* Platzhalter, inaktiv */

  /* Hauptfarbe: Lang-Marineblau (Variablenname "rot" ist historisch) */
  --rot:          #083167;
  --rot-dunkel:   #051F44;
  --rot-hell:     #E6ECF5;
  --blau:         var(--rot);
  --auf-akzent:   #FFFFFF;   /* Text auf blauen Flächen */

  /* Status */
  --gruen:        #1F7A45;
  --gruen-hell:   #E3F3E8;
  --gelb:         #9A5A00;   /* Warnung (orange) */
  --gelb-hell:    #FFF1DC;
  --gelb-rand:    #F1D3A6;
  --fehler:       #C4271D;
  --fehler-hell:  #FDE8E6;

  --schatten:      0 1px 3px rgba(0, 0, 0, 0.06);
  --schatten-tief: 0 12px 40px rgba(0, 0, 0, 0.18);
  --radius:        18px;
  --radius-klein:  12px;

  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-hoehe: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --seite:        #000000;
    --weiss:        #1C1C1E;
    --creme:        #2C2C2E;
    --creme-dunkel: #38383A;
    --fuellung:     #2C2C2E;
    --seitenleiste: #111113;
    --kohle:        #F2F2F7;
    --grau:         #A1A1A6;
    --grau-hell:    #636366;
    --rot:          #4A88EA;
    --rot-dunkel:   #7FA7E6;
    --rot-hell:     #1E2A3D;
    --gruen:        #5DD58A;
    --gruen-hell:   #173222;
    --gelb:         #FFB340;
    --gelb-hell:    #33240D;
    --gelb-rand:    #5C4218;
    --fehler:       #FF6B61;
    --fehler-hell:  #3A1714;
    --schatten:      none;
    --schatten-tief: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}
/* Zum Testen/Vorführen: <html data-theme="dark"> erzwingt den Dunkelmodus */
:root[data-theme="dark"] {
  --seite:        #000000;
  --weiss:        #1C1C1E;
  --creme:        #2C2C2E;
  --creme-dunkel: #38383A;
  --fuellung:     #2C2C2E;
  --seitenleiste: #111113;
  --kohle:        #F2F2F7;
  --grau:         #A1A1A6;
  --grau-hell:    #636366;
  --rot:          #4A88EA;
  --rot-dunkel:   #7FA7E6;
  --rot-hell:     #1E2A3D;
  --gruen:        #5DD58A;
  --gruen-hell:   #173222;
  --gelb:         #FFB340;
  --gelb-hell:    #33240D;
  --gelb-rand:    #5C4218;
  --fehler:       #FF6B61;
  --fehler-hell:  #3A1714;
  --schatten:      none;
  --schatten-tief: 0 12px 40px rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;   /* Seite darf nie seitlich verschoben werden */
}

body {
  font-family: var(--schrift);
  background: var(--seite);
  color: var(--kohle);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Typografie ─────────────────────────────── */

h1, h2, h3 { font-family: var(--schrift); color: var(--kohle); line-height: 1.2; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }

.text-grau  { color: var(--grau); }
.text-klein { font-size: 0.88rem; }
.zahl       { font-variant-numeric: tabular-nums; }

/* ─── Layout: Seitenleiste (groß) / Leiste unten (Handy) ─── */

.app {
  display: flex;
  min-height: 100vh;
}

.seitenleiste {
  width: 248px;
  flex-shrink: 0;
  background: var(--seitenleiste);
  border-right: 1px solid var(--creme-dunkel);
  padding: 1.2rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  overflow-y: auto;
}

.seitenleiste .marke {
  display: flex;
  justify-content: center;
  background: #FFFFFF;           /* Logo hat weißen Hintergrund – auch im Dunkelmodus */
  border-radius: var(--radius-klein);
  padding: 0.4rem 0.5rem;
}
.seitenleiste .marke img { width: 100%; max-width: 180px; height: auto; display: block; }

.nav-punkt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.8rem;
  border-radius: 10px;
  color: var(--kohle);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-punkt svg { flex-shrink: 0; color: var(--grau); }
.nav-punkt:hover { background: var(--fuellung); text-decoration: none; }
.nav-punkt.aktiv { background: var(--rot); color: var(--auf-akzent); font-weight: 600; }
.nav-punkt.aktiv svg { color: var(--auf-akzent); }
.nav-zahl {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: var(--fehler); color: #FFFFFF;
  font-size: 0.72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.seitenleiste-fuss {
  margin-top: auto;
  padding: 1rem 0.8rem 0.2rem;
  font-size: 0.82rem;
  color: var(--grau);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.seitenleiste-fuss .wer { color: var(--kohle); font-weight: 600; }
.seitenleiste-fuss .links { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; }

.hauptbereich {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.inhalt {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 2.2rem 2.5rem;
}

.handy-kopf { display: none; }
.tabbar { display: none; }

/* Fußzeile (Handy + Login) */
.fusszeile {
  text-align: center;
  padding: 1.2rem 1rem 1.6rem;
  color: var(--grau);
  font-size: 0.8rem;
}
.fusszeile .herz { color: #d6336c; }

/* Seitenkopf: Titel links, Aktionen rechts */
.seitenkopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem 1rem;
  margin-bottom: 1.4rem;
}
.seitenkopf .unterzeile { color: var(--grau); font-size: 0.95rem; margin-bottom: 0.15rem; }
.zurueck { display: inline-block; font-size: 0.92rem; margin-bottom: 0.9rem; }

/* ─── Karten ─────────────────────────────────── */

.karte {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}

.karte-titel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.karte-titel h2 { font-size: 1.2rem; }

.raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.1rem;
  align-items: start;
}
.raster > .karte { margin-bottom: 0; }

/* Kennzahl-Kacheln */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.kachel {
  background: var(--weiss);
  border-radius: 16px;
  box-shadow: var(--schatten);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--kohle);
}
a.kachel:hover { text-decoration: none; background: var(--creme); }
.kachel .titel { font-size: 0.85rem; color: var(--grau); }
.kachel .wert  { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* Listen im iOS-Stil */
.liste { list-style: none; }
.liste > li, .listen-zeile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--creme-dunkel);
}
.liste > li:first-child { border-top: none; }

/* ─── Knöpfe ─────────────────────────────────── */

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: none;
  border-radius: var(--radius-klein);
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

.btn-rot   { background: var(--rot); color: var(--auf-akzent); }
.btn-rot:hover { background: var(--rot-dunkel); }
.btn-gruen { background: var(--gruen); color: #FFFFFF; }
.btn-gruen:hover { filter: brightness(0.92); }
.btn-hell  { background: var(--fuellung); color: var(--rot); }
.btn-hell:hover { background: var(--creme-dunkel); }
.btn-gefahr { background: var(--fuellung); color: var(--fehler); }
.btn-gefahr:hover { background: var(--fehler-hell); }
.btn-text  { background: transparent; color: var(--rot); padding-left: 0.4rem; padding-right: 0.4rem; }
.btn-text:hover { background: var(--fuellung); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-gruen { color: #0B2716; }
}
:root[data-theme="dark"] .btn-gruen { color: #0B2716; }

.btn-klein {
  font-size: 0.86rem;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 9px;
}

.btn-gross {
  font-size: 1.12rem;
  min-height: 54px;
  padding: 0.9rem 1.6rem;
  width: 100%;
  max-width: 380px;
  border-radius: 14px;
}

.aktion-zeile {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Formulare ──────────────────────────────── */

.feld { margin-bottom: 1rem; }

.feld label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--grau);
}

.feld input[type="text"],
.feld input[type="password"],
.feld input[type="date"],
.feld input[type="time"],
.feld input[type="number"],
.feld input[type="tel"],
.feld input[type="email"],
.feld select,
.feld textarea,
.eingabe {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-klein);
  background: var(--fuellung);
  color: var(--kohle);
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.feld select, select.eingabe {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.feld input:focus,
.feld select:focus,
.feld textarea:focus,
.eingabe:focus {
  outline: none;
  border-color: var(--rot);
  background-color: var(--weiss);
}

input[type="time"], input[type="date"] { font-variant-numeric: tabular-nums; }

.feld-zeile {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.feld-zeile .feld { flex: 1; min-width: 140px; }

.checkbox-feld {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.checkbox-feld input { width: 22px; height: 22px; accent-color: var(--rot); }
.checkbox-feld label { margin: 0; font-size: 1rem; color: var(--kohle); font-weight: 400; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--rot); }

/* Schalter (iOS-Toggle) – <label class="schalter"><input type="checkbox"><span></span></label> */
.schalter { position: relative; display: inline-block; width: 51px; height: 31px; flex-shrink: 0; }
.schalter input { opacity: 0; width: 0; height: 0; }
.schalter span {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--creme-dunkel); border-radius: 31px; transition: background 0.2s;
}
.schalter span::before {
  content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px;
  background: #FFFFFF; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.schalter input:checked + span { background: #34C759; }
.schalter input:checked + span::before { transform: translateX(20px); }
.schalter input:focus-visible + span { outline: 2px solid var(--rot); outline-offset: 2px; }

/* ─── Login-Seite ────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--seite);
}

.login-box {
  background: var(--weiss);
  border-radius: 24px;
  box-shadow: var(--schatten-tief);
  padding: 2.4rem 2rem 2rem;
  width: 100%;
  max-width: 390px;
  text-align: center;
}

.login-logo {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: var(--radius-klein);
  padding: 0.5rem 0.8rem;
}
.login-logo img { width: 100%; height: auto; object-fit: contain; display: block; }

.login-box h1 { font-size: 1.6rem; margin-bottom: 1.6rem; }
.login-box .unterzeile { color: var(--grau); font-size: 0.95rem; margin-bottom: 1.6rem; }
.login-box .feld { text-align: left; }
.login-box .btn-gross { max-width: none; margin-top: 0.4rem; }

/* ─── Meldungen ──────────────────────────────── */

.meldung {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-klein);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.meldung-fehler { background: var(--fehler-hell); color: var(--fehler); }
.meldung-info   { background: var(--gelb-hell); color: var(--gelb); }
.meldung-ok     { background: var(--gruen-hell); color: var(--gruen); }

/* ─── Tabellen ───────────────────────────────── */

.tabelle-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grau);
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--creme-dunkel);
}
.tabelle td {
  padding: 0.7rem;
  border-bottom: 1px solid var(--creme-dunkel);
  vertical-align: middle;
}
.tabelle tr:last-child td { border-bottom: none; }
.tabelle td.rechts, .tabelle th.rechts { text-align: right; }

.inaktiv-zeile td { color: var(--grau); }

/* Geplante Zeit: eigene Spalte auf Desktop/Tablet, Zeile unter dem Namen auf Mobile */
.geplant-mobil { display: none; }

/* ─── Status-Punkte & Abzeichen ──────────────── */

.punkt {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.punkt-gruen { background: var(--gruen); animation: punkt-pulse 2s infinite; }
.punkt-grau  { background: var(--grau-hell); }
@keyframes punkt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  white-space: nowrap;
}
.badge-gruen { background: var(--gruen-hell); color: var(--gruen); }
.badge-grau  { background: var(--fuellung); color: var(--grau); }
.badge-gelb  { background: var(--gelb-hell); color: var(--gelb); }
.badge-rot   { background: var(--fehler-hell); color: var(--fehler); }
.badge-blau  { background: var(--rot-hell); color: var(--rot); }

/* ─── Hilfsklassen ───────────────────────────── */

.leer-hinweis {
  text-align: center;
  color: var(--grau);
  padding: 1.8rem 1rem;
}

.versteckt { display: none !important; }

/* Profilkreis mit Initialen */
.initialen {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--rot-hell); color: var(--rot);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

/* ─── Dialog, Meldung unten, Hinweisleiste ───── */

.dialog-hintergrund {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  animation: einblenden 0.15s ease-out;
}
.dialog {
  background: var(--weiss);
  color: var(--kohle);
  border-radius: 18px;
  box-shadow: var(--schatten-tief);
  width: 100%;
  max-width: 380px;
  padding: 1.5rem 1.4rem 1.2rem;
  text-align: center;
  animation: hochkommen 0.18s ease-out;
}
.dialog h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.dialog p  { color: var(--grau); font-size: 0.95rem; margin-bottom: 1.2rem; white-space: pre-line; }
.dialog .knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.dialog .knoepfe.einzeln { grid-template-columns: 1fr; }

.meldung-unten {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 250;
  transform: translateX(-50%);
  background: #1C1C1E; color: #FFFFFF;
  border-radius: 14px;
  padding: 0.7rem 0.8rem 0.7rem 1.1rem;
  display: flex; align-items: center; gap: 0.9rem;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: calc(100vw - 2rem);
  animation: hochkommen 0.18s ease-out;
}
.meldung-unten button {
  border: none; background: #3A3A3C; color: #FFFFFF; font-family: inherit;
  font-size: 0.88rem; font-weight: 600; padding: 0.45rem 0.8rem; border-radius: 9px; cursor: pointer;
}

.app-banner {
  position: fixed; left: 0; right: 0; top: 0; z-index: 200;
  background: var(--rot); color: var(--auf-akzent);
  padding: 0.65rem 1rem;
  display: flex; gap: 0.8rem; align-items: center; justify-content: center; flex-wrap: wrap;
  font-size: 0.92rem;
}
.app-banner button {
  background: var(--auf-akzent); color: var(--rot); border: none; border-radius: 9px;
  padding: 0.4rem 0.9rem; font-weight: 600; font-family: inherit; cursor: pointer;
}

@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes hochkommen { from { opacity: 0; transform: translate(var(--tx, 0), 12px); } to { opacity: 1; transform: translate(var(--tx, 0), 0); } }
.meldung-unten { --tx: -50%; }

/* "Mehr"-Blatt auf dem Handy */
.blatt-hintergrund {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; justify-content: flex-end;
  animation: einblenden 0.15s ease-out;
}
.blatt {
  background: var(--seite);
  border-radius: 20px 20px 0 0;
  padding: 0.6rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  animation: hochkommen 0.2s ease-out;
}
.blatt .griff { width: 40px; height: 5px; border-radius: 3px; background: var(--grau-hell); margin: 0 auto 0.8rem; }
.blatt-gruppe { background: var(--weiss); border-radius: 14px; overflow: hidden; margin-bottom: 0.8rem; }
.blatt-gruppe a, .blatt-gruppe button {
  display: flex; align-items: center; gap: 0.8rem; width: 100%;
  padding: 0.85rem 1rem; color: var(--kohle); font-size: 1rem; font-family: inherit;
  background: none; border: none; border-top: 1px solid var(--creme-dunkel); text-align: left; cursor: pointer;
}
.blatt-gruppe > :first-child { border-top: none; }
.blatt-gruppe svg { color: var(--rot); }
.blatt-gruppe a:hover { text-decoration: none; background: var(--creme); }

/* ─── Handy & kleine Tablets ─────────────────── */

@media (max-width: 899px) {
  .seitenleiste { display: none; }

  .handy-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.2rem;
  }
  .handy-kopf .marke {
    background: #FFFFFF; border-radius: 9px; padding: 3px 7px; display: flex;
  }
  .handy-kopf .marke img { height: 30px; width: auto; display: block; }

  .inhalt { padding: 0.8rem 1rem 1rem; }
  /* Fußzeile endet über der Leiste unten, nicht dahinter */
  .fusszeile.handy-nur { padding-bottom: calc(var(--tabbar-hoehe) + 1.4rem + env(safe-area-inset-bottom)); }
  .karte { padding: 1.1rem; border-radius: 16px; }
  h1 { font-size: 1.75rem; }
  .tabelle th, .tabelle td { padding: 0.55rem 0.45rem; font-size: 0.92rem; }

  .geplant-spalte { display: none; }
  .geplant-mobil { display: block; }

  .tabbar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    height: calc(var(--tabbar-hoehe) + env(safe-area-inset-bottom));
    padding: 6px 4px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--seitenleiste) 92%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--creme-dunkel);
  }
  .tabbar a, .tabbar button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
    font-size: 0.68rem; font-weight: 500; font-family: inherit;
    color: var(--grau); background: none; border: none; cursor: pointer; padding: 2px 0 0;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .aktiv { color: var(--rot); font-weight: 600; }
  .tabbar .nav-zahl { position: absolute; top: -2px; left: 54%; margin: 0; }

  .meldung-unten { bottom: calc(var(--tabbar-hoehe) + 0.8rem + env(safe-area-inset-bottom)); }
  .fusszeile.handy-nur { display: block; }
}

@media (min-width: 900px) {
  .fusszeile.handy-nur { display: none; }
}

/* ─── Computer: Menü steht fest, nur der Inhalt rechts scrollt ─── */
@media (min-width: 900px) {
  .app { height: 100vh; overflow: hidden; }
  .hauptbereich { height: 100vh; overflow-y: auto; position: relative; }

  .inhalt { padding-top: 2.2rem; }
}

/* Kopf der Seitenleiste: Logo + Knopf zum Ein-/Ausklappen */
.seitenleiste-kopf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.2rem 1.1rem;
}
.seitenleiste-kopf .marke { flex: 1; min-width: 0; margin: 0; }
.menue-knopf {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: none; background: transparent; color: var(--grau);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.menue-knopf svg { width: 20px; height: 20px; flex-shrink: 0; }
.menue-knopf:hover { color: var(--rot); background: var(--fuellung); }

/* Eingeklappt: schmale Leiste nur mit Symbolen */
.seitenleiste { transition: width 0.2s ease; }
.menue-zu .seitenleiste { width: 68px; padding-left: 0.6rem; padding-right: 0.6rem; }
.menue-zu .seitenleiste-kopf { justify-content: center; margin-left: 0; margin-right: 0; }
.menue-zu .seitenleiste .marke,
.menue-zu .nav-text,
.menue-zu .nav-zahl,
.menue-zu .seitenleiste-fuss { display: none; }
.menue-zu .nav-punkt { justify-content: center; padding: 0.62rem 0; }
.menue-zu .inhalt { max-width: 1600px; }


/* ─── Druck: nur Inhalt, keine Menüs ─────────── */

@media print {
  :root { --seite: #FFFFFF; --weiss: #FFFFFF; --kohle: #000000; --grau: #444444; }
  .app, .hauptbereich { height: auto !important; overflow: visible !important; }
  .seitenleiste, .tabbar, .handy-kopf, .menue-knopf, .fusszeile, .app-banner, .meldung-unten, .nicht-drucken { display: none !important; }
  .inhalt { padding: 0; max-width: none; }
  .karte { box-shadow: none; border: 1px solid #CCCCCC; }
}

/* ─── Kleine Bausteine für die Seiten ─────────── */
.untertitel   { color: var(--grau); margin: 0.2rem 0 1.4rem; }
.hinweis      { color: var(--grau); font-size: 0.9rem; margin-bottom: 1rem; }
.hinweis-klein{ color: var(--grau); font-size: 0.85rem; }
.inline       { display: inline; }
.rechts       { text-align: right; }
.ohne-abstand { margin: 0; }
.ohne-unten   { margin-bottom: 0; }
.filter-zeile { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; }
.filter-zeile .feld { margin-bottom: 0; }
.deaktiviert  { opacity: 0.4; cursor: default; pointer-events: none; }

/* Eingabefelder außerhalb von .feld (z.B. kleine Felder in Tabellen) */
select, textarea,
input[type="text"], input[type="time"], input[type="date"], input[type="number"],
input[type="tel"], input[type="password"], input[type="email"], input[type="search"] {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--kohle);
  background-color: var(--fuellung);
  border: 1.5px solid transparent;
  border-radius: 9px;
  padding: 0.4rem 0.6rem;
  min-height: 36px;
}
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.9rem;
}
select:focus, textarea:focus, input:focus { outline: none; border-color: var(--rot); }

/* ─── Stempeluhr (Mitarbeiter) ───────────────── */
.stempel-raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
@media (min-width: 1150px) {
  .stempel-raster { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
}
.stempel-raster .karte { margin-bottom: 0; }
.stempel-seite { display: flex; flex-direction: column; gap: 1.1rem; }

.stempeluhr {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  text-align: center; padding-top: 1.6rem; padding-bottom: 1.6rem;
}
.status-chip {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: var(--fuellung); color: var(--grau);
  font-size: 0.88rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px;
}
.status-chip.status-an { background: var(--gruen-hell); color: var(--gruen); }
.stempel-zeit { font-size: 3.4rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1; margin-top: 0.6rem; }

.stempel-knopf {
  width: 184px; height: 184px; border-radius: 50%; border: none; cursor: pointer;
  margin: 1rem 0 0.4rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-size: 1.35rem; font-weight: 700; color: #FFFFFF;
  transition: transform 0.1s, filter 0.15s;
}
.stempel-knopf:active { transform: scale(0.96); }
.stempel-knopf:disabled { opacity: 0.6; }
.stempel-ein { background: #083167; box-shadow: 0 10px 30px rgba(8, 49, 103, 0.32); }
.stempel-aus { background: #C4271D; box-shadow: 0 10px 30px rgba(196, 39, 29, 0.32); }
.stempel-knopf:hover { filter: brightness(1.08); }
:root[data-theme="dark"] .stempel-ein { background: #2F6FD6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stempel-ein { background: #2F6FD6; } }

.schicht-zeile { display: flex; align-items: center; gap: 0.8rem; padding: 0.3rem 0; }
.schicht-symbol {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--rot-hell); color: var(--rot);
  display: inline-flex; align-items: center; justify-content: center;
}
.trenner { height: 1px; background: var(--creme-dunkel); margin: 0.9rem 0; }

/* ─── Chef-Übersicht ─────────────────────────── */
.person-zeile {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.65rem 0; border-top: 1px solid var(--creme-dunkel);
}
.karte-titel + .person-zeile { border-top: none; }
.person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.person-warnung {
  background: var(--gelb-hell); border: 1px solid var(--gelb-rand);
  border-radius: 12px; padding: 0.65rem 0.8rem; margin: 0.3rem 0;
  flex-wrap: wrap;
}
.person-warnung .person-text { min-width: 160px; }
.person-warnung + .person-zeile { border-top: none; }
.initialen-warnung { background: var(--gelb-rand); color: var(--gelb); }
.initialen-grau { background: var(--fuellung); color: var(--grau); }
.text-warnung { color: var(--gelb) !important; }
.dauer-gruen { color: var(--gruen); font-weight: 600; }
.ausstempeln-form { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.aufgabe { padding: 0.9rem 0; border-top: 1px solid var(--creme-dunkel); }
.karte-titel + .aufgabe, .karte-titel + .leer-hinweis + .aufgabe { border-top: none; padding-top: 0.2rem; }
.aufgabe-kopf { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.25rem; flex-wrap: wrap; }
.einschub { margin-top: 0.8rem; background: var(--creme); padding: 1rem; border-radius: var(--radius-klein); }

/* ─── Schichtplan: Kopf ──────────────────────── */
.tag-wahl {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: var(--weiss); border-radius: var(--radius-klein); box-shadow: var(--schatten);
  padding: 0 0.2rem;
}
.tag-wahl .btn { font-size: 1.3rem; min-width: 40px; }
.tag-wahl strong { font-size: 0.95rem; padding: 0 0.3rem; white-space: nowrap; }

/* ─── Schichtplan: Zeitstrahl ────────────────── */
.zeitstrahl { min-width: 760px; display: flex; flex-direction: column; gap: 4px; user-select: none; -webkit-user-select: none; }
.zs-achse, .zs-zeile { display: flex; align-items: center; }
.zs-label, .zs-name { width: 170px; min-width: 170px; padding-right: 12px; }
.zs-label { font-size: 0.78rem; color: var(--grau); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zs-skala { flex: 1; position: relative; height: 20px; }
.zs-skala span { position: absolute; transform: translateX(-50%); font-size: 0.74rem; color: var(--grau); white-space: nowrap; font-variant-numeric: tabular-nums; }
.zs-skala span.zs-mn { color: var(--kohle); font-weight: 700; }

.zs-rolle { border-top: 1px solid var(--creme-dunkel); padding: 5px 6px; margin: 0 -6px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.zs-rolle.zs-ziel { background: var(--rot-hell); box-shadow: inset 0 0 0 2px var(--rot); }
.zs-name {
  border: none; background: none; cursor: pointer; text-align: left; font-family: inherit; color: var(--kohle);
  display: flex; flex-direction: column; gap: 1px; padding-top: 2px; padding-bottom: 2px;
}
.zs-name span { font-size: 0.95rem; font-weight: 600; }
.zs-name small { font-size: 0.74rem; color: var(--grau); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.zs-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.zs-fehlt { color: var(--fehler); font-weight: 600; }
.zs-warntext { color: var(--gelb) !important; font-weight: 600; }

.zs-spur {
  flex: 1; position: relative; height: 38px; border-radius: 9px;
  background-color: var(--creme);
  background-image: linear-gradient(to right, var(--creme-dunkel) 1px, transparent 1px);
}
.zs-spur-kopf { height: 42px; }
.zs-mitternacht { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--grau-hell); pointer-events: none; }

.zs-sammel {
  position: absolute; top: 6px; bottom: 11px; border-radius: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--rot) 78%, var(--weiss)); color: var(--auf-akzent);
  font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden;
}
.zs-sammel-warn { box-shadow: inset 0 0 0 2px #E08A00; }
.zs-luecke { position: absolute; bottom: 2px; height: 5px; border-radius: 3px; background: #D70015; }

.zs-balken {
  position: absolute; top: 4px; bottom: 4px; min-width: 22px; box-sizing: border-box;
  background: var(--rot); color: var(--auf-akzent); border: 1.5px solid var(--rot); border-radius: 8px;
  display: flex; align-items: center; padding: 0 12px; cursor: grab; white-space: nowrap;
}
@media (min-width: 900px) { .zs-balken, .zs-neu { touch-action: none; } }
.zs-balken:active { cursor: grabbing; }
.zs-text { overflow: hidden; text-overflow: ellipsis; font-size: 0.78rem; }
.zs-text b { font-weight: 650; }
.zs-text .zahl { opacity: 0.85; }
.zs-warn { background: #FFE7C7; color: #7A3E00; border-color: #E08A00; }
.zs-temp { background: var(--weiss); color: var(--rot); border-style: dashed; }
.zs-zieht { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); z-index: 5; }
.zs-griff { position: absolute; top: -2px; bottom: -2px; width: 12px; cursor: ew-resize; display: flex; align-items: center; justify-content: center; }
.zs-griff::after { content: ""; width: 3px; height: 16px; border-radius: 2px; background: currentColor; opacity: 0.55; }
.zs-griff-l { left: -2px; }
.zs-griff-r { right: -2px; }
.zs-blase {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: #1C1C1E; color: #FFFFFF; font-size: 0.8rem; font-weight: 600;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; z-index: 6;
}
.zs-neu {
  background: none; border: 1.5px dashed var(--creme-dunkel); height: 34px;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--grau); cursor: crosshair;
}
.zs-neu:hover { border-color: var(--rot); color: var(--rot); }

.legende { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 0.9rem; font-size: 0.8rem; color: var(--grau); }
.legende span { display: inline-flex; align-items: center; gap: 0.4rem; }
.leg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.leg-normal { background: var(--rot); }
.leg-warn { background: #FFE7C7; border: 1.5px solid #E08A00; }
.leg-luecke { height: 5px; background: #D70015; }
.leg-mitternacht { width: 0; height: 12px; border-left: 2px dashed var(--grau-hell); border-radius: 0; }

/* ─── Schichtplan: Bedarf ────────────────────── */
.bedarf-raster { display: grid; gap: 0.5rem 0.6rem; align-items: center; min-width: 460px; }
.bedarf-kopf { display: flex; flex-direction: column; gap: 0.3rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--creme-dunkel); }
.bedarf-name { display: flex; align-items: center; gap: 0.2rem; }
.bedarf-name input { flex: 1; min-width: 0; font-weight: 600; background: transparent; padding-left: 0.3rem; }
.bedarf-name input:hover { background: var(--fuellung); }
.bedarf-zeiten { display: flex; align-items: center; gap: 0.25rem; }
.bedarf-zeiten input { width: 100%; min-width: 92px; padding: 0.3rem 0.35rem; font-size: 0.88rem; color: var(--rot); font-weight: 600; }
.bedarf-rolle { font-weight: 600; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 0.3rem; }
.stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--fuellung); color: var(--rot); font-size: 1.15rem; font-weight: 600; font-family: inherit;
}
.stepper button:hover { background: var(--creme-dunkel); }
.stepper span { min-width: 22px; text-align: center; font-size: 1.05rem; font-weight: 700; }

/* ─── Schichtplan: Verfügbarkeit ─────────────── */
.verf-zeile { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; padding: 0.45rem 0; border-top: 1px solid var(--creme-dunkel); }
.verf-name { flex: 1 1 130px; }
.verf-zeile input[type="time"] { width: 104px; }

/* Breites Fenster (Bearbeiten/Anlegen) */
.dialog-breit { max-width: 440px; text-align: left; }
.dialog-breit h2 { margin-bottom: 1rem; }
.dialog-knoepfe { display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 0.4rem; }
.verf-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); column-gap: 1.6rem; }
@media (max-width: 520px) { .verf-raster { grid-template-columns: 1fr; } }

/* Einstellungen: Zeile mit Text links, Schalter/Auswahl rechts */
.einstellungs-liste { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.einstellung { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1rem 0; border-top: 1px solid var(--creme-dunkel); }
.einstellung:first-child { border-top: none; }
.einstellung p { margin-top: 0.2rem; max-width: 60ch; }
.vorlage-zeile { align-items: flex-end; padding: 0.5rem 0; }
.vorlage-zeile .feld:first-of-type { flex: 2; }

/* Nur am Computer / nur am Handy anzeigen */
@media (max-width: 899px) { .nur-gross { display: none !important; } }
@media (min-width: 900px) { .nur-handy { display: none !important; } }

/* Schichtplan als Liste (Handy) */
.plan-liste { display: flex; flex-direction: column; gap: 1rem; }
.pl-kopf { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.pl-kopf strong { font-size: 1.05rem; }
.pl-schicht {
  width: 100%; border: none; background: none; font-family: inherit; color: var(--kohle); text-align: left; cursor: pointer;
  padding: 0.6rem 0; border-top: 1px solid var(--creme-dunkel); display: flex; flex-direction: column; gap: 0.35rem;
}
.pl-zeile { display: flex; justify-content: space-between; gap: 0.5rem; }
.pl-mini { position: relative; height: 6px; border-radius: 3px; background: var(--fuellung); display: block; }
.pl-mini span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--rot); }
.pl-mini span.warn { background: #E08A00; }
.pl-neu {
  width: 100%; margin-top: 0.3rem; min-height: 40px; border: 1.5px dashed var(--creme-dunkel); border-radius: 10px;
  background: none; color: var(--rot); font-family: inherit; font-weight: 600; cursor: pointer;
}

/* Entwürfe der Vorplanung */
.zs-abgesagt { background: var(--fehler-hell); color: var(--fehler); border: 1.5px dashed var(--fehler); text-decoration: line-through; }
.zs-entwurf { background: var(--rot-hell); color: var(--rot); border-style: dashed; }
.zs-entwurf.zs-warn { background: #FFE7C7; color: #7A3E00; }
.zs-text i { font-style: normal; font-size: 0.7rem; opacity: 0.8; }
.leg-entwurf { background: var(--rot-hell); border: 1.5px dashed var(--rot); }
.entwurf-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--rot-hell); border: 1.5px dashed var(--rot); border-radius: 14px;
  padding: 0.9rem 1.1rem; margin-bottom: 1.2rem;
}
.entwurf-banner strong { color: var(--rot); }

/* Fortschrittsbalken (Rücklauf) */
.fortschritt { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--creme-dunkel); }
.fortschritt span { display: block; height: 100%; }

/* Mitarbeiter: Schichten bestätigen */
.bestaetigen-kopf {
  background: var(--rot); color: var(--auf-akzent); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.bestaetigen-kopf strong { font-size: 1.1rem; }
.bestaetigen-kopf span { font-size: 0.9rem; opacity: 0.9; }
.fortschritt-hell { background: rgba(255, 255, 255, 0.25); height: 6px; }
.meine-schicht { padding: 0.8rem 0; border-top: 1px solid var(--creme-dunkel); display: flex; flex-direction: column; gap: 0.6rem; }
.karte-titel + .meine-schicht { border-top: none; padding-top: 0; }
.meine-schicht-kopf { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.antwort-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; max-width: 420px; }
.status-knopf {
  border: none; cursor: pointer; font-family: inherit; font-size: 0.82rem; font-weight: 700;
  padding: 0.4rem 0.75rem; border-radius: 999px; white-space: nowrap;
}
.meine-schicht[data-status="bestaetigt"] .status-knopf { background: var(--gruen-hell); color: var(--gruen); }
.meine-schicht[data-status="abgesagt"] .status-knopf { background: var(--fehler-hell); color: var(--fehler); }

/* Druck-Dialog */
.druck-arten { display: flex; flex-direction: column; background: var(--creme); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.druck-arten label { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--creme-dunkel); cursor: pointer; }
.druck-arten label:first-child { border-top: none; }
.druck-arten input { width: 20px; height: 20px; flex-shrink: 0; }
.druck-arten span { flex: 1; display: flex; flex-direction: column; }
.druck-arten small { color: var(--grau); font-size: 0.8rem; }
.druck-arten em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--rot); background: var(--rot-hell); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }

/* ─── Demo-Modus ─────────────────────────────── */
.demo-banner {
  display: flex; align-items: center; gap: 0.6rem 0.9rem; flex-wrap: wrap;
  background: #FFF1DC; color: #7A3E00; border: 1px solid var(--gelb-rand); border-radius: 14px;
  padding: 0.6rem 0.8rem; margin-bottom: 1rem;
}
.demo-schild { background: #E08A00; color: #FFFFFF; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; }
.demo-text { flex: 1 1 200px; font-size: 0.9rem; }
.demo-aktionen { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.demo-rundgang ol { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.8rem; }
.demo-hilfe {
  background: var(--rot-hell); border-radius: 14px; padding: 0.8rem 1rem; margin-bottom: 1.2rem; font-size: 0.92rem;
}
.demo-hilfe summary { cursor: pointer; color: var(--rot); }
.demo-hilfe p { margin-top: 0.5rem; color: var(--kohle); }
:root[data-theme="dark"] .demo-banner { background: #33240D; color: #FFB340; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .demo-banner { background: #33240D; color: #FFB340; } }
.demo-login { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--creme-dunkel); }
.demo-login p { color: var(--grau); font-size: 0.92rem; }
.demo-login .btn-gross { max-width: none; }

/* ─── Stempelzeiten (Chef) ───────────────────── */
.filter-leiste { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-leiste input[type="search"] { flex: 1 1 220px; min-height: 42px; background-color: var(--weiss); box-shadow: var(--schatten); }
.segment { display: inline-flex; background: var(--creme-dunkel); border-radius: 10px; padding: 2px; gap: 2px; }
.segment button {
  border: none; background: transparent; border-radius: 8px; padding: 0.45rem 0.9rem; font-family: inherit;
  font-size: 0.88rem; font-weight: 500; color: var(--kohle); cursor: pointer; min-height: 36px;
}
.segment button.aktiv { background: var(--weiss); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.stempel-person { border-top: 1px solid var(--creme-dunkel); }
.stempel-person:first-child { border-top: none; }
.stempel-person.inaktiv { opacity: 0.75; }
.stempel-kopf {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0;
  border: none; background: none; font-family: inherit; color: var(--kohle); text-align: left; cursor: pointer;
}
.stempel-kopf .pfeil { color: var(--grau); font-size: 1.2rem; width: 0.8rem; transition: transform 0.15s; }
.stempel-kopf[aria-expanded="true"] .pfeil { transform: rotate(90deg); }
.stempel-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stempel-name small { color: var(--grau); font-size: 0.8rem; }
.stempel-netto { color: var(--grau); min-width: 72px; text-align: right; }
.stempel-details { padding: 0 0 0.8rem 1.5rem; }
.stempel-eintrag { display: flex; align-items: center; gap: 0.4rem 1rem; flex-wrap: wrap; padding: 0.5rem 0; border-top: 1px dashed var(--creme-dunkel); }
.stempel-eintrag:first-child { border-top: none; }
.stempel-eintrag > .hinweis-klein { flex: 1; }
@media (max-width: 600px) { .stempel-status { display: none; } .stempel-details { padding-left: 0.4rem; } }

/* ─── Mitarbeiter: ganzer Plan ───────────────── */
.tag-block { border-top: 1px solid var(--creme-dunkel); }
.tag-block:first-child { border-top: none; }
.tag-kopf {
  width: 100%; display: flex; align-items: baseline; gap: 0.6rem; padding: 0.8rem 0;
  border: none; background: none; font-family: inherit; color: var(--kohle); text-align: left; cursor: pointer; font-size: 1rem;
}
.tag-kopf .pfeil { color: var(--grau); font-size: 1.2rem; width: 0.8rem; transition: transform 0.15s; }
.tag-kopf[aria-expanded="true"] .pfeil { transform: rotate(90deg); }
.tag-inhalt { padding: 0 0 1rem 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.tag-rolle { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grau); margin-bottom: 0.3rem; }
.tag-person { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.5rem 0.8rem; border-radius: 10px; background: var(--creme); margin-bottom: 0.3rem; }
.tag-person.ich { background: var(--rot-hell); font-weight: 600; }
.tag-person small { color: var(--rot); font-weight: 500; }
@media (max-width: 600px) { .tag-inhalt { padding-left: 0; } }

/* ─── Verfügbarkeit (Mitarbeiter) ────────────── */
.verf-tag { padding: 0.9rem 0; border-top: 1px solid var(--creme-dunkel); display: flex; flex-direction: column; gap: 0.7rem; }
.verf-tag:first-child { border-top: none; padding-top: 0.2rem; }
.verf-tag-kopf { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.segment-wahl { position: relative; cursor: pointer; }
.segment-wahl input { position: absolute; opacity: 0; pointer-events: none; }
.segment-wahl span { display: inline-flex; align-items: center; min-height: 36px; padding: 0.35rem 0.9rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; }
.segment-wahl input:checked + span { background: var(--weiss); font-weight: 700; color: var(--gruen); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.segment-nein input:checked + span { color: var(--fehler); }
.segment-wahl input:focus-visible + span { outline: 2px solid var(--rot); }
.listen-link { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.8rem 0; border-top: 1px solid var(--creme-dunkel); color: var(--kohle); }
.listen-link:first-child { border-top: none; }
.listen-link:hover { text-decoration: none; }
.listen-link > span:first-child { display: flex; flex-direction: column; }
.listen-link small { color: var(--grau); font-size: 0.85rem; }
.summen-zeile td { border-top: 2px solid var(--creme-dunkel); font-weight: 700; }
.filter-zeile .feld { margin-bottom: 0; }

/* ─── Geführter Rundgang (Demo) ──────────────── */
.rg-dimm { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 400; pointer-events: none; }
.rg-flaeche { position: fixed; background: rgba(0, 0, 0, 0.5); z-index: 400; pointer-events: none; }
.rg-spot {
  position: fixed; z-index: 401; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 4px var(--rot);
  transition: left 0.2s, top 0.2s, width 0.2s, height 0.2s;
}
.rg-blase {
  position: fixed; z-index: 402; width: 360px; max-width: calc(100vw - 24px);
  background: var(--weiss); color: var(--kohle); border-radius: 16px; box-shadow: var(--schatten-tief);
  padding: 0.9rem 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.45rem;
}
.rg-blase.rg-mitte { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: 420px; }
.rg-kopf { display: flex; justify-content: space-between; align-items: center; }
.rg-zaehler { font-size: 0.75rem; font-weight: 700; color: var(--rot); text-transform: uppercase; letter-spacing: 0.04em; }
.rg-x { border: none; background: none; color: var(--grau); font-size: 1rem; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.rg-x:hover { background: var(--fuellung); }
.rg-blase h3 { font-size: 1.1rem; }
.rg-blase p { color: var(--grau); font-size: 0.93rem; line-height: 1.45; }
.rg-knoepfe { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.3rem; }
@media (max-width: 899px) {
  .rg-blase, .rg-blase.rg-mitte {
    left: 12px !important; right: 12px; top: auto !important; transform: none;
    bottom: calc(var(--tabbar-hoehe) + 12px + env(safe-area-inset-bottom)); width: auto; max-width: none;
  }
}
