/* ===========================================================================
   Walther-App — Gestaltung
   ---------------------------------------------------------------------------
   „Baustellen-Cockpit": blauer Kopf, ruhige Karten, klare Farben.
   Handy zuerst; ab 1100 px Breite schaltet die App auf die Rechner-Aufteilung
   (Seitenleiste links, Raster rechts). Umgeschaltet wird ueber die Klasse
   `am-rechner` am <body> — gesetzt in app.js, sobald das Fenster breit genug ist.

   Schriften liegen lokal unter ./fonts/ (Barlow + Barlow Semi Condensed,
   SIL Open Font License). Es wird nichts aus dem Netz nachgeladen.
   =========================================================================== */

/* ------------------------------ Schriften ------------------------------- */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/barlow-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/barlow-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/barlow-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/barlow-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/barlow-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/barlow-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/barlow-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/barlow-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/barlow-semi-condensed-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------ Grundwerte ------------------------------ */
:root {
  --blau: #1a3e8f;
  --blau-tief: #0f2a66;
  --blau-nacht: #0a1d49;
  --blau-hell: #e8eefa;
  --rot: #d2122e;
  --rot-hell: #fde8eb;
  --petrol: #006774;
  --text: #1b1e26;
  --text2: #5a5e66;
  --text3: #8a8f9a;
  --grund: #eef1f6;
  --karte: #ffffff;
  --linie: #e1e5ec;
  --gruen: #1f8a4c;
  --gelb: #d9a413;
  --orange: #e2711d;
  --schatten: 0 1px 2px rgba(15, 42, 102, 0.06), 0 8px 24px -8px rgba(15, 42, 102, 0.18);
  --schatten-hoch: 0 2px 4px rgba(15, 42, 102, 0.08), 0 18px 40px -12px rgba(15, 42, 102, 0.35);
  --r: 20px;
  --anzeige: "Barlow Semi Condensed", "Barlow", "Segoe UI", sans-serif;
  --lese: "Barlow", "Segoe UI", sans-serif;
}

/* Dunkel nur auf ausdruecklichen Wunsch (Konto). Hell bleibt der Standard. */
[data-theme="dark"] {
  --text: #eef1f6;
  --text2: #a9b0bd;
  --text3: #7d848f;
  --grund: #10151f;
  --karte: #1a2130;
  --linie: #2b3446;
  --blau-hell: #1c2740;
  --rot-hell: #3a1620;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --schatten-hoch: 0 2px 4px rgba(0, 0, 0, 0.45), 0 18px 40px -12px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family: var(--lese);
  color: var(--text);
  background: #c9d3e6;
  background-image: radial-gradient(1200px 600px at 20% -10%, #dfe7f7, transparent),
    radial-gradient(900px 500px at 110% 110%, #b8c6e3, transparent);
}
[data-theme="dark"] body {
  background: #070b12;
  background-image: radial-gradient(1200px 600px at 20% -10%, #131c2e, transparent),
    radial-gradient(900px 500px at 110% 110%, #0b1424, transparent);
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}
a {
  color: inherit;
  /* Navigation, Kacheln, Karten und knopfartige Links tragen keinen Strich —
     so wie im Entwurf. Den Strich behaelt nur ein Link mitten im Fliesstext;
     ohne ihn waere er dort nicht mehr als Link zu erkennen. */
  text-decoration: none;
}
p a,
.karte-text a {
  text-decoration: underline;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  font-family: var(--anzeige);
}
:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 2px;
  border-radius: 8px;
}
/* Der Inhaltsbereich wird nach jedem Bereichswechsel angesprungen, damit
   Tastatur und Vorleser mitkommen. Er ist aber kein Bedienelement — ein
   Rahmen um die ganze Seite waere nur Unruhe. */
.inhalt:focus,
.inhalt:focus-visible {
  outline: 0;
}

/* =========================== HANDY-Aufteilung =========================== */
.buehne {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.telefon {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--grund);
  position: relative;
  /* Das Telefon selbst scrollt nie — das tut nur der Bildschirm darin. Die
     Blaetter ragen zugeklappt ueber die Unterkante hinaus und vergroessern
     damit den scrollbaren Bereich. Mit `hidden` koennte der Browser dorthin
     rollen (etwa wenn ein Eingabefeld im Blatt den Fokus bekommt) und die
     ganze Ansicht bliebe verschoben. `clip` kennt gar keinen Rollbereich;
     aeltere Browser kennen `clip` nicht und behalten `hidden`. */
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
}
@media (min-width: 620px) and (max-width: 1099px) {
  .buehne {
    padding: 18px 12px;
  }
  .telefon {
    width: 430px;
    max-width: 100%;
    height: calc(100vh - 36px);
    max-height: 900px;
    border-radius: 34px;
    box-shadow: 0 0 0 8px #0d1424, 0 30px 70px -24px rgba(10, 29, 73, 0.55);
  }
}
.bildschirm {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-bottom: 110px;
}
.bildschirm::-webkit-scrollbar {
  width: 0;
}

/* Der Bereichsinhalt. Am Rechner wandert genau dieses Element in die
   Rechner-Ansicht — deshalb tragen beide Aufteilungen dieselbe Klasse. */
.inhalt {
  display: block;
  animation: rein 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ladehinweis {
  color: var(--text2);
  padding: 22px 18px;
}

/* ------------------------------ Blauer Kopf ----------------------------- */
.hero {
  position: relative;
  color: #fff;
  padding: 18px 18px 92px;
  background: linear-gradient(160deg, var(--blau) 0%, var(--blau-tief) 60%, var(--blau-nacht) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}
.dachlinie {
  position: absolute;
  right: -30px;
  top: 40px;
  width: 260px;
  height: 150px;
  opacity: 0.16;
}
.kopfzeile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.marke-plakette {
  background: #fff;
  border-radius: 12px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
}
.marke-plakette img {
  height: 36px;
  width: auto;
  display: block;
}
.kopf-rechts {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sos {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--rot);
  color: #fff;
  font-family: var(--anzeige);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 8px 13px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(210, 18, 46, 0.6);
  animation: puls 2.4s infinite;
}
.sos svg {
  width: 16px;
  height: 16px;
}
@keyframes puls {
  0% {
    box-shadow: 0 0 0 0 rgba(210, 18, 46, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(210, 18, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(210, 18, 46, 0);
  }
}
.rund {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  position: relative;
  color: inherit;
}
.rund svg {
  width: 20px;
  height: 20px;
}
.punkt-zahl {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--rot);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--blau-tief);
}
.gruss {
  position: relative;
  margin-top: 20px;
}
.gruss .datum {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 600;
}
.gruss h1 {
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  margin: 4px 0 0;
}
.suche {
  position: relative;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  backdrop-filter: blur(6px);
  width: 100%;
  text-align: left;
}
.suche svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.suche kbd {
  margin-left: auto;
  font-family: var(--anzeige);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ------------------------------ Zeit-Karte ------------------------------ */
.zeitkarte {
  position: relative;
  margin: -76px 14px 0;
  background: var(--karte);
  border-radius: 24px;
  box-shadow: var(--schatten-hoch);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.ring {
  width: 96px;
  height: 96px;
  position: relative;
}
.ring svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}
.ring .spur {
  stroke: var(--blau-hell);
}
.ring .wert {
  stroke: var(--blau);
  transition: stroke-dashoffset 0.6s;
}
.ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}
.ring-text b {
  font-family: var(--anzeige);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring-text span {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.zeit-info .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gruen);
}
.zeit-info .status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 3px rgba(31, 138, 76, 0.18);
}
.zeit-info .status.pause {
  color: var(--orange);
}
.zeit-info .status.pause i {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(226, 113, 29, 0.18);
}
.zeit-info .status.aus {
  color: var(--text3);
}
.zeit-info .status.aus i {
  background: var(--text3);
  box-shadow: 0 0 0 3px rgba(138, 143, 154, 0.18);
}
.projekt-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  text-align: left;
  width: 100%;
}
.pnr {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 13px;
  background: var(--blau);
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.projekt-chip .name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.projekt-chip .ort {
  font-size: 12.5px;
  color: var(--text2);
}
.zeit-knoepfe {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.zk {
  border-radius: 14px;
  padding: 10px 6px;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--grund);
  color: var(--text);
  transition: transform 0.12s;
}
.zk svg {
  width: 20px;
  height: 20px;
}
.zk:active {
  transform: scale(0.95);
}
.zk.haupt {
  background: var(--blau);
  color: #fff;
}
.zk.gehen {
  background: var(--rot-hell);
  color: var(--rot);
}
.zk[disabled] {
  opacity: 0.45;
}

/* ------------------------------ Abschnitte ------------------------------ */
.abschnitt {
  padding: 22px 14px 0;
}
.abschnitt-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 4px 10px;
}
.abschnitt-kopf h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}
.abschnitt-kopf a,
.abschnitt-kopf button.link {
  font-size: 13.5px;
  color: var(--petrol);
  font-weight: 600;
  text-decoration: none;
}
.seiten-kopf {
  padding: 18px 18px 8px;
}
.seiten-kopf h1 {
  font-size: 30px;
  margin: 0;
}
.seiten-kopf p {
  margin: 2px 0 0;
  color: var(--text2);
  font-size: 14px;
}
/* Am Rechner steht der Seitenname schon oben in der Leiste — hier unten waere
   er doppelt (so steht es im Entwurf). */
body.am-rechner .seiten-kopf {
  display: none;
}

/* ------------------------------ Listen ---------------------------------- */
.liste {
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  overflow: hidden;
}
/* Posteingang (Entwurf): Symbol, Text und die Zahl der offenen Meldungen. */
.posteingang .zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--linie);
}
.posteingang .zeile:last-child {
  border-bottom: 0;
}
.pe-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.pe-ico svg {
  width: 20px;
  height: 20px;
}
.pe-text {
  flex: 1;
  min-width: 0;
}
.pe-text b {
  display: block;
  font-size: 14.5px;
}
.pe-text span {
  font-size: 12.5px;
  color: var(--text2);
}
.pe-zahl {
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 20px;
  color: var(--rot);
}
.aufgabe {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--linie);
  transition: opacity 0.3s, background 0.2s;
}
.aufgabe:last-child {
  border-bottom: 0;
}
.haken {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--linie);
  flex: none;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  background: none;
  color: inherit;
}
.haken svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  color: #fff;
}
.aufgabe.erledigt .haken,
.ak-karte.erledigt .haken {
  background: var(--gruen);
  border-color: var(--gruen);
}
.aufgabe.erledigt .haken svg,
.ak-karte.erledigt .haken svg {
  opacity: 1;
}
.aufgabe.erledigt .a-titel {
  text-decoration: line-through;
  color: var(--text3);
}
.a-titel {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
}
.a-meta {
  font-size: 12.5px;
  color: var(--text2);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.faellig {
  color: var(--rot);
  font-weight: 700;
}
.mini-pnr {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--blau);
  background: var(--blau-hell);
  padding: 0 5px;
  border-radius: 4px;
  text-decoration: none;
}

