/* Rechberger Arbeitsplatz — das Erscheinungsbild der Vorlage vom 25.09.2026
   (Codex-Prototyp „rechberger-plattform") über dem Cockpit.

   Diese Datei ändert nur, wie etwas aussieht: Farben, Maße, Anordnung. Sie
   wird nach cockpit.css und den Seitenstilen geladen und überschreibt deren
   Werte. Keine Logik, keine Daten — Anmeldung, Rechte und CSP bleiben, wie
   sie sind. Keine Inline-Styles, keine fremden Schriften: Arial/Helvetica
   liegen auf jedem Rechner, nachgeladen wird nichts.

   Farbe und Dichte wählt jede Person in den Einstellungen (design.js setzt
   `data-design` und `data-dichte` am <html>). */

/* --- Grundwerte --------------------------------------------------------- */

:root {
  --bg: #f3f4f5;
  --ground: #f3f4f5;
  --surface: #ffffff;
  --surface-alt: #f5f7f8;
  --surface-brand: #e4f2f3;

  /* Petrol der Vorlage, einen Hauch dunkler: weißer Text darauf erreicht
     WCAG AA (4,9 : 1 statt 4,4 : 1 bei #00858d). */
  --tint: #007c84;
  --tint-hi: #00666d;
  --tint-weich: #e4f2f3;
  --aktion: #007c84;
  --aktion-hi: #00666d;
  --marker: #00a6ac;

  --side: #f8f9fa;
  --chassis: #f8f9fa;
  --chassis-soft: #e9edef;

  --label: #252b31;
  --ink: #252b31;
  --label-2: #646d75;
  --ink-soft: #646d75;
  --label-3: #8b959c;
  --ink-faint: #8b959c;

  --sep: #dce0e3;
  --sep-2: #e6e9ec;
  --rule: #dce0e3;
  --rule-strong: #c5ccd1;
  --feldrand: #d4dbe0;

  --sl: #313940;
  --sl2: #56616b;
  --sl3: #6f7982;

  --kopf-grund: #f3f5f6;
  --zeile-hover: #f5f9fa;
  --knopf-2: #eef0f2;
  --knopf-2-text: #35434d;

  --pille-lauf: #edf5f2;
  --pille-lauf-text: #39715d;
  --pille-plan: #faf4e7;
  --pille-plan-text: #7f6220;
  --pille-fertig: #e7edf3;
  --pille-fertig-text: #405e79;
  --pille-grau: #edf0f2;
  --pille-grau-text: #465660;

  --kopfzeile: 58px;
  --rail: 14.375rem;
  --radius-flaeche: 4px;
  --radius: 3px;
  --radius-klein: 2px;
  --schrift: Arial, Helvetica, sans-serif;
  --schatten-dialog: 0 25px 100px rgba(16, 43, 52, 0.19);
}

:root[data-design="dunkel"] {
  color-scheme: dark;
  --bg: #16212a;
  --ground: #16212a;
  --surface: #22323e;
  --surface-alt: #2b414f;
  --surface-brand: #214750;

  --tint: #5fcbd3;
  --tint-hi: #8fe0e6;
  --tint-weich: #214750;
  --marker: #45bec8;

  --side: #1b2933;
  --chassis: #1b2933;
  --chassis-soft: #26394a;

  --label: #e0e8ed;
  --ink: #e0e8ed;
  --label-2: #a8bcc8;
  --ink-soft: #a8bcc8;
  --label-3: #7f95a2;
  --ink-faint: #7f95a2;

  --sep: #344551;
  --sep-2: #2e3e4a;
  --rule: #344551;
  --rule-strong: #4a5f6e;
  --feldrand: #425a68;

  --sl: #d2e2eb;
  --sl2: #b1c8d5;
  --sl3: #8fa6b3;

  --kopf-grund: #1b2a35;
  --zeile-hover: #2b414f;
  --knopf-2: #34505d;
  --knopf-2-text: #d6ecf2;

  --pille-lauf: rgba(111, 207, 154, 0.14);
  --pille-lauf-text: #8fdbb2;
  --pille-plan: rgba(227, 178, 90, 0.16);
  --pille-plan-text: #eac27a;
  --pille-fertig: rgba(150, 180, 210, 0.16);
  --pille-fertig-text: #b6cde3;
  --pille-grau: rgba(200, 215, 225, 0.1);
  --pille-grau-text: #c5d4dd;

  --ok: #7fd4a4;
  --ok-bg: rgba(127, 212, 164, 0.14);
  --warn: #e7b765;
  --warn-bg: rgba(231, 183, 101, 0.15);
  --bad: #f19a90;
  --bad-bg: rgba(241, 154, 144, 0.14);
  --schatten-dialog: 0 25px 100px rgba(0, 0, 0, 0.5);
}

body {
  font-size: 0.875rem;
  letter-spacing: 0;
}

:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 2px;
  border-radius: var(--radius-klein);
}

/* --- Gehäuse: Seitenleiste ---------------------------------------------- */

.huelle { grid-template-columns: var(--rail) minmax(0, 1fr); }

.rail {
  background: var(--side);
  color: var(--sl);
  box-shadow: inset -1px 0 0 var(--sep);
  padding: 20px 12px 0;
}

a.rail-marke {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--sep);
  height: auto;
  border-radius: 0;
}

a.rail-marke:hover,
a.rail-marke:active { background: none; transform: none; }

/* Seit 19.11.2026 das Zeichen der Rechberger Gruppe; die drei Firmen stehen
   unten rechts (_gruppe.html). */
.rail-marke .schriftzug { font-size: 23px; }


/* Das Originalzeichen steht auf Weiß — auch im dunklen Bild. */
:root[data-design="dunkel"] a.rail-marke {
  background: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 20px;
}

.rail-gruppe {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--sl3);
  padding: 0 12px 12px;
}

.rail nav { padding: 0 0 1.5rem; gap: 3px; }

.rail a,
.rail-zeile {
  height: auto;
  padding: 11px 12px;
  gap: 11px;
  border-radius: var(--radius-klein);
  font-size: 14px;
  font-weight: 400;
  color: var(--sl2);
}

.rail a:hover,
.rail-zeile:hover { background: var(--chassis-soft); color: var(--sl); }

.rail a:active,
.rail-zeile:active { transform: none; }

.rail nav > a[aria-current],
.rail nav > .zweig > a[aria-current],
.rail nav > .zweig:has(.rail-projekte > li.zweig) > a {
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--marker);
}

:root[data-design="dunkel"] .rail nav > a[aria-current],
:root[data-design="dunkel"] .rail nav > .zweig > a[aria-current],
:root[data-design="dunkel"] .rail nav > .zweig:has(.rail-projekte > li.zweig) > a { color: #9bdee5; }

.rail .sym { width: 19px; height: 19px; flex: 0 0 19px; color: var(--sl3); }
.rail [aria-current] .sym,
.rail nav > .zweig:has(.rail-projekte > li.zweig) > a .sym { color: var(--tint); }

/* Der Aufklapppfeil der Vorlage gibt es nicht: Die Bauprojekte klappen von
   selbst auf, sobald ein Projekt offen ist. */
.rail nav > .zweig > a > .rail-pfeil,
.rail nav > a > .rail-leer { display: none; }

.rail-zahl {
  margin-left: auto;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: var(--radius-klein);
  background: #cce6e9;
  color: #006d76;
}

.rail-zahl:empty { display: none; }
:root[data-design="dunkel"] .rail-zahl { background: #214750; color: #9bdee5; }

/* Unter „Bauprojekte" steht nur das offene Projekt mit seinen Abschnitten —
   wie in der Vorlage. Alle Bauvorhaben führt die Seite „Bauprojekte". */
.rail-projekte > li:not(.zweig) { display: none; }

.rail-projekte:has(> li.zweig) {
  margin: 1px 0 12px 23px;
  padding: 8px 0 3px 10px;
  border-left: 1px solid var(--rule-strong);
}

.rail-projekte > li.zweig > a {
  padding: 2px 7px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--sl2);
  background: none;
  box-shadow: none;
}

.rail-projekte > li.zweig > a:hover { background: none; color: var(--tint); }
.rail-projekte > li.zweig > a > .rail-pfeil { display: none; }
.rail-projekte .rail-text { white-space: normal; }

.rail-pfad button {
  height: auto;
  padding: 9px 7px;
  font-size: 12px;
  font-weight: 400;
  color: var(--sl2);
  border-radius: var(--radius-klein);
}

.rail-pfad button:hover { background: var(--chassis-soft); color: var(--sl); }
.rail-pfad button:active { transform: none; }

.rail-pfad button[aria-current] {
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-weight: 700;
}

:root[data-design="dunkel"] .rail-pfad button[aria-current] { color: #9bdee5; }

.rail-pfad .sym { display: none; }

/* --- Kapitel des offenen Projekts als Zeitleiste (19.11.2026) --------------
   Projektname oben, darunter die Abschnitte an einer durchgehenden Linie mit
   je einem Punkt. Das offene Kapitel trägt den gefüllten Punkt und die
   Markenfarbe — kein Kasten mehr, der wie ein Eingabefeld aussah. */

.rail-projekte:has(> li.zweig) {
  margin: 2px 0 14px 21px;
  padding: 6px 0 2px;
  border-left: 0;
}

.rail-projekte > li.zweig > a {
  padding: 2px 8px 8px 2px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--sl);
}

.rail-pfad { position: relative; }

/* Die Linie läuft von Punkt zu Punkt, nicht über sie hinaus. */
.rail-pfad::before {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 6px;
  width: 2px;
  border-radius: 1px;
  background: var(--rule-strong);
}

.rail-pfad > li { position: relative; }

.rail-pfad > li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--side);
  box-shadow: inset 0 0 0 2px var(--sl3);
  pointer-events: none;
  transition: background-color 140ms ease-out, box-shadow 140ms ease-out;
}

