/* InfraManager · Kern · Gestaltung
   Asphalt und Weiß für die Leisten, Signalgelb nur für die wichtigste Handlung.
   Die kräftigen Farben gehören den Status-Symbolen auf der Karte. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/atkinson-hyperlegible-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --asphalt: #24282c;
  --asphalt-hell: #3a4046;
  --weiss: #ffffff;
  --grund: #eef1f0;
  --linie: #c9d0d4;
  --signal: #ffd100;
  --signal-gedrueckt: #e6bc00;
  --text: #1c1f22;
  --text-leise: #5c656d;
  --text-auf-asphalt: #f2f4f5;
  --text-auf-asphalt-leise: #b7bfc5;
  --fehler: #b3261e;
  --fokus: #0b62d6;

  --schrift: "Atkinson Hyperlegible", system-ui, sans-serif;
  --schrift-nummer: "Atkinson Hyperlegible Mono", ui-monospace, monospace;

  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --leiste: 56px;
  --tipp: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background: var(--asphalt);
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.unsichtbar {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Anmeldung ---------- */

.anmeldung {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: calc(32px + var(--oben)) 24px calc(32px + var(--unten));
  background: var(--asphalt);
  color: var(--text-auf-asphalt);
  position: relative;
  overflow: hidden;
}
.anmeldung-inhalt {
  width: 100%;
  max-width: 400px;
  margin-left: max(0px, calc((100vw - 400px) / 2 - 120px));
  position: relative;
  z-index: 1;
}
.produkt {
  margin: 0 0 8px;
  color: var(--text-auf-asphalt-leise);
  font-size: 15px;
}
.anmeldung-gemeinde {
  margin: 0 0 32px;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Mittellinie wie auf der Fahrbahn: das eine prägnante Element der Seite */
.markierung {
  position: absolute;
  top: 0; bottom: 0;
  right: clamp(24px, 12vw, 160px);
  width: 14px;
  background: repeating-linear-gradient(
    to bottom, var(--signal) 0 72px, transparent 72px 120px);
  opacity: 0.9;
}
@media (max-width: 560px) {
  .markierung { right: 12px; width: 8px; opacity: 0.55; }
}

.formular { display: grid; gap: 8px; }
.formular label {
  font-size: 15px;
  color: var(--text-auf-asphalt-leise);
  margin-top: 8px;
}
.formular input {
  height: var(--tipp);
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--weiss);
  color: var(--text);
}
.formular input:focus-visible { border-color: var(--signal); outline: none; }
.fehler {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #ff8a80;
  background: rgba(179, 38, 30, 0.25);
  color: var(--text-auf-asphalt);
}

.knopf-signal {
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 6px;
  background: var(--signal);
  color: var(--asphalt);
  font-weight: 700;
  font-size: 18px;
}
.knopf-signal:hover { background: var(--signal-gedrueckt); }
.knopf-signal:active { transform: translateY(1px); }
.knopf-signal:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Anwendung ---------- */

.anwendung {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: calc(var(--leiste) + var(--oben)) 1fr;
  grid-template-columns: minmax(0, 1fr); /* nie breiter als der Bildschirm */
  background: var(--grund);
}
.leiste {
  position: relative;
  z-index: 1100; /* über den Kartenknöpfen, damit das Menü nicht verdeckt wird */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--oben) 8px 0 8px;
  background: var(--asphalt);
  color: var(--text-auf-asphalt);
}
.leiste-gemeinde {
  min-height: var(--tipp);
  padding: 2px 10px;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
  text-align: left;
  border-radius: 6px;
  max-width: 72vw;
}
/* Lange Gemeindenamen brechen in höchstens zwei Zeilen um */
.leiste-gemeinde #gemeinde-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leiste-gemeinde:hover { background: var(--asphalt-hell); }
.support-hinweis {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--signal);
  color: var(--asphalt);
  font-size: 14px;
  font-weight: 700;
}
.leiste-benutzer {
  margin-left: auto;
  width: 40px; height: 40px;
  border: 2px solid var(--text-auf-asphalt-leise);
  border-radius: 50%;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
}
.leiste-benutzer:hover { border-color: var(--weiss); }