/* ------------------------------ Kacheln (Bento) ------------------------- */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bk {
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bk:active {
  transform: scale(0.97);
}
.bk .ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--blau-hell);
  color: var(--blau);
  display: grid;
  place-items: center;
}
.bk .ico svg {
  width: 20px;
  height: 20px;
}
.bk h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 10px 0 2px;
}
.bk p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.3;
}
.bk .gross {
  font-family: var(--anzeige);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-top: auto;
  padding-top: 8px;
  font-variant-numeric: tabular-nums;
}
.bk .gross small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-left: 4px;
}
.bk.breit {
  grid-column: 1/-1;
}
.bk .plakette {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rot-hell);
  color: var(--rot);
}
.bk.rot .ico {
  background: var(--rot-hell);
  color: var(--rot);
}
.bk.rot {
  box-shadow: inset 0 3px 0 var(--rot), var(--schatten);
}
.bk .ico.insta {
  background: linear-gradient(135deg, #f9d976, #e1306c 55%, #5b51d8);
  color: #fff;
}
.ampel-reihe {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
}
.ampel-reihe span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ampel-reihe i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.balken {
  height: 6px;
  border-radius: 3px;
  background: var(--grund);
  overflow: hidden;
  margin-top: 8px;
}
.balken i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blau), #3e6fd8);
  border-radius: 3px;
}

/* Kacheln anpassen */
.anpassen-knopf {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--petrol);
}
.anpassen-hinweis {
  display: none;
  margin: -4px 4px 12px;
  font-size: 13px;
  color: var(--text2);
}
body.anpassen .anpassen-hinweis {
  display: block;
}
body.anpassen .anpassen-knopf {
  background: var(--blau);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
}
.bk.ausgeblendet {
  display: none;
}
body.anpassen .bk.ausgeblendet {
  display: flex;
  opacity: 0.35;
  filter: grayscale(1);
}
.bk .schalter {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gruen);
  color: #fff;
  place-items: center;
  z-index: 2;
}
.bk .schalter svg {
  width: 15px;
  height: 15px;
}
body.anpassen .bk .schalter {
  display: grid;
}
body.anpassen .bk.ausgeblendet .schalter {
  background: var(--text3);
}
body.anpassen .bk .plakette {
  display: none;
}
body.anpassen .bk {
  cursor: grab;
  touch-action: none;
}
.bk.zieh-geist {
  opacity: 0.4;
}
.bk.ueber {
  outline: 2px dashed var(--blau);
  outline-offset: 2px;
}

/* ------------------------------ Untere Leiste --------------------------- */
.leiste {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(238, 241, 246, 0), rgba(238, 241, 246, 0.96) 30%);
  z-index: 10;
}
[data-theme="dark"] .leiste {
  background: linear-gradient(180deg, rgba(16, 21, 31, 0), rgba(16, 21, 31, 0.96) 30%);
}
/* Immer fuenf Plaetze — Start · Aufgaben (bzw. Team) · + · Chat · Baustellen.
   Das „+" sitzt als mittleres Kind genau in der Mitte (Nachtrag 12). */
.leiste-innen {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--karte);
  border-radius: 22px;
  box-shadow: var(--schatten-hoch);
  padding: 8px 6px;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  padding: 4px 0;
}
.tab svg {
  width: 22px;
  height: 22px;
}
.tab[aria-current="true"] {
  color: var(--blau);
}
/* Das Symbol ist der Anker fuer die rote Plakette (sonst klebte sie an der
   Beschriftung statt am Symbol). */
.tab-ico {
  position: relative;
  display: grid;
  place-items: center;
}
.tab-ico .punkt-zahl {
  top: -6px;
  right: -9px;
  border-color: var(--karte);
}
.plus {
  justify-self: center;
  width: 56px;
  height: 56px;
  margin-top: -26px;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--blau), var(--blau-tief));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px -6px rgba(26, 62, 143, 0.7);
  transition: transform 0.2s;
}
.plus svg {
  width: 26px;
  height: 26px;
  transition: transform 0.25s;
}
.plus.offen svg {
  transform: rotate(45deg);
}

/* ------------------------------ Blaetter -------------------------------- */
.schleier {
  position: absolute;
  inset: 0;
  background: rgba(10, 29, 73, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 20;
}
.schleier.an {
  opacity: 1;
  pointer-events: auto;
}
.blatt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--grund);
  border-radius: 28px 28px 0 0;
  padding: 10px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 21;
  max-height: 88%;
  overflow-y: auto;
}
.blatt.an {
  transform: none;
}
.griff {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #c3cad6;
  margin: 0 auto 12px;
}
.blatt h2 {
  font-size: 22px;
  margin: 0 0 4px;
}
.blatt .unter {
  font-size: 13.5px;
  color: var(--text2);
  margin: 0 0 14px;
}
.aktions-raster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ak {
  background: var(--karte);
  border-radius: 18px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--schatten);
}
.ak .kreis {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--blau-hell);
  color: var(--blau);
  display: grid;
  place-items: center;
}
.ak .kreis svg {
  width: 22px;
  height: 22px;
}
.ak.rot .kreis {
  background: var(--rot-hell);
  color: var(--rot);
}

/* Notruf */
.notruf-112 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: var(--rot);
  color: #fff;
  border-radius: 22px;
  padding: 20px;
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow: 0 14px 30px -10px rgba(210, 18, 46, 0.7);
}
.notruf-112 svg {
  width: 30px;
  height: 30px;
}
.notruf-hinweis {
  background: var(--rot-hell);
  color: #8f0c20;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
[data-theme="dark"] .notruf-hinweis {
  color: #ffb3bf;
}
.not-liste {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.not-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--karte);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--schatten);
  text-align: left;
  width: 100%;
}
.not-zeile .kreis {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blau-hell);
  color: var(--blau);
  display: grid;
  place-items: center;
  flex: none;
}
.not-zeile .kreis svg {
  width: 20px;
  height: 20px;
}
.not-zeile b {
  display: block;
  font-size: 15px;
}
.not-zeile span {
  font-size: 12.5px;
  color: var(--text2);
}
.not-zeile .anruf {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gruen);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.not-zeile .anruf svg {
  width: 18px;
  height: 18px;
}

/* Suche */
.such-feld {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--karte);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--schatten);
  margin-bottom: 12px;
}
.such-feld input {
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  flex: 1;
  background: none;
  color: var(--text);
}
.such-feld svg {
  width: 18px;
  height: 18px;
  color: var(--text3);
  flex: none;
}
.treffer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--karte);
  margin-bottom: 6px;
  width: 100%;
  text-align: left;
}
.treffer .kreis {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--blau-hell);
  color: var(--blau);
  display: grid;
  place-items: center;
  flex: none;
}
.treffer .kreis svg {
  width: 18px;
  height: 18px;
}
.treffer b {
  display: block;
  font-size: 14.5px;
}
.treffer span {
  font-size: 12.5px;
  color: var(--text2);
}
.gruppe-titel {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 12px 4px 6px;
}

/* ------------------------------ Aufgaben-Tafel -------------------------- */
.af-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.umschalter {
  display: inline-flex;
  background: var(--karte);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--schatten);
}
.umschalter button {
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text2);
}
.umschalter button[aria-pressed="true"] {
  background: var(--blau);
  color: #fff;
}
.af-kopf .umschalter button,
.tp-kopf .umschalter button {
  font-size: 13.5px;
  padding: 6px 13px;
}
.af-zusammen {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.af-zahl {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--karte);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--schatten);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
.af-zahl b {
  font-family: var(--anzeige);
  font-size: 22px;
  color: var(--text);
}
.af-zahl.rot b {
  color: var(--rot);
}
.tafel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.spalte {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--linie);
  border-radius: 20px;
  padding: 12px;
}
[data-theme="dark"] .spalte {
  background: rgba(255, 255, 255, 0.04);
}
.spalte-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px 10px;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 16px;
}
.spalte-kopf i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.spalte-kopf span {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  background: var(--karte);
  border-radius: 999px;
  padding: 1px 9px;
}
.ak-karte {
  background: var(--karte);
  border-radius: 16px;
  box-shadow: var(--schatten);
  padding: 12px 12px 11px;
  margin-bottom: 9px;
  border-left: 4px solid var(--st, var(--linie));
  transition: transform 0.15s, opacity 0.3s;
}
.ak-karte .oben {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ak-karte .a-titel {
  flex: 1;
}
.ak-karte .unten {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text2);
}
.ak-karte .wer {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--anzeige);
}
.ak-karte.erledigt {
  opacity: 0.45;
}
.ak-karte.erledigt .a-titel {
  text-decoration: line-through;
}
.prio {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--rot);
  background: var(--rot-hell);
  border-radius: 5px;
  padding: 0 6px;
}
.quelle-klein {
  font-size: 11px;
  font-weight: 700;
  color: #0e8fbf;
  background: #e3f6fd;
  border-radius: 5px;
  padding: 0 6px;
}
[data-theme="dark"] .quelle-klein {
  background: #0d2b38;
}
.spalte-leer {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  padding: 14px 6px;
}
.wisch-hinweis {
  font-size: 12px;
  color: var(--text3);
  margin: 0 4px 8px;
}
.nur-chef-flex {
  display: none !important;
}
body.chef .nur-chef-flex {
  display: flex !important;
}
.nur-chef {
  display: none;
}
body.chef .nur-chef {
  display: block;
}