.rail-pfad > li:has(> button[aria-current])::before {
  background: var(--marker);
  box-shadow: 0 0 0 3px var(--tint-weich);
}

.rail .rail-pfad button {
  box-sizing: border-box;
  width: 100%;
  margin-left: 0;
  padding: 8px 8px 8px 22px;
  border: 0;
  border-radius: 8px;
  outline: none;
  box-shadow: none;
  color: var(--sl2);
}

.rail .rail-pfad button:hover { background: var(--chassis-soft); color: var(--sl); }
.rail .rail-pfad button:focus-visible { box-shadow: inset 0 0 0 2px var(--marker); }

.rail .rail-pfad button[aria-current] {
  box-shadow: none;
  background: none;
  color: var(--tint-hi);
  font-weight: 700;
}

.rail .rail-pfad button[aria-current]:hover { background: var(--chassis-soft); }

.rail-pfad .rail-zahl { font-variant-numeric: tabular-nums; }

:root[data-design="dunkel"] .rail .rail-pfad button[aria-current] { color: #9bdee5; }

/* Zugang ohne Anmeldung (nur Entwicklung): Der Balken bleibt oben stehen
   und genau eine Zeile hoch. Sonst rechnet die Leiste mit 32 px, die nach
   dem Scrollen fehlen oder beim Umbruch nicht reichen — unten klaffte ein
   Spalt unter dem Profil. */
.warnband {
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
  height: 32px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.warnband ~ .huelle .rail { top: 32px; }
.warnband ~ .huelle .kopfzeile { top: 32px; }

/* Profil am Fuß: öffnet die Einstellungen. Eine Karte in der Leiste —
   runder Avatar in der Markenfarbe, der Name ganz (bis zwei Zeilen), die
   Rolle als kleine Marke, das Zahnrad als eigener runder Knopf
   (19.11.2026). */
.rail-fuss {
  display: block;
  margin: 0 -12px;
  padding: 10px 10px 12px;
  box-shadow: none;
  border-top: 1px solid var(--sep);
}

.profil {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 8px 9px 9px;
  border: 0;
  border-radius: 12px;
  background: none;
  box-shadow: none;
  color: var(--sl);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  justify-content: flex-start;
  white-space: normal;
  transition: background-color 140ms ease-out;
}

.profil:hover:not(:disabled) { background: var(--chassis-soft); }
.profil:active:not(:disabled) { transform: none; }
.profil:focus-visible { outline: 2px solid var(--marker); outline-offset: -2px; }

.profil-text { flex: 1; min-width: 0; }

.profil-text b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--sl);
  overflow-wrap: anywhere;
}

.profil-text small {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  padding: 1px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-design="dunkel"] .profil-text small { color: #9bdee5; }

.profil-zahnrad {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--sl3);
  transition: background-color 140ms ease-out, color 140ms ease-out, transform 300ms var(--spring, ease);
}

.rail .profil-zahnrad .sym { width: 17px; height: 17px; flex: none; color: inherit; }

/* cockpit.css hält Name und Rolle der alten Leiste auf einer Zeile. */
.rail-fuss .profil-text b { white-space: normal; }

.profil:hover .profil-zahnrad {
  background: var(--side);
  color: var(--tint);
  transform: rotate(45deg);
}

.profil .avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--marker), var(--tint));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 2px var(--side), 0 0 0 3px rgb(0 166 172 / 0.25);
}

:root[data-design="dunkel"] .profil .avatar { color: #fff; }

/* Überfälliger Prüftermin eines Werkzeugs: Der Warnpunkt steht im Dialog
   (shell.js). Damit er nicht ungesehen bleibt, trägt ihn auch das Zahnrad —
   es war die einzige Stelle der alten Leiste, die sich selbst meldete. */
body:has(#rail-werkzeug-punkt:not([hidden])) .profil-zahnrad::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 2px var(--side);
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 4px;
  background: #e0e6e9;
  color: #465864;
  font-size: 12px;
  font-weight: 700;
}

:root[data-design="dunkel"] .avatar { background: #2c4250; color: #c9dce6; }

/* Nur Microsoft, weder Code noch Passwort: Der Hinweis bleibt unübersehbar,
   aber in der Tonlage der hellen Leiste. */
.rail .rail-hinweis {
  display: block;
  margin: -6px 20px 14px 67px;
  padding: 0;
  font-size: 12px;
  color: var(--warn);
  text-decoration: underline;
}

.rail .rail-hinweis:hover { background: none; }

/* --- Gehäuse: Kopfzeile und Seitenkopf ---------------------------------- */

.buehne { min-height: 100vh; }

.kopfzeile {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--kopfzeile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 30px;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--sep);
}

.brotkrumen {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-size: 13px;
  color: var(--label-2);
}

.brotkrumen > .trenner,
.kick .trenner { color: var(--label-3); }

.kopfzeile .kick {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kopfzeile .kick a { color: var(--label-2); font-weight: 400; }
.kopfzeile .kick a:hover { color: var(--tint); }

.kopfzeile-rechts {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
  font-size: 12px;
  color: var(--label-2);
}

.kopfzeile-rechts .firma { white-space: nowrap; }

.kopfzeile-rechts .trennstrich {
  width: 1px;
  height: 22px;
  background: var(--sep);
}

.kopfzeile .avatar-knopf {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #e0e6e9;
  color: #465864;
  font-size: 10px;
  font-weight: 700;
  box-shadow: none;
}

:root[data-design="dunkel"] .kopfzeile .avatar-knopf { background: #2c4250; color: #c9dce6; }
.kopfzeile .avatar-knopf:hover:not(:disabled) { background: var(--tint-weich); color: var(--tint-hi); }

.kopfzeile #abmelden {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--label-2);
  background: none;
  box-shadow: 0 0 0 1px var(--sep);
  border-radius: var(--radius);
}

.kopfzeile #abmelden:hover:not(:disabled) { color: var(--label); background: var(--surface-alt); }

.navi-knopf { display: none; }

.kopf {
  position: static;
  padding: 28px 30px 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.kopf.gescrollt { box-shadow: none; }

.kopf-reihe {
  align-items: center;
  gap: 16px;
  margin: 0 0 23px;
}

.kopf h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 0 0 8px;
}

.kopf-unter { font-size: 14px; color: var(--label-2); margin: 0; }
.kopf .rechts { padding: 0; gap: 9px; }

.inhalt { padding: 0 30px 40px; max-width: none; }

@media (min-width: 1600px) {
  .kopf { padding: 32px 32px 0; }
  .inhalt { padding: 0 32px 40px; }
}

/* --- Flächen, Tabellen, Beschriftungen ---------------------------------- */

.tafel,
.box,
.pf-panel,
.pf-block,
.pf-tafel {
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--sep);
}

.tafel-kopf,
.pf-panel-kopf { padding: 15px 18px; }

.tafel-kopf h2,
.pf-panel-kopf h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }

.cap {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--label-2);
  margin: 26px 0 10px;
  padding: 0;
}

th,
.th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--label-2);
  background: var(--kopf-grund);
  padding: 11px 14px;
  box-shadow: inset 0 -1px 0 var(--sep), inset 0 1px 0 var(--sep);
}

td,
.tr {
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: inset 0 -1px 0 var(--sep-2);
}

tbody tr:hover,
.tr:hover { background: var(--zeile-hover); }

.tr:active { background: var(--zeile-hover); }

/* Beschreibungszeilen einer Detailtabelle sind keine Spaltenköpfe. */
th.feldname {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--sep-2);
}

.sub,
.neben { color: var(--label-2); }

.leer,
.blank { color: var(--label-2); }

.leer h3,
.blank h3 { font-size: 17px; }

/* Kennzahlenband des Cockpits in der Leiste der Vorlage. */
.kennzahlen {
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--sep);
  background: var(--surface);
}

.kennzahlen dt { font-size: 13px; color: var(--label-2); font-weight: 400; }
.kennzahlen dd { font-size: 25px; font-weight: 700; letter-spacing: -0.5px; }

/* Kacheln (Werkzeug, Stammdaten) */
.karte {
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--sep);
}

/* --- Bedienelemente ----------------------------------------------------- */

button,
.knopf,
.btn {
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
}

button:active:not(:disabled),
.knopf:active,
.btn:active { transform: translateY(1px); }

button.primaer,
.knopf.primaer,
button.aktion,
.knopf.aktion,
.btn {
  background: var(--aktion);
  color: #fff;
  padding: 10px 14px;
}

button.primaer:hover:not(:disabled),
.knopf.primaer:hover,
button.aktion:hover:not(:disabled),
.knopf.aktion:hover,
.btn:hover { background: var(--aktion-hi); filter: none; }

.btn--2 {
  background: var(--knopf-2);
  color: var(--knopf-2-text);
  box-shadow: none;
}

.btn--2:hover { background: var(--chassis-soft); }

button.schlicht { font-size: 13px; font-weight: 700; color: var(--tint); }

input,
select,
textarea,
.inp {
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid var(--feldrand);
  border-radius: var(--radius);
  background: var(--surface);
}

input:focus,
select:focus,
textarea:focus,
.inp:focus {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px rgba(0, 124, 132, 0.16);
}

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

label { font-size: 13px; font-weight: 400; color: var(--label-2); }

/* Suchzeile der Vorlage: weiß, gerahmt, Lupe links. */
.find {
  background: var(--surface);
  border: 1px solid var(--feldrand);
  border-radius: var(--radius);
  padding: 0 12px;
  gap: 10px;
}

.find:focus-within {
  background: var(--surface);
  border-color: var(--tint);
  box-shadow: 0 0 0 2px rgba(0, 124, 132, 0.18);
}

.find svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--label-3); }

.find input {
  border: 0;
  padding: 9px 0;
  font-size: 14px;
  box-shadow: none;
  background: none;
}

.find input:focus { box-shadow: none; }

/* Segmente (Umschalter) wie die Filterleiste der Vorlage. */
.segmente {
  background: var(--chassis-soft);
  box-shadow: inset 0 0 0 1px var(--sep);
  padding: 3px;
  border-radius: 4px;
  gap: 2px;
}

.segmente button {
  font-size: 13px;
  font-weight: 400;
  padding: 7px 12px;
  color: var(--label-2);
  border-radius: var(--radius-klein);
}

.segmente button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--tint-hi);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(35, 49, 60, 0.07);
}

:root[data-design="dunkel"] .segmente button[aria-pressed="true"] { color: #9bdee5; }

/* Reiter: Unterstrich statt Fläche. In der Vorlage führen die Abschnitte
   einer Seite immer über Reiter — auch auf breiten Schirmen. */
.reiter,
.reiter--rueckfall,
.pf-reiter {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  margin: 0 0 24px;
  padding: 0;
  box-shadow: inset 0 -1px 0 var(--rule-strong);
}

.reiter button,
.pf-reiter button {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--label-2);
  border-bottom: 2px solid transparent;
}

.reiter button:hover:not([aria-current]),
.pf-reiter button:hover:not([aria-current]) { background: none; color: var(--label); }

.reiter button[aria-current="page"],
.pf-reiter button[aria-current="page"] {
  background: none;
  color: var(--tint-hi);
  font-weight: 700;
  border-bottom-color: var(--aktion);
}

:root[data-design="dunkel"] .reiter button[aria-current="page"],
:root[data-design="dunkel"] .pf-reiter button[aria-current="page"] { color: #9bdee5; }

.reiter .anzahl,
.pf-reiter .anzahl {
  font-size: 11px;
  font-weight: 400;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: var(--radius-klein);
  background: var(--pille-grau);
  color: var(--pille-grau-text);
  opacity: 1;
}

.reiter .anzahl:empty,
.pf-reiter .anzahl:empty { display: none; }

/* --- Marken und Phasen -------------------------------------------------- */

.marke,
.pil {
  font-size: 12px;
  font-weight: 400;
  padding: 3px 7px;
  border-radius: var(--radius-klein);
  color: var(--pille-grau-text);
  background: var(--pille-grau);
}

.marke.gut, .pil.gut { color: var(--pille-lauf-text); background: var(--pille-lauf); }
.marke.warn, .pil.warn { color: var(--pille-plan-text); background: var(--pille-plan); }

/* Projektphase als Pille mit Punkt — wie „● Ausführung" in der Vorlage. */
.phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: var(--radius-klein);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--pille-grau-text);
  background: var(--pille-grau);
}

.phase::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.phase.lauf { color: var(--pille-lauf-text); background: var(--pille-lauf); }
.phase.plan { color: var(--pille-plan-text); background: var(--pille-plan); }
.phase.fertig { color: var(--pille-fertig-text); background: var(--pille-fertig); }

.phase.fertig::before {
  content: "✓";
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  font-weight: 700;
}

/* --- Meldungen, Hinweis, Kontextmenü ------------------------------------ */

.meldung { border-radius: var(--radius); font-size: 14px; }

.tip {
  border-radius: var(--radius);
  background: #28414c;
  color: #fff;
}

.kontextmenue { border-radius: var(--radius); }

/* --- Dialoge ------------------------------------------------------------ */

dialog {
  border: 1px solid var(--sep);
  border-radius: var(--radius-flaeche);
  background: var(--surface);
  box-shadow: var(--schatten-dialog);
}

dialog::backdrop {
  background: rgba(16, 60, 82, 0.4);
  backdrop-filter: blur(3px);
}

dialog h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  padding: 20px 24px 16px;
}

dialog .koerper { padding: 20px 24px; }
dialog .fuss { padding: 16px 24px; }

/* --- Einstellungen (Profil → Zahnrad) ----------------------------------- */

dialog.einstellungen {
  width: min(1180px, calc(100vw - 40px));
  height: min(820px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: hidden;
}

dialog.einstellungen[open] {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
}

.einst-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 17px;
  background: var(--side);
  box-shadow: inset -1px 0 0 var(--sep);
  overflow-y: auto;
}

.einst-marke {
  margin-left: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: var(--label-2);
}

dialog.einstellungen .einst-nav h2 {
  margin: 5px 10px 22px;
  padding: 0;
  font-size: 21px;
  letter-spacing: -0.5px;
  box-shadow: none;
}