.menue {
  position: absolute;
  top: calc(var(--leiste) + var(--oben) - 4px);
  right: 8px;
  min-width: 240px;
  padding: 12px 0 6px;
  background: var(--weiss);
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 24, 28, 0.28);
}
.menue-name { margin: 0 16px; font-weight: 700; }
.menue-detail { margin: 2px 16px 10px; color: var(--text-leise); font-size: 15px; }
.menue button {
  display: block; width: 100%;
  min-height: var(--tipp);
  padding: 0 16px;
  border: 0; border-top: 1px solid var(--grund);
  background: none; text-align: left;
}
.menue button:hover { background: var(--grund); }

.karte { width: 100%; height: 100%; }
.leaflet-container { font-family: var(--schrift); background: var(--grund); }
.leaflet-control-attribution { font-size: 12px; }

.kartenwerkzeuge {
  position: fixed;
  right: 12px;
  bottom: calc(28px + var(--unten));
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.hintergrund {
  display: flex;
  padding: 3px;
  background: var(--weiss);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(20, 24, 28, 0.25);
}
.hintergrund button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 15px;
}
.hintergrund button[aria-checked="true"] {
  background: var(--asphalt);
  color: var(--weiss);
  font-weight: 700;
}
.knopf-rund {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--weiss);
  color: var(--asphalt);
  box-shadow: 0 2px 10px rgba(20, 24, 28, 0.25);
}
.knopf-rund[aria-pressed="true"] { background: var(--fokus); color: var(--weiss); }

.leer-hinweis {
  position: fixed;
  left: 12px;
  bottom: calc(28px + var(--unten));
  z-index: 900;
  max-width: min(320px, calc(100vw - 200px));
  margin: 0;
  padding: 10px 14px;
  background: var(--weiss);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(20, 24, 28, 0.25);
  font-size: 15px;
}

/* ---------- Dialog und Meldungen ---------- */

.dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 20px 0 8px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
}
.dialog::backdrop { background: rgba(20, 24, 28, 0.6); }
.dialog h2 { margin: 0 20px 12px; font-size: 20px; }
.gemeindeliste { list-style: none; margin: 0; padding: 0; }
.gemeindeliste button {
  display: flex; width: 100%;
  justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 0 20px;
  border: 0; border-top: 1px solid var(--grund);
  background: none; text-align: left;
}
.gemeindeliste button:hover { background: var(--grund); }
.rolle { color: var(--text-leise); font-size: 15px; }
.dialog-hinweis { margin: 12px 20px 8px; color: var(--text-leise); font-size: 15px; }
.dialog-schliessen {
  display: block;
  min-height: var(--tipp);
  margin: 8px 12px 4px auto;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-leise);
}
.dialog-schliessen:hover { background: var(--grund); color: var(--text); }

/* Kurzmeldungen oben unter der Kopfleiste: dort verdecken sie weder Formulare noch Knöpfe */
.meldung {
  position: fixed;
  left: 50%;
  top: calc(var(--leiste) + var(--oben) + 12px);
  transform: translateX(-50%);
  width: max-content;
  z-index: 2000;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--asphalt);
  color: var(--text-auf-asphalt);
  box-shadow: 0 6px 20px rgba(20, 24, 28, 0.35);
}