/* ------------------------------ Start: Kacheln -------------------------- */
.zeitkonto-zeile {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grund);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text2);
  text-align: left;
  width: 100%;
}
.zeitkonto-zeile b {
  font-family: var(--anzeige);
  font-size: 18px;
  color: var(--text);
}
.zeitkonto-zeile .plus {
  color: var(--gruen);
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  display: inline;
}
.zeitkonto-zeile .pfeil {
  margin-left: auto;
  font-size: 20px;
  color: var(--text3);
}
.zeitkonto-zeile.hell {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}
.zeitkonto-zeile.hell b {
  color: #fff;
}
.zeitkonto-zeile.hell .plus {
  color: #8df0b8;
}
.zeitkonto-zeile.hell .pfeil {
  color: rgba(255, 255, 255, 0.6);
}
.tp-gross {
  display: block;
  width: 100%;
  text-align: left;
  background: linear-gradient(150deg, #006774, #004b55);
  color: #fff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--schatten-hoch);
  font-family: var(--lese);
}
.tp-gross-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tp-gross-kopf .ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  color: #fff;
}
.tp-gross-kopf .ico svg {
  width: 20px;
  height: 20px;
}
.tp-gross-kopf b {
  font-family: var(--anzeige);
  font-size: 19px;
}
.tp-gross-kopf .plakette {
  position: static;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.tp-gross-du {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.4;
}
.tp-gross-du .pnr {
  background: #fff;
  color: #006774;
}
.tp-gross-zahlen {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}
.tp-gross-zahlen b {
  font-family: var(--anzeige);
  font-size: 18px;
  color: #fff;
}
.tp-gross-leute {
  display: flex;
  margin-top: 10px;
}
.tp-gross-leute i {
  font-style: normal;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 11px;
  border: 2px solid #005863;
  margin-right: -6px;
  position: relative;
  color: #fff;
}
.tp-gross-leute i::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6be3a0;
  border: 2px solid #005863;
}
.tp-gross-leute i.pause::after {
  background: var(--orange);
}
.tp-gross-leute i.fehlt::after {
  background: #ff6b7d;
}
.tp-gross-spalten {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.tp-gross-spalten > div {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
}
.tp-gross-spalten b {
  display: block;
  font-family: var(--anzeige);
  font-size: 17px;
  margin-top: 6px;
}
.tp-gross-spalten span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}
.tp-gross-spalten .pnr {
  background: #fff;
  color: #006774;
}
.route-gross {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  background: var(--gruen);
  color: #fff;
  border-radius: 16px;
  padding: 14px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(31, 138, 76, 0.8);
}
.route-gross svg {
  width: 22px;
  height: 22px;
}
.wetter-warnung {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: #fff4d6;
  color: #7a5200;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
}
.wetter-warnung svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: #c77800;
}
.wetter-warnung b {
  font-weight: 800;
}
.wetter-warnung.rot {
  background: var(--rot-hell);
  color: #8f0c20;
}
.wetter-warnung.rot svg {
  color: var(--rot);
}
[data-theme="dark"] .wetter-warnung {
  background: #3a2f10;
  color: #ffd98a;
}
[data-theme="dark"] .wetter-warnung.rot {
  background: #3d1419;
  color: #ffb3bf;
}
.offline-leiste {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 10px 14px 0;
  background: #fff4d6;
  color: #7a5200;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
body.offline .offline-leiste {
  display: flex;
}
.aufgaben-quer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.aufgaben-quer .aufgabe {
  border-bottom: 0;
  border-right: 1px solid var(--linie);
}
.aufgaben-quer .aufgabe:last-child {
  border-right: 0;
}

/* ------------------------------ Zeitkonto ------------------------------- */
.zk-kopf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.zk-kopf div {
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 12px;
  text-align: center;
}
.zk-kopf b {
  display: block;
  font-family: var(--anzeige);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.zk-kopf span {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}
.zk-kopf .gruen b {
  color: var(--gruen);
}
.zk-kopf .rot b {
  color: var(--rot);
}
.woche {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  height: 130px;
  padding: 6px 4px 0;
}
.woche div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}
.woche i {
  display: block;
  width: 100%;
  max-width: 38px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #3e6fd8, var(--blau));
}
.woche i.heute {
  background: linear-gradient(180deg, #6be3a0, var(--gruen));
}
.woche b {
  font-family: var(--anzeige);
  font-size: 13px;
  color: var(--text);
}
.soll-linie {
  font-size: 12px;
  color: var(--text3);
  margin: 4px 4px 0;
}
.stunden-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linie);
}
.stunden-zeile:last-child {
  border-bottom: 0;
}
.stunden-zeile .balken {
  flex: 1;
  margin: 0;
}
.stunden-zeile b {
  font-family: var(--anzeige);
  font-size: 17px;
  min-width: 56px;
  text-align: right;
}

/* ------------------------------ Projekt-Seite --------------------------- */
.p-kopf {
  background: linear-gradient(160deg, var(--blau), var(--blau-tief));
  color: #fff;
  padding: 16px 18px 70px;
  position: relative;
  overflow: hidden;
}
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14.5px;
  opacity: 0.9;
  color: inherit;
  text-decoration: none;
}
.zurueck svg {
  width: 18px;
  height: 18px;
}
.p-kopf .pnr-gross {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 15px;
  background: #fff;
  color: var(--blau);
  padding: 3px 9px;
  border-radius: 7px;
  letter-spacing: 0.04em;
}
.p-kopf h1 {
  font-size: 30px;
  margin: 8px 0 2px;
  line-height: 1.05;
}
.p-kopf .adresse {
  font-size: 14px;
  opacity: 0.85;
}
.p-stats {
  margin: -52px 14px 0;
  position: relative;
  background: var(--karte);
  border-radius: 22px;
  box-shadow: var(--schatten-hoch);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 6px;
}
.p-stats div {
  text-align: center;
  border-right: 1px solid var(--linie);
}
.p-stats div:last-child {
  border-right: 0;
}
.p-stats b {
  display: block;
  font-family: var(--anzeige);
  font-size: 26px;
  font-weight: 800;
  color: var(--blau);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .p-stats b {
  color: #7fa5f5;
}
.p-stats span {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}
.p-aktionen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 14px 0;
}
.p-aktionen button,
.p-aktionen a {
  background: var(--karte);
  border-radius: 14px;
  padding: 10px 4px;
  box-shadow: var(--schatten);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--blau);
  text-decoration: none;
  text-align: center;
}
[data-theme="dark"] .p-aktionen button,
[data-theme="dark"] .p-aktionen a {
  color: #7fa5f5;
}
.p-aktionen svg {
  width: 20px;
  height: 20px;
}
.reiter {
  display: flex;
  gap: 6px;
  padding: 16px 14px 0;
  overflow-x: auto;
}
.reiter::-webkit-scrollbar {
  height: 0;
}
.reiter button {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--karte);
  font-weight: 600;
  font-size: 14px;
  color: var(--text2);
  box-shadow: var(--schatten);
}
.reiter button[aria-pressed="true"] {
  background: var(--blau);
  color: #fff;
}
.reiter-inhalt {
  padding: 12px 14px 0;
}
.zeitleiste {
  position: relative;
  padding-left: 22px;
}
.zeitleiste::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--linie);
}
.zl {
  position: relative;
  background: var(--karte);
  border-radius: 16px;
  box-shadow: var(--schatten);
  padding: 11px 13px;
  margin-bottom: 8px;
}
.zl::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blau);
  border: 3px solid var(--grund);
}
.zl.rot::before {
  background: var(--rot);
}
.zl.gruen::before {
  background: var(--gruen);
}
.zl b {
  font-size: 14.5px;
}
.zl span {
  display: block;
  font-size: 12.5px;
  color: var(--text2);
}
.fotos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fotos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--grund);
  display: block;
}