.einst-nav button {
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

.einst-nav button:hover:not(:disabled) { background: var(--chassis-soft); color: var(--label); }

.einst-nav button[aria-pressed="true"],
.einst-nav button[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-weight: 700;
}

:root[data-design="dunkel"] .einst-nav button[aria-pressed="true"] { color: #9bdee5; }

.einst-nav .sym,
.einst-link .sym { display: inline-flex; flex: none; }

.einst-nav .sym svg { width: 18px; height: 18px; }

.einst-fuss {
  margin: auto 10px 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--label-3);
}

.einst-haupt {
  position: relative;
  min-width: 0;
  overflow-y: auto;
  background: var(--surface);
}

.einst-seite[hidden] { display: none; }

.einst-kopf {
  padding: 29px 80px 24px 29px;
  box-shadow: inset 0 -1px 0 var(--sep-2);
}

.einst-kopf h3 { margin: 0 0 9px; font-size: 25px; letter-spacing: -0.5px; }
.einst-kopf p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--label-2); }

.einst-schliessen {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--label-2);
}

.einst-koerper { padding: 26px 30px 34px; }
.einst-koerper > h4 { margin: 0 0 12px; font-size: 17px; }
.einst-koerper > h4 + p { margin: -4px 0 0; font-size: 13px; color: var(--label-2); }

.konto-identitaet {
  display: flex;
  gap: 19px;
  align-items: center;
  padding: 0 0 25px;
  box-shadow: inset 0 -1px 0 var(--sep-2);
}

.person-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-size: 16px;
  font-weight: 700;
}

.person-avatar.gross { width: 70px; height: 70px; border-radius: 14px; font-size: 23px; }
:root[data-design="dunkel"] .person-avatar { color: #9bdee5; }

.konto-identitaet h4 { margin: 0 0 8px; font-size: 22px; }
.konto-identitaet .marken { display: flex; flex-wrap: wrap; gap: 5px; }

.konto-daten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
  max-width: 640px;
  margin: 24px 0 0;
}

.konto-daten dt { font-size: 12px; color: var(--label-2); margin-bottom: 6px; }
.konto-daten dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }

.konto-sicherheit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 640px;
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--sep-2);
  color: var(--label-2);
}

.konto-sicherheit > svg { width: 20px; height: 20px; flex: none; color: var(--tint); }
.konto-sicherheit strong { color: var(--label); font-size: 14px; }
.konto-sicherheit p { margin: 7px 0 12px; font-size: 13px; line-height: 1.7; }
.konto-sicherheit.offen > svg { color: var(--warn); }

.design-wahl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 23px 0 32px;
}

.design-wahl button {
  display: block;
  padding: 9px;
  border: 2px solid var(--sep);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
  color: var(--label-2);
  font-weight: 400;
  text-align: left;
}

.design-wahl button[aria-pressed="true"] { border-color: var(--aktion); }
.design-wahl strong { display: block; padding: 10px 4px 3px; font-size: 13px; color: var(--label); }

.design-vorschau {
  display: flex;
  height: 95px;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid #dce4e9;
  background: #f5f7fa;
}

.design-vorschau i { display: block; }
.design-vorschau i:first-child { width: 28%; background: #e1e8ed; border-right: 1px solid #d0dce3; }
.design-vorschau i:last-child { flex: 1; margin: 17px 12px; border-top: 8px solid #74a8b3; border-bottom: 32px solid #fff; }
.design-vorschau.dunkel { background: #26333e; border-color: #3d4d5a; }
.design-vorschau.dunkel i:first-child { background: #1b2730; border-color: #364752; }
.design-vorschau.dunkel i:last-child { border-bottom-color: #3c4d5a; }
.design-vorschau.system { background: linear-gradient(90deg, #f5f7fa 50%, #26333e 50%); }

.dichte-wahl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin: 19px 0 25px;
}

.dichte-wahl button {
  display: block;
  padding: 18px;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--label-2);
  font-weight: 400;
  text-align: left;
  white-space: normal;
}

.dichte-wahl button[aria-pressed="true"] {
  background: var(--tint-weich);
  box-shadow: 0 0 0 1px var(--aktion);
}

.dichte-wahl strong { display: block; margin-bottom: 8px; font-size: 14px; color: var(--label); }
.dichte-wahl span { font-size: 12px; line-height: 1.6; }

.einst-hinweis { font-size: 13px; line-height: 1.6; color: var(--label-2); }

.einst-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

a.einst-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--tint);
  text-decoration: none;
}

a.einst-link:hover {
  background: var(--zeile-hover);
  box-shadow: 0 0 0 1px var(--rule-strong);
}

a.einst-link[aria-current="page"] { box-shadow: 0 0 0 1px var(--aktion), inset 3px 0 0 var(--marker); }

.einst-link .sym svg { width: 20px; height: 20px; }
.einst-link-text { flex: 1; min-width: 0; }
.einst-link-text strong { display: block; margin-bottom: 6px; font-size: 15px; color: var(--label); }
.einst-link-text small { display: block; font-size: 12px; line-height: 1.6; color: var(--label-2); }
.einst-link .pfeil { font-size: 18px; color: var(--tint); }

.werkzeug-zweige {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 30px;
  padding: 0;
}

.werkzeug-zweige a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--label);
  font-size: 13px;
  text-decoration: none;
}

.werkzeug-zweige a:hover { background: var(--zeile-hover); }
.werkzeug-zweige a[aria-current] { box-shadow: 0 0 0 1px var(--aktion); color: var(--tint-hi); }

.werkzeug-zweige .rail-zahl,
.einst-link .rail-zahl { margin-left: auto; }

.einst-link .rail-punkt { flex: none; }

/* --- Einstellungen, übersichtlicher (19.11.2026) ----------------------------
   Kleineres Fenster mit runden Ecken, Navigation mit Symbolkacheln, Inhalte
   als gruppierte Listen unter kleinen Zwischenüberschriften, Status als
   farbige Marke. Überschreibt die Grundregeln oben; die schmalen Ansichten
   weiter unten gelten unverändert. */

dialog.einstellungen {
  width: min(940px, calc(100vw - 40px));
  height: min(660px, calc(100dvh - 48px));
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06), 0 24px 70px rgb(10 30 40 / 0.28);
}

dialog.einstellungen::backdrop {
  background: rgb(15 25 32 / 0.38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

dialog.einstellungen[open] { grid-template-columns: 236px minmax(0, 1fr); }

.einst-nav { gap: 3px; padding: 26px 14px 20px; }
.einst-marke { margin-left: 12px; color: var(--tint); }
dialog.einstellungen .einst-nav h2 { margin: 4px 12px 20px; font-size: 20px; }

.einst-nav button {
  gap: 11px;
  padding: 7px 10px 7px 7px;
  border-radius: 10px;
  color: var(--sl, var(--label-2));
  font-size: 13.5px;
  font-weight: 500;
}

.einst-nav .sym {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--label-2);
  transition: background-color 140ms ease-out, color 140ms ease-out;
}

.einst-nav .sym svg { width: 17px; height: 17px; }

.einst-nav button[aria-pressed="true"],
.einst-nav button[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 0 0 1px var(--sep);
  color: var(--label);
  font-weight: 650;
}

.einst-nav button[aria-pressed="true"] .sym {
  background: linear-gradient(140deg, var(--marker), var(--tint));
  box-shadow: none;
  color: #fff;
}

:root[data-design="dunkel"] .einst-nav button[aria-pressed="true"] { color: var(--label); }

.einst-fuss { margin: auto 12px 0; }

.einst-kopf { padding: 26px 80px 20px 32px; }
.einst-kopf h3 { margin: 0 0 6px; font-size: 22px; }

.einst-schliessen {
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-alt);
  box-shadow: 0 0 0 1px var(--sep);
  font-size: 19px;
  line-height: 1;
}

.einst-schliessen:hover:not(:disabled) { background: var(--chassis-soft); color: var(--label); }

.einst-koerper { padding: 22px 32px 32px; }

/* Zwischenüberschrift einer Gruppe: klein, gesperrt, mit Abstand davor. */
.einst-koerper > h4.einst-gruppe {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 26px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label-2);
}

.einst-koerper > h4.einst-gruppe:first-child { margin-top: 0; }

.einst-gruppe small {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--label-3);
}

/* Mein Konto: Ausweis mit rundem Avatar wie unten in der Leiste. */
.konto-identitaet {
  gap: 18px;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--tint-weich), transparent 70%), var(--surface-alt);
  box-shadow: 0 0 0 1px var(--sep);
}

.person-avatar.gross {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--marker), var(--tint));
  color: #fff;
  font-size: 20px;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px rgb(0 166 172 / 0.25);
}

