:root {
  --farbe-dunkel: #23272b;      /* Anthrazit - Metall/Zaun-Optik */
  --farbe-dunkel-2: #2f343a;
  --farbe-akzent: #4c7a3f;      /* Gruen - Garten-/Landschaftsbau */
  --farbe-akzent-dunkel: #3a5f30;
  --farbe-hell: #f4f5f6;
  --farbe-karte: #ffffff;
  --farbe-rand: #dde1e4;
  --farbe-text: #23272b;
  --farbe-text-schwach: #6b7480;
  --farbe-fehler: #b3261e;
  --farbe-fehler-bg: #fdecea;
  --farbe-erfolg: #2f6b3a;
  --farbe-erfolg-bg: #e9f5ea;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--farbe-hell);
  color: var(--farbe-text);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--farbe-akzent-dunkel); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- Kopfbereich / Navigation ---------- */
header.app-header {
  background: var(--farbe-dunkel);
  color: #fff;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
header.app-header .app-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
header.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
header.app-header .brand img {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
}
header.app-header .brand span {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
header.app-header .app-header-topzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,0.16); }
.nav-toggle-strich { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }

header.app-header nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  font-size: 14px;
  margin-top: 4px;
}
header.app-header nav.offen { display: flex; }
header.app-header nav a,
header.app-header nav form,
header.app-header nav button.linklike {
  width: 100%;
}
header.app-header nav a,
header.app-header button.linklike {
  display: block;
  color: #e4e8e2;
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  border: none;
  font-family: inherit;
  min-height: unset;
}
header.app-header nav a:hover,
header.app-header button.linklike:hover { background: rgba(255,255,255,0.16); color: #fff; }
header.app-header button.linklike { color: #f3c9c4; }
header.app-header button.linklike:hover { background: rgba(179,38,30,0.25); color: #fff; }
header.app-header form { margin: 0; }
/* "Wichtiges"-Button in der Navigation: bewusst als auffaelliger, solide
   gefuellter Button statt der uebrigen halbtransparenten Links gestaltet,
   damit er wie gewuenscht deutlich sichtbar hervorsticht. */
header.app-header nav a.nav-wichtig-btn {
  background: #e8590c;
  color: #fff;
  font-weight: 700;
}
header.app-header nav a.nav-wichtig-btn:hover { background: #c94c09; color: #fff; }
/* Blinkt, um Mitarbeiter gezielt auf "Wichtiges" hinzuweisen - nutzt dieselbe
   Blink-Animation wie die anderen leuchtenden Hinweise in der App. */
header.app-header nav a.nav-wichtig-btn-blinkend {
  animation: leuchtend-rot-blinken 1s steps(1, end) infinite;
}
.user-badge {
  display: block;
  font-size: 12.5px;
  color: #b7c2b0;
  white-space: nowrap;
  padding: 4px 14px 2px;
}

@media (min-width: 700px) {
  header.app-header { padding: 6px 16px; }
  header.app-header .app-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  header.app-header .app-header-topzeile { width: auto; gap: 8px; }
  header.app-header .brand img { height: 24px; max-height: 24px; }
  header.app-header .brand span { font-size: 13.5px; }
  .nav-toggle { display: none; }
  header.app-header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 4px;
    margin-top: 0;
    flex-wrap: nowrap;
  }
  header.app-header nav a,
  header.app-header nav form,
  header.app-header nav button.linklike { width: auto; }
  header.app-header nav a,
  header.app-header button.linklike {
    padding: 5px 9px;
    font-size: 12.5px;
    white-space: nowrap;
  }
  .user-badge { padding: 0; font-size: 11px; }
}

/* ---------- Login-Seite ---------- */
.login-page {
  position: relative;
  /* z-index (auch wenn 0) ist noetig, damit diese Seite einen eigenen
     Stapelkontext bildet - sonst wirkt der negative z-index des Zauns
     weiter oben (auf Dokumentenebene) und landet hinter dem gesamten
     Seitenhintergrund statt nur hinter der Anmeldekarte. */
  z-index: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(160deg, var(--farbe-akzent) 0%, var(--farbe-akzent-dunkel) 100%);
}
/* Moderner Sichtschutzzaun (horizontale Bretter) als Hintergrund-Deko -
   passend zum "Zaunbau"-Thema der Firma. Liegt per negativem z-index hinter
   der Anmeldekarte und den Firmendaten, ganz unten auf der Seite. */
.login-zaun-deko {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}
.login-firmenkopf {
  text-align: center;
  color: #fff;
  margin-bottom: 26px;
  max-width: 340px;
}
.login-logo-kreis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  margin-bottom: 14px;
}
.login-logo-kreis img { height: 56px; width: auto; display: block; }
.login-firmenkopf h1 {
  font-size: 21px;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login-firmendaten {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.login-firmendaten p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #cfd6cd;
}
.login-card {
  background: var(--farbe-karte);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  padding: 30px 24px;
  width: 100%;
  max-width: 360px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--farbe-akzent), var(--farbe-akzent-dunkel));
}
.login-card h2 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
  color: var(--farbe-text);
  text-align: center;
}
.login-impressum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(35,39,43,0.06);
  border: 1px solid var(--farbe-rand);
  color: var(--farbe-text-schwach);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  min-height: unset;
}
.login-impressum-btn:hover { background: rgba(35,39,43,0.12); color: var(--farbe-text); }

/* ---------- Anmelden-Seite (neues zweispaltiges Layout) ----------
   Eigenstaendiger Klassen-Praefix "anmelden-", unabhaengig von den obigen
   ".login-*"-Klassen (die dadurch ungenutzt, aber unschaedlich, bestehen
   bleiben) - eigene Rot-Akzentfarbe passend zum Logo, unabhaengig vom
   sonst gruenen "--farbe-akzent" der App. */
.anmelden-seite {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, #d7ecf7 0%, #bfe0f2 32%, #eaf4fa 62%, #f4f5f6 100%);
  perspective: 1600px;
}
/* Weiche "Lichtflecken" im Hintergrund - geben der Flaeche mehr Tiefe, ohne
   ein echtes Foto zu benoetigen. */