/* ------------------------------ Baustellen ------------------------------ */
.bs-reihe {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 4px 8px;
  scroll-snap-type: x mandatory;
}
.bs-reihe::-webkit-scrollbar {
  height: 0;
}
.bs-karte {
  flex: none;
  width: 236px;
  scroll-snap-align: start;
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bs-karte .kopf {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bs-karte b {
  font-size: 15px;
}
.bs-karte .ort {
  font-size: 12.5px;
  color: var(--text2);
}
.bs-karte .info {
  font-size: 12px;
  color: var(--text2);
  display: flex;
  gap: 10px;
}
.route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  background: var(--gruen);
  color: #fff;
  border-radius: 12px;
  padding: 9px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.route svg {
  width: 18px;
  height: 18px;
}
.route.leise {
  background: var(--blau-hell);
  color: var(--blau);
}
.bs-liste {
  display: grid;
  gap: 10px;
}
.bs-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--karte);
  border-radius: 14px;
  margin-bottom: 6px;
  box-shadow: var(--schatten);
  width: 100%;
  text-align: left;
}
.bs-zeile b {
  display: block;
  font-size: 14.5px;
}
.bs-zeile span.o {
  font-size: 12.5px;
  color: var(--text2);
}
.bs-zeile .route-klein {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gruen);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.bs-zeile .route-klein svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------ Tagesplan ------------------------------- */
.tp-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tp-senden {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blau);
  color: #fff;
  border-radius: 12px;
  padding: 8px 13px;
  font-weight: 700;
  font-size: 13.5px;
}
.tp-senden svg {
  width: 17px;
  height: 17px;
}
.tp-zusammen {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.live-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 16px;
  margin: 4px 4px 10px;
}
.live-titel i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.18);
}
.tp-raster {
  display: grid;
  gap: 12px;
}
.tp-karte {
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  overflow: hidden;
}
.tp-karte .tp-oben {
  padding: 12px 14px;
  background: linear-gradient(150deg, var(--blau), var(--blau-tief));
  color: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tp-karte .tp-oben b {
  display: block;
  font-family: var(--anzeige);
  font-size: 18px;
  line-height: 1.1;
}
.tp-karte .tp-oben .ort {
  font-size: 12.5px;
  opacity: 0.8;
}
.tp-karte .tp-oben .pnr {
  background: #fff;
  color: var(--blau);
}
.tp-karte .tp-oben a {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  flex: none;
}
.tp-karte .tp-oben a svg {
  width: 18px;
  height: 18px;
}
.tp-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--text2);
  border-bottom: 1px solid var(--linie);
}
.tp-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tp-meta svg {
  width: 15px;
  height: 15px;
  color: var(--blau);
}
.tp-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--linie);
}
.tp-person:last-child {
  border-bottom: 0;
}
.tp-person .avatar {
  width: 32px;
  height: 32px;
  font-size: 12.5px;
}
.tp-person b {
  font-size: 14.5px;
  flex: 1;
}
.tp-person .tp-rolle {
  font-size: 11px;
  font-weight: 700;
  color: var(--blau);
  background: var(--blau-hell);
  border-radius: 5px;
  padding: 0 6px;
  margin-left: 6px;
}
.abwesend {
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 12px 14px;
}
.abwesend h3 {
  font-family: var(--anzeige);
  font-size: 16px;
  margin: 0 0 6px;
}
.abwesend .zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.tageskarte {
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 12px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}
.tageskarte .vorschau {
  aspect-ratio: 1/1.3;
  border-radius: 10px;
  border: 1px solid var(--linie);
  position: relative;
  overflow: hidden;
  background: var(--grund);
  display: grid;
  place-items: center;
  color: var(--text3);
}
.tageskarte .vorschau img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tageskarte b {
  display: block;
  font-family: var(--anzeige);
  font-size: 18px;
}
.tageskarte span {
  font-size: 12.5px;
  color: var(--text2);
  display: block;
}
.tageskarte .knopf-reihe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tageskarte .knopf-reihe button,
.tageskarte .knopf-reihe a {
  border-radius: 11px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  background: var(--blau-hell);
  color: var(--blau);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.tageskarte .knopf-reihe button.voll,
.tageskarte .knopf-reihe a.voll {
  background: var(--blau);
  color: #fff;
}
.tageskarte .knopf-reihe a.voll {
  order: -1;
}
.plan-anhang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  background: var(--blau-hell);
  border-radius: 12px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
  color: var(--blau);
}
.plan-anhang svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.plan-anhang b {
  display: block;
  font-size: 14px;
}
.plan-anhang span {
  font-size: 12px;
  color: var(--text2);
}

/* ------------------------------ Chat ------------------------------------ */
.chat-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--linie);
  background: var(--karte);
  text-decoration: none;
  color: inherit;
}
.chat-zeile:last-child {
  border-bottom: 0;
}
.chat-zeile:hover {
  background: #f7f9fc;
}
.chat-zeile[aria-current="true"] {
  background: var(--blau-hell);
}
[data-theme="dark"] .chat-zeile:hover {
  background: rgba(255, 255, 255, 0.05);
}
.chat-av {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 15px;
  flex: none;
  position: relative;
  background: var(--blau);
}
.chat-av svg {
  width: 22px;
  height: 22px;
}
.chat-mitte {
  flex: 1;
  min-width: 0;
}
.chat-mitte b {
  display: block;
  font-size: 15px;
}
.chat-mitte .letzte {
  display: block;
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text3);
}
.ungelesen {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--gruen);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.verb-chips {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.vchip {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 5px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.vchip.cn {
  background: #e2f4ec;
  color: #1d8f6a;
}
.vchip.intern {
  background: var(--blau-hell);
  color: var(--blau);
}
.chat-raum {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.raum-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--karte);
  border-bottom: 1px solid var(--linie);
}
.raum-kopf b {
  display: block;
  font-size: 16px;
}
.raum-kopf span {
  font-size: 12px;
  color: var(--text2);
}
.brueckenhinweis {
  margin: 10px 14px 0;
  background: #eef7f1;
  border: 1px solid #cfe9d7;
  color: #1f6b3d;
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.brueckenhinweis svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.nachrichten {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blase {
  max-width: 80%;
  background: var(--karte);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 11px;
  box-shadow: var(--schatten);
  font-size: 14.5px;
  line-height: 1.35;
  align-self: flex-start;
}
.blase .von {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.blase .zeit {
  font-size: 11px;
  color: var(--text3);
  text-align: right;
  margin-top: 3px;
}
.blase.ich {
  align-self: flex-end;
  background: var(--blau);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.blase.ich .zeit {
  color: rgba(255, 255, 255, 0.7);
}
.blase img.foto-nachricht {
  width: 210px;
  max-width: 100%;
  border-radius: 12px;
  margin: 4px 0 2px;
  display: block;
}
.sys {
  align-self: center;
  font-size: 12px;
  color: var(--text2);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 3px 10px;
}
[data-theme="dark"] .sys {
  background: rgba(255, 255, 255, 0.08);
}
.eingabe {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--karte);
  border-top: 1px solid var(--linie);
  position: sticky;
  bottom: 0;
}
.eingabe input,
.eingabe textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--linie);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  outline: 0;
  background: var(--grund);
  color: var(--text);
}
/* Das Nachrichtenfeld ist ein mehrzeiliges Feld (Enter macht eine neue Zeile),
   soll aber wie eine einzeilige Eingabe aussehen. `min-height` aus der
   allgemeinen textarea-Regel wuerde es hier auf 96 px aufblaehen. */
.eingabe textarea {
  min-height: 40px;
  max-height: 120px;
  resize: none;
  overflow-y: auto;
}
.eingabe input:focus,
.eingabe textarea:focus {
  border-color: var(--blau);
}
.eingabe button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blau);
  flex: none;
}
.eingabe button.senden {
  background: var(--blau);
  color: #fff;
}
/* Der Foto-Knopf ist ein <label> — er muss den versteckten Datei-Waehler
   ausloesen und trotzdem wie die runden Knoepfe daneben aussehen. */
.eingabe .chat-bild {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blau);
  flex: none;
  cursor: pointer;
}
.eingabe .chat-bild input {
  display: none;
}
.eingabe svg {
  width: 20px;
  height: 20px;
}
.desk-chat {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 200px);
  min-height: 520px;
  background: var(--karte);
  border-radius: 22px;
  box-shadow: var(--schatten);
  overflow: hidden;
}
.desk-chat .chat-links {
  border-right: 1px solid var(--linie);
  overflow: auto;
}
.desk-chat .nachrichten {
  flex: 1;
  overflow: auto;
}

/* ------------------------------ Team / Personen ------------------------- */
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 11px 12px;
  margin-bottom: 8px;
}
.person b {
  display: block;
  font-size: 15px;
}
.person span {
  font-size: 12.5px;
  color: var(--text2);
}
.person .anrufe {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.person .anrufe button,
.person .anrufe a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blau-hell);
  color: var(--blau);
}
.person .anrufe button.gruen,
.person .anrufe a.gruen {
  background: var(--gruen);
  color: #fff;
}
.person .anrufe svg {
  width: 18px;
  height: 18px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--anzeige);
  font-weight: 800;
  color: #fff;
  font-size: 15px;
  position: relative;
  flex: none;
  background: var(--blau);
}
.avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gruen);
  border: 2px solid var(--karte);
}
.avatar.pause::after {
  background: var(--orange);
}
.avatar.weg::after {
  background: var(--text3);
}
.avatar.ohne::after {
  display: none;
}
.marke {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--rot-hell);
  color: var(--rot);
  margin-left: 6px;
  display: inline-block;
}
.marke-chef {
  background: var(--blau-hell);
  color: var(--blau);
}
.marke-ok {
  background: #e6f4ec;
  color: var(--gruen);
}
.marke-warn {
  background: #fff3e6;
  color: var(--orange);
}
.marke-rot {
  background: var(--rot-hell);
  color: var(--rot);
}
.marke-gesperrt {
  background: var(--grund);
  color: var(--text3);
}
.marke-laeuft {
  background: #e6f4ec;
  color: var(--gruen);
}
.marke-geaendert {
  background: #fff3e6;
  color: var(--orange);
}