:root[data-design="dunkel"] .person-avatar.gross { color: #fff; }

.konto-identitaet h4 { margin: 0 0 7px; font-size: 19px; }

.konto-identitaet .marke {
  border-radius: 999px;
  background: var(--tint-weich);
  color: var(--tint-hi);
  font-weight: 600;
}

/* Angaben als Liste mit Trennlinien statt freistehender Felder. */
.konto-daten {
  display: block;
  max-width: none;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--sep);
  overflow: hidden;
}

.konto-daten > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
}

.konto-daten > div + div { box-shadow: inset 0 1px 0 var(--sep); }
.konto-daten dt { margin: 0; font-size: 13px; color: var(--label-2); }
.konto-daten dd { font-size: 13.5px; font-weight: 600; text-align: right; }

.einst-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.einst-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.einst-status.gut { background: var(--ok-bg); color: var(--ok); }
.einst-status.warn { background: var(--warn-bg); color: var(--warn); }

.konto-sicherheit {
  max-width: none;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface-alt);
}

.konto-sicherheit.offen {
  background: var(--warn-bg);
  box-shadow: inset 3px 0 0 var(--warn);
}

.konto-sicherheit p { margin: 5px 0 12px; }

/* Verwaltung, Werkzeug & Apps: eine Liste je Gruppe, Zeilen mit Trennlinie,
   Symbolkachel links, Pfeil rechts. */
.einst-links {
  display: block;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  overflow: hidden;
}

a.einst-link {
  gap: 14px;
  padding: 13px 16px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: background-color 140ms ease-out;
}

a.einst-link + a.einst-link { box-shadow: inset 0 1px 0 var(--sep); }

a.einst-link:hover {
  background: var(--surface-alt);
  box-shadow: none;
}

a.einst-link + a.einst-link:hover { box-shadow: inset 0 1px 0 var(--sep); }

a.einst-link[aria-current="page"] {
  background: var(--tint-weich);
  box-shadow: inset 3px 0 0 var(--marker);
}

.einst-link .sym {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tint-weich);
  color: var(--tint);
}

.einst-link .sym svg { width: 19px; height: 19px; }
.einst-link-text strong { margin-bottom: 2px; font-size: 14px; }
.einst-link-text small { line-height: 1.45; }

.einst-link .pfeil {
  font-size: 16px;
  color: var(--label-3);
  transition: transform 140ms ease-out, color 140ms ease-out;
}

a.einst-link:hover .pfeil { color: var(--tint); transform: translateX(2px); }

/* Die drei Abschnitte des Werkzeugs als kleine Sprungmarken darunter. */
.werkzeug-zweige {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.werkzeug-zweige a {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
}

.werkzeug-zweige a:hover { background: var(--surface-alt); }

/* Design: Auswahlkarten mit runden Ecken, gewählte Karte in Markenfarbe. */
.design-wahl { gap: 12px; margin: 0; }

.design-wahl button {
  padding: 8px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--sep);
}

.design-wahl button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--marker); }
.design-vorschau { height: 80px; border-radius: 7px; }
.design-wahl strong { padding: 9px 4px 2px; }

.dichte-wahl { gap: 12px; margin: 0 0 18px; }

.dichte-wahl button {
  padding: 14px 16px;
  border-radius: 12px;
}

.dichte-wahl button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--marker); }
.dichte-wahl strong { margin-bottom: 4px; }

/* --- Übersicht ---------------------------------------------------------- */

.portfolio-leiste {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  background: var(--surface);
  border-top: 3px solid var(--aktion);
  box-shadow: 0 0 0 1px var(--sep);
}

.portfolio-leiste > div {
  padding: 19px 23px;
  box-shadow: inset -1px 0 0 var(--sep-2);
}

.portfolio-leiste > div:last-child { box-shadow: none; }

.leisten-label {
  display: block;
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--label-2);
}

.leisten-wert strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.leisten-notiz { margin-left: 9px; font-size: 12px; color: var(--label-2); }


/* Sicherheitsleiste: nur für Berechtigte gerendert (Route), Zahlen aus dem
   Audit-Log über dieselbe geschützte API wie die Seite „Audit-Log". */
.sicherheitsleiste {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 0 0 30px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
}

.sicherheitsleiste .leisten-label { margin-bottom: 5px; }
.sicherheitsleiste a.leisten-label { text-decoration: none; }
.sicherheitsleiste a.leisten-label:hover { color: var(--tint); text-decoration: underline; }

.sl-fehlversuche {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 24px;
  box-shadow: inset -1px 0 0 var(--sep-2);
}

.sl-fehlversuche > svg { width: 20px; height: 20px; color: var(--tint); flex: none; }
.sl-fehlversuche strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.sl-fehlversuche.warn > svg,
.sl-fehlversuche.warn strong { color: var(--warn); }

.sl-ereignisse { min-width: 0; }

.sl-ereignisse ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--label-2);
}

.sl-ereignisse li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sl-ereignisse li b { color: var(--label); font-weight: 400; }

.sl-link,
.uebersicht-fuss a { font-size: 13px; color: var(--tint); white-space: nowrap; text-decoration: none; }

.sl-link:hover,
.uebersicht-fuss a:hover { text-decoration: underline; }

.portfolio-kopf {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.portfolio-kopf h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.3px; }
.portfolio-kopf p { margin: 0; font-size: 13px; color: var(--label-2); }

.objekt-raster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

a.objekt-karte {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--label);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

a.objekt-karte:hover { box-shadow: 0 0 0 1px #94b7bd, 0 6px 20px rgba(35, 60, 74, 0.05); }
a.objekt-karte:focus-visible { outline: 3px solid var(--aktion); outline-offset: 3px; }

.objekt-bild {
  position: relative;
  display: block;
  aspect-ratio: 1.67;
  overflow: hidden;
  background: #e4ebee;
}

:root[data-design="dunkel"] .objekt-bild { background: #1b2a35; }

.objekt-bild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

a.objekt-karte:hover .objekt-bild img { transform: scale(1.025); }

.objekt-bild.mit-foto::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(18, 35, 51, 0.5));
  pointer-events: none;
}

.objekt-platzhalter {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  height: 100%;
  color: #6f9aa2;
  font-size: 12px;
  letter-spacing: 0.6px;
}

.objekt-platzhalter svg { width: 38px; height: 38px; }

.bild-ort {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 1;
  padding: 6px 9px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.94);
  color: #394f5c;
  font-size: 11px;
  font-weight: 700;
}

.bild-art {
  position: absolute;
  bottom: 13px;
  left: 16px;
  z-index: 1;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.objekt-inhalt { padding: 17px 18px 0; }

.objekt-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 23px;
  margin-bottom: 10px;
}

.objekt-ref { font-size: 11px; letter-spacing: 0.6px; color: var(--label-3); }
.objekt-kopf .phase { font-size: 11px; padding: 4px 6px; }

.objekt-titel {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

a.objekt-karte:hover .objekt-titel { color: var(--tint); }

.objekt-unter {
  min-height: 18px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--label-2);
}

.objekt-fakten {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 13px;
  padding: 14px 0 17px;
  box-shadow: inset 0 1px 0 var(--sep-2);
}

.objekt-fakten > div + div { padding-left: 15px; box-shadow: inset 1px 0 0 var(--sep-2); }