.anmelden-seite::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 30% at 12% 18%, rgba(255,255,255,0.55), transparent 70%),
    radial-gradient(30% 24% at 88% 12%, rgba(255,255,255,0.4), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
/* Zaun-Silhouette am unteren Rand, evoziert die Foto-Vorlage ohne ein
   konkretes Foto zu verwenden - gleiche Bretter-Optik wie die vorherige
   Zaun-Deko, nur dunkler/silhouettenhaft statt weiss. */
.anmelden-seite::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background-image: repeating-linear-gradient(90deg, rgba(35,39,43,0.14) 0 8px, transparent 8px 34px);
  background-position: bottom;
  z-index: 0;
  pointer-events: none;
}
.anmelden-karte {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  background: linear-gradient(165deg, #ffffff 0%, #fbfcfd 60%, #f3f5f6 100%);
  border-radius: 22px;
  /* Mehrschichtiger Schatten: weicher Umgebungsschatten + engerer
     Kontaktschatten + feiner heller Rand oben = wirkt wie eine ueber dem
     Hintergrund schwebende Karte. */
  box-shadow:
    0 3px 8px rgba(20,24,28,0.10),
    0 18px 40px rgba(20,24,28,0.16),
    0 45px 90px rgba(20,24,28,0.16),
    inset 0 1px 0 rgba(255,255,255,0.9);
  max-width: 980px;
  width: 100%;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease;
}
.anmelden-links, .anmelden-rechts {
  flex: 1 1 50%;
  min-width: 0;
  padding: 40px 36px;
}
.anmelden-links { display: flex; flex-direction: column; }
/* Grabstichel-Rille statt einer flachen Linie: eine dunkle und direkt
   daneben eine helle Linie erzeugen einen eingelassenen (3D-)Falz. */
.anmelden-trenner {
  width: 1px;
  background: rgba(35,39,43,0.14);
  box-shadow: 1px 0 0 rgba(255,255,255,0.8);
  margin: 32px 0;
}
.anmelden-logo-kreis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ffffff 0%, #f1f3f4 100%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.9);
  padding: 14px;
  box-shadow:
    0 10px 22px rgba(20,24,28,0.16),
    0 2px 4px rgba(20,24,28,0.08),
    inset 0 2px 3px rgba(255,255,255,0.9),
    inset 0 -3px 6px rgba(20,24,28,0.06);
  margin-bottom: 20px;
  width: 96px; height: 96px;
}
.anmelden-logo-kreis img { width: 100%; height: 100%; object-fit: contain; display: block; }
.anmelden-willkommen { margin: 0; font-size: 20px; font-weight: 700; color: var(--farbe-text); line-height: 1.3; }
.anmelden-linie { width: 56px; height: 4px; background: #d61f26; border-radius: 999px; margin: 14px 0 22px; }
.anmelden-merkmale { display: flex; flex-direction: column; gap: 16px; }
.anmelden-merkmal { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; color: var(--farbe-text); }
/* Icons sitzen jetzt auf einer kleinen "geprägten" Plakette statt frei zu
   schweben - dezenter Schlagschatten unter dem Symbol selbst sorgt fuer
   zusaetzliche Tiefe. */
.anmelden-merkmal-icon {
  flex: none;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffffff 0%, #eef1f3 100%);
  box-shadow: 0 4px 10px rgba(20,24,28,0.12), inset 0 1px 1px rgba(255,255,255,0.9);
  padding: 6px;
}
.anmelden-merkmal-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12)); }
.anmelden-titel { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--farbe-text); letter-spacing: 0.01em; }
.anmelden-titel span { color: #d61f26; }
.anmelden-intro { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.anmelden-intro-icon {
  flex: none;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffffff 0%, #f1f3f4 100%);
  box-shadow: 0 6px 14px rgba(20,24,28,0.14), inset 0 1px 1px rgba(255,255,255,0.9);
  padding: 10px;
}
.anmelden-intro-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.14)); }
.anmelden-intro-titel { margin: 4px 0 6px; font-size: 16px; font-weight: 700; color: var(--farbe-text); }
.anmelden-intro-titel span { color: #d61f26; }
.anmelden-intro-absatz { margin: 0; font-size: 13.5px; color: var(--farbe-text-schwach); line-height: 1.5; }
.anmelden-formular { margin-top: 4px; }
/* Gepresster 3D-Button: der dunkle "Sockel"-Rand unten simuliert Hoehe;
   beim Klicken (:active) sackt der Button ab und der Sockel wird kuerzer -
   fuehlt sich wie ein echter, gedrueckter Knopf an. */
.anmelden-login-btn {
  width: 100%;
  background: linear-gradient(180deg, var(--farbe-dunkel-2) 0%, var(--farbe-dunkel) 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 13px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.28), 0 8px 18px rgba(20,24,28,0.3);
  transform: translateY(0);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.anmelden-login-btn:hover { background: linear-gradient(180deg, var(--farbe-dunkel) 0%, var(--farbe-dunkel-2) 100%); }
.anmelden-login-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.28), 0 3px 8px rgba(20,24,28,0.28);
}
.anmelden-hinweisbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(165deg, var(--farbe-hell) 0%, #ececee 100%);
  box-shadow: inset 0 1px 3px rgba(20,24,28,0.07), inset 0 -1px 0 rgba(255,255,255,0.6);
}
.anmelden-hinweis-icon {
  flex: none;
  width: 30px; height: 30px;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffffff 0%, #f1f3f4 100%);
  box-shadow: 0 4px 8px rgba(20,24,28,0.12), inset 0 1px 1px rgba(255,255,255,0.9);
  padding: 5px;
}
.anmelden-hinweis-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12)); }
.anmelden-hinweisbox p { margin: 0; font-size: 13px; color: var(--farbe-text-schwach); line-height: 1.5; }
.anmelden-hinweisbox strong { color: var(--farbe-text); }
.anmelden-impressum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(35,39,43,0.06);
  border: 1px solid var(--farbe-rand);
  color: var(--farbe-text-schwach);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  min-height: unset;
}
.anmelden-impressum-btn:hover { background: rgba(35,39,43,0.12); color: var(--farbe-text); }

@media (max-width: 780px) {
  .anmelden-seite { padding: 16px 10px; }
  .anmelden-seite::before { height: 70px; }
  .anmelden-karte { flex-direction: column; border-radius: 16px; }
  /* Login-Formular steht auf dem Handy ganz oben, damit man nicht erst an
     Logo/Feature-Liste vorbeiscrollen muss, um sich einzuloggen. */
  .anmelden-rechts { order: 1; }
  .anmelden-trenner { order: 2; width: auto; height: 1px; margin: 0 20px; }
  .anmelden-links { order: 3; }
  .anmelden-links, .anmelden-rechts { padding: 20px 18px; }
  .anmelden-logo-kreis { width: 60px; height: 60px; padding: 9px; margin-bottom: 10px; }
  .anmelden-willkommen { font-size: 16px; }
  .anmelden-linie { margin: 9px 0 14px; }
  .anmelden-merkmale { gap: 9px; }
  .anmelden-merkmal { font-size: 13px; gap: 10px; }
  .anmelden-merkmal-icon { width: 24px; height: 24px; }
  .anmelden-titel { font-size: 19px; }
  .anmelden-intro { gap: 10px; margin-bottom: 12px; }
  .anmelden-intro-icon { width: 38px; height: 38px; }
  .anmelden-intro-titel { font-size: 14px; margin: 1px 0 3px; }
  .anmelden-intro-absatz { font-size: 12.5px; line-height: 1.4; }
  .anmelden-formular label { margin: 8px 0 4px; }
  .anmelden-login-btn { padding: 11px; margin-top: 4px; }
  .anmelden-hinweisbox { margin-top: 14px; padding: 12px 14px; gap: 10px; }
  .anmelden-hinweis-icon { width: 22px; height: 22px; }
  .anmelden-hinweisbox p { font-size: 12px; }
  .anmelden-impressum-btn { margin-top: 12px; }
}

@media (max-width: 400px) {
  /* Auf sehr kleinen Handys: Logo/Feature-Liste ganz ausblenden, damit nur
     Login-Formular + Hinweisbox zu sehen sind - kein Scrollen noetig. */
  .anmelden-links, .anmelden-trenner { display: none; }
  .anmelden-rechts { padding-top: 22px; }
}