/* ------------------------------ Fuhrpark -------------------------------- */
.fz {
  background: var(--karte);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 12px;
  position: relative;
  overflow: hidden;
  text-align: left;
  display: block;
  width: 100%;
}
.fz::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--a, var(--linie));
}
.fz .fz-ico {
  color: var(--blau);
}
.fz .fz-ico svg {
  width: 30px;
  height: 30px;
}
.fz b {
  display: block;
  font-family: var(--anzeige);
  font-size: 17px;
  margin-top: 4px;
}
.fz span {
  font-size: 12px;
  color: var(--text2);
  display: block;
}
.fz .fz-status {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--a);
  display: flex;
  align-items: center;
  gap: 5px;
}
.fz .fz-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--a);
}
.ampel-flaeche-gruen {
  --a: var(--gruen);
}
.ampel-flaeche-gelb {
  --a: var(--gelb);
}
.ampel-flaeche-orange {
  --a: var(--orange);
}
.ampel-flaeche-rot {
  --a: var(--rot);
}
.ampel-flaeche-grau {
  --a: var(--text3);
}
.legende {
  font-size: 12.5px;
  color: var(--text2);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 4px;
}
.legende-titel {
  font-weight: 700;
  color: var(--text);
}

/* ------------------------------ Konto / Zugaenge ------------------------ */
.konto-karte {
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 16px;
  margin-bottom: 12px;
}
.push-hinweis {
  background: var(--blau-hell);
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 10px;
}

/* ------------------------------ Ersatzteile aus frueheren Etappen -------- */
/* Diese Bausteine kommen aus den Bereichen, die es schon gab (Zeit, Material,
   Bestellen, Lieferschein, Kleidung, Werkzeug, Urlaub, Krankmeldung, EOA,
   Brett, Wissen, Aufkleber). Sie tragen jetzt dieselbe Formensprache. */

.karte {
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 14px;
  margin-bottom: 12px;
}
.karte-wichtig {
  border-left: 4px solid var(--rot);
}
.karte-laeuft {
  border-left: 4px solid var(--gruen);
}
.karte-neu {
  border-left: 4px solid var(--blau);
}
.karte-inner {
  border-radius: 14px;
  background: var(--grund);
  padding: 12px;
}
.karte-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.karte-titel {
  font-family: var(--anzeige);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.karte-meta {
  font-size: 12.5px;
  color: var(--text2);
}
.karte-text {
  font-size: 14.5px;
  line-height: 1.45;
  margin: 6px 0 0;
}
.unterzeile {
  font-size: 12.5px;
  color: var(--text2);
}
.leer,
.leer-klein {
  color: var(--text3);
  font-size: 14px;
  padding: 14px 4px;
  text-align: center;
}
.leer-klein {
  font-size: 12.5px;
  padding: 6px 4px;
  text-align: left;
}
.neu-punkt {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rot);
  margin-left: 6px;
}

/* Formulare */
.feld {
  display: block;
  margin-bottom: 12px;
}
.feld-text {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 4px;
}
.feld input,
.feld select,
.feld textarea,
input[type="text"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 10px 12px;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
.feld-paar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blau);
  color: #fff;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.knopf svg {
  width: 18px;
  height: 18px;
}
.knopf-breit {
  display: flex;
  width: 100%;
}
.knopf-leise {
  background: var(--grund);
  color: var(--text);
}
.knopf-rot {
  background: var(--rot);
  color: #fff;
}
.knopf-gruen {
  background: var(--gruen);
  color: #fff;
}
.knopf-klein {
  padding: 7px 11px;
  font-size: 13.5px;
  border-radius: 11px;
}
.knopf-reihe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.knopf[disabled] {
  opacity: 0.55;
}
.auswahl {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.auswahl-fest {
  font-weight: 600;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--karte);
  box-shadow: var(--schatten);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text2);
}
.chip-aktiv {
  background: var(--blau);
  color: #fff;
}
.chip-warn {
  background: var(--rot-hell);
  color: var(--rot);
}
.meldung {
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.meldung-fehler {
  background: var(--rot-hell);
  color: #8f0c20;
}
.meldung-ok {
  background: #e6f4ec;
  color: #15633a;
}
[data-theme="dark"] .meldung-fehler {
  color: #ffb3bf;
}
[data-theme="dark"] .meldung-ok {
  color: #8ce0b0;
}
.hinweis-rot {
  color: var(--rot);
  font-weight: 600;
}

/* Anmeldung */
.anmeldung {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px;
}
.anmeldung-logo {
  display: block;
  margin: 0 auto 22px;
  height: 52px;
  width: auto;
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: var(--schatten);
}
.startpasswort {
  background: var(--blau-hell);
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 13.5px;
}

/* Zeit */
.zeit-gross {
  font-family: var(--anzeige);
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.wochen-zeile {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
  font-size: 14px;
}
.wochen-zeile:last-child {
  border-bottom: 0;
}
.wochen-zeile-heute {
  font-weight: 700;
}
.wochen-zeile-summe {
  border-top: 2px solid var(--linie);
  font-weight: 700;
}
.wochen-tag {
  font-weight: 600;
  color: var(--text2);
}
.wochen-wert {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.zeile-block {
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
}
.zeile-block:last-child {
  border-bottom: 0;
}
.zeile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.zeile-rest {
  font-size: 12.5px;
  color: var(--text2);
}
.zeile-grund {
  font-size: 12.5px;
  color: var(--text2);
  font-style: italic;
}
.zeit-uhrzeit {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.zeit-art {
  font-weight: 600;
}
.zeit-buchung-offline {
  color: var(--orange);
  font-weight: 700;
}

/* Material */
.artikel-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
  width: 100%;
  text-align: left;
}
.artikel-zeile:last-child {
  border-bottom: 0;
}
.artikel-name {
  font-weight: 600;
  font-size: 14.5px;
}
.artikel-bestand {
  margin-left: auto;
  font-family: var(--anzeige);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.artikel-warn {
  color: var(--rot);
}
.artikel-klein {
  font-size: 12.5px;
  color: var(--text2);
}
.such-zeile {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

/* Fotos */
.foto-reihe {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.foto-fach {
  flex: none;
  width: 104px;
}
.foto {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--grund);
  display: block;
}
.foto-text {
  font-size: 12px;
  color: var(--text2);
  margin-top: 3px;
}
.foto-klein {
  font-size: 11.5px;
  color: var(--text3);
}

/* Unterschrift */
.unterschrift {
  margin-top: 10px;
}
.unterschrift-flaeche {
  width: 100%;
  height: auto;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 14px;
  touch-action: none;
  display: block;
}
.unterschrift-bild {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 14px;
  max-width: 100%;
}

/* Auswahl-Zeile (Freischaltungen) */
.auswahl-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--linie);
}
.auswahl-zeile:last-child {
  border-bottom: 0;
}
.auswahl-zeile input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--blau);
}

/* Nutzer */
.nutzer-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
}
.nutzer-zeile:last-child {
  border-bottom: 0;
}
.nutzer-info {
  min-width: 0;
}
.nutzer-name {
  font-weight: 600;
  font-size: 15px;
}
.nutzer-klein {
  font-size: 12.5px;
  color: var(--text2);
}

/* Werkzeug / Meldungen */
.entscheidung {
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--orange);
}
/* Bestellungen (Etappe 10, Entwurf vom 09.10.2026): zwei grosse farbige
   Kacheln nebeneinander, darunter die breite orange Lieferschein-Kachel, die
   Büro-Zeile "Zu bestellen" und der Abschnitt "Mehr" mit vier kleinen Kacheln. */