.objekt-fakten strong {
  display: block;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.objekt-fakten span { display: block; margin-top: 5px; font-size: 10px; line-height: 1.4; color: var(--label-2); }

.objekt-fuss {
  display: flex;
  align-items: center;
  min-height: 51px;
  font-size: 11px;
  color: var(--label-2);
  box-shadow: inset 0 1px 0 var(--sep-2);
}

.uebersicht-fuss { display: flex; justify-content: flex-end; margin-top: 22px; font-size: 13px; }

/* --- Bauprojekte -------------------------------------------------------- */

.kennzahl-leiste {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
}

.kennzahl-leiste > div { padding: 15px 20px; box-shadow: inset -1px 0 0 var(--sep-2); }
.kennzahl-leiste > div:last-child { box-shadow: none; }
.kennzahl-leiste .kl-label { font-size: 13px; color: var(--label-2); }
.kennzahl-leiste .kl-wert { display: flex; align-items: center; gap: 12px; margin-top: 8px; }

.kennzahl-leiste strong {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.kennzahl-leiste .kl-wert span { font-size: 12px; color: var(--label-2); }
.kennzahl-leiste .kl-wert .lauf { color: var(--pille-lauf-text); }
.kennzahl-leiste .kl-wert .plan { color: var(--pille-plan-text); }

.pl-panel {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  overflow: hidden;
}

.pl-panel > .pl-leiste {
  margin: 0;
  padding: 0 18px;
  box-shadow: inset 0 -1px 0 var(--sep);
}

/* Alle / Eigene: in der Vorlage Reiter mit Unterstrich, keine Segmente. */
.pl-panel .segmente {
  gap: 25px;
  padding: 0;
  background: none;
  box-shadow: none;
}

.pl-panel .segmente button {
  padding: 15px 0 13px;
  border-radius: 0;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

.pl-panel .segmente button[aria-pressed="true"] {
  background: none;
  box-shadow: none;
  border-bottom-color: var(--marker);
}

.pl-panel .segmente .anzahl {
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: var(--radius-klein);
  background: var(--pille-grau);
  color: var(--pille-grau-text);
  font-size: 11px;
  font-weight: 400;
}

.pl-panel .find { margin: 14px 18px; }

.pl-panel > .tafel {
  border-radius: 0;
  box-shadow: none;
}

.pl-panel-fuss {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  font-size: 12px;
  color: var(--label-2);
  box-shadow: inset 0 1px 0 var(--sep);
}

.pl-bild {
  display: block;
  width: 47px;
  height: 37px;
  flex: none;
  margin-right: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.pl-link { display: flex; align-items: center; }
.pl-link-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pl-link b { font-size: 14px; font-weight: 700; }
.pl-zeile2 { font-size: 12px; margin-top: 4px; }

.pl-marke {
  padding: 3px 6px;
  border-radius: var(--radius-klein);
  background: var(--pille-grau);
  color: var(--pille-grau-text);
  box-shadow: 0 0 0 1px var(--sep-2);
  font-size: 12px;
  font-weight: 700;
}

/* --- Bauprojekt (Projektzentrale) --------------------------------------- */

/* Projektkopf (Felix, 19.11.2026): das Foto der Baustelle als Hintergrund,
   darüber ein Verlauf, der die Schrift lesbar hält. Ohne Foto ein ruhiger
   Verlauf in der Markenfarbe. */
.projekt-held {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 230px;
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0b4f55 0%, #007c84 55%, #2aa3a9 100%);
  color: #fff;
  isolation: isolate;
}
.projekt-held-bild {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.projekt-held::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(10 22 28 / 0.25) 0%, rgb(10 22 28 / 0.5) 40%, rgb(10 22 28 / 0.86) 100%);
}
.projekt-held:not(.mit-foto)::after {
  background: radial-gradient(120% 90% at 100% 0%, rgb(255 255 255 / 0.14), transparent 60%);
}
.projekt-held-inhalt { width: 100%; padding: 26px 28px 24px; }
.projekt-held-oben { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.held-nummer,
.held-art {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgb(255 255 255 / 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.projekt-held-name {
  margin: 0;
  font-size: 34px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.8px;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.25);
}
.projekt-held-ort { margin: 6px 0 0; font-size: 15px; opacity: 0.92; }
.projekt-held-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.projekt-held-chips:not(:has(> :not([hidden]))) { display: none; }
.held-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgb(255 255 255 / 0.16);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.held-chip > svg { width: 18px; height: 18px; flex: none; }
.held-wetter { background: rgb(255 255 255 / 0.92); color: var(--label); box-shadow: none; }
.held-wetter > svg { color: #d48a00; }

/* Projektdaten als Kacheln: Beschriftung klein darüber, der Wert darunter.
   Die Zeilen bleiben tr/th/td, damit das Ändern in der Zeile weiter greift. */
.projekt-fakten,
.projekt-fakten tbody { display: block; width: 100%; }
.projekt-fakten tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--sep-2);
  border-top: 1px solid var(--sep-2);
}
.projekt-fakten tr {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 18px 15px;
  background: var(--surface);
}
.projekt-fakten tr:last-child:nth-child(odd) { grid-column: 1 / -1; }
.projekt-fakten th,
.projekt-fakten td {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: left;
}
#stammdaten th.feldname {
  width: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--label-3);
}
.projekt-fakten td { font-size: 15px; color: var(--label); line-height: 1.45; }
.projekt-fakten td a { font-weight: 600; }
/* Die ganze Kachel ist der Knopf, wenn sie sich ändern lässt. */
#stammdaten tr[data-aendern] { cursor: pointer; }
#stammdaten tr[data-aendern]:hover,
#stammdaten tr[data-aendern]:hover td { background: var(--zeile-hover); }
#stammdaten tr[data-aendern]:has(form),
#stammdaten tr[data-aendern]:has(form) td { cursor: auto; background: var(--surface); }
#stammdaten tr:has(form) { grid-column: 1 / -1; }

/* Aufklappbare Tafel („Zuletzt im Projekt"). */
.pf-klappe > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.pf-klappe > summary::-webkit-details-marker { display: none; }
.pf-klappe > summary h3 { margin: 0; }
.pf-klappe > summary:hover { background: var(--zeile-hover); }
.klappe-zahl { font-size: 12px; color: var(--label-3); }
.klappe-pfeil {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--label-2);
  transition: transform 0.18s ease;
}
.pf-klappe[open] > summary .klappe-pfeil { transform: rotate(180deg); }
.pf-klappe[open] > summary { box-shadow: inset 0 -1px 0 var(--sep-2); }
@media (prefers-reduced-motion: reduce) { .klappe-pfeil { transition: none; } }

@media (max-width: 760px) {
  .projekt-held { min-height: 260px; margin-bottom: 16px; }
  .projekt-held-inhalt { padding: 20px 18px 18px; }
  .projekt-held-name { font-size: 27px; }
  .projekt-fakten tbody { grid-template-columns: 1fr; }
}

/* Projektdaten direkt in der Zeile ändern (Felix, 29.10.2026). Die Zeile ist
   nur dann ein Knopf, wenn die Befugnis da ist — sonst fehlt `data-aendern`. */
#stammdaten tr[data-aendern] td { cursor: pointer; }
#stammdaten tr[data-aendern]:hover td { background: var(--zeile-hover); }
#stammdaten tr[data-aendern] td:has(form) { cursor: auto; background: none; }
.zeile-aendern {
  margin-left: 8px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--label-3);
  font-size: 0.95rem;
  line-height: 1.4;
}
.zeile-aendern:hover,
.zeile-aendern:focus-visible { color: var(--aktion); }
.zeile-editor { display: grid; gap: 8px; }
.zeile-editor-felder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile-editor-felder input[name="plz"] { width: 90px; }
.zeile-editor-felder input:not([name="plz"]),
.zeile-editor-felder select,
.zeile-editor-felder textarea { flex: 1 1 180px; width: auto; }
.zeile-editor-knoepfe { display: flex; gap: 8px; }

.projekt-ordner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Ein einzelner Ordner (Planablage vorerst ausgeblendet) nimmt die ganze Breite. */
.projekt-ordner:has(> :only-child) { grid-template-columns: 1fr; }

button.projekt-ordner-knopf {
  justify-content: flex-start;
  gap: 17px;
  width: 100%;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--tint);
  text-align: left;
  white-space: normal;
}

button.projekt-ordner-knopf:hover:not(:disabled) {
  background: var(--zeile-hover);
  box-shadow: 0 0 0 1px #77acb4;
}

.projekt-ordner-knopf > svg { width: 22px; height: 22px; }
.projekt-ordner-knopf .text { flex: 1; min-width: 0; }
.projekt-ordner-knopf strong { display: block; margin-bottom: 8px; font-size: 17px; color: var(--label); }
.projekt-ordner-knopf small { display: block; font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--label-2); }
.projekt-ordner-knopf .pfeil { margin-left: auto; font-size: 20px; }

.pf-block h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--label-2);
}

/* „Zuletzt im Projekt": Zeit links über die ganze Höhe, rechts Art, Text und
   wer es war. Das Zwei-Spalten-Raster legte den Text sonst in die schmale
   Zeitspalte. */