/* Eigener Standort */
.standort-punkt {
  width: 18px; height: 18px;
  border: 3px solid var(--weiss);
  border-radius: 50%;
  background: var(--fokus);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* Nummern wie auf dem Mastschild, für Module */
.nummer { font-family: var(--schrift-nummer); font-weight: 700; letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Bausteine für Module ---------- */

/* Aktionsleiste unten links: die wichtigste Handlung in Signalgelb */
.aktionen {
  position: fixed;
  left: 12px;
  bottom: calc(28px + var(--unten));
  z-index: 950;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 100px);
}
.aktionen:empty { display: none; }
.aktionen .knopf-signal, .aktionen .knopf-normal {
  margin: 0;
  height: 52px;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(20, 24, 28, 0.3);
}
.knopf-normal {
  height: var(--tipp);
  padding: 0 16px;
  border: 2px solid var(--linie);
  border-radius: 6px;
  background: var(--weiss);
  color: var(--text);
  font-weight: 700;
}
.knopf-normal:hover { border-color: var(--asphalt); }

/* Fadenkreuz in der Kartenmitte zum Setzen eines Objekts */
.fadenkreuz {
  position: absolute;
  left: 50%; top: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  z-index: 650;
  pointer-events: none;
}
.fadenkreuz::before, .fadenkreuz::after {
  content: "";
  position: absolute;
  background: var(--asphalt);
  box-shadow: 0 0 0 2px var(--signal);
}
.fadenkreuz::before { left: 27px; top: 0; width: 2px; height: 56px; }
.fadenkreuz::after  { top: 27px; left: 0; height: 2px; width: 56px; }

/* Seitenfeld: am Handy ein Fenster von unten, am PC rechts neben der Karte */
.panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1050;
  max-height: 68vh;
  display: flex;
  flex-direction: column;
  background: var(--weiss);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 24px rgba(20, 24, 28, 0.3);
  padding-bottom: var(--unten);
}
@media (min-width: 760px) {
  .panel {
    left: auto;
    top: calc(var(--leiste) + var(--oben));
    width: 420px;
    max-height: none;
    border-radius: 0;
    box-shadow: -6px 0 24px rgba(20, 24, 28, 0.2);
  }
}
.panel-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 10px 20px;
  border-bottom: 1px solid var(--grund);
}
.panel-titel { flex: 1; min-width: 0; font-size: 20px; font-weight: 700; }
.panel-schliessen {
  width: var(--tipp); height: var(--tipp);
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: none; color: var(--text-leise);
}
.panel-schliessen:hover { background: var(--grund); color: var(--text); }
.panel-inhalt { overflow-y: auto; padding: 16px 20px 24px; }
.panel-inhalt h3 { margin: 24px 0 8px; font-size: 17px; }
.panel-inhalt h3:first-child { margin-top: 0; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.knopfreihe .knopf-signal { margin: 0; height: var(--tipp); padding: 0 16px; font-size: 17px; }

/* Felder eines Objekts */
.felder { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.felder dt { color: var(--text-leise); }
.felder dd { margin: 0; overflow-wrap: anywhere; }
.bemerkung { margin: 12px 0 0; padding: 10px 12px; background: var(--grund); border-radius: 6px; white-space: pre-wrap; }

/* Formulare im Seitenfeld */
.formular-hell { display: grid; gap: 6px; }
.formular-hell label { margin-top: 10px; color: var(--text-leise); font-size: 15px; }
.formular-hell input, .formular-hell select, .formular-hell textarea {
  min-height: var(--tipp);
  padding: 10px 12px;
  border: 2px solid var(--linie);
  border-radius: 6px;
  background: var(--weiss);
  font: inherit;
}
.formular-hell textarea { min-height: 96px; resize: vertical; }
.formular-hell input:focus-visible, .formular-hell select:focus-visible, .formular-hell textarea:focus-visible {
  border-color: var(--fokus); outline: none;
}
.formular-hell .knopfreihe { margin-top: 16px; }
.formular-hell .fehler { color: var(--fehler); background: #fdecea; border-left-color: var(--fehler); }

/* Chronik */
.chronik { list-style: none; margin: 0; padding: 0; }
.chronik li { padding: 10px 0; border-top: 1px solid var(--grund); }
.chronik-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 15px; color: var(--text-leise); }
.chronik-art { font-weight: 700; color: var(--text); }
.chronik-text { margin: 4px 0 0; white-space: pre-wrap; }
.chronik-detail { margin: 4px 0 0; font-size: 15px; white-space: pre-line; }

/* Am PC: Ist das Seitenfeld offen, rücken die Kartenknöpfe links daneben. */
@media (min-width: 760px) {
  body:has(.panel:not([hidden])) .kartenwerkzeuge { right: 432px; }
  body:has(.panel:not([hidden])) .leaflet-right { right: 420px; }
}

/* Gefährliche Handlungen: rot, nie in der Hauptreihe */
.knopf-gefahr {
  height: var(--tipp);
  padding: 0 16px;
  border: 2px solid var(--fehler);
  border-radius: 6px;
  background: var(--weiss);
  color: var(--fehler);
  font-weight: 700;
}
.knopf-gefahr:hover { background: #fdecea; }
.knopf-gefahr.voll { background: var(--fehler); color: var(--weiss); }
.knopf-gefahr.voll:hover { background: #8f1d17; }
.gefahrenzone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--grund); }
.warnkasten { margin: 0 0 8px; padding: 12px 14px; border-left: 4px solid var(--fehler); background: #fdecea; }

/* Kontrollkästchen mit Text */
.haken { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; color: var(--text); }
.haken input { min-height: auto; width: 22px; height: 22px; margin-top: 1px; flex: none; }

/* Passwort-Dialog */
.dialog-formular { padding: 0 20px 12px; }
.dialog-formular input { width: 100%; }

/* Benutzerverwaltung */
.vw-reiterleiste { display: flex; gap: 4px; margin-bottom: 16px; padding: 3px; background: var(--grund); border-radius: 8px; }
.vw-reiter { flex: 1; min-height: 40px; border: 0; border-radius: 6px; background: none; font-weight: 700; color: var(--text-leise); }
.vw-reiter.aktiv { background: var(--weiss); color: var(--text); box-shadow: 0 1px 3px rgba(20, 24, 28, 0.15); }
.vw-liste { list-style: none; margin: 12px 0 0; padding: 0; }
.vw-liste button { display: grid; gap: 3px; width: 100%; padding: 12px 2px; border: 0; border-top: 1px solid var(--grund); background: none; text-align: left; }
.vw-liste button:hover { background: var(--grund); }
.vw-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.vw-detail { color: var(--text-leise); font-size: 15px; overflow-wrap: anywhere; }
.vw-hinweis { margin: 6px 0 0; color: var(--text-leise); font-size: 15px; }
.vw-rolle { padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--grund); }
.vw-rolle-admin { background: var(--asphalt); color: var(--weiss); }
.vw-marke { padding: 1px 8px; border-radius: 999px; font-size: 13px; background: #fff4d6; color: #6b5200; }
.vw-marke.gesperrt { background: #fdecea; color: var(--fehler); font-weight: 700; }
.vw-haken { display: grid; gap: 2px; }
.vw-passwort { margin: 12px 0; padding: 14px; border-radius: 8px; background: var(--grund); font-size: 24px; text-align: center; letter-spacing: 0.04em; user-select: all; }

/* Formularfelder nie breiter als das Seitenfeld (lange Auswahltexte würden es sonst aufspreizen) */
.formular-hell { grid-template-columns: minmax(0, 1fr); }
.formular-hell input:not([type="checkbox"]), .formular-hell select, .formular-hell textarea {
  width: 100%; min-width: 0; max-width: 100%;
}
.formular-hell select { text-overflow: ellipsis; }

/* Platz für Module in der Kopfleiste */
.leiste-aktionen { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.leiste-aktionen + .leiste-benutzer { margin-left: 4px; }
.leiste-knopf {
  position: relative;
  min-height: 40px; padding: 0 12px;
  border: 2px solid var(--text-auf-asphalt-leise); border-radius: 999px;
  background: transparent; color: var(--text-auf-asphalt);
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px;
}
.leiste-knopf:hover { border-color: var(--weiss); }
.leiste-zahl {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--signal); color: var(--asphalt);
  font-size: 13px; line-height: 22px; text-align: center;
}
.vw-stufe { display: grid; gap: 4px; margin-top: 10px; color: var(--text); }

/* Ebenen */
.ebenen-halter { position: relative; }
.ebenen-liste {
  position: absolute; right: calc(100% + 10px); bottom: 0;
  /* Viele Ebenen: nie höher als der freie Platz, dann innen scrollen */
  max-height: calc(100vh - var(--leiste) - var(--oben) - 120px); overflow-y: auto;
  min-width: 200px; padding: 12px 14px;
  border-radius: 8px; background: var(--weiss); color: var(--text);
  box-shadow: 0 4px 16px rgba(20, 24, 28, 0.25);
}
.ebenen-liste strong { display: block; margin-bottom: 2px; }
.ebenen-liste .haken { margin-top: 8px; }

/* Hervorgehobener Ort */
.ort-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--signal); box-shadow: 0 0 0 3px var(--asphalt);
  animation: ort-puls 1.6s ease-out infinite;
}
@keyframes ort-puls { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.15); opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .ort-ring { animation: none; } }

/* Bereichswahl links in der Kopfleiste: klein die Gemeinde, groß der Bereich */
.leiste-gemeinde.mit-bereich #gemeinde-name {
  font-size: 13px; font-weight: 400; color: var(--text-auf-asphalt-leise);
  -webkit-line-clamp: 1;
}
.leiste-gemeinde .leiste-bereich { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 700; }
.leiste-bereich::after {
  content: ""; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.bereich-menue { left: 8px; right: auto; min-width: 230px; }
.bereich-menue [role="menuitemradio"][aria-checked="true"] { font-weight: 700; box-shadow: inset 4px 0 0 var(--signal); }
.menue-trenner { border-top: 1px solid var(--grund) !important; }

/* Solange die Ebenenliste offen ist, verdeckt sie die Kartenumschaltung; diese daher ausblenden */
.kartenwerkzeuge.ebenen-offen .hintergrund { visibility: hidden; }

/* Hilfe im Seitenfeld */
.hilfe-werkzeuge { gap: 8px; }
.hilfe-titel { margin: 14px 0 6px; font-size: 22px; }
.hilfe-inhalt p { margin: 8px 0; }
.hilfe-inhalt ul, .hilfe-inhalt ol { margin: 8px 0; padding-left: 22px; }
.hilfe-inhalt li { margin: 4px 0; }
.hilfe-inhalt code { padding: 0 4px; border-radius: 3px; background: var(--grund); }
.hilfe-ueberschrift { margin: 20px 0 4px; scroll-margin-top: 12px; }
h3.hilfe-ueberschrift { font-size: 18px; }
h4.hilfe-ueberschrift { font-size: 16px; }
.hilfe-tipp { margin: 12px 0; padding: 6px 14px; border-left: 4px solid var(--signal); border-radius: 4px; background: #fffbe6; }
.hilfe-tipp p { margin: 4px 0; }
.hilfe-verzeichnis { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--grund); }
.hilfe-verzeichnis ul { list-style: none; margin: 0; padding: 0; }
.hilfe-verzeichnis button { width: 100%; min-height: 36px; padding: 4px 0; border: 0; background: none; text-align: left; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hilfe-treffer { list-style: none; margin: 8px 0 0; padding: 0; }
.hilfe-treffer button { display: grid; gap: 3px; width: 100%; padding: 10px 2px; border: 0; border-top: 1px solid var(--grund); background: none; text-align: left; }
.hilfe-treffer span { color: var(--text-leise); font-size: 15px; }
.hilfe-hinweis { color: var(--text-leise); }
.hilfe-blaettern { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--grund); justify-content: space-between; }

/* Wortmarke „Kommunaler INFRAMANAGER“ */
.wortmarke {
  display: flex; flex-direction: column; justify-content: center;
  margin: 0; padding: 0 12px 0 4px;
  border-right: 1px solid var(--text-auf-asphalt-leise);
  line-height: 1.05; white-space: nowrap; flex: none;
}
.wm-oben { font-weight: 400; font-size: 11px; color: var(--text-auf-asphalt-leise); letter-spacing: 0.04em; }
.wm-unten { font-size: 15px; font-weight: 700; color: var(--signal); letter-spacing: 0.09em; }
.wortmarke.gross { border-right: 0; padding: 0; margin-bottom: 18px; }
.wortmarke.gross .wm-oben { font-size: 15px; }
.wortmarke.gross .wm-unten { font-size: 26px; letter-spacing: 0.1em; }
/* Gemeinde und Bereich nehmen den restlichen Platz, lange Namen werden mit „…“ gekürzt */
/* Eine große Schaltfläche: Wortmarke links, daneben Gemeinde und Bereich.
   Bei Platzmangel (schmale Handys, große Systemschrift) gibt zuerst die Wortmarke nach,
   der Bereich behält immer eine Mindestbreite und bleibt antippbar. */
.leiste .leiste-gemeinde {
  max-width: none; min-width: 0; flex: 1 1 0; overflow: hidden;
  display: flex; align-items: center; gap: 10px; padding: 2px 6px 2px 4px;
}
.leiste .leiste-gemeinde { container-type: inline-size; }
/* Die Wortmarke steht ganz da oder gar nicht, nie abgeschnitten */
.leiste-gemeinde .wortmarke { flex: none; }
@container (max-width: 205px) {
  .leiste-gemeinde .wortmarke { display: none; }
}
.leiste-ort { display: flex; flex-direction: column; justify-content: center; min-width: 80px; flex: 1 1 auto; overflow: hidden; text-align: left; }
.leiste-gemeinde #gemeinde-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste-gemeinde.mit-bereich .leiste-bereich { display: flex; min-width: 0; white-space: nowrap; }
.leiste-bereich #bereich-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.leiste-gemeinde .leiste-bereich::after { flex: none; }
.leiste-aktionen { margin-left: 0; }
@media (max-width: 420px) {
  .wortmarke { padding: 0 8px 0 2px; }
  .wm-oben { font-size: 9.5px; }
  .wm-unten { font-size: 12px; letter-spacing: 0.04em; }
  .leiste { gap: 6px; }
  .leiste-knopf { padding: 0 8px; }
}

/* Anbieter, bewusst zurückhaltend */
.anbieter { margin: 40px 0 0; color: var(--text-auf-asphalt-leise); font-size: 13px; }
.menue-produkt { margin: 8px 16px 2px; padding-top: 8px; border-top: 1px solid var(--grund); color: var(--text-leise); font-size: 12px; }
.leiste-knopf-symbol { display: none; }
@media (max-width: 380px) {
  .leiste-knopf-symbol { display: block; }
  .leiste-knopf-text { display: none; }
}
.anbieter a { color: var(--text-auf-asphalt-leise); text-underline-offset: 3px; }
.anbieter a:hover { color: var(--text-auf-asphalt); }


/* Übersicht */
.ue-gruss { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.ue-abschnitt h3 { margin: 18px 0 8px; }
.ue-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ue-kachel {
  display: grid; align-content: start; gap: 2px; min-height: 88px; padding: 10px 12px;
  border: 2px solid var(--grund); border-left-width: 6px; border-radius: 8px;
  background: var(--weiss); text-align: left; color: var(--text);
}
.ue-kachel:hover { border-color: var(--text-leise); }
.ue-wert { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ue-titel { font-size: 15px; font-weight: 700; }
.ue-zusatz { font-size: 13px; color: var(--text-leise); }
.ue-kachel.stufe-ok { border-left-color: #2e8540; }
.ue-kachel.stufe-hinweis { border-left-color: #1f5fbf; }
.ue-kachel.stufe-warnung { border-left-color: #e8890c; background: #fff8ee; }
.ue-kachel.stufe-alarm { border-left-color: #c62828; background: #fdecea; }
.ue-kachel.stufe-alarm .ue-wert { color: #c62828; }
.ue-start { margin-top: 20px; }
.menue-uebersicht { font-weight: 700; border-bottom: 1px solid var(--grund) !important; }

/* Benachrichtigungen */
.bn-an { font-weight: 700; color: #2e8540; }
.bn-arten { display: grid; gap: 2px; }

/* Plattform-Verwaltung */
.pg-module { width: 100%; border-collapse: collapse; margin-top: 6px; }
.pg-module th { text-align: left; font-size: 14px; color: var(--text-leise); font-weight: 400; padding: 4px 0; }
.pg-module td { padding: 6px 0; border-top: 1px solid var(--grund); }
.pg-module td:not(:first-child), .pg-module th:not(:first-child) { text-align: center; width: 110px; }
.pg-module input { width: 22px; height: 22px; }

/* Grundstücksgrenzen */
.ebene-fest { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--grund); }
.gst-info { font-size: 14px; line-height: 1.35; }
.gst-info dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 6px 0; }
.gst-info dt { color: var(--text-leise); }
.gst-info dd { margin: 0; overflow-wrap: anywhere; }
.gst-hinweis { margin: 6px 0 0; color: var(--text-leise); font-size: 12px; }
.vw-vertraulich { color: #8a1c1c; font-size: 13px; font-weight: 700; }


/* ---------- Gemeinsame Gestaltung von Listen und Detailansichten ----------
   (früher in der Straßenbeleuchtung; Baukasten, Tickets und Wartungspläne nutzen sie ebenso,
   daher im Kern, damit sie auch ohne das Modul Straßenbeleuchtung geladen wird) */
/* InfraManager · Modul Straßenbeleuchtung · Gestaltung */

.lp-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lp-titel .nummer { font-size: 22px; }

.lp-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
}
.lp-status-in_betrieb           { background: #2e8540; }
.lp-status-stoerung_gemeldet    { background: #e8890c; color: #24282c; }
.lp-status-defekt               { background: #c62828; }
.lp-status-reparatur_beauftragt { background: #1f5fbf; }
.lp-status-ausser_betrieb       { background: #7a8288; }
.lp-status-geplant              { background: #ffffff; color: #1f5fbf; box-shadow: inset 0 0 0 2px #5aa0e6; }
.lp-status-abgebaut             { background: #e3e6e8; color: #5c656d; }

/* Nummer neben dem Mast, wie auf dem Schild */
.leaflet-tooltip.lp-nummer {
  padding: 1px 6px;
  border: 0;
  border-radius: 4px;
  background: #24282c;
  color: #ffffff;
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 13px;
  box-shadow: none;
}
.leaflet-tooltip.lp-nummer::before { display: none; }

/* Überfällige Mastprüfung: dunkler Ring statt weißem */
.leaflet-interactive.lp-pruefung { stroke: #24282c; }

.lp-warnung { color: #c62828; font-weight: 700; }
.lp-leer { color: #5c656d; margin: 0; }

/* Leuchtentypen-Katalog */
.lp-katalog { list-style: none; margin: 16px 0 0; padding: 0; }
.lp-katalog button {
  display: grid; gap: 2px; width: 100%;
  padding: 12px 4px;
  border: 0; border-top: 1px solid #eef1f0;
  background: none; text-align: left;
}
.lp-katalog button:hover { background: #eef1f0; }
.lp-katalog-name { font-weight: 700; }
.lp-katalog-detail { color: #5c656d; font-size: 15px; }
.lp-inaktiv {
  margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  background: #e3e6e8; color: #5c656d; font-size: 13px; font-weight: 400;
}
.lp-haken { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: #1c1f22; }
.lp-haken input { min-height: auto; width: 22px; height: 22px; margin-top: 1px; }
.formular-hell input.nummer { font-size: 19px; }

/* Fotos */
.lp-titelbild {
  display: block; width: 100%;
  margin: 0 0 14px; padding: 0;
  border: 0; border-radius: 8px; overflow: hidden;
  background: #eef1f0;
}
/* Ausschnitt im oberen Bilddrittel: bei Masten sitzt dort die Leuchte */
.lp-titelbild img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: center 22%; }
.lp-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lp-fotos button, .lp-chronik-fotos button {
  position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  background: #eef1f0; aspect-ratio: 1;
}
.lp-fotos img, .lp-chronik-fotos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lp-foto-marke {
  position: absolute; left: 4px; bottom: 4px;
  padding: 1px 6px; border-radius: 4px;
  background: #ffd100; color: #24282c; font-size: 12px; font-weight: 700;
}
.lp-chronik-fotos { display: flex; gap: 6px; margin-top: 6px; }
.lp-chronik-fotos button { width: 72px; }
.lp-foto-gross { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 8px; background: #eef1f0; }
.lp-link { display: inline-flex; align-items: center; text-decoration: none; }

/* Liste und Übersicht */
.lp-kennzahlen { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px;
  border: 2px solid #c9d0d4; border-radius: 999px;
  background: #ffffff; font-size: 15px;
}
.lp-chip.aktiv { border-color: #24282c; background: #24282c; color: #ffffff; }
.lp-chip-zahl { font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-punkt { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px #ffffff; }
.lp-fakten { margin: 12px 0 0; color: #5c656d; font-size: 15px; }
.lp-suchzeile { margin-top: 14px; }
.lp-suchzeile input { width: 100%; }
.lp-zaehler { margin: 10px 0 4px; color: #5c656d; font-size: 15px; }
.lp-liste { list-style: none; margin: 0; padding: 0; }
.lp-liste button {
  display: grid; gap: 3px; width: 100%;
  padding: 10px 2px;
  border: 0; border-top: 1px solid #eef1f0;
  background: none; text-align: left;
}
.lp-liste button:hover { background: #eef1f0; }
.lp-zeile-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lp-zeile-kopf .nummer { font-size: 17px; }
.lp-zeile-detail { color: #5c656d; font-size: 15px; }
.lp-alter { font-size: 14px; color: #5c656d; }
.lp-alter.lang { color: #c62828; font-weight: 700; }

/* Export */
.lp-exportzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; }
.lp-exportzeile .lp-zaehler { margin: 0; }
.lp-export { display: inline-flex; align-items: center; gap: 6px; }
.lp-export .knopf-normal { height: 36px; padding: 0 12px; font-size: 15px; }

/* Verknüpfte Tickets am Lichtpunkt */
.lp-tickets { list-style: none; margin: 0; padding: 0; }
.lp-tickets button { width: 100%; padding: 8px 2px; border: 0; border-top: 1px solid #eef1f0; background: none; text-align: left; }
.lp-tickets button:hover { background: #eef1f0; }

/* Plattform: angemeldete Sitzungen und Nutzung */
.pg-sitzungen, .pg-statistik { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.pg-sitzungen li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--grund); border-radius: 8px; }
.pg-punkt { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: #9e9e9e; }
.pg-punkt.aktiv { background: #2e8540; box-shadow: 0 0 0 3px #d7eedc; }
.pg-punkt.kuerzlich { background: #e8890c; }
.pg-statistik li { padding: 6px 0; border-bottom: 1px solid var(--grund); }
.pg-zeile { display: flex; justify-content: space-between; gap: 8px; }
.pg-balken { display: block; height: 10px; margin: 4px 0; border-radius: 5px; background: var(--grund); overflow: hidden; }
.pg-balken span { display: block; height: 100%; border-radius: 5px; background: #1f5fbf; }
.pg-balken.bereich span { background: #e8890c; }
.pg-tage { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: 6px 0; border-bottom: 2px solid var(--text-leise); }
.pg-tag { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 3px; }
.pg-tag span { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: #1f5fbf; }