.b-paar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.b-gross {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-height: 172px;
  padding: 16px;
  border-radius: 22px;
  color: #fff;
  text-align: left;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.45);
}
.b-rot {
  background: linear-gradient(160deg, var(--rot), #a80e24);
}
.b-gruen {
  background: linear-gradient(160deg, var(--gruen), #166b3a);
}
.b-orange {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 0;
  margin-bottom: 12px;
  background: linear-gradient(120deg, var(--orange), #b85410);
}
.b-ico {
  width: 30px;
  height: 30px;
  flex: none;
}
.b-mitte {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.b-titel {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.15;
}
.b-text {
  font-size: 13px;
  opacity: 0.9;
}
/* Die Zahl sitzt unten in der Kachel — deshalb schiebt `margin-top: auto` sie
   an den unteren Rand. */
.b-wert {
  margin-top: auto;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}
.b-wert small {
  display: block;
  margin-top: 2px;
  font-family: var(--lese);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}
.b-orange .b-wert {
  margin-top: 0;
  font-size: 28px;
  text-align: right;
}
/* Die Büro-Zeile "Zu bestellen" — nur mit dem Recht `bestellen.status_setzen`. */
.b-buero {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 14px;
  border-radius: var(--r);
  background: var(--karte);
  box-shadow: var(--schatten);
  text-align: left;
}
.b-buero-i {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--gruen);
}
.b-buero-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.b-buero-text b {
  font-size: 16px;
}
.b-buero-text span {
  font-size: 12.5px;
  color: var(--text2);
}
.b-zaehler {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--rot-hell);
  color: var(--rot);
  font-size: 12.5px;
  font-weight: 700;
}
.b-klein-raster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.b-kk {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--karte);
  box-shadow: var(--schatten);
  text-align: left;
}
.b-oben {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.b-i {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--blau);
}
.b-i-rot {
  color: var(--rot);
}
.b-kk b {
  font-size: 15px;
}
.b-u {
  font-size: 12.5px;
  color: var(--text2);
}
/* Das Blatt "Bestellen": je Position eine Karte mit Kopfzeile, Feldpaar und
   den Vorschlägen, die beim Tippen erscheinen. */
.b-positionen {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.b-position {
  background: var(--grund);
  border-radius: 16px;
  padding: 11px 12px;
}
.b-kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
.b-weg {
  font-size: 12.5px;
  color: var(--rot);
}
.b-reihe {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}
.b-tipp {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--karte);
  box-shadow: var(--schatten);
  text-align: left;
}
.b-tipp b {
  font-size: 14px;
}
.b-tipp em {
  font-style: normal;
  font-size: 12px;
  color: var(--text2);
}
.b-tipp-leer {
  color: var(--rot);
}
.b-weitere {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px dashed var(--linie);
  border-radius: 14px;
  color: var(--blau);
  font-weight: 600;
}
.b-zwei {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.b-abschicken {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--rot), #a80e24);
  color: #fff;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 12px 24px -12px rgba(210, 18, 46, 0.75);
}
/* Eine Zeile in den Listen (Bereits bestellt, Zu bestellen, Zuletzt bestellt,
   Nochmal bestellen, Reklamationen). */
.b-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--linie);
}
.b-zeile:last-child {
  border-bottom: 0;
}
/* Blockzeilen (mit Foto und Knöpfen) stehen untereinander statt nebeneinander. */
.b-block {
  display: block;
}
.b-name {
  flex: 1;
  min-width: 0;
}
.b-meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text2);
}
.b-foto {
  margin-top: 8px;
}
.b-foto img {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
}
.b-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.b-a-bestellt,
.b-a-lager,
.b-a-nein {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.b-a-bestellt {
  background: var(--gruen);
}
.b-a-lager {
  background: var(--blau);
}
.b-a-nein {
  background: var(--rot);
}
.eoa-eintrag {
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
}
.eoa-eintrag:last-child {
  border-bottom: 0;
}

/* Aufkleber / Druck */
.druckbogen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.etikett {
  border: 1px dashed var(--linie);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  background: var(--karte);
}
.etikett-code {
  width: 100%;
  height: auto;
}
.etikett-text {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: 14px;
}
.etikett-titel {
  font-size: 11px;
  color: var(--text2);
}
.etikett-klein {
  font-size: 10px;
  color: var(--text3);
}

/* Ampeln (Werkzeug/Fuhrpark-Altbestand) */
.ampel-marke {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}
.ampel-punkt {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.ampel-gruen {
  background: var(--gruen);
}
.ampel-gelb {
  background: var(--gelb);
}
.ampel-orange {
  background: var(--orange);
}
.ampel-rot {
  background: var(--rot);
}
.ampel-grau {
  background: var(--text3);
}
/* Zusatzzeilen in der Fahrzeug-Kachel: Meldung und "nicht mehr im Einsatz". */
.fz .fz-meldung {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--orange);
}
.fz.fz-inaktiv {
  opacity: 0.55;
}
.fz.fz-inaktiv .fz-meldung {
  color: var(--text3);
}

/* Zugaenge / Kachel-Auswahl */
.kachel-auswahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* =========================== RECHNER-Ansicht ============================ */
.desk {
  display: none;
}
body.am-rechner .buehne {
  display: none;
}
body.am-rechner .desk {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: calc(100vh - 32px);
  margin: 16px auto 16px;
  max-width: 1440px;
  width: calc(100% - 32px);
  background: var(--grund);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(10, 29, 73, 0.45);
}
.seite-leiste {
  background: linear-gradient(180deg, var(--blau-tief), var(--blau-nacht));
  color: #fff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  overflow-y: auto;
}
.seite-leiste .marke-plakette {
  margin: 0 4px 22px;
  padding: 10px 12px;
  border-radius: 14px;
}
.seite-leiste .marke-plakette img {
  height: auto;
  width: 100%;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  width: 100%;
}
.nav svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.nav:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav[aria-current="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.nav .zahl {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  background: var(--rot);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
}
.nav-titel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 16px 12px 6px;
}
body.chef .nav.nur-chef {
  display: flex;
}
.leiste-fuss {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 16px;
}
.sos-gross {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rot);
  color: #fff;
  font-family: var(--anzeige);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 12px;
  border-radius: 14px;
  animation: puls 2.4s infinite;
}
.sos-gross svg {
  width: 18px;
  height: 18px;
}
.ich {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  width: 100%;
  text-align: left;
  color: #fff;
}
.ich b {
  display: block;
  font-size: 14px;
}
.ich span {
  font-size: 12px;
  opacity: 0.7;
}
.desk-haupt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.desk-kopf {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--linie);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
[data-theme="dark"] .desk-kopf {
  background: rgba(26, 33, 48, 0.7);
}
.desk-kopf h1 {
  font-size: 26px;
  margin: 0;
  white-space: nowrap;
}
.desk-kopf .datum {
  font-size: 13px;
  color: var(--text2);
  font-weight: 600;
}
.desk-suche {
  flex: 1;
  max-width: 560px;
  margin-left: auto;
  position: relative;
}
.desk-suche .such-feld {
  margin: 0;
  box-shadow: none;
  border: 1px solid var(--linie);
}
.desk-suche kbd {
  font-family: var(--anzeige);
  font-size: 12px;
  background: var(--grund);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--text2);
}
.desk-treffer {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--karte);
  border-radius: 16px;
  box-shadow: var(--schatten-hoch);
  padding: 8px;
  display: none;
  max-height: 420px;
  overflow: auto;
  z-index: 8;
}
.desk-treffer.an {
  display: block;
}
.desk-treffer .treffer {
  box-shadow: none;
  border-radius: 12px;
  background: none;
}
.desk-treffer .treffer:hover {
  background: var(--grund);
}
.desk-kopf .rund {
  background: var(--karte);
  color: var(--blau);
  box-shadow: var(--schatten);
  flex: none;
}
.desk-kopf .punkt-zahl {
  border-color: var(--karte);
}
.desk-inhalt-ziel {
  padding: 24px 28px 40px;
  min-width: 0;
}
.raster-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.sp-3 {
  grid-column: span 3;
}
.sp-4 {
  grid-column: span 4;
}
.sp-5 {
  grid-column: span 5;
}
.sp-6 {
  grid-column: span 6;
}
.sp-7 {
  grid-column: span 7;
}
.sp-8 {
  grid-column: span 8;
}
.sp-12 {
  grid-column: span 12;
}
/* Am schmalen Rechner (1100–1280 px) stehen die Karten untereinander —
   nebeneinander waeren sie zu eng (so steht es im Entwurf). */
@media (max-width: 1280px) {
  .sp-4,
  .sp-5,
  .sp-7,
  .sp-8 {
    grid-column: span 12;
  }
  .sp-3 {
    grid-column: span 6;
  }
}
.panel {
  background: var(--karte);
  border-radius: 22px;
  box-shadow: var(--schatten);
  padding: 18px 18px 16px;
  min-width: 0;
}
.panel-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-kopf h2 {
  font-size: 19px;
  margin: 0;
}
.panel-kopf a {
  font-size: 13.5px;
  color: var(--petrol);
  font-weight: 600;
  text-decoration: none;
}
.panel .liste {
  box-shadow: none;
  border: 1px solid var(--linie);
}
.panel.zeit-gross {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  background: linear-gradient(150deg, var(--blau), var(--blau-tief));
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* Am Handy steckt der Inhalt in `.zeitkarte` (eigene Karte mit Rand und
   Schatten). Am Rechner ist das Panel selbst die Karte — der Rahmen waere
   doppelt. `display:contents` loest den Wrapper auf, damit Ring, Status,
   Zeitkonto-Zeile und Knoepfe direkt im Raster des Panels liegen. */
.panel.zeit-gross > .zeitkarte {
  display: contents;
}
.zeit-gross .ring .spur {
  stroke: rgba(255, 255, 255, 0.15);
}
.zeit-gross .ring .wert {
  stroke: #fff;
}
.zeit-gross .ring-text b {
  color: #fff;
}
.zeit-gross .ring-text span {
  color: rgba(255, 255, 255, 0.7);
}
.zeit-gross .status {
  color: #9ff0c1;
}
.zeit-gross .status i {
  background: #6be3a0;
}
.zeit-gross .status.pause {
  color: #ffc38a;
}
.zeit-gross .status.pause i {
  background: #ffc38a;
}
.zeit-gross .projekt-chip .ort {
  color: rgba(255, 255, 255, 0.75);
}
.zeit-gross .projekt-chip .name {
  color: #fff;
}
.zeit-gross .pnr {
  background: #fff;
  color: var(--blau);
}
.zeit-gross .zeit-knoepfe {
  grid-column: 1/-1;
}
.zeit-gross .zk {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.zeit-gross .zk.haupt {
  background: #fff;
  color: var(--blau);
}
.zeit-gross .zk.gehen {
  background: rgba(210, 18, 46, 0.9);
  color: #fff;
}
.panel.tp-gross {
  background: linear-gradient(150deg, #006774, #004b55);
  color: #fff;
  text-align: left;
}
body.am-rechner .tp-gross-spalten {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* Der Tagesplan steht am Rechner in Spalten — je Baustelle eine Karte. */
body.am-rechner .tp-raster {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
@media (max-width: 1280px) {
  body.am-rechner .tp-raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Baustellen: am Rechner nebeneinander statt zum Wischen. */
body.am-rechner .bs-reihe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
  padding: 0;
}
body.am-rechner .bs-karte {
  width: auto;
  box-shadow: none;
  border: 1px solid var(--linie);
}
body.am-rechner .bs-zeile {
  box-shadow: none;
  border: 1px solid var(--linie);
}
@media (max-width: 1280px) {
  body.am-rechner .bs-reihe {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Team: am Rechner zwei Personen nebeneinander statt einer langen Schlange. */
body.am-rechner .person-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.am-rechner .person-raster .person {
  margin-bottom: 0;
  box-shadow: none;
  border: 1px solid var(--linie);
}
@media (max-width: 1280px) {
  body.am-rechner .person-raster {
    grid-template-columns: 1fr;
  }
}
.tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tabelle th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--linie);
}
.tabelle td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--linie);
  vertical-align: middle;
}
.tabelle tr:last-child td {
  border-bottom: 0;
}
.status-pille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.st-arbeit {
  background: #e6f4ec;
  color: var(--gruen);
}
.st-pause {
  background: #fff3e6;
  color: var(--orange);
}
.st-krank {
  background: var(--rot-hell);
  color: var(--rot);
}
.st-weg {
  background: var(--grund);
  color: var(--text2);
}
.status-pille i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.bento-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.bento-4 .bk {
  min-height: 136px;
}
.p-desk-kopf {
  background: linear-gradient(150deg, var(--blau), var(--blau-tief));
  color: #fff;
  border-radius: 22px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.p-desk-kopf h1 {
  font-size: 34px;
  margin: 8px 0 2px;
}
.p-desk-kopf .adresse {
  opacity: 0.85;
}
.p-desk-kopf .zahlen {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.p-desk-kopf .zahlen b {
  display: block;
  font-family: var(--anzeige);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.p-desk-kopf .zahlen span {
  font-size: 12.5px;
  opacity: 0.75;
  font-weight: 600;
}
.quelle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--linie);
  border-radius: 16px;
  margin-bottom: 8px;
}
.quelle .q-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--anzeige);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex: none;
}
.quelle b {
  display: block;
  font-size: 14.5px;
}
.quelle span {
  font-size: 12.5px;
  color: var(--text2);
}
.quelle .rechts {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--petrol);
}
.verb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.vs-an {
  background: #e6f4ec;
  color: var(--gruen);
}
.vs-teil {
  background: #fff3e6;
  color: var(--orange);
}
.vs-aus {
  background: var(--grund);
  color: var(--text2);
}
.verb-karte {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.verb-karte p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.45;
}
.verb-karte .q-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--anzeige);
  font-weight: 800;
  color: #fff;
}
.verb-karte h2 {
  font-size: 19px;
  margin: 0;
}
.verb-karte ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text2);
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(10, 29, 73, 0.45);
  z-index: 50;
  padding: 16px;
}
.modal.an {
  display: grid;
}
.modal-innen {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--grund);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--schatten-hoch);
  animation: rein 0.25s;
}
.desk-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--blau-nacht);
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 60;
  pointer-events: none;
}
.desk-toast.an {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Weniger Bewegung, wenn der Nutzer das so eingestellt hat */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------- Etappe 9: Aktuelles -------------------------- */
/* Die Rubrik "Aktuelles" der Homepage: pflegen, was draussen steht. */

/* Ein Beitrag in der Liste — eine Karte mit einer Zeile (Bild links, Text
   rechts) und darunter der Schalter fuer die Homepage. */
.akt-eintrag {
  padding: 12px;
  margin-bottom: 10px;
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
}

/* Die ganze Zeile ist ein Knopf und fuehrt ins Blatt zum Bearbeiten. */
.akt-zeile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.akt-bild {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--linie);
  border-radius: 12px;
  background: var(--grund);
}