/* ---------- Formulare ---------- */
label { display: block; font-size: 13.5px; font-weight: 600; margin: 12px 0 5px; color: #40474d; }
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--farbe-rand);
  border-radius: 8px;
  font-size: 16px; /* verhindert Auto-Zoom bei iPhone */
  background: #fff;
  color: var(--farbe-text);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--farbe-akzent);
  box-shadow: 0 0 0 3px rgba(76,122,63,0.15);
}
textarea { resize: vertical; min-height: 70px; }
.feld-zeile { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) {
  .feld-zeile.zwei { grid-template-columns: 1fr 1fr; }
  .feld-zeile.drei { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Datei-Eingabe: ersetzt die vom Betriebssystem/Browser vorgegebene
   (auf iPhones oft englische) Beschriftung des nativen Datei-Auswahl-Buttons
   durch einen eigenen deutschsprachigen Button + Dateiname-Anzeige. Das
   eigentliche <input type="file"> bleibt technisch/fuer Screenreader nutzbar,
   ist aber optisch unsichtbar ("visually hidden", nicht display:none, damit
   Formular-Validierung/Fokus weiter normal funktionieren). ---------- */
.datei-eingabe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.datei-eingabe .btn { margin: 0; cursor: pointer; }
.datei-dateiname { font-size: 13.5px; color: var(--farbe-text-schwach); }
.datei-eingabe-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--farbe-akzent);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  min-height: 44px; /* gute Touch-Groesse */
}
button:hover, .btn:hover { background: var(--farbe-akzent-dunkel); }
button.sekundaer, .btn.sekundaer {
  background: #fff; color: var(--farbe-text); border: 1.5px solid var(--farbe-rand);
}
button.sekundaer:hover, .btn.sekundaer:hover { background: #f0f1f2; }
button.gefahr, .btn.gefahr { background: #fff; color: var(--farbe-fehler); border: 1.5px solid #f0c4c1; }
button.gefahr:hover { background: var(--farbe-fehler-bg); }
button.block, .btn.block { width: 100%; }
.btn-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Karten / Listen ---------- */
.card {
  background: var(--farbe-karte);
  border: 1px solid var(--farbe-rand);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.page-title h1 { font-size: 21px; margin: 0; }

.suchleiste { display: flex; gap: 8px; margin-bottom: 14px; }
.suchleiste input { flex: 1; }

.aufmass-item {
  display: block;
  background: var(--farbe-karte);
  border: 1px solid var(--farbe-rand);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}
.aufmass-item:hover { border-color: var(--farbe-akzent); }
.aufmass-item .zeile1 { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.aufmass-item .kunde { font-weight: 700; font-size: 16px; color: var(--farbe-text); }
.aufmass-item .datum { font-size: 12.5px; color: var(--farbe-text-schwach); }
.aufmass-item .adresse { font-size: 13.5px; color: var(--farbe-text-schwach); margin-top: 3px; }
.status-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  margin-top: 6px; text-transform: uppercase; letter-spacing: 0.02em;
}
.status-offen { background: #fdf1dc; color: #8a5a00; }
.status-angebot { background: #e4edfb; color: #1a4b8c; }
.status-versendet { background: #dcf4f0; color: #0f7a6c; }
.status-beauftragt { background: #eae6fb; color: #4b2f9e; }
.status-erledigt { background: var(--farbe-erfolg-bg); color: var(--farbe-erfolg); }

/* Status-Auswahl (Administrator) auf der Aufmaße-Liste: als Pille gestyltes
   <select>, analog zum Status-Button der Baustellen-Planung (siehe
   .bz-status-auswahl) - Auto-Save beim Auswaehlen, siehe aufmass_liste.js.
   Andere Rollen sehen stattdessen die normale, nicht interaktive
   ".status-badge" oben. */
.status-auswahl {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: none;
  width: auto; /* ueberschreibt die globale Regel "select { width: 100% }" oben - die
    Auswahl soll wie ein Badge nur so breit wie ihr Inhalt sein, nicht die ganze Karte fuellen. */
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.status-auswahl.status-offen { background: #fdf1dc; color: #8a5a00; }
.status-auswahl.status-angebot { background: #e4edfb; color: #1a4b8c; }
.status-auswahl.status-versendet { background: #dcf4f0; color: #0f7a6c; }
.status-auswahl.status-beauftragt { background: #eae6fb; color: #4b2f9e; }
.status-auswahl.status-erledigt { background: var(--farbe-erfolg-bg); color: var(--farbe-erfolg); }

/* Aufmaße per Drag & Drop sortierbar (Administrator) - "touch-action: none"
   ist entscheidend fuer das Ziehen per Finger (z.B. iPad), siehe gleiches
   Vorgehen bei ".az-ziehbar" (Fahrzeug-Zuteilung). */
.aufmass-item.aufmass-ziehbar { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.aufmass-item.aufmass-wird-gezogen { opacity: 0.45; cursor: grabbing; }
/* Schwebender Klon, der beim Ziehen per Pointer Events dem Finger/der Maus
   folgt (siehe zugAktivieren() in aufmass_liste.js, analog zu ".az-ziehklon"
   bei der Fahrzeug-Zuteilung) - die eigentliche Karte an ihrer Stelle wird
   waehrenddessen nur abgedunkelt (siehe ".aufmass-wird-gezogen" oben). */
.aufmass-ziehklon {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.97;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18), 0 20px 36px rgba(0,0,0,0.28);
  transform: scale(1.03) rotate(-1deg);
  margin: 0 !important;
}

.leer-hinweis { text-align: center; color: var(--farbe-text-schwach); padding: 40px 16px; }

/* ---------- Positionen (dynamische Zeilen) ---------- */
.position-karte {
  border: 1.5px dashed var(--farbe-rand);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: #fafbfa;
  position: relative;
}
.position-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.position-kopf select { max-width: 220px; }
.position-entfernen {
  background: none; border: none; color: var(--farbe-fehler); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 6px 4px; min-height: unset;
}

/* ---------- Benutzerverwaltung (kompakt) ---------- */
.benutzer-liste { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 16px; }
@media (min-width: 640px) {
  .benutzer-liste { grid-template-columns: 1fr 1fr; }
}
.benutzer-item {
  background: var(--farbe-karte);
  border: 1px solid var(--farbe-rand);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: grab;
}
.benutzer-item.benutzer-wird-gezogen { opacity: 0.45; cursor: grabbing; }
.benutzer-kopf { display: flex; align-items: center; gap: 8px; }
.benutzer-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--farbe-akzent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10.5px;
}
.benutzer-info { flex: 1; min-width: 0; }
.benutzer-name {
  font-weight: 700; font-size: 13px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.benutzer-meta {
  font-size: 11px; color: var(--farbe-text-schwach);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.benutzer-item .status-badge { flex-shrink: 0; margin-top: 0; font-size: 10.5px; padding: 2px 8px; }
.benutzer-aktionen { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.benutzer-aktionen .chip { font-size: 11.5px; padding: 4px 10px; }
.chip {
  background: var(--farbe-hell);
  border: 1px solid var(--farbe-rand);
  color: var(--farbe-text);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: unset;
}
.chip:hover { background: #eceeef; }
.chip-gefahr { color: var(--farbe-fehler); border-color: #f2c9c5; }
.chip-gefahr:hover { background: var(--farbe-fehler-bg); }
.benutzer-pw-form {
  display: none;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.benutzer-pw-form.sichtbar { display: flex; }
.benutzer-pw-form input { flex: 1; min-width: 160px; padding: 8px 10px; font-size: 14px; }
.benutzer-pw-form button { min-height: unset; padding: 8px 14px; font-size: 13px; }

/* ---------- Detailansicht ---------- */
.detail-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.detail-block { margin-bottom: 18px; }
.detail-block h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--farbe-text-schwach); margin: 0 0 8px; }
dl.info-liste { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 0; font-size: 14.5px; }
dl.info-liste dt { color: var(--farbe-text-schwach); }
dl.info-liste dd { margin: 0; }

.position-anzeige { border-left: 3px solid var(--farbe-akzent); padding: 8px 0 8px 12px; margin-bottom: 10px; }
.position-anzeige .titel { font-weight: 700; }
.position-anzeige .werte { font-size: 13.5px; color: #444; margin-top: 2px; }
.position-anzeige .notiz { font-size: 13px; color: var(--farbe-text-schwach); font-style: italic; margin-top: 2px; }

.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.foto-grid a { display: block; }
.foto-grid img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--farbe-rand); }
.foto-loeschen { display: block; text-align: center; font-size: 11.5px; color: var(--farbe-fehler); margin-top: 3px; background: none; border: none; cursor: pointer; padding: 2px; }

/* ---------- Auftragsverwaltung (strukturierte Auftraege) ---------- */
.av-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.av-tab {
  background: #fff; border: 1.5px solid var(--farbe-rand); color: var(--farbe-text-schwach);
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; min-height: unset;
}
.av-tab:hover { background: var(--farbe-hell); }
.av-tab.aktiv { background: var(--farbe-akzent); border-color: var(--farbe-akzent); color: #fff; }

.av-stat-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.av-stat-karte { background: var(--farbe-karte); border: 1px solid var(--farbe-rand); border-radius: var(--radius); padding: 14px 16px; }
.av-stat-wert { font-size: 24px; font-weight: 700; color: var(--farbe-text); line-height: 1.2; }
.av-stat-label { font-size: 12.5px; color: var(--farbe-text-schwach); margin-top: 2px; }
.av-stat-umsatz { display: flex; align-items: center; justify-content: space-between; background: var(--farbe-dunkel); color: #fff; }
.av-stat-umsatz-label { font-size: 12px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.04em; }
.av-stat-umsatz-wert { font-size: 22px; font-weight: 700; }

.av-pdf-karte { border: 1.5px dashed var(--farbe-akzent); background: #fafbf8; }
.av-dropzone {
  border: 2px dashed var(--farbe-rand); border-radius: var(--radius); background: #fff;
  padding: 30px 16px; text-align: center; cursor: pointer; color: var(--farbe-text-schwach); font-size: 14px;
}
.av-dropzone.dragover { border-color: var(--farbe-akzent); background: var(--farbe-erfolg-bg); }

.av-liste-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.av-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.av-filter-tab {
  background: var(--farbe-hell); border: none; color: #555; border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; cursor: pointer; min-height: unset;
}
.av-filter-tab.aktiv { background: var(--farbe-akzent); color: #fff; }
.av-bulk-leiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--farbe-rand); margin-bottom: 10px; }

.auftrag-status-offen { background: #fdf1dc; color: #8a5a00; }
.auftrag-status-bestellt { background: #e4edfb; color: #1a4b8c; }
.auftrag-status-fertig { background: var(--farbe-erfolg-bg); color: var(--farbe-erfolg); }
.auftrag-status-rechnung { background: #ececec; color: #595959; }

.av-overlay {
  display: none; position: fixed; inset: 0; background: rgba(35,39,43,0.55);
  z-index: 200; align-items: center; justify-content: center; padding: 16px;
}
.av-overlay.sichtbar { display: flex; }
.av-edit-karte { max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; margin-bottom: 0; }

.av-toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--farbe-dunkel); color: #fff;
  padding: 11px 18px; border-radius: 8px; font-size: 13.5px; z-index: 300; opacity: 0; pointer-events: none;
  transform: translateY(8px); transition: opacity 0.2s, transform 0.2s;
}
.av-toast.sichtbar { opacity: 1; transform: translateY(0); }

/* ---------- Auftragszuteilung (Kanban-Board) ---------- */
/* Dezenter Farbverlauf im Hintergrund statt einer flachen Flaeche - gibt dem
   Board etwas Tiefe, ohne von den eigentlichen (nun staerker plastischen)
   Spalten/Karten abzulenken. */
.az-body { background: linear-gradient(180deg, #e4e8ee 0%, #eef1f5 40%, #f0f2f5 100%); min-height: 100vh; }
.az-topbar {
  background: linear-gradient(180deg, var(--farbe-dunkel-2) 0%, var(--farbe-dunkel) 100%);
  color: #fff; display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; position: sticky; top: 0; z-index: 60;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
.az-zurueck { color: #e4e8e2; text-decoration: none; background: rgba(255,255,255,0.1); padding: 8px 14px; border-radius: 8px; font-size: 13.5px; }
.az-zurueck:hover { background: rgba(255,255,255,0.18); }
.az-titel { font-size: 16px; font-weight: 700; }
.az-untertitel { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.az-btn-speichern { background: var(--farbe-fehler); margin-left: auto; min-height: unset; padding: 10px 20px; }
.az-btn-speichern:hover { background: #941a14; }

.az-main { display: flex; gap: 16px; padding: 18px; overflow-x: auto; align-items: flex-start; }
/* Jede Spalte (Kopf + Koerper zusammen) wirkt jetzt wie eine ueber dem
   Hintergrund schwebende Tafel - mehrschichtiger Schatten wie bei der
   Login-Karte, dazu eine leichte "Anhebung", wenn man mit der Maus darueber
   ist (auf Touch-Geraeten ohne Effekt, siehe hover:hover-Abfrage). */
.az-spalte, .az-pool-spalte {
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(20,24,28,0.10), 0 10px 22px rgba(20,24,28,0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.az-spalte { flex: 1 1 220px; min-width: 220px; }
.az-pool-spalte { flex: 0 0 240px; min-width: 240px; }
@media (hover: hover) {
  .az-spalte:hover, .az-pool-spalte:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(20,24,28,0.14), 0 16px 30px rgba(20,24,28,0.18);
  }
}

.az-spalten-kopf {
  border-radius: 10px 10px 0 0; padding: 12px 14px; color: #fff; position: relative; overflow: hidden;
}
/* Glanzstreifen oben im Kopf - macht aus der flachen Farbflaeche eine leicht
   gewoelbte, glaenzende Leiste (typischer "3D-Button/-Balken"-Trick). */
.az-spalten-kopf::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 55%;
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.az-spalten-kopf::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2px;
  background: rgba(0,0,0,0.15); pointer-events: none;
}
.az-kopf-pool { background: #343a40; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.az-kopf-grau { background: #6c757d; }
.az-kopf-blau { background: #0d6efd; }
.az-kopf-gelb { background: #b5860a; }
.az-kopf-gruen { background: #198754; }
.az-kopf-rot { background: #cc0000; }
.az-kopf-lila { background: #7c3aed; }
.az-kopf-orange { background: #e8590c; }
.az-kopf-tuerkis { background: #0e7c86; }
.az-kopf-pink { background: #d63384; }
.az-kopf-schwarz { background: #212529; }
.az-fz-name { font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,0.2); position: relative; }
.az-fz-kennzeichen { font-size: 11.5px; opacity: 0.85; margin-top: 2px; position: relative; }
.az-anzahl { opacity: 0.8; font-weight: 400; position: relative; }

.az-such-wrap { background: #343a40; padding: 0 10px 10px; }
.az-such-feld {
  width: 100%; border: none; border-radius: 6px; padding: 8px 10px; font-size: 13px;
  background: #4a5057; color: #fff; outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}
.az-such-feld::placeholder { color: rgba(255,255,255,0.4); }

.az-spalten-koerper {
  border-radius: 0 0 10px 10px; min-height: 360px; padding: 10px;
  background: #fff; border: 2px solid #e0e0e0; border-top: none;
  /* Leichter Innenschatten oben = wirkt wie eine Vertiefung/Ablage, in der
     die "erhabenen" Karten (siehe .az-karte) liegen. */
  box-shadow: inset 0 6px 10px -8px rgba(0,0,0,0.28);
}
.az-pool-spalte .az-spalten-koerper { background: #e9ecef; }
.az-spalten-koerper.az-drag-over { background: #f0f6ff; border-color: var(--farbe-akzent); }
.az-rand-grau { border-color: #6c757d !important; }
.az-rand-blau { border-color: #0d6efd !important; }
.az-rand-gelb { border-color: #b5860a !important; }
.az-rand-gruen { border-color: #198754 !important; }
.az-rand-rot { border-color: #cc0000 !important; }
.az-rand-lila { border-color: #7c3aed !important; }
.az-rand-orange { border-color: #e8590c !important; }
.az-rand-tuerkis { border-color: #0e7c86 !important; }
.az-rand-pink { border-color: #d63384 !important; }
.az-rand-schwarz { border-color: #212529 !important; }

.az-leer-hinweis { text-align: center; color: #ccc; font-size: 12.5px; padding: 24px 8px; pointer-events: none; }
.az-karte-versteckt { display: none !important; }

.az-karte {
  background: linear-gradient(165deg, #ffffff 0%, #fbfcfd 100%);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  /* Mehrschichtiger Schatten statt einer einzelnen duennen Linie - die Karte
     wirkt dadurch erhaben, als laege sie sichtbar ueber der Spalte. */
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #ccc; position: relative; user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) {
  .az-karte.az-ziehbar:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.14);
  }
}
/* "touch-action: none" ist entscheidend fuer das Ziehen per Finger (z.B.
   iPad): ohne diese Regel interpretiert Safari eine Beruehrung+Bewegung auf
   der Karte selbst als Seiten-Scrollen, statt sie an unsere
   Pointer-Event-Logik in auftragszuteilung.js weiterzugeben. */
.az-karte.az-ziehbar { cursor: grab; touch-action: none; }
.az-karte.az-wird-gezogen { opacity: 0.35; box-shadow: none; }
.az-karte.az-drop-vor::before, .az-karte.az-drop-nach::after {
  content: ''; display: block; position: absolute; left: 0; right: 0; height: 3px;
  background: var(--farbe-dunkel); border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.az-karte.az-drop-vor::before { top: -5px; }
.az-karte.az-drop-nach::after { bottom: -5px; }
/* Schwebender Klon, der beim Ziehen per Pointer Events dem Finger/der Maus
   folgt (siehe zugAktivieren() in auftragszuteilung.js) - die eigentliche
   Karte an ihrem Platz wird waehrenddessen nur abgedunkelt (az-wird-gezogen).
   Eine leichte Drehung + staerkerer/weicherer Schatten vermitteln den
   Eindruck, die Karte sei tatsaechlich "aufgehoben" worden. */
.az-ziehklon {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.97;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18), 0 20px 36px rgba(0,0,0,0.28);
  transform: scale(1.05) rotate(-2deg);
  margin: 0 !important;
}
.az-spalte .az-karte { border-left-color: #ccc; }
#az-spalte-pool .az-karte { border-left-color: #adb5bd; }
.az-karte-nr { font-size: 11px; color: #aaa; margin-bottom: 2px; }
.az-karte-name { font-weight: 700; font-size: 13px; color: #1a1a1a; }
.az-karte-sub { font-size: 11px; color: #666; margin-top: 2px; }
.az-karte-status { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 12px; padding: 2px 8px; margin-top: 4px; background: #f0f0f0; color: #555; }
.az-prio-badge {
  position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 700; color: #aaa;
  background: #f8f9fa; border-radius: 10px; padding: 1px 7px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.7);
}
.az-prio-1 { color: #cc0000; background: #fff3f3; }
.az-prio-2 { color: #b5860a; background: #fffbe6; }
.az-prio-3 { color: #198754; background: #f0faf5; }

@media (max-width: 860px) {
  .az-main { padding: 12px; gap: 10px; }
  .az-pool-spalte { width: 200px; flex: 0 0 200px; }
  .az-spalte { flex: 0 0 220px; }
}

/* ---------- Meldungen ---------- */
.meldung { padding: 11px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.meldung.fehler { background: var(--farbe-fehler-bg); color: var(--farbe-fehler); border: 1px solid #f2c9c5; }
.meldung.erfolg { background: var(--farbe-erfolg-bg); color: var(--farbe-erfolg); border: 1px solid #c5e3c9; }

table.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tabelle th, table.tabelle td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--farbe-rand); }
table.tabelle th { color: var(--farbe-text-schwach); font-size: 12.5px; text-transform: uppercase; }

.hinweis-text { color: var(--farbe-text-schwach); font-size: 13px; }

footer.app-footer { text-align: center; color: var(--farbe-text-schwach); font-size: 12px; padding: 26px 16px 40px; }

/* ---------- KI-Dokumentenauslese (Auftragsverwaltung) ---------- */
.ki-upload-karte {
  background: #fafbf8;
  border: 1.5px dashed var(--farbe-akzent);
}
.ki-upload-karte input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--farbe-rand);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.ki-status { font-size: 13px; margin-top: 10px; min-height: 1em; }
.ki-status-laeuft { color: var(--farbe-text-schwach); }
.ki-status-erfolg { color: var(--farbe-erfolg); font-weight: 600; }
.ki-status-fehler { color: var(--farbe-fehler); font-weight: 600; }

.dokument-pdf-kachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100px; border-radius: 8px; border: 1px solid var(--farbe-rand);
  background: var(--farbe-hell); color: var(--farbe-text); text-decoration: none;
  font-weight: 700; font-size: 13px; text-align: center; padding: 6px;
}
.dokument-pdf-kachel span {
  font-weight: 400; font-size: 10.5px; color: var(--farbe-text-schwach);
  margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Baustellen-Planung ---------- */
.lieferschein-karte {
  border: 1px solid var(--farbe-rand); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fff;
}
.lieferschein-karte:last-child { margin-bottom: 0; }
.lieferschein-kopf { display: flex; align-items: center; gap: 12px; }
.lieferschein-info { flex: 1; min-width: 0; }
.lieferschein-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zubehoer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--farbe-rand);
}
.zubehoer-grid img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--farbe-rand); }
.zubehoer-grid .dokument-pdf-kachel { height: 80px; font-size: 11px; }
.zugriff-liste { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.zugriff-zeile {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--farbe-rand); cursor: pointer;
}
.zugriff-zeile:last-child { border-bottom: none; }
.zugriff-zeile input { width: 17px; height: 17px; }

/* ---------- Sortier-Auswahl (Auftragsverwaltung) - modernes Segmented-Control ---------- */
.sortier-leiste { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sortier-label { font-size: 13px; font-weight: 600; color: var(--farbe-text-schwach); white-space: nowrap; }
.sortier-gruppe {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--farbe-rand);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.sortier-chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--farbe-text-schwach);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.sortier-chip:hover { background: var(--farbe-hell); color: var(--farbe-text); }
.sortier-chip.aktiv { background: var(--farbe-akzent); color: #fff; }
.sortier-chip.aktiv:hover { background: var(--farbe-akzent); color: #fff; }

/* ---------- Fahrzeug-Kennzeichnung (farbige Badges je Kennzeichen) ---------- */
.fahrzeug-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.fahrzeug-grau  { background: #e7e9eb; color: #4b5157; }
.fahrzeug-blau  { background: #dce6f5; color: #14356e; }
.fahrzeug-gelb  { background: #fcefc2; color: #8a6d1f; }
.fahrzeug-rot   { background: var(--farbe-fehler-bg); color: var(--farbe-fehler); }
.fahrzeug-neutral { background: var(--farbe-hell); color: var(--farbe-text-schwach); border: 1px solid var(--farbe-rand); }
.fahrzeug-dunkelgruen { background: #dcece0; color: #1e4d2b; }

/* ---------- Fahrzeug-Auswahl (farbiges Dropdown im Formular) ---------- */
.fahrzeug-auswahl { position: relative; margin-top: 6px; }
.fahrzeug-auswahl-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--farbe-rand);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: var(--farbe-text);
  cursor: pointer;
  text-align: left;
}
.fahrzeug-auswahl-btn:hover { border-color: var(--farbe-akzent); }
.fahrzeug-auswahl-text { flex: 1; }
.fahrzeug-auswahl-pfeil { color: var(--farbe-text-schwach); margin-left: 8px; }
.fahrzeug-auswahl-liste {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1.5px solid var(--farbe-rand);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}
.fahrzeug-auswahl-liste.offen { display: block; }
.fahrzeug-option {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}
.fahrzeug-option:hover { background: var(--farbe-hell); }

.fahrzeug-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
.fahrzeug-dot-grau  { background: #8a8f95; }
.fahrzeug-dot-blau  { background: #14356e; }
.fahrzeug-dot-gelb  { background: #e0b400; }
.fahrzeug-dot-rot   { background: #b3261e; }
.fahrzeug-dot-dunkelgruen { background: #1e4d2b; }
.fahrzeug-dot-neutral, .fahrzeug-dot-leer { background: #c7cbd1; }

/* ---------- Auftrags-Farbmarker (freie Zuordnung, unabhaengig von Fahrzeug/Status) ---------- */
.farb-auswahl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.farb-option { cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.farb-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.farb-dot-gross {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--farbe-rand) inset;
}
.farb-option input:checked + .farb-dot-gross {
  border-color: #fff; box-shadow: 0 0 0 2px var(--farbe-text);
}
.farb-dot-gross::after { content: ""; color: #fff; font-size: 15px; font-weight: 700; }
.farb-option input:checked + .farb-dot-gross::after { content: "✓"; }
.farb-marker-grau        { background: #8a8f95; }
.farb-marker-blau        { background: #14356e; }
.farb-marker-gelb        { background: #e0b400; }
.farb-marker-rot         { background: #b3261e; }
.farb-marker-dunkelgruen { background: #1e4d2b; }
.farb-marker-lila        { background: #6a3aa0; }
.farb-marker-leer        { background: #fff; box-shadow: 0 0 0 1.5px var(--farbe-rand) inset; }
.farb-marker-leer::after { color: var(--farbe-text-schwach) !important; }

.farb-punkt {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; flex-shrink: 0;
}
.farb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--farbe-hell); color: var(--farbe-text);
}

.farb-filter-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.farb-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--farbe-hell); color: var(--farbe-text); text-decoration: none;
  border: 1.5px solid transparent;
}
.farb-filter-chip.aktiv { border-color: var(--farbe-text); background: #fff; }

/* ---------- Baustellen: Farb-Fenster neben Montage-Start-Badge ---------- */
.baustelle-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.baustelle-badges .montage-start-badge { margin-top: 0; }
.farb-fenster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2, #fff);
  border: 2px solid currentColor;
  flex-shrink: 0;
}
.farb-fenster.farb-marker-grau        { color: #4b5563; }
.farb-fenster.farb-marker-blau        { color: #0b57d0; }
.farb-fenster.farb-marker-gelb        { color: #a6790a; }
.farb-fenster.farb-marker-rot         { color: #d7263d; }
.farb-fenster.farb-marker-dunkelgruen { color: #15803d; }
.farb-fenster.farb-marker-lila        { color: #7c2d9c; }
.farb-fenster.farb-marker-leer        { color: var(--farbe-text-schwach); border-color: var(--farbe-rand); }

.farb-option-code {
  display: block;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--farbe-text-schwach);
  margin-top: 4px;
}

/* ---------- Geschaetzte Bauzeit (Baustellen-Planung), bewusst in Rot ---------- */
.bauzeit-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fdeceb;
  color: #b3261e;
}
.bauzeit-auswahl { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.bauzeit-option { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 500; }
.bauzeit-option input { margin: 0; }

/* ---------- Fahrzeuge/Kennzeichen (Baustellen-Planung), bis zu 3 pro Baustelle.
   Eigener Klassenname, da ".fahrzeug-badge" bereits fuer die Auftragsverwaltung
   mit eigenen Farbvarianten (.fahrzeug-grau usw.) verwendet wird. ---------- */
.baustelle-fahrzeug-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1f5faa;
}


/* ---------- Summen-Karte (Auftragsverwaltung) ---------- */
.summen-karte { display: none; }
.summen-karte.sichtbar { display: block; }

/* ---------- Montage-Start (Baustellen-Planung) ---------- */
.montage-start-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fdf1dc;
  color: #8a5a00;
}

.dokument-dateiname { font-size: 11px; color: var(--farbe-text-schwach); text-align: center; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

/* ---------- Fahrzeuge verwalten (Link im Auftragszuteilung-Topbar) ---------- */
.az-fahrzeuge-link {
  margin-left: auto;
  color: #e4e8e2;
  text-decoration: none;
  background: rgba(255,255,255,0.1);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.az-fahrzeuge-link:hover { background: rgba(255,255,255,0.18); }
.az-btn-speichern { margin-left: 10px; }
.az-hinweis-btn { min-height: unset; margin-left: auto; }

/* ---------- Hinweis-Popup (Bild + Text beim Oeffnen der Fahrzeug-Zuteilung) ---------- */
.az-hinweis-popup-hintergrund {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  align-items: center; justify-content: center;
  z-index: 1200;
  padding: 16px;
}
.az-hinweis-popup-hintergrund.sichtbar { display: flex; }
.az-hinweis-popup {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.az-hinweis-popup-schliessen {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  min-height: unset;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: var(--farbe-text);
  font-size: 20px;
  line-height: 1;
  padding: 0;
}
.az-hinweis-popup-schliessen:hover { background: rgba(0,0,0,0.12); }
.az-hinweis-popup-bild { max-width: 100%; max-height: 60vh; border-radius: 8px; object-fit: contain; }
.az-hinweis-popup-text { font-size: 14.5px; color: var(--farbe-text); margin: 14px 0; white-space: pre-wrap; text-align: left; }
.az-hinweis-popup-aktionen { display: flex; justify-content: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.az-hinweis-popup-btn-sekundaer { background: #eef0f3; color: var(--farbe-text); }
.az-hinweis-popup-btn-sekundaer:hover { background: #e2e5ea; }

.az-hinweis-dialog-vorschau { display: block; max-width: 100%; max-height: 140px; border-radius: 8px; margin-bottom: 10px; }
.kal-dialog-feld textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 7px 8px;
  border: 1px solid var(--farbe-rand);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}
.az-hinweis-aktiv-feld {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  margin-bottom: 4px;
}
.az-hinweis-aktiv-feld input { margin: 0; }

/* ---------- Fahrzeugverwaltung ---------- */
.fahrzeug-zeile { display: flex; flex-direction: column; gap: 10px; }
.fahrzeug-form .btn-reihe { align-items: center; }
.fahrzeug-aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.farbe-punkt { display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: auto; }
.farbe-punkt-grau  { background: #6c757d; }
.farbe-punkt-blau  { background: #0d6efd; }
.farbe-punkt-gelb  { background: #ffea00; }
.farbe-punkt-gruen { background: #198754; }
.farbe-punkt-rot   { background: #cc0000; }
.farbe-punkt-lila    { background: #7c3aed; }
.farbe-punkt-orange  { background: #e8590c; }
.farbe-punkt-tuerkis { background: #0e7c86; }
.farbe-punkt-pink    { background: #d63384; }
.farbe-punkt-schwarz { background: #212529; }

/* ---------- Mitarbeiter-Namens-Chip: faerbt einen Namen ueberall dort, wo er
   erscheint, in der Farbe seines zugeordneten Fahrzeugs (per Kennzeichen-
   Abgleich, siehe lib/fahrzeugFarbe.js) - z.B. Benutzerverwaltung,
   Aktivitaetsprotokoll, Baustellen-Zugriff, Benachrichtigungs-Fenster, Mein
   Konto, Navigationsleiste. Gleiche Farbpalette wie bei der
   Fahrzeugverwaltung/Fahrzeug-Zuteilung. ---------- */
.mitarbeiter-name-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
}
.mitarbeiter-chip-grau    { background: #6c757d; }
.mitarbeiter-chip-blau    { background: #0d6efd; }
.mitarbeiter-chip-gelb    { background: #ffea00; color: #23272b; }
.mitarbeiter-chip-gruen   { background: #198754; }
.mitarbeiter-chip-rot     { background: #cc0000; }
.mitarbeiter-chip-lila    { background: #7c3aed; }
.mitarbeiter-chip-orange  { background: #e8590c; }
.mitarbeiter-chip-tuerkis { background: #0e7c86; }
.mitarbeiter-chip-pink    { background: #d63384; }
.mitarbeiter-chip-schwarz { background: #212529; }

/* ---------- Baustelle-Detail: verknuepfte Auftraege ---------- */
.baustelle-auftraege-liste { display: flex; flex-direction: column; gap: 10px; }
.baustelle-auftrag-zeile {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--farbe-rand);
  border-radius: 10px; padding: 10px 12px; background: #fff;
}
.baustelle-auftrag-info { flex: 1; min-width: 0; }
.baustelle-auftrag-titel { font-weight: 600; font-size: 14.5px; }
.baustelle-auftrag-zeile .status-badge { margin-top: 0; flex-shrink: 0; }

/* ---------- Auftragszuteilung: Reiter Auftraege/Baustellen ---------- */
.az-tabs { display: flex; gap: 8px; padding: 0 18px; margin-top: 14px; }
.az-tab {
  background: #fff; border: 1px solid var(--farbe-rand); color: #555; border-radius: 999px;
  padding: 8px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; min-height: unset;
}
.az-tab.az-tab-aktiv { background: var(--farbe-dunkel); color: #fff; border-color: var(--farbe-dunkel); }
.az-karte-farbpunkt {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.az-karte-link {
  display: inline-block; margin-top: 6px; font-size: 11px; color: var(--farbe-akzent); text-decoration: none; font-weight: 600;
}
.az-karte-link:hover { text-decoration: underline; }

/* ---------- Fahrzeug-Zuteilung: eingeschraenkte Ansicht ohne zugeordnetes Fahrzeug ---------- */
.az-kein-fahrzeug-hinweis {
  margin: 24px 18px; padding: 22px; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--farbe-rand); text-align: center;
}
.az-kein-fahrzeug-hinweis p { margin: 0 0 6px; }
.az-kein-fahrzeug-hinweis p:last-child { margin-bottom: 0; }

/* ---------- Hervorgehobener Button (z.B. "Auftragszuteilung" auf der
   Baustellen-Planung fuer Mitarbeiter) - leuchtendes Rot mit Glow-Effekt ---------- */
button.leuchtend-rot, .btn.leuchtend-rot {
  background: #ff3b30;
  color: #fff;
  border: 2px solid #000;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.7), 0 0 2px rgba(255, 59, 48, 0.9);
  animation: leuchtend-rot-blinken 1s steps(1, end) infinite;
}
button.leuchtend-rot:hover, .btn.leuchtend-rot:hover {
  background: #e0291f;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.9), 0 0 3px rgba(255, 59, 48, 1);
}
/* Gleiches Blink-Prinzip wie .leuchtend-rot, nur in Orange (Wichtiges-Markenfarbe) -
   fuer den sichtbaren "Wichtiges"-Button auf der Baustellen-Planung-Seite. */
button.wichtig-leuchtend, .btn.wichtig-leuchtend {
  background: #ffe066;
  color: #23272b;
  border: 1px solid #000;
  padding: 1px 10px;
  font-size: 13px;
  line-height: 1;
  /* Verhindert, dass der Button (anders als "Auftragszuteilung") die volle
     Breite des umgebenden Kastens einnimmt - dadurch wirkt er wirklich
     kleiner statt nur mit kleinerer Schrift genauso breit zu bleiben. */
  align-self: center;
  box-shadow: 0 0 8px rgba(255, 224, 102, 0.8), 0 0 1px rgba(255, 224, 102, 0.9);
  animation: leuchtend-rot-blinken 1s steps(1, end) infinite;
}
button.wichtig-leuchtend:hover, .btn.wichtig-leuchtend:hover {
  background: #ffd633;
  box-shadow: 0 0 20px rgba(255, 214, 51, 0.9), 0 0 3px rgba(255, 214, 51, 1);
}
@keyframes leuchtend-rot-blinken {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.45; }
}
/* Kleiner leuchtender/blinkender roter Punkt neben dem Kundennamen in der
   Baustellen-Liste - zeigt dem Administrator auf einen Blick, dass fuer diese
   Baustelle noch kein Kollege ueber "Zugriff fuer Mitarbeiter" freigegeben ist. */
.kein-kollege-punkt {
  display: inline-block;
  width: 10px; height: 10px;
  margin-left: 6px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.85), 0 0 2px rgba(255, 59, 48, 1);
  animation: leuchtend-rot-blinken 1s steps(1, end) infinite;
  vertical-align: middle;
}
/* Baustellen-Planung: manuelle Reihenfolge per Drag & Drop (nur Administrator).
   Bewusst immer einspaltig - auch am PC untereinander (auf Wunsch; war zuvor
   ab 640px mehrspaltig als Karten-Raster mit bis zu 4 Spalten). Drag & Drop
   zum Sortieren nach Dringlichkeit bleibt unveraendert erhalten. Die zuvor
   breitere Container-Breite (".baustellen-wrap") wird nicht mehr benoetigt,
   da ohne Mehrspaltigkeit die normale Container-Breite passt. Nur innerhalb
   von ".baustellen-liste" ueberschrieben, damit die auf anderen Seiten
   (z.B. Aufmaß-Liste im Dashboard) wiederverwendete ".aufmass-item"-
   Basisklasse unveraendert bleibt. */
.baustellen-liste { display: grid; grid-template-columns: 1fr; gap: 6px; }
/* Jede Zeile zeigt Bezeichnung/Adresse (links), Baustart/Bauzeit (Mitte),
   einen waehlbaren Status-Button (3. Position, nur Administrator waehlbar,
   alle anderen sehen ihn nur) und Kennzeichen/Anzahl Dokumente (rechts).
   Feste Hoehe + kein Zeilenumbruch innerhalb der Felder (jedes Feld wird bei
   Platzmangel mit "..." abgeschnitten statt umzubrechen), damit ALLE Zeilen
   unabhaengig vom Inhalt exakt gleich hoch bleiben und optisch identisch
   wirken. */
.baustellen-liste .aufmass-item {
  margin-bottom: 0;
  padding: 8px 14px;
  height: 92px;
  display: grid;
  grid-template-columns: 1.6fr 0.85fr 0.85fr 1fr;
  column-gap: 12px;
  align-items: center;
  overflow: hidden;
}
.baustellen-liste .bz-spalte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
.baustellen-liste .bz-mitte { text-align: left; }
/* Status-Button auf Wunsch etwas tiefer in der (jetzt hoeheren) Zeile statt
   mittig/oben - daher justify-content statt der von .bz-spalte geerbten
   Zentrierung. */
.baustellen-liste .bz-status { align-items: flex-start; justify-content: flex-end; padding-bottom: 6px; }
.baustellen-liste .bz-rechts { text-align: right; align-items: flex-end; }
.baustellen-liste .bz-oben,
.baustellen-liste .bz-unten {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.baustellen-liste .bz-oben { font-weight: 700; font-size: 13.5px; color: var(--farbe-text); }
.baustellen-liste .bz-unten { font-weight: 400; font-size: 11.5px; color: var(--farbe-text-schwach); }
.baustellen-liste .bz-mitte .bz-oben,
.baustellen-liste .bz-rechts .bz-oben { font-weight: 600; font-size: 12.5px; }
/* Montage-Start (oben Mitte) auf Wunsch in Rot hervorgehoben. */
.baustellen-liste .bz-mitte .bz-oben { color: var(--farbe-fehler); }
/* Status-Button: fuer den Administrator ein als Pille gestyltes <select>
   (Auto-Save beim Auswaehlen, siehe baustellen_liste.js), fuer alle anderen
   Rollen nur eine gleich aussehende, nicht interaktive Anzeige. Farbe je
   Status wie bei den uebrigen Status-Badges der App. */
.baustellen-liste .bz-status-auswahl,
.baustellen-liste .bz-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: none;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.baustellen-liste .bz-status-auswahl {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.baustellen-liste .bz-status-offen    { background: #fdf1dc; color: #8a5a00; }
.baustellen-liste .bz-status-bestellt { background: #e4edfb; color: #1a4b8c; }
.baustellen-liste .bz-status-lager    { background: #e6f4ea; color: #1b7a3d; }
.baustellen-liste .bz-status-arbeit   { background: #eae6fb; color: #4b2f9e; }
.baustellen-liste .bz-status-rechnung { background: #fce4ec; color: #ad1457; }
/* Statistik-Zeile oben auf der Baustellen-Planung: Gesamtanzahl + Anzahl
   "Rechnung schreiben" - Farbe der zweiten Chip identisch zum Status-Badge
   (siehe .bz-status-rechnung oben), hier aber als eigenstaendige Klasse, da
   diese Zeile ausserhalb von ".baustellen-liste" liegt. */
.bz-statistik-zeile { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.bz-statistik-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2, #f1f2f4);
  color: var(--farbe-text-schwach);
}
.bz-statistik-chip.bz-status-rechnung { background: #fce4ec; color: #ad1457; }
/* Suche nach Baustellen-Nummer/Name auf der Baustellen-Planung - nur
   Administrator. Eigene Zeile zwischen der Statistik und den Status-Filtern. */
.bz-suche-zeile { margin: 0 0 12px; }
.bz-suche-feld {
  width: 100%;
  max-width: 360px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--farbe-rand, #d7dade);
  background: var(--surface-2, #fff);
  color: var(--farbe-text);
  font-size: 14px;
}
.bz-suche-feld:focus { outline: none; border-color: var(--farbe-text); }
/* Anzeige "nach Bearbeitung" - Filter-Buttons oberhalb der Baustellen-Liste,
   fuer alle Rollen sichtbar. Gleiche Farben wie die Status-Badges in der
   Liste (siehe .bz-status-* oben), damit sofort erkennbar ist, welcher Filter
   zu welchem Status gehoert; der aktive Filter bekommt zusaetzlich einen
   dunklen Rand. */
.bz-filter-zeile { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.bz-filter-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--surface-2, #f1f2f4);
  color: var(--farbe-text-schwach);
  cursor: pointer;
}
.bz-filter-chip.aktiv { border-color: var(--farbe-text); }
.bz-filter-chip.bz-status-offen    { background: #fdf1dc; color: #8a5a00; }
.bz-filter-chip.bz-status-bestellt { background: #e4edfb; color: #1a4b8c; }
.bz-filter-chip.bz-status-lager    { background: #e6f4ea; color: #1b7a3d; }
.bz-filter-chip.bz-status-arbeit   { background: #eae6fb; color: #4b2f9e; }
.bz-filter-chip.bz-status-rechnung { background: #fce4ec; color: #ad1457; }
/* Farbmarker-Chip oben rechts - identischer Chip wie auf der
   Baustellen-Detailseite, nur kompakter fuer die niedrige Zeile. */
.baustellen-liste .bz-rechts .bz-farb-fenster {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  vertical-align: middle;
}
/* Zugeordnete Fahrzeuge (bis zu 3) neben dem Farbmarker-Chip, jeweils in der
   fuer das Fahrzeug in der Fahrzeugverwaltung hinterlegten Fahrzeugfarbe -
   bewusst eigene Klassen statt Wiederverwendung von .mitarbeiter-chip-*, um
   die Namens-Einfaerbung der Mitarbeiter nicht mit dieser Anzeige zu koppeln. */
.baustellen-liste .bz-rechts-chipreihe {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  max-height: 46px;
  overflow: hidden;
  white-space: normal;
}
/* Weisser Hintergrund, Rand in der Fahrzeugfarbe (identisch zu den Punkten in
   der Fahrzeugverwaltung, .farbe-punkt-*), Schrift auf Wunsch aber schwarz
   statt farbig - Rand und Schrift daher bewusst getrennte Eigenschaften
   (border-color statt currentColor). */
.baustellen-liste .bz-fahrzeug-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2, #fff);
  border: 1.5px solid #6c757d;
  color: var(--farbe-text, #23272b);
  white-space: nowrap;
  flex-shrink: 0;
}
.bz-fahrzeug-chip-grau    { border-color: #6c757d; }
.bz-fahrzeug-chip-blau    { border-color: #0d6efd; }
.bz-fahrzeug-chip-gelb    { border-color: #e8b400; }
.bz-fahrzeug-chip-gruen   { border-color: #198754; }
.bz-fahrzeug-chip-rot     { border-color: #cc0000; }
.bz-fahrzeug-chip-lila    { border-color: #7c3aed; }
.bz-fahrzeug-chip-orange  { border-color: #e8590c; }
.bz-fahrzeug-chip-tuerkis { border-color: #0e7c86; }
.bz-fahrzeug-chip-pink    { border-color: #d63384; }
.bz-fahrzeug-chip-schwarz { border-color: #212529; }
.aufmass-item[draggable="true"] { cursor: grab; }
.aufmass-item.baustelle-wird-gezogen { opacity: 0.45; cursor: grabbing; }

/* Baustellen-Planung auf dem Handy: die enge 4-Spalten-Zeile (fuer den PC
   gedacht) wird auf schmalen Bildschirmen zu einer Karte mit den Feldern
   untereinander - jedes Feld bekommt genug Platz und wird nicht mehr per
   "..." abgeschnitten. Die feste, fuer alle Zeilen identische Hoehe gilt
   damit nur noch auf dem PC/Desktop; auf dem Handy richtet sich die Hoehe
   nach dem Inhalt (z.B. Anzahl zugeordneter Fahrzeuge), bleibt aber weiterhin
   optisch einheitlich aufgebaut. Breakpoint identisch zur bestehenden
   Nav-Umschaltung der App (700px). */
@media (max-width: 699px) {
  .baustellen-liste .aufmass-item {
    height: auto;
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 12px 14px;
  }
  .baustellen-liste .bz-spalte {
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
  }
  .baustellen-liste .bz-mitte,
  .baustellen-liste .bz-rechts { text-align: left; }
  .baustellen-liste .bz-status { align-items: flex-start; justify-content: flex-start; padding-bottom: 0; }
  .baustellen-liste .bz-rechts { align-items: flex-start; }
  .baustellen-liste .bz-oben,
  .baustellen-liste .bz-unten {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .baustellen-liste .bz-rechts-chipreihe {
    justify-content: flex-start;
    max-height: none;
    overflow: visible;
  }
}

.leuchtend-rot-hinweis-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.leuchtend-rot-hinweis {
  display: block;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  color: #ff3b30;
}
.az-eingeschraenkt .az-karte-link {
  animation: leuchtend-rot-blinken 1s steps(1, end) infinite;
  color: #ff3b30;
  font-weight: 700;
}
.az-karte-montage, .az-karte-montage strong {
  color: #198754;
}

/* ---------- Kalender (Wochenplan Fahrzeuge x Tage) ---------- */
.kal-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}
.kal-kopf { margin: 18px 0 10px; }
.kal-kopf h1 { font-size: 21px; margin: 0 0 4px; }
.kal-steuerung {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.kal-nav-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.kal-wochenlabel {
  font-weight: 700;
  font-size: 14.5px;
  margin-left: auto;
}
.kal-tabelle-scroll {
  overflow-x: auto;
  border: 1px solid var(--farbe-rand);
  border-radius: var(--radius);
  background: #fff;
}
.kal-tabelle { border-collapse: collapse; width: 100%; min-width: 860px; }
.kal-tabelle th, .kal-tabelle td {
  border: 1px solid var(--farbe-rand);
  padding: 8px;
  vertical-align: top;
}
.kal-tabelle th {
  background: var(--farbe-hell);
  font-size: 12.5px;
  text-transform: uppercase;
  color: var(--farbe-text-schwach);
  text-align: center;
  white-space: nowrap;
}
.kal-fahrzeug-kopf { text-align: left !important; }
.kal-fahrzeug-zelle { min-width: 130px; width: 150px; }
.kal-fahrzeug-zelle-pool { background: var(--farbe-hell); }
.kal-fz-name { font-weight: 700; font-size: 13.5px; }
.kal-fz-kennzeichen { font-size: 11.5px; opacity: 0.85; margin-top: 2px; }
/* min-height statt height, damit die Zelle bei mehreren Eintraegen (z.B. bis zu
   3 Baustellen fuer dasselbe Fahrzeug am selben Tag) automatisch mitwaechst,
   statt Inhalt abzuschneiden. */
.kal-zelle { min-width: 130px; min-height: 56px; }
.kal-zelle.kal-drag-over { background: #f0f6ff; }
.kal-eintrag {
  background: #fff;
  border: 1px solid var(--farbe-rand);
  border-left: 4px solid var(--farbe-akzent);
  border-radius: 6px;
  padding: 4px 7px;
  margin-bottom: 4px;
  font-size: 12px;
}
.kal-eintrag:last-child { margin-bottom: 0; }
.kal-eintrag[draggable="true"] { cursor: grab; }
.kal-eintrag.kal-wird-gezogen { opacity: 0.4; }
.kal-eintrag-baustelle { border-left-color: var(--farbe-akzent); }
.kal-eintrag-auftrag { border-left-color: #0d6efd; }
.kal-eintrag-titel { display: block; font-weight: 600; }
.kal-eintrag-link { color: inherit; text-decoration: none; }
.kal-eintrag-link:hover { text-decoration: underline; }
.kal-leer-hinweis { text-align: center; color: var(--farbe-text-schwach); padding: 30px 16px; }

@media print {
  header.app-header, .kal-steuerung, footer.app-footer, .hinweis-text { display: none !important; }
  .kal-wrap { max-width: 100%; padding: 0; }
  .kal-tabelle-scroll { border: none; overflow: visible; }
  .kal-tabelle { min-width: 0; }
  .kal-eintrag { break-inside: avoid; }
  @page { size: landscape; margin: 10mm; }
}

/* ---------- Kalender: mehrtaegige Eintraege (Bauzeit ueber mehrere Tage) ---------- */
.kal-zelle-mehrtaegig { background: #fafbf8; }
.kal-eintrag-zeitraum {
  display: block;
  font-size: 10.5px;
  color: var(--farbe-text-schwach);
  margin-top: 1px;
}

/* ---------- Kalender: Mehrfachzuteilung (Zusatz-Fahrzeuge je Termin) ---------- */
.kal-eintrag-zeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.kal-eintrag-zusatz { background: #f5faff; border-left-color: #6f42c1; }
.kal-eintrag-btn {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  line-height: 16px;
  border: 1px solid var(--farbe-rand);
  border-radius: 4px;
  background: #fff;
  color: var(--farbe-text-schwach);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.kal-eintrag-hinzufuegen:hover { background: #e7f6ec; border-color: #198754; color: #198754; }
.kal-eintrag-entfernen:hover { background: #fdeceb; border-color: #dc3545; color: #dc3545; }

.kal-dialog-hintergrund {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center; justify-content: center;
  z-index: 1000;
}
.kal-dialog-hintergrund.sichtbar { display: flex; }
.kal-dialog {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.kal-dialog-titel { font-size: 16.5px; margin: 0 0 4px; }
.kal-dialog-untertitel { font-size: 12.5px; color: var(--farbe-text-schwach); margin: 0 0 14px; }
.kal-dialog-feld { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.kal-dialog-feld select, .kal-dialog-feld input {
  display: block; width: 100%; margin-top: 4px;
  padding: 7px 8px;
  border: 1px solid var(--farbe-rand);
  border-radius: 6px;
  font-size: 14px;
}
.kal-dialog-fehler { color: #dc3545; font-size: 12.5px; min-height: 16px; margin: 2px 0 8px; }
.kal-dialog-aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- In-App-Fenster: Hinweis auf Baustellen-Zugriff (nur Admin) ---------- */
.benachr-hintergrund {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100;
  padding: 16px;
}
.benachr-fenster {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.benachr-titel { font-size: 18px; margin: 0 0 4px; }
.benachr-untertitel { font-size: 13px; color: var(--farbe-text-schwach); margin: 0 0 14px; }
.benachr-liste { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.benachr-liste li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 10px;
  background: var(--farbe-hell);
  border-radius: 6px;
  font-size: 13.5px;
}
.benachr-eintrag-text { flex: 1; }
.benachr-zeit { flex: 0 0 auto; font-size: 11.5px; color: var(--farbe-text-schwach); white-space: nowrap; }

/* ---------- AB Reihenfolge (nur Admin) ---------- */
.ab-wrap { max-width: 1000px; }
.ab-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 4px; flex-wrap: wrap; }
.ab-kopf h1 { margin: 0; font-size: 21px; }
/* Ein Spalte auf schmalen Bildschirmen (Handy), ab 640px zwei, ab 900px drei
   Spalten nebeneinander - darunter reihen sich beliebig viele weitere Karten
   automatisch an. */
.ab-liste { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
@media (min-width: 640px) {
  .ab-liste { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .ab-liste { grid-template-columns: repeat(3, 1fr); }
}
.ab-karte {
  background: #fff;
  border: 2px solid #c7c3f0;
  border-radius: 12px;
  padding: 9px 11px;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(30, 27, 75, 0.05);
  transition: box-shadow 0.15s, transform 0.15s;
}
.ab-karte:hover { box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12); transform: translateY(-1px); }
.ab-karte.ab-wird-gezogen { opacity: 0.45; }
.ab-karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ab-karte-kunde { font-weight: 700; font-size: 13.5px; color: #292455; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-karte-loeschen {
  flex: 0 0 auto; width: 18px; height: 18px; line-height: 16px;
  border: 1px solid #ece9fb; border-radius: 5px; background: #f8f7fd;
  color: #9490b3; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ab-karte-loeschen:hover { background: #ffe4e9; border-color: #fb7185; color: #e11d48; }
.ab-karte-nummer { font-size: 10.5px; color: #8b87ab; margin-top: 1px; }
.ab-karte-ort { font-size: 12px; color: #6f6b91; margin: 2px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-karte-stand {
  width: 100%; padding: 4px 8px; font-size: 11px; font-weight: 700;
  border-radius: 999px; border: none; text-transform: uppercase; letter-spacing: 0.02em;
  cursor: pointer;
}
.ab-stand-offen { background: #dc2626; color: #fff; }
.ab-stand-materialien_bestellt {
  background: #2563eb; color: #fff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.75), 0 0 2px rgba(37, 99, 235, 0.9);
}
.ab-stand-kollegen_vor_ort { background: #111111; color: #fff; }
.ab-leer-hinweis { text-align: center; color: var(--farbe-text-schwach); padding: 30px 16px; grid-column: 1 / -1; }

/* Eigene, modernere Akzentfarbe (Indigo) fuer die Bedienelemente dieser Seite -
   bewusst per ID gescoped, damit die geteilten .btn/.kal-dialog-Basisstile
   (auch vom Kalender genutzt) unangetastet bleiben. */
.ab-wrap #ab-neu-oeffnen { background: #6366f1; }
.ab-wrap #ab-neu-oeffnen:hover { background: #4f46e5; }
#ab-dialog .kal-dialog { border-top: 4px solid #6366f1; }
#ab-dialog #ab-neu-speichern { background: #6366f1; }
#ab-dialog #ab-neu-speichern:hover { background: #4f46e5; }
#ab-dialog #ab-neu-abbrechen { background: #f1f0fb; color: #453f78; }
#ab-dialog #ab-neu-abbrechen:hover { background: #e6e4fa; }