.strahl-punkt {
  grid-template-columns: 5.4rem minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 3px;
  padding: 12px 18px;
  font-size: 14px;
}

.strahl-zeit { grid-row: span 3; font-size: 12px; color: var(--label-2); }
.strahl-art,
.strahl-text,
.strahl-akteur { grid-column: 2; }
.strahl-art { font-size: 12px; font-weight: 700; color: var(--label-2); }

.pf-knopf { font-size: 14px; border-radius: var(--radius-klein); }
.pf-knopf:hover:not(:disabled) { background: var(--zeile-hover); }

/* Planablage */
.plan-formular {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  box-shadow: inset 0 -1px 0 var(--sep);
}

.plan-formular .feld { margin: 0; }
.plan-formular input[type="file"] { padding: 7px 9px; }

#plan-liste td a { color: var(--tint); }

/* --- Mitarbeiter --------------------------------------------------------- */

.mitarbeiter-karten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.mitarbeiter-karte {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 19px 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
}

.mitarbeiter-karte:hover { box-shadow: 0 0 0 1px #9cbdc6, 0 3px 15px rgba(35, 61, 78, 0.03); }

.mitarbeiter-oben {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mitarbeiter-oben .marke { font-size: 10px; }

.mitarbeiter-name { min-height: 70px; padding: 16px 0 0; }
.mitarbeiter-name small { font-size: 11px; color: var(--label-2); }
.mitarbeiter-name h3 { margin: 3px 0 7px; font-size: 17px; letter-spacing: -0.3px; }
.mitarbeiter-name p { margin: 0; font-size: 12px; color: var(--label-2); }

.mitarbeiter-rollen {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  padding: 8px 0;
}

.mitarbeiter-rollen .offen { font-size: 12px; color: var(--pille-plan-text); }

.mitarbeiter-zugang {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0 16px;
  font-size: 12px;
  color: var(--label-2);
}

.mitarbeiter-zugang svg { width: 15px; height: 15px; flex: none; }

.mitarbeiter-aktion {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding: 13px 0;
  box-shadow: inset 0 1px 0 var(--sep-2);
}

.mitarbeiter-aktion button {
  padding: 8px 11px;
  font-size: 12px;
  background: var(--knopf-2);
  color: var(--tint-hi);
  box-shadow: none;
}

:root[data-design="dunkel"] .mitarbeiter-aktion button { color: #9bdee5; }

/* --- Anmeldung (Entwurf vom 28.09.2026) -------------------------------------
   Links das Baustellenbild mit Marke, rechts genau ein Weg hinein. Die Seite
   lädt design.js nicht — sie bleibt immer hell. Das Bild ist eine lokale
   Datei; img-src 'self' der CSP deckt auch Hintergrundbilder. */

.anmeldung {
  grid-template-columns: 56fr 44fr;
  background: #f7f7f5;
}

.anmeldung-marke {
  justify-content: space-between;
  padding: 58px 64px 60px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(9, 32, 38, 0.3) 0%, rgba(9, 32, 38, 0) 26%,
      rgba(8, 56, 64, 0.35) 56%, rgba(7, 62, 70, 0.93) 100%),
    url("/static/img/anmeldung-baustelle.jpg") center / cover no-repeat #20414a;
  box-shadow: none;
}


.anmeldung-marke .anmeldung-titel {
  max-width: none;
  margin: 0 0 16px;
  font-size: clamp(36px, 3.3vw, 60px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -1.5px;
  color: #fff;
}

.anmeldung-marke .anmeldung-claim {
  max-width: none;
  margin: 0 0 30px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
}

.anmeldung-marke .firmen {
  margin: 0;
  padding-top: 26px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.anmeldung-form {
  position: relative;
  padding: 48px 64px 96px;
  background: #f7f7f5;
}

.anmeldung-inhalt,
.werkzeugwahl { width: 100%; max-width: 470px; }
.anmeldung-inhalt form { max-width: none; }

.anmeldung-eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #25a3a4;
}

.anmeldung-form h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 2.9vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.4px;
  color: #1d2a33;
}

.anmeldung-form .sub { margin: 0 0 40px; font-size: 17px; color: #5b6770; }

.anmeldung-form .ms-knopf {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin: 0;
  padding: 17px 26px 17px 64px;
  border-radius: 6px;
  background: #135f68;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.anmeldung-form .ms-knopf:hover { background: #0d4d55; }
.anmeldung-form .ms-knopf svg { width: 22px; height: 22px; }
.anmeldung-form .ms-knopf .ms-pfeil { width: 24px; height: 24px; margin-left: auto; }
.anmeldung-form .meldung { margin-bottom: 20px; }

.anmeldung-fuss {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: #6b757d;
}

/* Werkzeugwahl nach der Microsoft-Anmeldung: dieselben Knöpfe, größer. */
/* Eigene Zustände verhindern helle Flächen aus den allgemeinen Knopfregeln. */
.anmeldung-form .werkzeug-knopf { --werkzeug-farbe: var(--aktion); }
.anmeldung-form .werkzeug-knopf,
.anmeldung-form .werkzeug-knopf:hover:not(:disabled) {
  padding: 18px 22px;
  border-radius: 6px;
  background: var(--werkzeug-farbe);
  color: #fff;
  filter: none;
  transform: none;
  white-space: normal;
  transition: background-color 140ms ease-out, box-shadow 140ms ease-out;
}
.anmeldung-form .werkzeug-knopf.primaer { --werkzeug-farbe: #135f68; }

/* Symbol links, Name und Zweck in der Mitte, Pfeil rechts (19.11.2026). */
.anmeldung-form .werkzeug-knopf {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 20px 18px 18px;
}

.werkzeug-knopf .wk-symbol {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.14);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  opacity: 1;
}

.werkzeug-knopf .wk-symbol svg { width: 30px; height: 30px; }

.werkzeug-knopf .wk-text {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
  font-size: inherit;
  opacity: 1;
}

.werkzeug-knopf .wk-text b { font-size: 19px; }
.werkzeug-knopf .wk-text span { font-size: 15px; font-weight: 400; opacity: 0.82; }

.werkzeug-knopf .wk-pfeil {
  flex: none;
  width: 22px;
  height: 22px;
  opacity: 0.7;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .werkzeug-knopf:hover .wk-pfeil { transform: translateX(3px); opacity: 1; }
}

@media (max-width: 420px) {
  .anmeldung-form .werkzeug-knopf { gap: 14px; padding: 16px 14px; }
  .werkzeug-knopf .wk-symbol { width: 44px; height: 44px; border-radius: 10px; }
  .werkzeug-knopf .wk-symbol svg { width: 24px; height: 24px; }
}

@media (hover: hover) and (pointer: fine) {
  .anmeldung-form .werkzeug-knopf:hover:not(:disabled) {
    background: color-mix(in srgb, var(--werkzeug-farbe), #000 10%);
  }
}

.anmeldung-form .werkzeug-knopf:active:not(:disabled) {
  background: color-mix(in srgb, var(--werkzeug-farbe), #000 18%);
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 18%);
  transform: none;
}

/* --- Dunkles Bild: fest eingebaute Hellflächen der Seitenstile ----------- */

:root[data-design="dunkel"] .kopfzeile,
:root[data-design="dunkel"] .tip { background: var(--surface); }

:root[data-design="dunkel"] .tip { color: var(--label); box-shadow: 0 0 0 1px var(--sep); }

:root[data-design="dunkel"] input,
:root[data-design="dunkel"] select,
:root[data-design="dunkel"] textarea { background: #1b2a35; color: var(--label); }

:root[data-design="dunkel"] .bild-ort { background: rgba(245, 250, 251, 0.93); color: #354c59; }

/* Im dunklen Bild ist Petrol hell — weiße Schrift darauf wäre kaum lesbar. */
:root[data-design="dunkel"] .of[aria-pressed="true"],
:root[data-design="dunkel"] .of[aria-pressed="true"] svg,
:root[data-design="dunkel"] .of[aria-pressed="true"] .of-zahl,
:root[data-design="dunkel"] .planraum .ix-aktuell,
:root[data-design="dunkel"] .pick[aria-pressed="true"] .tick { color: #06262a; }

/* --- Dichte „Kompakt" ---------------------------------------------------- */

:root[data-dichte="kompakt"] td,
:root[data-dichte="kompakt"] .tr { padding-top: 7px; padding-bottom: 7px; }

:root[data-dichte="kompakt"] .rail a,
:root[data-dichte="kompakt"] .rail-zeile { padding-top: 8px; padding-bottom: 8px; }

:root[data-dichte="kompakt"] .objekt-inhalt { padding-top: 11px; }
:root[data-dichte="kompakt"] .objekt-bild { aspect-ratio: 2.3; }
:root[data-dichte="kompakt"] .mitarbeiter-karte { padding-top: 14px; }
:root[data-dichte="kompakt"] .mitarbeiter-name { min-height: 56px; padding-top: 10px; }
:root[data-dichte="kompakt"] .kopf { padding-top: 20px; }
:root[data-dichte="kompakt"] .kopf-reihe { margin-bottom: 16px; }

/* --- Schmalere Schirme --------------------------------------------------- */

@media (min-width: 1700px) {
  .objekt-bild { aspect-ratio: 1.9; }
  .objekt-titel { font-size: 20px; }
}

@media (max-width: 1250px) {
  .objekt-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
  .portfolio-leiste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .einst-links { grid-template-columns: 1fr; }
  .mitarbeiter-karten { grid-template-columns: 1fr; }
  .plan-formular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .sicherheitsleiste { grid-template-columns: 1fr; gap: 12px; }
  .sl-fehlversuche { padding: 0 0 12px; box-shadow: inset 0 -1px 0 var(--sep-2); }
  .kennzahl-leiste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kennzahl-leiste > div:nth-child(2) { box-shadow: none; }
  .kennzahl-leiste > div:nth-child(-n+2) { border-bottom: 1px solid var(--sep-2); }
  .werkzeug-zweige { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  dialog.einstellungen[open] { grid-template-columns: 180px minmax(0, 1fr); }
  .einst-kopf, .einst-koerper { padding-left: 22px; padding-right: 22px; }
  .konto-daten { grid-template-columns: 1fr; }
  .projekt-ordner { grid-template-columns: 1fr; }
}

/* Schmal: Die Leiste fährt wie in der Vorlage über den Inhalt (☰). */
@media (max-width: 54rem) {
  .huelle,
  .warnband ~ .huelle { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: fixed;
    inset: var(--warnband) auto 0 0;
    z-index: 40;
    width: 240px;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }

  .rail.offen {
    transform: none;
    box-shadow: 0 0 0 100vw rgba(36, 49, 58, 0.33);
  }

  .rail nav { flex-direction: column; gap: 3px; padding: 0 0 1.5rem; overflow: visible; }
  .rail-gruppe { display: block; }
  .rail .kinder { display: grid; }
  .rail-pfad { display: block; }
  .rail a, .rail-zeile { white-space: normal; width: 100%; }

  .navi-knopf {
    display: inline-flex;
    padding: 6px 8px;
    background: none;
    box-shadow: none;
    font-size: 20px;
    font-weight: 400;
    color: var(--label);
  }

  .kopfzeile { padding: 0 14px; gap: 10px; }
  .kopfzeile-rechts .firma,
  .kopfzeile-rechts .trennstrich { display: none; }
  .brotkrumen { margin-right: auto; font-size: 12px; gap: 8px; }
  .brotkrumen > span:first-child,
  .brotkrumen > span:first-child + .trenner { display: none; }

  .kopf { padding: 22px 14px 0; }
  .kopf-reihe { flex-direction: column; align-items: flex-start; }
  .kopf h1 { font-size: 26px; }
  .inhalt { padding: 0 14px 32px; }

  dialog.einstellungen[open] {
    display: flex;
    flex-direction: column;
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
  }

  .einst-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 12px; box-shadow: inset 0 -1px 0 var(--sep); }
  .einst-marke, .einst-fuss { display: none; }
  dialog.einstellungen .einst-nav h2 { width: 100%; margin: 0 4px 8px; font-size: 18px; }
  .einst-nav button { padding: 9px; font-size: 12px; }
  .einst-schliessen { top: 10px; right: 10px; }
  .design-wahl { gap: 8px; }
  .design-vorschau { height: 60px; }
  .dichte-wahl { grid-template-columns: 1fr; }

  .anmeldung { grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
  .anmeldung-marke, .anmeldung-form { min-width: 0; }
  .anmeldung-marke { min-height: 300px; padding: 28px 22px 26px; gap: 24px; }
  .anmeldung-marke .firmen { display: none; }
  .anmeldung-marke .anmeldung-titel { font-size: 32px; }
  .anmeldung-form { padding: 36px 22px 32px; }
  .anmeldung-fuss { position: static; margin-top: 36px; }
  .anmeldung-form .ms-knopf { padding: 17px 16px; gap: 12px; font-size: 16px; white-space: normal; }
  .anmeldung-form .ms-knopf svg { flex-shrink: 0; }
}

@media (max-width: 760px) {
  .objekt-raster { grid-template-columns: 1fr; gap: 14px; }
  .portfolio-leiste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portfolio-leiste > div { min-width: 0; padding: 14px 12px; }
  /* Drei schmale Spalten: „Bautagesberichte" muss in ihre Breite passen
     (abgeschnitten am Handy, 19.11.2026) — weniger Sperrung, notfalls Umbruch. */
  .portfolio-leiste .leisten-label {
    min-height: 2.6em;            /* Zahlen bleiben auf einer Linie */
    letter-spacing: 0.2px;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .portfolio-leiste .leisten-notiz { display: block; margin: 4px 0 0; }
  .portfolio-kopf { flex-direction: column; align-items: flex-start; }
  .plan-formular { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  a.objekt-karte,
  .objekt-bild img,
  .rail { transition: none; }
  a.objekt-karte:hover .objekt-bild img { transform: none; }
}

@media print {
  .kopfzeile { display: none; }
}

/* --- Mängel (Felix, 19.11.2026) -------------------------------------------- */

.mg-filter { display: flex; gap: 6px; }
.mg-filter [aria-pressed="true"] { background: var(--tint-weich); color: var(--tint); box-shadow: 0 0 0 1px var(--tint); }
.mg-liste { display: grid; gap: 12px; }
.mg-karte {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--sep);
  border-left: 4px solid #c0392b;
}
.mg-karte.behoben { border-left-color: #2e8b57; }
.mg-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mg-kopf strong { font-size: 15px; }
.mg-wann { margin-left: auto; font-size: 12px; color: var(--label-2); }
.mg-text { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.mg-wer, .mg-stand { margin: 6px 0 0; font-size: 13px; color: var(--label-2); }
.mg-fotos { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.mg-fotos > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mg-fotoname { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label-3); }
.mg-fotos img { display: block; width: 88px; height: 66px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px var(--sep); }
.mg-aktion { margin-top: 12px; }
.mg-formular { display: grid; gap: 8px; }
.mg-datei { font-size: 13px; color: var(--label-2); }
.mg-datei input { display: block; margin-top: 4px; }
@media (max-width: 760px) {
  .mg-wann { margin-left: 0; width: 100%; }
}

/* Kennzahlen unter dem Projektkopf (19.11.2026) */
/* Flex statt Raster: Die letzte Reihe füllt sich aus, statt graue Lücken zu lassen. */
.projekt-kennzahlen {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: -8px 0 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sep);
  box-shadow: 0 0 0 1px var(--sep);
}
.kennzahl {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  text-align: left;
  color: var(--label);
  font: inherit;
}
button.kennzahl { cursor: pointer; }
button.kennzahl:hover { background: var(--zeile-hover); }
.kennzahl strong { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.kennzahl span { font-size: 12px; font-weight: 600; color: var(--label-2); }
.kennzahl small { font-size: 11.5px; color: var(--label-3); }
.projekt-kennzahlen.mit-maengeln .kennzahl:last-child strong { color: #c0392b; }
@media (max-width: 640px) {
  .projekt-kennzahlen { margin-top: -4px; }
  .kennzahl { flex-basis: 40%; }
  .kennzahl { padding: 12px; }
  .kennzahl strong { font-size: 19px; }
}