/* Ohne Bild bleibt der Platz stehen, damit alle Zeilen gleich aussehen. */
.akt-bild-leer {
  display: grid;
  place-items: center;
  color: var(--blau);
}
.akt-bild-symbol svg {
  width: 26px;
  height: 26px;
}

.akt-inhalt {
  flex: 1;
  min-width: 0;
}
.akt-titel {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.akt-datum {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text2);
}
.akt-marken {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* Der Anriss des Beitrags — hoechstens zwei Zeilen, damit die Liste
   uebersichtlich bleibt. Der ganze Text steht im Blatt. */
.akt-anriss {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Sicherheitsnetz fuer Browser ohne Zeilenbegrenzung. */
  max-height: 2.7em;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text2);
}

/* Ein Merker am Beitrag ("erst nach Freigabe zeigen") bleibt stehen, solange
   er gesetzt ist — bewusst ausserhalb des Knopfes. */
.akt-merker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.akt-fuss {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--linie);
}
.akt-fuss .auswahl {
  flex: 1 1 auto;
}
.akt-fuss .knopf {
  margin-left: auto;
}

/* Die Bilder eines Beitrags im Blatt: je Bild eine Zeile — links das
   Vorschaubild, rechts die Beschreibung und die Knoepfe. So passt es auch am
   Handy, ohne dass die Zeile seitlich wegrollt. */
.akt-bild-zeile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  background: var(--karte);
  border-radius: 16px;
}
.akt-bild-klein {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--grund);
}
.akt-bild-rest {
  flex: 1;
  min-width: 0;
}
.akt-bild-rest .feld {
  margin-bottom: 4px;
}

/* Die Vorschau im Blatt: das Bild in seiner echten Form, nicht quadratisch
   beschnitten — so steht es spaeter auch auf der Homepage. */
.akt-vorschau-bild {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: var(--grund);
}

/* Am Rechner sitzt die Liste schon in einer weissen Karte — dann trennt nur
   eine feine Linie (wie bei den Baustellen-Zeilen). */
body.am-rechner .akt-eintrag {
  box-shadow: none;
  border: 1px solid var(--linie);
}

/* Am Rechner gibt es keine untere Leiste und keinen Schleier */
body.am-rechner .leiste,
body.am-rechner .schleier,
body.am-rechner .blatt,
body.am-rechner .toast {
  display: none !important;
}

/* Blaetter gibt es am Rechner trotzdem: `blattOeffnen` haengt sie in die Mitte
   (#d-modal-innen). Dort sind sie keine Schublade von unten mehr, sondern der
   Inhalt der Mitteilung — ohne diese Regel bliebe die Mitte leer. */
body.am-rechner .modal-innen .blatt {
  display: block !important;
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: none;
  border-radius: 0;
  transform: none;
  box-shadow: none;
}
body.am-rechner .modal-innen .blatt .griff {
  display: none;
}

/* ============================== DRUCK ================================== */
@media print {
  body {
    background: #fff;
    background-image: none;
  }
  .leiste,
  .schleier,
  .blatt,
  .toast,
  .desk-toast,
  .modal,
  .suche,
  .kopf-rechts,
  .desk-kopf,
  .seite-leiste,
  .offline-leiste,
  .anpassen-knopf,
  .anpassen-hinweis,
  .hero::before,
  .dachlinie,
  .nicht-drucken {
    display: none !important;
  }
  .telefon,
  .buehne,
  .bildschirm {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
  body.am-rechner .buehne {
    display: block !important;
  }
  body.am-rechner .desk {
    display: block !important;
    box-shadow: none;
    margin: 0;
    width: auto;
    max-width: none;
    background: #fff;
  }
  .hero,
  .p-kopf,
  .tp-gross,
  .panel.zeit-gross,
  .tp-karte .tp-oben {
    background: #fff !important;
    color: #000 !important;
    padding: 8px 0 !important;
  }
  .hero *,
  .p-kopf *,
  .tp-gross * {
    color: #000 !important;
  }
  .karte,
  .panel,
  .liste,
  .bk,
  .fz,
  .tp-karte,
  .person,
  .bs-zeile,
  .bs-karte,
  .ak-karte {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  .marke-plakette {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  .reiter-inhalt[hidden] {
    display: block !important;
  }
  .druckbogen {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .etikett {
    border: 1px dashed #999;
    break-inside: avoid;
  }
  a[href]::after {
    content: "";
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}

/* ------------------------------ Zugangsverwaltung (Etappe 9) -------------- */

.verwaltung-reiter {
  margin-bottom: 12px;
}
.verwaltung-kopf {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.verwaltung-kopf .such-feld {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0;
}
.verwaltung-kopf .knopf {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}
.verwaltung-zaehler {
  margin: 0 0 10px 2px;
}

/* Liste */
.verwaltung-liste {
  display: grid;
  gap: 10px;
}
.verwaltung-karte {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--karte);
  border-radius: var(--r);
  box-shadow: var(--schatten);
  padding: 13px 15px;
  color: inherit;
  text-decoration: none;
}
.verwaltung-karte.ist-gesperrt {
  opacity: 0.62;
}
.verwaltung-karte-text {
  flex: 1;
  min-width: 0;
}
.verwaltung-karte-rechts {
  text-align: right;
  flex: none;
}
.verwaltung-zahl {
  font-family: var(--anzeige);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.verwaltung-marken {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}
.verwaltung-marken .marke {
  margin-left: 0;
}

/* Person */
.verwaltung-person-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}
.verwaltung-person-kopf h1 {
  margin: 0;
}
.verwaltung-rollen {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}
.auswahl-rolle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
}
.auswahl-rolle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--blau);
}
.verwaltung-zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

/* Bereiche und Rechte */
.verwaltung-kachel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
}
.verwaltung-kachel:last-child {
  border-bottom: 0;
}
.verwaltung-kachel input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--blau);
}
.verwaltung-schloss {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--grund);
  color: var(--text3);
  font-weight: 700;
}
.verwaltung-schloss.ist-auf {
  background: var(--blau-hell);
  color: var(--blau);
}
.verwaltung-kachel-text {
  flex: 1;
  min-width: 0;
}
.verwaltung-kachel.ist-zu .verwaltung-kachel-text {
  opacity: 0.6;
}
.verwaltung-rechte {
  background: var(--grund);
  border-radius: 14px;
  padding: 4px 14px;
  margin: 2px 0 10px;
}
.verwaltung-recht {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
}
.verwaltung-recht:last-child {
  border-bottom: 0;
}
.verwaltung-recht-text {
  flex: 1;
  min-width: 190px;
}
.verwaltung-recht-titel {
  font-size: 14.5px;
  font-weight: 600;
}
.umschalter-klein {
  padding: 2px;
}
.umschalter-klein button {
  font-size: 12.5px;
  padding: 6px 11px;
}

/* Vorschau „So sieht <Vorname> die App" */
.verwaltung-vorschau-gruppe {
  margin-bottom: 12px;
}
.verwaltung-vorschau-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}
.verwaltung-vorschau-kachel {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grund);
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 13.5px;
  font-weight: 600;
}
.verwaltung-vorschau-kachel .kachel-symbol {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blau);
}

/* Uebersicht: Personen × Bereiche (nur am Rechner) */
.matrix-karte {
  padding: 0;
  overflow: auto;
  max-height: 72vh;
}
.matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13.5px;
}
.matrix th,
.matrix td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--linie);
}
.matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--karte);
  font-weight: 700;
  vertical-align: bottom;
}
.matrix-ecke,
.matrix-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--karte);
  text-align: left;
  min-width: 170px;
}
.matrix thead .matrix-ecke {
  z-index: 3;
}
.matrix-name a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.matrix-name .nutzer-klein {
  display: block;
  font-weight: 400;
}
.matrix-spalte {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  max-height: 130px;
  font-size: 12.5px;
  color: var(--text2);
}
.matrix-zelle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--blau);
}
.matrix-fest {
  color: var(--text3);
  font-weight: 700;
}
.matrix-fest.ist-an {
  color: var(--blau);
}

/* Protokoll */
.protokoll-zeile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--linie);
}
.protokoll-zeile:last-child {
  border-bottom: 0;
}
.protokoll-text {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
}
.protokoll-rechts {
  text-align: right;
  flex: none;
}

@media print {
  .matrix-karte {
    max-height: none;
    overflow: visible;
  }
}

/* ===========================================================================
   Anmeldung mit Face ID, Fingerabdruck, Code und Notfall-Codes
   (Etappe 1, Lauf 2)
   =========================================================================== */

.zf-anmeldung {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px;
}

.zf-schrittmarke {
  display: inline-block;
  background: var(--blau-hell);
  color: var(--blau);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 12px;
}

.zf-abschnitt {
  margin: 16px 0;
}

.zf-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Der grosse runde Entsperr-Knopf */
.zf-entsperr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 180px;
  height: 180px;
  min-height: 120px;
  margin: 22px auto;
  border-radius: 50%;
  border: 2px solid var(--blau);
  background: var(--karte);
  color: var(--text);
  font-family: var(--lese);
  font-size: 15px;
  font-weight: 600;
  padding: 18px;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--schatten);
}

.zf-entsperr:hover {
  transform: translateY(-1px);
  box-shadow: var(--schatten-hoch);
}

.zf-entsperr:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 4px;
}

.zf-entsperr:disabled {
  opacity: 0.6;
  cursor: wait;
}

.zf-entsperr-symbol {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.zf-entsperr-symbol svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.zf-link {
  display: block;
  width: 100%;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--blau);
  font-family: var(--lese);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  padding: 12px 6px;
  text-decoration: none;
  border-radius: 12px;
}

.zf-link:hover {
  background: var(--blau-hell);
}

.zf-link:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 2px;
}

.zf-klein {
  font-size: 13.5px;
  color: var(--text2);
  text-align: center;
  margin: 4px auto 16px;
  max-width: 380px;
  line-height: 1.4;
}

.zf-fehler {
  color: var(--rot);
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0;
  line-height: 1.4;
}

.zf-fehler p {
  margin: 0;
}

/* Codefeld gross, Monospace, mit Buchstabenabstand */
.zf-codefeld {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 20px;
  letter-spacing: 0.3em;
  text-align: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--linie);
  border-radius: var(--r);
  background: var(--karte);
  color: var(--text);
}

.zf-codefeld:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 2px;
}

.zf-codefeld.zf-fehler-eingabe {
  border-color: var(--rot);
  background: var(--rot-hell);
}

/* Schalter „Dieses Handy merken" */
.zf-schalter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  min-height: 44px;
  font-size: 14.5px;
  cursor: pointer;
  line-height: 1.35;
}

.zf-schalter input[type="checkbox"] {
  min-width: 24px;
  min-height: 24px;
  accent-color: var(--blau);
}

/* Notfall-Code-Bereich, aufklappbar */
.zf-notfall {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--linie);
}

/* Notfall-Codes-Liste: ab 360 px zweispaltig */
.zf-codes {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
  padding-left: 1.6em;
  margin: 16px 0;
  list-style: decimal;
}

.zf-codes li {
  margin: 3px 0;
  user-select: all;
  -webkit-user-select: all;
}

@media (min-width: 360px) {
  .zf-codes {
    column-count: 2;
    column-gap: 24px;
  }
}

/* Das Geheimnis zum Abtippen */
.zf-geheimnis {
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-align: center;
  background: var(--blau-hell);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--r);
  margin: 12px 0;
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}

/* QR-Bild vom Server */
.zf-qr {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 12px auto;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--schatten);
}

/* Hinweisleiste auf „Mein Tag" und im Assistenten */
.zf-hinweis-leiste {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--blau-hell);
  color: var(--text);
  margin-bottom: 12px;
  font-size: 14.5px;
  line-height: 1.4;
  flex-wrap: wrap;
}

.zf-hinweis-symbol {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: var(--blau);
  flex: 0 0 24px;
}

.zf-hinweis-symbol svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.zf-hinweis-text {
  flex: 1 1 200px;
}

.zf-hinweis-knopf {
  margin-left: auto;
  color: var(--blau);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  padding: 12px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
}

.zf-hinweis-knopf:hover {
  background: var(--karte);
}

.zf-hinweis-knopf:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 2px;
}

/* Pflicht-Haken auf dem Notfall-Codes-Blatt */
.zf-haken-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14.5px;
  cursor: pointer;
  margin: 12px 0;
  line-height: 1.35;
}

.zf-haken-zeile input[type="checkbox"] {
  min-width: 24px;
  min-height: 24px;
  accent-color: var(--blau);
}

.zf-druckbereich {
  background: var(--karte);
}

.zf-datum {
  color: var(--text2);
  font-size: 13.5px;
  margin: 0 0 12px;
}

/* Ausdruck der Notfall-Codes: nur das Blatt bleibt sichtbar. */
@media print {
  body.zf-druck-codes * {
    visibility: hidden;
  }
  body.zf-druck-codes .zf-druckbereich,
  body.zf-druck-codes .zf-druckbereich * {
    visibility: visible;
  }
  body.zf-druck-codes .zf-druckbereich {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

.zf-hinweis-start {
  margin: 12px 14px 0;
}

/* ---------------------------------------------------------------------------
   Oberfläche Sicherheit (Lauf 3b, Korrektur-Runde 1)
   --------------------------------------------------------------------------- */

.si-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--linie);
}

.si-zeile:last-child {
  border-bottom: none;
}

.si-name {
  flex: 1 1 auto;
  min-width: 0;
}

.si-name strong {
  display: block;
  font-size: 15px;
}

.si-klein {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.si-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.si-knoepfe .knopf,
.si-knopf {
  min-height: 44px;
}

.si-marke-ok,
.si-marke-offen {
  display: inline-block;
  width: auto;
  /* In Spalten-Layouts (flex) sonst ueber die volle Breite gezogen. */
  align-self: flex-start;
}

.si-marke-ok {
  background: #e6f4ec;
  color: var(--gruen);
}

.si-marke-offen {
  background: #fff3e6;
  color: var(--orange);
}

.si-bestaetigung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--rot-hell);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.si-warn {
  color: var(--rot);
}

.si-protokoll-zeile {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--linie);
  font-size: 14px;
}

.si-protokoll-zeit {
  color: var(--text2);
}

.si-protokoll-geraet {
  color: var(--text3);
  font-size: 12px;
}

.si-protokoll-mehr {
  margin-top: 8px;
}

.si-protokoll-klappe {
  flex: 1 1 100%;
  margin-top: 8px;
}

.si-zaehler {
  font-weight: 700;
  font-size: 15px;
  color: var(--blau);
}

.si-select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--linie);
  background: var(--karte);
  font-size: 15px;
  color: var(--text);
  width: 100%;
  max-width: 320px;
}

.si-hinweis {
  border-left: 4px solid var(--blau);
}

@media (max-width: 390px) {
  .si-zeile {
    flex-direction: column;
    align-items: stretch;
  }
  .si-zeile .si-knoepfe,
  .si-zeile .si-bestaetigung {
    width: 100%;
  }
  .si-protokoll-zeile {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* „Kurz bestätigen": die Schicht legt sich fest über alles, damit niemand
   im Hintergrund weiterklicken kann. Der z-index liegt über Kopf- und
   Fußleiste; die Schicht liegt ausserdem über allen Karten und Dialogen. */
.zf-schicht {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  padding: 16px;
  /* Halbtransparenter Hintergrund — der Dialog hebt sich vor dem Rest der
     Seite ab, der Nutzer sieht, dass es gerade nur um diese Bestätigung geht. */
  background: rgba(10, 20, 40, 0.55);
  /* Bei wenig Höhe soll die Karte scrollen, statt am Rand abgeschnitten zu
     werden — deshalb `overflow: auto` auf der Schicht und `margin: auto` auf
     der Karte darunter. */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Karte zentrieren. `margin: auto` in einem Flex-Container rueckt sie sowohl
   waagerecht als auch senkrecht in die Mitte und lässt sie beim Ueberlaufen
   nicht am oberen Rand abschneiden. Maximal 420 px wie die normale Karte. */
.zf-schicht > .zf-anmeldung {
  margin: auto;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  /* Die Grund-Polsterung der Karte faellt hier weg — der Rand kommt von der
     Schicht selbst (16 px), damit die Karte auf dem Handy randfüllend bleibt. */
  padding: 0;
}

/* Auf dem Handy (schmale Anzeige) die volle Breite — 16 px Rand kommt vom
   Padding der Schicht. Auf breiten Anzeigen bleibt die 420-px-Grenze. */
@media (max-width: 480px) {
  .zf-schicht > .zf-anmeldung {
    max-width: none;
  }
}
