/* Projektbüro – Gestaltung 2026 (Vorlage Deals & Projects): Seitenleiste, Kopfleiste, Karten */
:root {
  --blau: #0176D3;          /* Salesforce-Blau: aktiv, Hauptaktionen */
  --blau-dunkel: #014486;   /* Hover/aktiv */
  --blau-hell: #D8E6F7;     /* Stepper-Rest */
  --blau-zart: #E8F3FB;
  --nacht: #021B3A;         /* Seitenleiste unten */
  --text: #181818;
  --grau: #5C5C5C;          /* Nebentext, Kontrast > 5:1 auf Weiß und #F3F3F3 */
  --grau-hell: #8A8A8A;
  --linie: #E5E5E5;
  --linie-stark: #D0D0D0;
  --grund: #F3F3F3;
  --karte: #ffffff;
  --rot: #BA0517;
  --rot-zart: #F9E8E9;
  --gruen: #2E844A;
  --gruen-zart: #E6F4EA;
  --warn: #DD7A01;
  --warn-zart: #FDF0E0;
  --radius: 12px;
  --radius-klein: 8px;
  --schatten: 0 1px 2px rgba(20, 40, 56, .06), 0 1px 3px rgba(20, 40, 56, .08);
  --schatten-hoch: 0 4px 6px -2px rgba(20, 40, 56, .06), 0 12px 20px -4px rgba(20, 40, 56, .10);
  --ring: 0 0 0 3px rgba(1, 118, 211, .25);
  --leiste-hoehe: 56px;
  --menue-breite: 248px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --menue-bg-oben: #2D3E50;
  --menue-bg-unten: #2D3E50;
  --menue-fg: #FFFFFF;
  --menue-fg-schwach: rgba(255, 255, 255, .85);
  --menue-fg-aus: rgba(255, 255, 255, .45);
  --menue-hover: rgba(255, 255, 255, .08);
  --menue-aktiv: #516F90;
  --menue-logo: #E8983A;
  --menue-logo-hell: #FFFFFF;
  --menue-linie: rgba(255, 255, 255, .25);
}
/* Seitenleiste einheitlich dunkel (HubSpot-Stil) für EC, GC und Alle. */
html.mandant-ec,
html.mandant-gc,
html.mandant-alle {
  --menue-bg-oben: #2D3E50;
  --menue-bg-unten: #2D3E50;
  --menue-fg: #FFFFFF;
  --menue-fg-schwach: rgba(255, 255, 255, .85);
  --menue-fg-aus: rgba(255, 255, 255, .45);
  --menue-hover: rgba(255, 255, 255, .08);
  --menue-aktiv: #516F90;
  --menue-logo: #E8983A;
  --menue-logo-hell: #FFFFFF;
  --menue-linie: rgba(255, 255, 255, .25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: var(--leiste-hoehe); }
body { margin: 0; font-family: var(--schrift); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--grund); -webkit-font-smoothing: antialiased; overflow-x: clip; }
[hidden] { display: none !important; }
.versteckt { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.verborgen { display: none; }
a { color: var(--blau); }
:focus-visible { outline: 3px solid rgba(1, 118, 211, .5); outline-offset: 2px; border-radius: 4px; }
.ico { flex: 0 0 auto; display: block; }
.platz { flex: 1 1 auto; }

/* ---------- Grundgerüst ---------- */
.app { display: grid; grid-template-columns: var(--menue-breite) minmax(0, 1fr); min-height: 100vh; max-width: 100%; min-width: 0; transition: grid-template-columns .2s ease; }
.haupt { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: #2D3E50; container-type: inline-size; container-name: haupt; }
.inhalt {
  flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: var(--grund); border-top-left-radius: 16px;
}
.seitenkopf {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex: 0 0 auto; padding: 18px 28px 8px;
}
.seitenkopf .titelblock { flex: 1 1 auto; min-width: 0; }
.seitenkopf .titel { color: #2D3E50; font-size: 24px; font-weight: 700; }
.seitenkopf .pfad { margin: 0 0 4px; }
.seitenkopf + main,
.reiter + main,
.aktionen-zeile + main { padding-top: 16px; }
main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 40px; }

/* ---------- Seitenleiste ---------- */
.menue { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; color: var(--menue-fg);
  background: linear-gradient(180deg, var(--menue-bg-oben) 0%, var(--menue-bg-unten) 100%); z-index: 40; }
.menue-kopf { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.menue-kopf .logo { flex: 0 0 auto; border-radius: 10px; }
.menue-kopf > .logo { box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.menue .logo rect[fill="#0176D3"],
.menue-logo-knopf .logo rect[fill="#0176D3"] { fill: none; }
.menue .logo [stroke="#D8E6F7"],
.menue-logo-knopf .logo [stroke="#D8E6F7"] { stroke: var(--menue-logo-hell); }
.menue .logo [fill="#D8E6F7"],
.menue-logo-knopf .logo [fill="#D8E6F7"] { fill: var(--menue-logo-hell); }
.menue .logo [stroke="#fff"],
.menue-logo-knopf .logo [stroke="#fff"] { stroke: var(--menue-logo-hell); }
.menue .logo [fill="#fff"],
.menue-logo-knopf .logo [fill="#fff"] { fill: var(--menue-logo-hell); }
button.menue-logo-knopf {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,.3);
}
button.menue-logo-knopf .logo { display: block; box-shadow: none; }
button.menue-logo-knopf:hover,
button.menue-logo-knopf:focus-visible {
  outline: none;
  background: var(--menue-hover, rgba(255,255,255,.08));
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
}
.leiste button.menue-logo-knopf:hover,
.leiste button.menue-logo-knopf:focus-visible {
  background: rgba(255,255,255,.08);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
}
.menue-name { min-width: 0; }
.marke { color: var(--menue-fg); font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.produkt { font-size: 12px; color: var(--menue-fg-schwach); letter-spacing: .02em; }
.menue-liste { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.menue-fuss { border-top: 1px solid var(--menue-linie, rgba(24,24,24,.16)); padding-top: 10px; margin-top: 10px; }
.menue a, .menue span.aus { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--menue-fg-schwach); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.menue a:hover { background: var(--menue-hover); color: var(--menue-fg); }
.menue a.aktiv { background: var(--menue-aktiv); color: var(--menue-fg); font-weight: 600; }
.menue a.aktiv::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--menue-fg); }
.menue a:focus-visible { outline-color: var(--menue-fg); }
.menue span.aus { color: var(--menue-fg-aus); cursor: not-allowed; }
.menue .bald { margin-left: auto; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .15); color: #fff; }
.menue-zahl {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #D32F2F; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
}
.menue-zahl[hidden] { display: none !important; }
.menue-punkt, .leiste-punkt {
  display: none; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: #D32F2F; box-shadow: 0 0 0 2px var(--menue-bg-oben); pointer-events: none;
}
.menue-punkt { top: 6px; right: 6px; }
.menue a { position: relative; }
#menue-knopf { position: relative; }
.menue-logo-knopf .leiste-punkt,
#menue-knopf .leiste-punkt { top: -2px; right: -2px; box-shadow: 0 0 0 2px #2D3E50; }
@media (min-width: 901px) {
  .menue.zu .menue-zahl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; min-width: 0; border: 0; }
  .menue.zu a.wv-hat-zahl .menue-punkt { display: block; top: 4px; right: 10px; }
  .menue:not(.zu) .menue-logo-knopf.wv-hat-zahl .leiste-punkt { display: none; }
  .menue.zu .menue-logo-knopf.wv-hat-zahl .leiste-punkt { display: block; }
  .menue:not(.zu) ~ .haupt #menue-knopf.wv-hat-zahl .leiste-punkt { display: none; }
  .menue.zu ~ .haupt #menue-knopf { display: none; }
}
@media (max-width: 900px) {
  .menue a.wv-hat-zahl .menue-punkt { display: block; }
  #menue-knopf.wv-hat-zahl .leiste-punkt { display: block; }
}

.schleier { display: none; }

/* eingeklappte Seitenleiste (nur breite Bildschirme) */
@media (min-width: 901px) {
  .app:has(.menue.zu) { grid-template-columns: 76px minmax(0, 1fr); }
  .menue.zu { padding-left: 14px; padding-right: 14px; }
  .menue.zu .menue-kopf { padding-left: 6px; padding-right: 0; }
  .menue.zu .menue-name, .menue.zu .text, .menue.zu .bald { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menue.zu a, .menue.zu span.aus { justify-content: center; padding: 0; }
  .menue.zu a.aktiv::before { left: -14px; }
}

/* ---------- Kopfleiste ---------- */
.leiste { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 14px; min-height: var(--leiste-hoehe); padding: 8px 28px;
  background: #2D3E50; color: #fff; isolation: isolate; }
.symbol { flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--linie); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; }
.symbol:hover { background: var(--blau-zart); border-color: var(--blau-hell); }
.titelblock { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.titel { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; }
.pfad { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--grau); min-width: 0; }
.pfad a { color: var(--grau); text-decoration: none; font-weight: 500; }
.pfad a:hover { color: var(--blau); text-decoration: underline; }
#pfad { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; }
#pfad::before { content: "/"; margin-right: 6px; color: var(--grau-hell); }
#pfad:empty { display: none; }
.suchfeld { position: relative; flex: 1 1 420px; width: auto; min-width: 200px; max-width: 640px; }
.leiste > .platz { flex: 1 1 0; min-width: 0; }
.titelblock { flex: 1 1 0; min-width: 0; }
.leiste-start, .leiste-ende { min-width: 0; }
.leiste-start { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.leiste-ende { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; min-width: 0; }
.suche-lupe { display: none; flex: 0 0 auto; }
.suche-lupe .ico { width: 18px; height: 18px; }
.suchfeld .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grau); pointer-events: none; width: 18px; height: 18px; }
#suche { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--linie); border-radius: 10px; background: var(--grund); font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
#suche::placeholder { color: var(--grau); }
#suche:hover { border-color: var(--linie-stark); }
#suche:focus { outline: none; background: #fff; border-color: var(--blau); box-shadow: var(--ring); }

/* Dunkle Kopfzeile, farblich an die Seitenleiste angeschlossen */
.leiste .titel,
.leiste .ich { color: #fff; }
.leiste .pfad,
.leiste .pfad a,
.leiste #pfad::before { color: rgba(255, 255, 255, .85); }
.leiste .pfad a:hover { color: #fff; }
.leiste .pfad a.projekt-archiviert,
.leiste #krumen a.projekt-archiviert { color: rgba(255, 255, 255, .85); }
.leiste .pfad a.projekt-archiviert:hover,
.leiste #krumen a.projekt-archiviert:hover { color: #fff; }
.leiste .symbol,
.leiste .knopf-hell {
  background: transparent;
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.leiste .symbol:hover,
.leiste .symbol:focus-visible,
.leiste .knopf-hell:hover,
.leiste .knopf-hell:focus-visible {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
.leiste .symbol:focus-visible,
.leiste .knopf-hell:focus-visible { outline-color: rgba(255, 255, 255, .55); }
.leiste .suchfeld .ico { color: rgba(255, 255, 255, .7); }
.leiste #suche {
  background: rgba(255, 255, 255, .12);
  border-color: transparent;
  border-radius: 999px;
  height: 36px;
  color: #fff;
  caret-color: #fff;
}
.leiste #suche::placeholder { color: rgba(255, 255, 255, .55); }
.leiste #suche:hover {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14);
}
.leiste #suche:focus {
  outline: none;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
  color: #fff;
}

/* Globale Suche: Verlauf der zuletzt geöffneten Treffer */
.suchfeld { z-index: 32; }
.suche-verlauf {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px 0 8px; background: #fff;
  border: 1px solid var(--linie); border-radius: 12px;
  box-shadow: var(--schatten-hoch); max-height: min(70vh, 440px);
  overflow-x: hidden; overflow-y: auto;
}
.suche-verlauf-kopf {
  padding: 6px 14px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--grau);
}
.suche-verlauf-leer { margin: 0; padding: 10px 14px 12px; font-size: 13px; color: var(--grau); }
.suche-verlauf-zeile { display: flex; align-items: stretch; gap: 2px; }
.suche-verlauf-zeile.aktiv, .suche-verlauf-zeile:hover { background: var(--blau-zart); }
.suche-verlauf-eintrag {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 8px 8px 8px 14px; border: 0; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.suche-verlauf-eintrag .ico,
.suche-verlauf .ico {
  position: static; left: auto; top: auto; transform: none;
  width: 18px; height: 18px; flex: 0 0 auto; color: var(--blau); pointer-events: none;
}
.suche-verlauf-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.suche-verlauf-titel { font-size: 14px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suche-verlauf-neben { font-size: 12px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suche-verlauf-weg {
  flex: 0 0 36px; width: 36px; margin: 4px 6px 4px 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--grau); font-size: 20px; line-height: 1; cursor: pointer;
}
.suche-verlauf-weg:hover { background: var(--rot-zart); color: var(--rot); }
.suche-verlauf-leeren {
  display: block; width: calc(100% - 16px); margin: 6px 8px 0; padding: 8px 10px;
  border: 0; border-top: 1px solid var(--linie); border-radius: 0 0 8px 8px;
  background: transparent; color: var(--grau); font: inherit; font-size: 13px;
  font-weight: 600; text-align: left; cursor: pointer;
}
.suche-verlauf-leeren:hover { color: var(--rot); background: var(--rot-zart); }
@media (max-width: 900px) {
  .suche-verlauf { max-height: min(60vh, 380px); }
}

.mandantwahl, .mandant-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; background: transparent;
  color: #fff; flex: 0 0 34px;
}
.mandantwahl .ico, .mandant-chip .ico, .mandantwahl .mandant-kurz, .mandantwahl select.hell { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0; pointer-events: none; }
.mandant-chip .mandant-lang { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mandantwahl:focus-within, .mandant-knopf:focus-visible { box-shadow: var(--ring); border-radius: 50%; }
.mandant-knopf {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin: 0; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: inherit; cursor: pointer; line-height: 0;
}
.mandant-knopf:disabled { cursor: default; }
.mandantwahl::after { content: none; display: none; }
.mandant-kreis {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #6b7280; color: #fff; -webkit-text-fill-color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .03em; line-height: 1;
  flex: 0 0 34px;
}
.mandant-kreis.mandant-ec {
  /* Pastell P1, fest — nicht die CSS-Variablen, die je Mandant umschlagen. */
  background: #FBC77A; color: #181818; -webkit-text-fill-color: #181818;
}
.mandant-kreis.mandant-gc {
  background: #7FD8CC; color: #181818; -webkit-text-fill-color: #181818;
}
.mandant-kreis.mandant-alle {
  background: #C4C4C4; color: #181818; -webkit-text-fill-color: #181818;
  font-size: 10px; letter-spacing: 0;
}
.mandant-menue {
  position: fixed; z-index: 10000; min-width: 220px; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten-hoch);
}
.mandant-menue-option {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; font-size: 14px; text-align: left; cursor: pointer;
}
.mandant-menue-option:hover, .mandant-menue-option.fokus { background: var(--blau-zart); }
.mandant-menue-option.aktiv { color: var(--blau); }
.mandant-menue-option .mandant-kreis { width: 28px; height: 28px; flex: 0 0 28px; font-size: 11px; }
.mandant-menue-option .mandant-kreis.mandant-alle { font-size: 9px; }
.mandant-menue-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 901px) {
  .leiste { gap: 16px; }
  .leiste-start > .platz { display: none; }
  .titelblock { flex: 1 1 0; min-width: 0; }
  .suchfeld { flex: 1 1 420px; width: auto; min-width: 220px; max-width: 640px; margin-left: 0; }
}
/* Zwei-Spalten-Seiten: Suche endet am rechten Rand der linken Spalte (Aufgaben). */
@container haupt (min-width: 896px) {
  .haupt:has(.links):has(aside.rechts) .leiste-start { flex: 3 1 520px; }
  .haupt:has(.links):has(aside.rechts) .leiste-ende { flex: 1 1 300px; }
}
.benutzer { display: inline-flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--blau); color: var(--avatar-fg, #fff); -webkit-text-fill-color: var(--avatar-fg, #fff); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.avatar:empty { display: none; }
/* Initialen immer mit Kontrast: Standard weiße Schrift auf dunklem Kreis. */
.person-avatar, .aufgabe-avatar {
  color: var(--avatar-fg, #fff);
  -webkit-text-fill-color: var(--avatar-fg, #fff);
}
.projekt .unten .avatar,
.projekt .unten .person-avatar,
.projekt .unten .aufgabe-avatar,
button .avatar, button .person-avatar, button .aufgabe-avatar,
a .avatar, a .person-avatar, a .aufgabe-avatar {
  color: var(--avatar-fg, #fff);
  -webkit-text-fill-color: var(--avatar-fg, #fff);
}
.ich { font-size: 13px; font-weight: 600; white-space: nowrap; }
.knopf-hell { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; color: var(--grau); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.knopf-hell .ico { width: 18px; height: 18px; }
.knopf-hell:hover { color: var(--rot); border-color: #f3c3be; background: var(--rot-zart); }

/* ---------- Karten ---------- */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); min-width: 0; max-width: 100%; }
main > .karte + .karte { margin-top: 20px; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-bottom: 1px solid var(--linie); }
.kopf-titel { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.abschnitt { margin: 0; padding: 16px 20px 10px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.karte > .abschnitt:first-child { border-bottom: 1px solid var(--linie); padding-bottom: 14px; margin-bottom: 4px; }
.leer { margin: 12px 20px; padding: 18px 16px; font-size: 13px; color: var(--grau); text-align: center; background: var(--grund); border: 1px dashed var(--linie-stark); border-radius: var(--radius-klein); }
.kopf + .leer { margin-top: 16px; text-align: left; background: transparent; border: 0; padding: 0; color: var(--grau); }
td.leer { margin: 0; padding: 36px 20px !important; border: 0; border-radius: 0; background: transparent; }
.meldung { margin: 0; padding: 0 20px; font-size: 13px; font-weight: 500; color: var(--rot); }
.meldung:not(:empty) { padding: 10px 20px; }
.kopf .meldung:not(:empty) { padding: 0; }

/* ---------- Formularelemente ---------- */
select, input, textarea, button { font: inherit; }
select { appearance: none; -webkit-appearance: none; min-height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px; color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
select:hover { border-color: var(--grau-hell); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--blau) !important; box-shadow: var(--ring); }
#ansicht { font-size: 15px; font-weight: 600; min-height: 40px; }
input:not([type=checkbox]):not([type=radio]), textarea { border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #6f7b87; }
.knopf, .neu button, .anmeldung button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--blau); border-radius: var(--radius-klein); background: var(--blau); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px rgba(20,40,56,.12); transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.knopf:hover, .neu button:hover, .anmeldung button:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); }
.knopf:active, .neu button:active, .anmeldung button:active { transform: translateY(1px); }
.knopf-zweit { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: #fff; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.knopf-zweit:hover:not(:disabled) { background: var(--grund); border-color: var(--grau-hell); }
.knopf-zweit:disabled { color: #a2adb8; background: #f9fbfc; cursor: not-allowed; }
.klein { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--linie-stark); border-radius: 7px; background: #fff; color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.klein:hover { background: var(--blau-zart); border-color: var(--blau-hell); color: var(--blau); }

/* Ladezustand: leere Boards/Listen nicht wie fertig leer wirken */
.wird-geladen:empty::before,
#spalten.wird-geladen:empty::before,
#tafel.wird-geladen:empty::before {
  content: "Wird geladen…";
  display: block; padding: 28px 12px; color: var(--grau); text-align: center; font-weight: 600;
}
.loesch-liste { margin: 6px 0 10px; padding-left: 1.2em; }
.loesch-liste li { margin: 2px 0; }

/* ---------- Kennzahlen ---------- */
.kennzahl { display: flex; flex-direction: column; align-items: flex-end; padding: 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kennzahl small { font-size: 11px; font-weight: 600; color: var(--grau); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Projekt-Tafel ---------- */
.spalten { display: flex; gap: 14px; padding: 16px; overflow-x: auto; scroll-snap-type: x proximity; }
.spalte { flex: 1 0 272px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-height: 60vh; padding: 12px; background: #EFEFEF; border: 1px solid var(--linie); border-radius: var(--radius); transition: background .15s, outline-color .15s; }
.spalte.ziel { outline: 2px dashed var(--blau); outline-offset: -2px; background: var(--blau-zart); }
.spalte h2 { margin: 0; display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-size: 14px; font-weight: 700; }
.spalte h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grau-hell); flex: 0 0 auto; }
.spalte.st-in_arbeit { border-top: 3px solid var(--blau); }
.spalte.st-dringend { border-top: 3px solid var(--rot); }
.spalte.st-rechnung_stellen { border-top: 3px solid var(--warn); }
.spalte.st-archiviert { border-top: 3px solid #98a2b3; }
.spalte.st-in_arbeit h2::before { background: var(--blau); }
.spalte.st-dringend h2::before { background: var(--rot); }
.spalte.st-rechnung_stellen h2::before { background: var(--warn); }
.spalte.st-archiviert h2::before { background: #98a2b3; }
.spalte h2 small { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--grau); background: #fff; border: 1px solid var(--linie); padding: 1px 8px; border-radius: 999px; }
.summe { padding: 0 4px 4px; font-size: 13px; font-weight: 600; color: var(--grau); font-variant-numeric: tabular-nums; }
.spalte:not(:has(.projekt))::after { content: "Keine Projekte"; display: block; padding: 24px 12px; text-align: center; color: var(--grau); font-size: 13px; border: 1px dashed var(--linie-stark); border-radius: var(--radius-klein); }
.projekt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #fff; color: var(--text); text-decoration: none; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten); cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; }
.projekt:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); border-color: var(--blau-hell); }
.projekt:focus-visible { outline: 3px solid rgba(1,118,211,.5); outline-offset: 2px; }
.projekt .kunde { font-weight: 700; font-size: 14px; line-height: 1.3; }
.projekt .name { font-size: 13px; color: var(--grau); line-height: 1.35; }
.projekt .unten { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--linie); font-size: 12px; color: var(--grau); font-variant-numeric: tabular-nums; }
.projekt .unten > span:first-child:not(.avatar):not(.person-avatar):not(.aufgabe-avatar) { font-weight: 600; color: var(--text); }
.projekt.ueberfaellig { border-left: 4px solid var(--rot); padding-left: 11px; }
.projekt.ueberfaellig .kunde { color: var(--rot); }
.projekt.ueberfaellig::after { content: "überfällig"; position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rot); background: var(--rot-zart); padding: 1px 6px; border-radius: 999px; }
.projekt.ueberfaellig .kunde { padding-right: 74px; }
.projekt.archiv .kunde, .projekt.archiv .name { text-decoration: line-through; color: var(--grau); }
h1.titel.archiviert { text-decoration: line-through; }
.projekt-archiviert,
a.projekt-archiviert,
.zeile a.wert.projekt-archiviert,
.tabelle a.projekt-archiviert,
.pfad a.projekt-archiviert,
#krumen a.projekt-archiviert {
  text-decoration: line-through;
  color: var(--grau);
}
.zeile a.wert.projekt-archiviert:hover,
.tabelle a.projekt-archiviert:hover,
.pfad a.projekt-archiviert:hover,
#krumen a.projekt-archiviert:hover {
  text-decoration: line-through underline;
  color: var(--grau);
}

/* ---------- Tabellen ---------- */
.tabellenrahmen { width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tabelle th { position: sticky; top: var(--leiste-hoehe); z-index: 2; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); background: #f7f9fb; padding: 11px 20px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 12px 20px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tbody tr { transition: background .1s; }
.tabelle tbody tr:hover { background: #f2f6f9; }
.tabelle tbody tr.beleg-vorschau { cursor: pointer; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle a { color: var(--text); text-decoration: none; font-weight: 600; }
.tabelle a:hover { color: var(--blau); text-decoration: underline; }
.tabelle td:nth-child(4) { color: var(--grau); }
.blaettern { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--grau); font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; background: #eaecf0; color: #344054; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-kunde { background: #dce9f2; color: #24506d; }
.b-lead { background: #fef0c7; color: #93370d; }
.b-interessent { background: #f4ebff; color: #53389e; }
.b-lieferant { background: #dcfae6; color: #085d3a; }
.b-sonstige { background: #eaecf0; color: #344054; }

/* Stufen der Aufgaben als farbige Auswahl */
.stufenwahl { width: 11.5rem; min-width: 11.5rem; max-width: 11.5rem; min-height: 32px; border: 1px solid transparent; border-radius: 999px; padding: 0 30px 0 12px; font-size: 12px; font-weight: 700; background-size: 14px; background-position: right 10px center; }
.tabelle .stufenwahl { min-height: 32px; }
.s-vorbereiten { background-color: #fee4e2; color: #912018; }
.s-umsetzen { background-color: #dcfae6; color: #085d3a; }
.s-warten_zusage { background-color: #fef0c7; color: #93370d; }
.s-warten_auszahlung { background-color: #dce9f2; color: #24506d; }
.s-fertig { background-color: #eaecf0; color: #344054; }
.stufenwahl option { background: #fff; color: var(--text); }

/* ---------- Formulare in Karten ---------- */
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; padding: 18px 20px; background: #f7f9fb; border-bottom: 1px solid var(--linie); }
.formular label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--grau); }
.formular input, .formular select { height: 40px; padding: 0 12px; font-size: 14px; color: var(--text); }
.formular select { padding-right: 34px; }
.formular textarea { padding: 10px 12px; font-size: 14px; resize: vertical; }
.formular .knoepfe { display: flex; gap: 8px; align-items: end; justify-content: flex-end; flex-wrap: wrap; }
.formular .breit { grid-column: 1 / -1; }

/* ---------- Projekt- und Kontaktansicht ---------- */
.reiter { display: flex; gap: 4px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--linie); overflow-x: auto; scrollbar-width: none; }
.reiter a, .reiter span { position: relative; padding: 14px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; color: #6f7b87; text-decoration: none; }
.reiter span { cursor: not-allowed; }
.reiter a.aktiv { color: var(--blau); }
.reiter a.aktiv::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--blau); }

/* Mail vorbereiten in der Reiterzeile (Projekt und Deal; Desktop rechts, iPhone darunter) */
.reiter-zeile {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--linie);
}
.reiter-zeile .reiter {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: none;
}
.reiter-aktionen {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  align-self: center;
  padding: 0 28px 0 12px;
}
.reiter-aktionen .mail-vorb-knopf {
  margin-left: 0;
}
@media (max-width: 900px) {
  .reiter-zeile { flex-wrap: wrap; }
  .reiter-zeile .reiter { flex: 1 1 100%; width: 100%; }
  .reiter-aktionen {
    width: 100%;
    justify-content: flex-end;
    padding: 8px 12px 10px;
  }
}
.projektseite { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
main.projektseite { padding: 24px 28px 40px; }
.ohne-rand { padding: 0; }
.links { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.rechts { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.info { padding-bottom: 12px; }
.zeile { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; align-items: baseline; padding: 7px 20px; font-size: 14px; }
.zeile .bez { font-size: 12px; font-weight: 500; color: var(--grau); }
.zeile .bez:empty { display: none; }
.zeile .bez:empty + .wert { grid-column: 1 / -1; font-weight: 600; }
.zeile .wert { overflow-wrap: anywhere; }
.zeile a.wert { color: var(--blau); font-weight: 600; text-decoration: none; }
.zeile a.wert:hover { text-decoration: underline; }
.verweis { display: inline-flex; align-items: center; gap: 6px; margin: 10px 20px 4px; color: var(--blau); font-size: 13px; font-weight: 600; }
.fliess { margin: 0; padding: 6px 20px 10px; font-size: 14px; white-space: pre-wrap; color: var(--text); }
.gruppe { margin: 0; padding: 10px 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); background: #f7f9fb; border-top: 1px solid var(--linie); }
.aufgabe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 20px; border-top: 1px solid var(--linie); transition: background .1s; }
.aufgabe:hover { background: #f6f9fb; }
.aufgabe .betreff { flex: 1 1 220px; font-size: 14px; font-weight: 500; }
.aufgabe.erledigt .betreff { text-decoration: line-through; color: var(--grau); }
.aufgabe .zeit, .aufgabe .wer { font-size: 12px; color: var(--grau); }
.aufgabe .wer:not(:empty) { padding: 1px 8px; border-radius: 999px; background: var(--grund); }
.neu { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--linie); background: #fafcfd; border-radius: 0 0 var(--radius) var(--radius); }
.neu input { flex: 1 1 180px; height: 40px; padding: 0 12px; }

/* Status als Fortschrittsleiste (DP-Vorlage, unverändert in Funktion und Farben) */
.stepper { list-style: none; display: flex; margin: 0; padding: 22px 16px 18px; }
.stepper .schritt { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.stepper .schritt::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 4px; background: var(--blau-hell); z-index: 0; }
.stepper .schritt:first-child::before { display: none; }
.stepper .schritt.erreicht::before { background: var(--blau); }
.stepper .punkt { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--blau-hell); cursor: pointer; padding: 0; transition: box-shadow .15s, transform .15s; }
.stepper .punkt::after { content: ""; position: absolute; inset: -10px; }
.stepper .erreicht .punkt { background: var(--blau); }
.stepper .aktuell .punkt { box-shadow: 0 0 0 5px rgba(1,118,211,.22); }
.stepper .punkt:hover { box-shadow: 0 0 0 5px rgba(1,118,211,.28); transform: scale(1.06); }
.stepper .punkt:focus-visible { outline: 2px solid var(--blau); outline-offset: 3px; }
.stepper .schritt-name { font-size: 13px; color: var(--grau); text-align: center; line-height: 1.25; font-weight: 500; }
.stepper .erreicht .schritt-name { color: var(--text); }
.stepper .aktuell .schritt-name { font-weight: 700; color: var(--blau); }

/* ---------- Historie und Erinnerungen ---------- */
.historie-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 14px; }
.historie-form textarea { flex: 1 1 100%; min-height: 76px; padding: 10px 12px; resize: vertical; }
.historie-form select, .historie-form input { min-height: 40px; padding: 0 12px; background-color: #fff; }
.historie-form select { padding-right: 34px; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.rechts .historie-form select { flex: 1 1 100%; }
.historie-form input[type=text] { flex: 1 1 100%; }
.historie-form input[type=datetime-local] { flex: 1 1 200px; }
.historie-form label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--grau); }
.eintrag { position: relative; padding: 12px 20px 12px 20px; border-top: 1px solid var(--linie); font-size: 14px; transition: background .1s; }
.eintrag:hover { background: #f9fbfc; }
.eintrag .kopfzeile { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--grau); }
.eintrag .typ { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blau); background: var(--blau-zart); padding: 2px 8px; border-radius: 999px; }
.eintrag .inhalt { white-space: pre-wrap; margin-top: 6px; line-height: 1.5; }
.eintrag .aktionen { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.eintrag .wann { font-weight: 600; color: var(--text); }
.eintrag a { color: var(--blau); font-weight: 600; text-decoration: none; }
.eintrag a:hover { text-decoration: underline; }
.eintrag.ueberfaellig { box-shadow: inset 3px 0 0 var(--rot); }
.eintrag.ueberfaellig .inhalt, .eintrag.ueberfaellig .wann { color: var(--rot); font-weight: 600; }
.karte > .meldung + div > .eintrag:first-child, .karte > div > .eintrag:first-child { border-top: 1px solid var(--linie); }

/* ---------- Konto / Wiederherstellung ---------- */
.hinweis { margin: 0; font-size: 14px; line-height: 1.55; color: var(--grau); }
.qr { align-self: center; width: 220px; height: 220px; border: 1px solid var(--linie); border-radius: var(--radius-klein); }
.schluessel { font-size: 15px; letter-spacing: 1px; word-break: break-all; background: var(--grund); padding: 4px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; color: var(--text); }
.codes { columns: 2; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 15px; margin: 0; padding: 4px 20px 14px 40px; }
.codes li { padding: 3px 0; }

/* ---------- Anmeldung ---------- */
.anmelde-seite { background: #fff; }
.anmelde-raster { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; min-height: 100vh; }
.anmelde-marke { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 48px; color: #fff;
  background: radial-gradient(900px 500px at 0% 0%, rgba(255,255,255,.10), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(255,255,255,.06), transparent 55%), linear-gradient(160deg, #2D3E50 0%, #3E5468 100%); }
.anmelde-logo { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.anmelde-logo .logo { display: block; flex: 0 0 auto; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.anmelde-logo .logo rect[fill="#0176D3"] { fill: none; }
.anmelde-logo .logo [stroke="#fff"] { stroke: var(--menue-logo-hell, #fff); }
.anmelde-claim { max-width: 440px; }
.claim-gross { margin: 0 0 12px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.claim-klein { margin: 0; font-size: 16px; color: #D5E3F5; }
.claim-stepper { list-style: none; display: flex; margin: 36px 0 0; padding: 0; max-width: 320px; }
.claim-stepper li { flex: 1; position: relative; height: 18px; }
.claim-stepper li::after { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: rgba(200,215,226,.45); }
.claim-stepper li::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 3px; background: rgba(200,215,226,.3); }
.claim-stepper li:last-child { flex: 0 0 14px; }
.claim-stepper li:last-child::before { display: none; }
.claim-stepper li.an::after { background: #fff; }
.claim-stepper li.an::before { background: #fff; }
.claim-stepper li.an:nth-child(2)::before { background: rgba(200,215,226,.3); }
.anmelde-fuss { margin: 0; font-size: 12px; color: #C5D4E8; }
.anmelde-inhalt { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.anmeldung { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.anmeldung.breit { max-width: 560px; }
.anmeldung h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.anmeldung .unterzeile { margin: -8px 0 8px; color: var(--grau); font-size: 15px; }
.anmeldung label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.anmeldung input { height: 44px; padding: 0 14px; font-size: 15px; }
.anmeldung button { min-height: 46px; font-size: 15px; margin-top: 4px; }
.anmeldung .meldung { padding: 0; }
.anmeldung ol.hinweis { padding-left: 20px; }
.anmeldung details summary { cursor: pointer; color: var(--blau); font-weight: 600; }
.anmeldung .knopf-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; margin-top: 0; border: 1px solid var(--blau); border-radius: var(--radius-klein); background: #fff; color: var(--blau); font-weight: 600; font-size: 15px; box-shadow: none; }
.anmeldung .knopf-passkey:hover { background: var(--blau-zart); border-color: var(--blau-dunkel); color: var(--blau-dunkel); }
.anmeldung .knopf-passkey:disabled { opacity: .6; cursor: wait; }
.anmeldung .knopf-passkey .ico { width: 20px; height: 20px; }
.anmelde-oder { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--grau); font-size: 13px; font-weight: 600; }
.anmelde-oder::before, .anmelde-oder::after { content: ""; flex: 1; height: 1px; background: var(--linie); }
.sicherheit-hinweis { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-klein); background: var(--warn-zart); border: 1px solid #f0d2a8; color: var(--text); }
.passkey-liste { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.passkey-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: #fff; }
.passkey-zeile .meta { color: var(--grau); font-size: 13px; }
.passkey-zeile .name { font-weight: 600; }
.totp-qr { width: 220px; height: 220px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: #fff; }
.codes-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }

/* Einstellung Sicherheit: Innenabstand wie übrige Karten, Text umbrechen */
.einstell-seite .karte > .knopf,
.einstell-seite .karte > .knopf-zweit {
  margin: 4px 20px 16px;
}
.einstell-seite .passkey-liste { margin: 4px 20px 8px; min-width: 0; }
.einstell-seite .passkey-zeile { flex-wrap: wrap; min-width: 0; align-items: flex-start; }
.einstell-seite .passkey-zeile > div { flex: 1 1 160px; min-width: 0; }
.einstell-seite .passkey-zeile .name,
.einstell-seite .passkey-zeile .meta { overflow-wrap: anywhere; }
.einstell-seite .passkey-zeile .knopf-zweit { flex: 0 0 auto; margin: 0; }
.einstell-seite .totp-qr {
  display: block; margin: 8px 20px; max-width: calc(100% - 40px); height: auto;
}
.einstell-seite .karte ol.hinweis {
  margin: 0 20px 12px; padding-left: 22px; overflow-wrap: anywhere;
}
.einstell-seite .codes-aktionen { margin: 8px 20px 16px; }
.einstell-seite .abschnitt { flex-wrap: wrap; overflow-wrap: anywhere; white-space: normal; max-width: 100%; box-sizing: border-box; }
.einstell-seite .fliess {
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  max-width: 100%; box-sizing: border-box;
}
@media (max-width: 700px) {
  .einstell-seite .codes { columns: 1; }
}


@media (max-width: 1180px) {
  .leiste .ich { display: none; }
}
/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .menue { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); height: auto; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 20px 40px rgba(20,40,56,.35); }
  .menue.zu { transform: none; }
  .menue.zu ~ .schleier { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 34, 46, .45); }
  .leiste { flex-wrap: wrap; gap: 10px; padding: 8px 16px; }
  .leiste-start { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
  .leiste-ende { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
  .titelblock { flex: 1 1 auto; min-width: 0; }
  .titel { font-size: 20px; }
  .seitenkopf { padding: 14px 16px 4px; }
  .seitenkopf .titel { font-size: 22px; }
  .inhalt { border-top-left-radius: 12px; }
  .leiste > .platz, .leiste-start > .platz { display: none; }
  .suche-lupe { display: inline-flex; }
  .suchfeld { display: none; margin-left: 0; max-width: none; width: auto; min-width: 0; flex: 1 1 100%; }
  .leiste.suche-offen .leiste-start { flex: 1 1 100%; }
  .leiste.suche-offen .suchfeld {
    display: block; flex: 1 1 100%; width: 100%; min-width: 0; max-width: none;
  }
  .mandantwahl, .mandant-chip { order: 7; width: 34px; height: 34px; }
  .mandant-knopf { width: 34px; height: 34px; }
  .ich, .knopf-hell .text { display: none; }
  .knopf-hell { padding: 0 10px; }
  main, main.projektseite { padding: 16px 12px 32px; }
  .reiter { padding: 0 12px; }
  .rechts { position: static; }
  .tabellenrahmen { overflow-x: auto; }
  .tabelle th { position: static; }
  .tabelle th, .tabelle td { padding-left: 14px; padding-right: 14px; }
  .kopf { padding: 14px 16px; }
  .spalten { padding: 12px; }
  .spalte { flex-basis: 82vw; }
  .anmelde-raster { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .anmelde-marke { padding: 24px; gap: 12px; }
  .claim-gross { font-size: 22px; margin-bottom: 6px; }
  .claim-klein { font-size: 14px; }
  .claim-stepper, .anmelde-fuss { display: none; }
  .anmelde-inhalt { justify-content: flex-start; padding: 28px 20px; }
}
@media (max-width: 600px) {
  .stepper { padding: 18px 4px 14px; }
  .stepper .schritt-name { font-size: 12px; }
  .zeile { grid-template-columns: 1fr; gap: 2px; }
  .kennzahl { font-size: 15px; }
  .codes { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Aufgabe löschen: dezentes Papierkorb-Symbol */
.loeschen { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--grau); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.loeschen:hover, .loeschen:focus-visible { color: var(--rot); background: var(--rot-zart); border-color: #E7B4B8; }
.tabelle td.aktion { width: 1%; padding-left: 4px; padding-right: 12px; text-align: right; }

/* ---------- Paket 2: Deals, Dialoge, Ansprechpartner ---------- */
.umschalter { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--grund); border: 1px solid var(--linie); }
.umschalter button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--grau); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.umschalter button:hover { color: var(--text); }
.umschalter button[aria-pressed="true"] { background: #fff; color: var(--blau); box-shadow: var(--schatten); }
.umschalter button.s-gewonnen[aria-pressed="true"] { background: var(--gruen-zart); color: #1B5E32; }
.umschalter button.s-verloren[aria-pressed="true"] { background: var(--rot-zart); color: var(--rot); }
.umschalter button.s-pause[aria-pressed="true"] { background: var(--warn-zart); color: #8A4B00; }
.statusleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 20px 16px; border-top: 1px solid var(--linie); }
.statusleiste-titel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }
.stepper .schritt.verloren .punkt { background: var(--rot); }
.stepper .schritt.verloren .schritt-name { color: var(--rot); }
.stepper .punkt.ohne-klick { cursor: default; }
.stepper .punkt.ohne-klick:hover { transform: none; box-shadow: none; }

/* Deal-Kopfleiste wie in Deals & Projects: Phasen links, Status-Knöpfe rechts */
.deal-uebersicht, .karte:has(> .deal-leiste) {
  --deal-akzent: var(--blau);
  --deal-akzent-zart: var(--blau-zart);
}
.deal-kopfkarte, .karte:has(> .deal-leiste) { padding: 0; overflow: hidden; }
.deal-leiste { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 108px; }
.deal-phasen { list-style: none; display: flex; flex: 1 1 260px; margin: 0; padding: 22px 16px 18px; min-width: 0; }
.deal-phasen .schritt { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.deal-phasen .schritt::before { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 4px; background: var(--blau-hell); z-index: 0; border-radius: 2px; pointer-events: none; }
.deal-phasen .schritt:first-child::before { display: none; }
.deal-phasen .punkt { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--blau-hell); cursor: pointer; padding: 0; transition: box-shadow .15s, transform .15s; pointer-events: auto; }
.deal-phasen .punkt::after { content: ""; position: absolute; inset: -10px; }
.deal-phasen .punkt:hover { transform: scale(1.06); }
.deal-phasen .schritt-name { font-size: 13px; color: var(--grau); text-align: center; line-height: 1.25; font-weight: 500; }
.deal-phasen .schritt.erreicht .schritt-name { color: var(--text); }
.deal-phasen .schritt.erreicht::before { background: var(--blau); }
.deal-phasen .schritt.erreicht .punkt,
.deal-phasen .schritt.aktuell .punkt { background: var(--blau); }
.deal-phasen .schritt.aktuell .punkt { box-shadow: 0 0 0 5px rgba(1, 118, 211, .22); }
.deal-phasen .punkt:hover { box-shadow: 0 0 0 5px rgba(1, 118, 211, .28); }
.deal-phasen .schritt.aktuell .punkt:hover { box-shadow: 0 0 0 5px rgba(1, 118, 211, .32); }
.deal-phasen .punkt:focus-visible { outline: 2px solid var(--blau); outline-offset: 3px; }
.deal-phasen .schritt.aktuell .schritt-name { font-weight: 700; color: var(--blau); }
.deal-leiste-trenner { flex: 0 0 1px; width: 1px; margin: 16px 0; background: var(--linie); }
.deal-stati { display: flex; align-items: center; justify-content: space-evenly; gap: 8px 12px; flex: 0 1 340px; padding: 14px 24px; }
.deal-status { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 72px; padding: 4px 8px; border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 10px; }
.deal-status-ico { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--blau-zart); color: var(--blau); transition: background .15s, color .15s, box-shadow .15s; }
.deal-status:hover .deal-status-ico { box-shadow: 0 0 0 3px rgba(1, 118, 211, .16); }
.deal-status:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
.deal-status-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.deal-status[aria-pressed="true"] .deal-status-ico { background: var(--blau); color: #fff; }
.deal-status[aria-pressed="true"] .deal-status-name { font-weight: 700; }
@media (max-width: 720px) {
  .deal-leiste-trenner { flex-basis: 100%; width: auto; height: 1px; margin: 0 16px; }
  .deal-phasen, .deal-stati { flex-basis: 100%; }
  .deal-phasen { padding: 18px 20px 14px; }
  .deal-stati { padding: 12px 12px 16px; }
}
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; padding: 16px 20px 6px; }
.kennzahl-kachel { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--grund); border: 1px solid var(--linie); }
.kachel-wert { font-size: 18px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kachel-name { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--grau); }
.karten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--linie); padding-right: 14px; margin-bottom: 4px; }
.karten-kopf .abschnitt { border-bottom: 0 !important; margin-bottom: 0 !important; }
.knopf-klein { min-height: 30px; padding: 0 10px; border: 1px solid var(--linie-stark); border-radius: 7px; background: #fff; color: var(--blau); font-size: 12px; font-weight: 700; cursor: pointer; }
.knopf-klein:hover { background: var(--blau-zart); border-color: var(--blau-hell); }
.karten-aktion { padding: 10px 20px 6px; }
.karten-aktion .knopf { width: 100%; }
.person { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px 10px 20px; border-top: 1px solid var(--linie); }
.karten-kopf + .person { border-top: 0; }
.person-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-name { font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.person-name { color: var(--blau); }
a.person-name:hover { text-decoration: underline; }
.person-info { font-size: 12px; color: var(--grau); overflow-wrap: anywhere; }
.person-info a { color: var(--blau); text-decoration: none; }
.person-info a:hover { text-decoration: underline; }
.person-aktionen { display: flex; gap: 2px; flex: 0 0 auto; }
.symbolknopf { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--grau); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.symbolknopf:hover, .symbolknopf:focus-visible { color: var(--blau); background: var(--blau-zart); border-color: var(--blau-hell); }
.badge.d-offen { background: var(--blau-zart); color: var(--blau-dunkel); }
.badge.d-gewonnen { background: var(--gruen-zart); color: #1B5E32; }
.badge.d-verloren { background: var(--rot-zart); color: var(--rot); }
.badge.d-pause { background: var(--warn-zart); color: #8A4B00; }
.badge.b-mandant { background: var(--blau-zart); color: var(--blau-dunkel); }
.badge.b-mandant::before { display: none; }
.nur-mehrere { display: none; }
body.mehrere-mandanten .nur-mehrere { display: table-cell; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle a.nebenlink { font-weight: 500; color: var(--grau); }
.tabelle a.liste-bezug {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  padding: 8px 0;
  margin: -8px 0;
  min-height: 32px;
  line-height: 1.35;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
}
.tabelle a.liste-bezug:hover,
.tabelle a.liste-bezug:focus-visible {
  text-decoration: underline;
  color: inherit;
}
@media (max-width: 900px) {
  .tabelle .liste-bezug-zelle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 8.5rem;
  }
  .tabelle .liste-bezug-sep { display: none; }
}
.deal-karte .marken { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.deal-karte .marken .badge { font-size: 11px; line-height: 18px; padding: 0 8px; }
.deal-karte .datum { font-size: 11px; color: var(--grau); }
.deal-karte.pausiert { opacity: .85; border-style: dashed; }
.spalte.st-deal-neu { border-top: 3px solid var(--gruen); }
.spalte.st-deal-angebot { border-top: 3px solid var(--blau); }
.spalte.st-deal-neu h2::before { background: var(--gruen); }
.spalte.st-deal-angebot h2::before { background: var(--blau); }
.badge.p-neu { background: var(--gruen-zart); color: var(--gruen); }
.badge.p-angebot { background: var(--blau-zart); color: var(--blau-dunkel); }
/* Dialog */
/* Safari: Ein offenes <dialog> als Flex-/Grid-Box oder ohne fit-content/min-content/margin:auto fällt auf einen dünnen weißen Strich zusammen. Das Innenlayout gehört in .dialog-form, nicht auf das dialog-Element. */
dialog {
  height: fit-content;
  min-height: min-content;
  margin: auto;
  box-sizing: border-box;
}
dialog[open] {
  display: block;
  height: fit-content;
  min-height: min-content;
  margin: auto;
}
.dialog, .angebot-dialog, .vorschau-dialog { --dialog-einzug: 22px; }
.dialog { width: min(680px, calc(100vw - 24px)); height: fit-content; min-height: min-content; max-height: 100vh; max-height: 100dvh; max-height: var(--dialog-max-h, 100vh); box-sizing: border-box; display: block; overflow: hidden; margin: auto; overscroll-behavior: contain; padding: 0; border: 1px solid var(--linie); border-radius: 16px; box-shadow: 0 24px 48px -12px rgba(20, 40, 56, .35); color: var(--text); }
.dialog::backdrop { background: rgba(20, 34, 46, .45); }
.dialog-form { display: flex; flex-direction: column; height: auto; max-height: var(--dialog-max-h, 100vh); min-height: 0; overflow: hidden; }
.dialog-titel { margin: 0; padding: 18px var(--dialog-einzug) 14px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--linie); flex: 0 0 auto; }
.dialog-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 18px var(--dialog-einzug) calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; flex: 0 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
html.dialog-offen, body.dialog-offen { overflow: hidden; overscroll-behavior: none; }
.dialog-raster > label, .dialog-raster > .feldgruppe { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--grau); min-width: 0; }
.dialog-raster > .breit { grid-column: 1 / -1; }
.dialog-raster input, .dialog-raster select { height: 40px; padding: 0 12px; font-size: 14px; color: var(--text); width: 100%; min-width: 0; }
.dialog-raster input[type=checkbox], .dialog-raster input[type=radio] { width: auto; height: auto; min-width: 18px; min-height: 18px; padding: 0; margin: 0 8px 0 0; flex: 0 0 auto; }
.dialog-raster select { padding-right: 34px; }
.dialog-raster textarea { padding: 10px 12px; font-size: 14px; resize: vertical; width: 100%; }
.dialog-raster .hinweis { margin: 0; }
.suchauswahl-reihe { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(0, 3fr); gap: 8px; }
.dialog .meldung:not(:empty) { padding: 0 var(--dialog-einzug, 22px) 10px; }
.dialog-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 14px var(--dialog-einzug, 22px) calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--linie); background: #f9fbfc; border-radius: 0 0 16px 16px; position: sticky; bottom: 0; flex: 0 0 auto; z-index: 3; }

.dialog-raster > .dialog-text { grid-column: 1 / -1; margin: 0; font-size: 15px; font-weight: 400; color: var(--text); line-height: 1.45; }
.dialog-raster > label.dialog-check { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; line-height: 1.4; }
.dialog-raster > label.dialog-check input[type=checkbox] { margin-top: 2px; accent-color: var(--blau); }
.archiv-dialog .dialog-titel { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .dialog-raster { grid-template-columns: 1fr; }
  .suchauswahl-reihe { grid-template-columns: 1fr; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Inhaltsfelder ohne Raster: gleicher Einzug wie Titel, Desktop und Handy */
.dialog-form > :not(.dialog-titel):not(.dialog-fuss):not(.dialog-raster):not(.angebot-dialog-kopf):not(.angebot-dialog-koerper):not(.angebot-dialog-fuss) {
  margin-left: var(--dialog-einzug, 22px);
  margin-right: var(--dialog-einzug, 22px);
}
.dialog-form > .fliess,
.dialog-form > .hinweis {
  padding-left: 0;
  padding-right: 0;
  padding-top: 14px;
  padding-bottom: 8px;
}
.dialog-form > .meldung,
.dialog-form > .meldung:not(:empty) {
  padding-left: 0;
  padding-right: 0;
}
.dialog-form > label,
.dialog-form > .angebot-feld {
  margin-top: 12px;
}
.dialog-form > label:last-of-type,
.dialog-form > .angebot-feld:last-of-type {
  margin-bottom: 16px;
}

/* ---------- Erinnerungsdialog (Paket 3, DP-Muster) ---------- */
.erinnerung-dialog { width: min(440px, calc(100vw - 24px)); }
.erinnerung-raster { grid-template-columns: 1fr 1fr; }
.datum-anpassen > label { display: flex; flex-direction: column; gap: 6px; font: inherit; color: inherit; font-weight: 600; }
.monatskalender {
  width: 100%; margin-top: 2px; padding: 8px;
  background: #fff; border: 1px solid var(--linie-stark);
  border-radius: var(--radius-klein); box-sizing: border-box; user-select: none;
}
.monatskalender-kopf { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.monatskalender-titel {
  flex: 1 1 auto; text-align: center; font-size: 14px; font-weight: 700;
  color: var(--text); text-transform: capitalize; line-height: 1.2;
}
.monatskalender-nav {
  flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.monatskalender-nav:hover, .monatskalender-nav:focus-visible { background: var(--blau-zart); }
.monatskalender-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.monatskalender-wochentag { text-align: center; font-size: 11px; font-weight: 600; color: var(--grau); padding: 4px 0; }
.monatskalender-tag {
  min-height: 40px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.monatskalender-tag:hover, .monatskalender-tag:focus-visible { background: var(--blau-zart); }
.monatskalender-tag.heute { box-shadow: inset 0 0 0 1.5px var(--blau); font-weight: 700; }
.monatskalender-tag.gewaehlt { background: var(--blau); color: #fff; font-weight: 700; box-shadow: none; }
.monatskalender-tag.gewaehlt:hover, .monatskalender-tag.gewaehlt:focus-visible { background: var(--blau-dunkel, #0156a3); color: #fff; }
.monatskalender-tag.aussen { color: #9aa0a6; font-weight: 400; }
.whatsup-anpassen .monatskalender, .wv-uhr-anpassen .monatskalender { flex: 1 1 100%; margin-top: 2px; }
.whatsup-menu:has(.monatskalender) { min-width: min(292px, calc(100vw - 24px)); }
.wv-uhr-menue:has(.monatskalender) { min-width: min(292px, calc(100vw - 16px)); }
@media (max-width: 430px) {
  .monatskalender-tag, .monatskalender-nav { min-height: 44px; }
  .erinnerung-dialog .monatskalender { padding: 6px; }
}
.personwahl { position: relative; width: 100%; min-width: 0; }
.personwahl-knopf {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  height: 40px; min-height: 40px; padding: 0 34px 0 12px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px;
  color: var(--text); font: inherit; font-size: 14px; font-weight: 400; text-align: left; cursor: pointer;
}
.personwahl-knopf .avatar { width: 28px; height: 28px; font-size: 11px; flex: 0 0 auto; }
.personwahl-knopf .avatar.leer, .personwahl-liste .avatar.leer {
  background: var(--blau); color: #fff; -webkit-text-fill-color: #fff; border: 0;
}
.personwahl-knopf:hover { border-color: var(--grau-hell); }
.personwahl-knopf:focus, .personwahl-knopf:focus-visible, .personwahl-knopf[aria-expanded="true"] {
  outline: none; border-color: var(--blau); box-shadow: var(--ring);
}
.personwahl-liste { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch); max-height: 240px; overflow-y: auto; }
.personwahl-liste li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.personwahl-liste li:hover, .personwahl-liste li[aria-selected="true"] { background: var(--blau-zart); }
.personwahl-liste .avatar { width: 28px; height: 28px; font-size: 11px; }
.personwahl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.datumsfeld { position: relative; width: 100%; min-width: 0; }
.datumsfeld-anzeige {
  width: 100%; box-sizing: border-box; height: 40px; min-height: 40px;
  padding: 0 34px 0 12px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.datumsfeld-anzeige:hover { border-color: var(--grau-hell); }
.datumsfeld-anzeige:focus, .datumsfeld-anzeige:focus-visible {
  outline: none; border-color: var(--blau) !important; box-shadow: var(--ring);
}
.dialog-raster .datumsfeld-anzeige,
.formular .datumsfeld-anzeige,
.angebot-feld .datumsfeld-anzeige,
.historie-zeit-menue .datumsfeld-anzeige {
  height: 40px; min-height: 40px; padding: 0 34px 0 12px;
}

.monatskalender.datumsfeld-kalender {
  margin-top: 0; box-shadow: var(--schatten-hoch);
}
/* Native Popover (Top-Layer über showModal-Dialogen). Standard-inset/margin würde den Kalender zentrieren. */
.monatskalender.datumsfeld-kalender[popover] {
  margin: 0;
  inset: unset;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 8px;
  border: 1px solid var(--linie-stark);
  background: #fff;
  color: var(--text);
}

/* ---------- What's up (Paket 3, DP-Muster) ---------- */
.whatsup { position: relative; padding: 0; overflow: hidden; }
.whatsup-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--linie); }
.whatsup-titel, .whatsup-kopf .abschnitt { margin: 0; padding: 0; font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.01em; border-bottom: 0; }
.whatsup-plus {
  position: absolute; z-index: 4;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--blau); color: #fff; cursor: pointer; line-height: 0;
  box-shadow: 0 2px 8px rgba(1, 118, 211, .28);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.whatsup-plus svg, .whatsup-plus .ico { width: 18px; height: 18px; display: block; flex: 0 0 18px; }
.whatsup-plus:hover, .whatsup-plus:focus-visible { background: var(--blau-dunkel); }
.whatsup-plus:active { transform: scale(.96); }
.whatsup-plus:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 2px; }
.whatsup-kopf .whatsup-plus,
.deal-seitenkopf .whatsup-plus { position: static; flex: 0 0 36px; }
.whatsup-liste { display: flex; flex-direction: column; gap: 0; }
.whatsup-karte { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; box-shadow: none; }
.whatsup-karte:last-child { border-bottom: 0; }
.whatsup-karte.faellig { background: #FFFBF5; }
.whatsup-karte.ueberfaellig { background: #FDF6F6; }
.whatsup-karte.ueberfaellig .whatsup-datum { color: var(--rot); font-weight: 600; }
.whatsup-karte.faellig:not(.ueberfaellig) .whatsup-datum { color: #8A4B00; font-weight: 600; }
.whatsup-glocke { flex: 0 0 auto; color: #8A8A8A; display: inline-flex; margin-top: 2px; }
.whatsup-text { flex: 1 1 auto; min-width: 0; }
.whatsup-bezeichnung { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whatsup-datum { margin-top: 3px; font-size: 13px; color: var(--grau); font-variant-numeric: tabular-nums; }
.whatsup-aktionen { flex: 0 0 auto; display: flex; align-items: center; gap: 0; margin-top: 0; }
.whatsup-ico { position: relative; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: #6B6B6B; cursor: pointer; }
.whatsup-ico:hover, .whatsup-ico:focus-visible { background: var(--grund); color: var(--text); }
.whatsup-menu { position: absolute; z-index: 8; right: 0; top: calc(100% + 4px); min-width: 180px; padding: 6px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch); }
.whatsup-menu button { display: block; width: 100%; text-align: left; min-height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.whatsup-menu button:hover, .whatsup-menu button:focus-visible { background: var(--blau-zart); }
.whatsup-menu button.whatsup-gefahr { color: var(--rot); }
.whatsup-menu button.whatsup-gefahr:hover { background: var(--rot-zart); }
.whatsup-anpassen { display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.whatsup-anpassen input { width: 100%; height: 36px; padding: 0 10px; }
.whatsup-anpassen .knopf { width: 100%; min-height: 36px; }
.whatsup-leer { margin: 0; padding: 12px 16px 16px; color: var(--grau); font-size: 13px; }
.whatsup .meldung:not(:empty) { padding: 8px 16px 12px; }

/* Aufgaben im DP-Stil: Gruppenkarte, Plus, Statusfeld */
#aufgaben-bereich { position: relative; min-width: 0; width: 100%; max-width: 100%; }
#aufgaben { min-width: 0; width: 100%; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.aufgaben-karte { position: relative; background: #fff; border: 1px solid var(--linie); border-radius: 2px; margin: 0; width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.aufgaben-plus { position: absolute; right: 12px; top: 8px; }
.aufgaben-kopf { display: flex; align-items: center; gap: 8px; padding: 16px 100px 14px 20px; border-bottom: 1px solid var(--linie); }
.aufgaben-gruppenname { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: 0; text-transform: none; }
.aufgaben-leer { margin: 0; padding: 16px 20px 20px; color: var(--grau); font-size: 14px; }
.aufgabe-zeile {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 11.5rem 11.5rem 36px;
  column-gap: 10px;
  align-items: center;
  min-height: 52px; min-width: 0; max-width: 100%; box-sizing: border-box;
  padding: 0 12px 0 6px; border-bottom: 1px solid var(--linie); cursor: pointer; background: #fff;
}
.aufgabe-zeile:last-child { border-bottom: 0; }
.aufgabe-zeile:hover { background: #F7FBFF; }
.aufgabe-zeile:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: -3px; }
.aufgabe-zeile .betreff {
  min-width: 0; font-size: 15px; font-weight: 500;
  color: var(--text); text-decoration: none; cursor: pointer; border-radius: 4px;
  overflow-wrap: anywhere; white-space: normal; padding: 8px 0; line-height: 1.3;
}
.aufgabe-zeile .betreff:hover,
.aufgabe-zeile .betreff:focus { color: var(--text); text-decoration: none; }
.aufgabe-zeile .betreff:hover { background: rgba(15, 23, 42, 0.05); }
.aufgabe-zeile .betreff:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 2px; }
.aufgabe-zeile.erledigt .betreff { text-decoration: line-through; color: var(--grau); }
.aufgabe-zeile.erledigt .betreff:hover,
.aufgabe-zeile.erledigt .betreff:focus { text-decoration: line-through; color: var(--grau); }
.aufgabe-griff {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--grau); cursor: grab; touch-action: none;
}
.aufgabe-griff:hover, .aufgabe-griff:focus-visible { color: var(--text); background: rgba(15, 23, 42, 0.06); }
.aufgabe-griff:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 1px; }
.aufgabe-griff:active { cursor: grabbing; }
.aufgabe-zeile.zieht { opacity: 0.5; }
.aufgabe-zeile.drop-davor { box-shadow: inset 0 3px 0 0 var(--blau, #0176d3); }
.aufgabe-zeile.drop-danach { box-shadow: inset 0 -3px 0 0 var(--blau, #0176d3); }
.aufgaben-karte.drop-hier { outline: 2px dashed var(--blau, #0176d3); outline-offset: -2px; }
.person-avatar, .aufgabe-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #032D60; color: var(--avatar-fg, #fff); -webkit-text-fill-color: var(--avatar-fg, #fff); font-size: 12px; font-weight: 700;
  flex: 0 0 36px; overflow: hidden; line-height: 1;
}
.aufgabe-status { position: relative; box-sizing: border-box; flex: 0 0 11.5rem; width: 11.5rem; min-width: 11.5rem; max-width: 11.5rem; align-self: stretch; min-height: 52px; margin: 0; border: 0; border-radius: 0; padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer; line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: normal; overflow-wrap: break-word; hyphens: auto; }
.aufgabe-status.s-vorbereiten { background: #706E6B; }
.aufgabe-status.s-umsetzen { background: #0176D3; }
.aufgabe-status.s-warten_zusage { background: #FF8000; }
.aufgabe-status.s-warten_auszahlung { background: #C45C15; }
.aufgabe-status.s-fertig { background: #2E844A; }
.aufgabe-status:hover, .aufgabe-status:focus-visible { filter: brightness(1.06); }
.aufgabe-status:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: -3px; }
.aufgabe-status-menue { position: fixed; z-index: 10000; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; width: 11.5rem; min-width: 11.5rem; padding: 8px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch); }
.aufgabe-status-option { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; margin: 0; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #fff; cursor: pointer; line-height: 1.2; text-align: center; }
.aufgabe-status-option .aufgabe-status-label { flex: 1 1 auto; }
.aufgabe-status-option.s-vorbereiten { background: #706E6B; }
.aufgabe-status-option.s-umsetzen { background: #0176D3; }
.aufgabe-status-option.s-warten_zusage { background: #FF8000; }
.aufgabe-status-option.s-warten_auszahlung { background: #C45C15; }
.aufgabe-status-option.s-fertig { background: #2E844A; }
.aufgabe-status-option:hover, .aufgabe-status-option.fokus, .aufgabe-status-option:focus-visible { filter: brightness(1.08); outline: 3px solid rgba(1, 118, 211, .5); outline-offset: 1px; }
.aufgabe-status-haken { display: inline-flex; align-items: center; flex: 0 0 auto; color: #fff; }
#meldung.ok { color: var(--gruen, #2E844A); font-weight: 600; }
/* overflow bleibt hidden, damit Status, ⋮ und Plus die Kartenbreite nicht überschreiten */
.personwahl-wrap { position: relative; }
.person-menue { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch, 0 8px 24px rgba(0,0,0,.12)); max-height: 240px; overflow-y: auto; }
.person-eintrag { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.person-eintrag:hover, .person-eintrag.aktiv { background: var(--blau-zart); }
.person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Historie-Komponist im DP-Stil */
.historie-kopf { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px 20px; }
.historie-titel { margin: 0; flex: 1; }
.historie-werkzeuge { display: flex; align-items: center; gap: 2px; margin-left: auto; position: relative; flex: 0 0 auto; }
.historie-werk { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: #6B6B6B; cursor: pointer; }
.historie-werk:hover, .historie-werk:focus-visible, .historie-werk.aktiv { background: var(--grund); color: var(--text); }
.historie-werk.historie-auge { color: var(--blau); }
.historie-werk.historie-auge:hover,
.historie-werk.historie-auge:focus-visible,
.historie-werk.historie-auge[aria-expanded="true"] { background: var(--blau-zart); color: var(--blau-dunkel); }
.historie-filter-menue {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 248px; max-width: min(280px, calc(100vw - 16px));
  padding: 6px 0; background: #fff; border: 1px solid var(--linie);
  border-radius: 10px; box-shadow: var(--schatten-hoch, 0 8px 24px rgba(0,0,0,.12));
  box-sizing: border-box;
}
.historie-filter-eintrag {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; min-height: 36px; padding: 6px 14px; border: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 14px;
  cursor: pointer; box-sizing: border-box;
}
.historie-filter-eintrag:hover, .historie-filter-eintrag:focus-visible { background: var(--blau-zart); outline: none; }
.historie-filter-radio {
  flex: 0 0 16px; width: 16px; height: 16px; box-sizing: border-box;
  border: 2px solid #8A8A8A; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.historie-filter-eintrag.aktiv .historie-filter-radio,
.historie-filter-eintrag[aria-checked="true"] .historie-filter-radio { border-color: var(--blau); }
.historie-filter-eintrag.aktiv .historie-filter-radio::after,
.historie-filter-eintrag[aria-checked="true"] .historie-filter-radio::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blau);
}
.historie-filter-name { min-width: 0; }
.historie-komponist { margin: 0 16px 12px 16px; background: #fff; border: 1px solid var(--linie); border-radius: 4px; overflow: visible; }
.historie-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--linie); padding: 0 8px; }
.historie-tab { appearance: none; border: 0; background: transparent; color: #3E3E3C; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 12px 10px 10px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.historie-tab:hover { color: var(--blau); }
.historie-tab.aktiv { color: var(--blau); border-bottom-color: var(--blau); }
.historie-mehr-wrap, .historie-mini-wrap { position: relative; display: inline-flex; }
.historie-mehr-menue, .historie-mini-menue, .historie-emoji-menue, .historie-zeit-menue { position: absolute; z-index: 8; left: 0; top: calc(100% + 4px); min-width: 180px; padding: 6px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch, 0 8px 24px rgba(0,0,0,.12)); }
.historie-mini-wrap:last-child .historie-mini-menue, .historie-mini-wrap:nth-last-child(2) .historie-mini-menue { left: auto; right: 0; }
.historie-mehr-menue button, .historie-mini-menue button { display: block; width: 100%; text-align: left; min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.historie-mehr-menue button:hover, .historie-mini-menue button:hover { background: var(--blau-zart); }
.historie-editor { min-height: 88px; padding: 12px 14px; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text); outline: none; }
.historie-editor[data-leer="ja"]:before { content: "Gib hier deinen Text ein …"; color: #8A8A8A; pointer-events: none; }
.historie-editor[data-leer="ja"][data-platz]:before { content: attr(data-platz); }
.historie-mentions { margin: 0 10px 8px; border: 1px solid var(--linie); border-radius: 8px; background: #fff; box-shadow: var(--schatten-hoch, 0 8px 24px rgba(0,0,0,.12)); max-height: 220px; overflow-y: auto; }
.historie-mention { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 10px; border: 0; background: transparent; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.historie-mention:hover, .historie-mention:focus-visible, .historie-mention.aktiv, .historie-mention[aria-selected="true"] { background: var(--blau-zart); }
.historie-mentions .person-avatar { width: 24px; height: 24px; font-size: 10px; flex: 0 0 24px; }
.historie-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px 8px 8px 10px; border-top: 1px solid var(--linie); }
.historie-speichern { appearance: none; border: 0; border-radius: 4px; background: var(--blau); color: #fff; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 8px 14px; cursor: pointer; margin-right: 4px; }
.historie-speichern:hover, .historie-speichern:focus-visible { background: var(--blau-dunkel); }
.historie-abbrechen { appearance: none; border: 0; background: transparent; color: #3E3E3C; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px; cursor: pointer; margin-right: 8px; }
.historie-abbrechen:hover { color: var(--blau); }
.historie-ico { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: #5C5C5C; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.historie-ico:hover, .historie-ico:focus-visible, .historie-ico.gesetzt { background: var(--grund); color: var(--text); }
.historie-ico:disabled, .historie-klammer:disabled { opacity: .38; cursor: not-allowed; background: transparent; }
.historie-absatz-zeichen { font-size: 16px; font-weight: 600; }
.historie-emoji-menue { display: flex; flex-wrap: wrap; width: 220px; gap: 2px; }
.historie-emoji { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 18px; }
.historie-emoji:hover { background: var(--blau-zart); }
.historie-zeit-menue { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.historie-zeit-menue input { width: 100%; height: 36px; padding: 0 8px; }
.historie-bezug { margin: 0 10px 10px; min-height: 36px; max-width: 100%; }
.historie-liste { padding: 0 16px 16px; }
.historie-liste .eintrag .typ { display: inline-flex; align-items: center; gap: 6px; }
.historie-liste .eintrag .typ svg { flex: 0 0 auto; }
.historie-liste .inhalt { white-space: normal; }
.historie-liste .inhalt ul, .historie-liste .inhalt ol { margin: 6px 0 6px 1.2em; padding: 0; }
.historie-liste .inhalt h3 { margin: 8px 0 4px; font-size: 15px; }
.erwaehnung { background: var(--blau-zart); color: var(--blau-dunkel); font-weight: 600; border-radius: 3px; padding: 0 3px; }
.historie-erwaehnt { margin-top: 6px; font-size: 12px; color: var(--grau); }

/* Projektkopf bearbeiten */
.info-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 20px; }
.info-kopf .abschnitt { margin: 0; flex: 1 1 auto; padding-right: 0; }
.info-form { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 16px; }
.info-form > label, .info-form > .suchauswahl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--grau); }
.info-form input, .info-form select, .info-form textarea { width: 100%; min-height: 40px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); }
.info-form textarea { min-height: 88px; padding: 10px 12px; resize: vertical; }
#info { overflow: auto; max-height: calc(100vh - var(--leiste-hoehe, 64px) - 32px); }
.info-form-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 0 12px; position: sticky; bottom: 0; background: #fff; }

/* Aufgabendetail: Zurück-Zeile über beiden Spalten, damit Erinnerungen
   bündig mit der Aufgabenkarte beginnen (nicht auf Höhe des Links). */
.projektseite > .zurueck-zeile {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding-left: 4px;
}
.zurueck-zeile { margin: 0 0 12px 4px; }
.aufgabe-kopf { padding: 18px 20px 16px; }
/* Titelfeld wie eine Überschrift: in Ruhe randlos, Hover dezent, Fokus blauer Rahmen.
   Spezifität muss die globale input-Regel (border 1px, weißer Grund) schlagen. */
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]),
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):hover,
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):focus,
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):focus-visible {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0 0 0 -11px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-klein);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):hover {
  background: rgba(45, 62, 80, .04);
  border-color: var(--linie);
}
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):focus,
.aufgabe-kopf input.aufgabe-titel:not([type=checkbox]):not([type=radio]):focus-visible {
  background: #fff;
  border-color: var(--blau) !important;
  box-shadow: 0 0 0 3px rgba(1, 118, 211, .18);
}
.aufgabe-meta { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 28px; margin: 14px 0 16px; }
.aufgabe-meta-feld { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.aufgabe-meta-label { font-size: 12px; font-weight: 600; color: var(--grau); }
.aufgabe-zustaendig { display: flex; align-items: center; min-height: 40px; }
.aufgabe-avatar-knopf {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  margin: 0; padding: 4px 8px 4px 4px; border: 1px solid transparent;
  border-radius: 999px; background: transparent; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2;
  text-align: left; cursor: pointer;
}
.aufgabe-avatar-knopf:hover { background: #fff; border-color: var(--linie-stark); }
.aufgabe-avatar-knopf[aria-expanded="true"] { background: #fff; border-color: var(--blau); box-shadow: var(--ring); }
.aufgabe-avatar-knopf:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 2px; }
.aufgabe-avatar-knopf .aufgabe-avatar, .aufgabe-avatar-knopf .person-avatar {
  width: 28px; height: 28px; font-size: 11px; flex: 0 0 28px;
  margin: 0; padding: 0; box-sizing: border-box;
}
.person-avatar.leer, .aufgabe-avatar.leer, .avatar.leer {
  margin: 0; padding: 0; box-sizing: border-box;
  background: #fff; color: var(--grau); -webkit-text-fill-color: var(--grau);
  border: 1px dashed var(--linie-stark); border-radius: 50%;
  font-weight: 600; text-align: center;
}
.aufgabe-avatar-knopf.leer {
  margin: 0; padding: 4px 8px 4px 4px;
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  text-align: left; font-size: 13px; color: var(--text);
}
.aufgabe-avatar-name {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aufgabe-avatar-knopf.leer .aufgabe-avatar-name { color: var(--grau); font-weight: 500; }
.aufgabe-avatar-pfeil { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--grau); }
.aufgabe-avatar-knopf[aria-expanded="true"] .aufgabe-avatar-pfeil { color: var(--blau); transform: rotate(180deg); }
.aufgabe-zeile .aufgabe-avatar-knopf {
  width: 100%; min-width: 0; max-width: none; box-sizing: border-box;
  justify-self: stretch; align-self: center;
}
.aufgabe-zeile .aufgabe-status {
  width: 100%; min-width: 0; max-width: none; flex: none;
  justify-self: stretch;
}
.aufgabe-zeile .aufgabe-mehr {
  width: 36px; height: 36px; margin: 0; padding: 0; justify-self: center;
}
.aufgabe-zustaendig .aufgabe-avatar-knopf {
  width: 100%; min-width: 220px; max-width: 320px; min-height: 44px;
  padding: 6px 12px 6px 6px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: #fff;
}
.aufgabe-zustaendig-menue {
  position: fixed; z-index: 10000; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 300px; max-width: min(360px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 16px)); overflow: auto;
  padding: 6px; background: #fff; border: 1px solid var(--linie);
  border-radius: 10px; box-shadow: var(--schatten-hoch);
}
.aufgabe-zustaendig-lade { margin: 0; padding: 10px 12px; font-size: 14px; color: var(--grau); }
.aufgabe-zustaendig-eintrag {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  margin: 0; border: 0; border-radius: 8px; padding: 6px 10px;
  background: transparent; color: var(--text); font: inherit; font-size: 14px;
  text-align: left; cursor: pointer;
}
.aufgabe-zustaendig-eintrag .person-avatar { width: 28px; height: 28px; font-size: 11px; flex: 0 0 28px; }
.aufgabe-zustaendig-eintrag .person-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aufgabe-zustaendig-eintrag.leer .person-name { color: var(--grau); }
.aufgabe-zustaendig-eintrag:hover, .aufgabe-zustaendig-eintrag.fokus, .aufgabe-zustaendig-eintrag:focus-visible {
  background: var(--blau-zart); outline: none;
}
.aufgabe-zustaendig-eintrag.aktiv { background: var(--blau-zart); }
.aufgabe-zustaendig-haken { display: inline-flex; align-items: center; flex: 0 0 auto; margin-left: auto; color: var(--blau); }
@media (max-width: 700px) {
  .aufgabe-zeile {
    grid-template-columns: 28px minmax(0, 1fr) 36px 6.5rem 44px;
    column-gap: 6px;
    padding: 0 8px 0 4px;
  }
  .aufgabe-zeile .aufgabe-avatar-name,
  .aufgabe-zeile .aufgabe-avatar-pfeil { display: none; }
  .aufgabe-zeile .aufgabe-avatar-knopf {
    width: 36px; min-width: 36px; max-width: 36px; padding: 4px;
    justify-content: center; justify-self: center;
  }
  .aufgabe-zeile .aufgabe-status { font-size: 12px; padding: 6px 6px; }
  .aufgabe-zeile .aufgabe-mehr { width: 44px; height: 44px; }
}
.aufgabe-kopf .aufgabe-status { min-height: 40px; width: 11.5rem; min-width: 11.5rem; max-width: 11.5rem; flex: 0 0 11.5rem; border-radius: 8px; padding: 8px 10px; }
.aufgabe-statusleiste { width: 100%; box-sizing: border-box; margin: 2px 0 6px; padding: 10px 0 8px; }
.aufgabe-statusleiste .schritt-name { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .aufgabe-statusleiste { padding: 8px 0 10px; }
  .aufgabe-statusleiste .schritt-name { font-size: 11px; }
}
.aufgabe-frist { height: 40px; min-width: 160px; padding: 0 12px; }
.aufgabe-beschreibung { display: block; width: 100%; min-height: 120px; margin: 6px 0 12px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; }
.aufgabe-aktionen { margin-top: 8px; }
.aufgabe-mehr { position: relative; display: inline-block; }

.historie-bot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: #1b2b4a; color: #fff; flex: 0 0 auto; }
.historie-bot svg { display: block; }
.historie-quelle { font-weight: 600; color: #1b2b4a; }

/* Aufgaben-Pipeline */
.aufgaben-tafel .spalte:not(:has(.projekt))::after { content: "Keine Aufgaben"; }
.spalte.st-auf-vorbereiten { border-top: 3px solid #706E6B; }
.spalte.st-auf-umsetzen { border-top: 3px solid #0176D3; }
.spalte.st-auf-warten_zusage { border-top: 3px solid #FF8000; }
.spalte.st-auf-warten_auszahlung { border-top: 3px solid #C45C15; }
.spalte.st-auf-fertig { border-top: 3px solid #2E844A; }
.spalte.st-auf-vorbereiten h2::before { background: #706E6B; }
.spalte.st-auf-umsetzen h2::before { background: #0176D3; }
.spalte.st-auf-warten_zusage h2::before { background: #FF8000; }
.spalte.st-auf-warten_auszahlung h2::before { background: #C45C15; }
.spalte.st-auf-fertig h2::before { background: #2E844A; }
.spalte.eingeklappt { flex: 0 0 88px; min-width: 88px; }
.spalte-klapp { margin-left: 4px; border: 0; background: #fff; border: 1px solid var(--linie); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: var(--grau); cursor: pointer; }
.spalte-klapp:hover { color: var(--text); border-color: var(--grau-hell); }
.spalte-hinweis { margin: 8px 4px 0; font-size: 12px; color: var(--grau); line-height: 1.4; }
.aufgabe-karte .unten { align-items: center; }
.aufgabe-karte .aufgabe-avatar { width: 26px; height: 26px; font-size: 10px; flex: 0 0 26px; margin: 0; padding: 0; box-sizing: border-box; }

.historie-editor img, .historie-liste .inhalt img, img.notiz-bild {
  display: block; max-width: 100%; max-height: 280px; margin: 8px 0; border-radius: 6px;
  border: 1px solid var(--linie); cursor: zoom-in; background: #f4f4f4;
}
.historie-editor.ablage { outline: 2px dashed var(--blau); outline-offset: -2px; background: var(--blau-zart); }
.historie-lichtkasten {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 20, 20, .78); padding: 32px 16px 48px;
}
.historie-lichtkasten[hidden] { display: none; }
.historie-lichtkasten img { max-width: min(96vw, 1400px); max-height: 86vh; border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.35); background: #111; }
.historie-lichtkasten-zu {
  position: absolute; top: 16px; right: 16px; appearance: none; border: 0; border-radius: 8px;
  background: #fff; color: #222; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; cursor: pointer;
}

.historie-liste .inhalt a, .historie-editor a { color: var(--blau); text-decoration: underline; }
.historie-liste .inhalt a:hover, .historie-editor a:hover { color: var(--blau-dunkel); }


/* Mail-Eintrag in der Historie */
.mail-kopf { display: flex; flex-direction: column; gap: 8px; }
.mail-betreff { font-weight: 700; font-size: 15px; color: var(--text, #1a1a1a); }
.mail-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 13px; }
.mail-meta dt { color: var(--muted, #667); font-weight: 600; }
.mail-meta dd { margin: 0; overflow-wrap: anywhere; }
.mail-auszug { margin: 4px 0 0; font-size: 14px; color: var(--text, #222); white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-links { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 4px; }
.mail-link { color: var(--blau, #1a4f8b); font-weight: 600; font-size: 13px; }
.mail-pfad { font-size: 13px; color: var(--muted, #556); overflow-wrap: anywhere; }

.aktions-menue { position: fixed; z-index: 10000; box-sizing: border-box; min-width: 260px; padding: 6px 0; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: var(--schatten-hoch); max-height: min(70vh, calc(100vh - 88px)); overflow-y: auto; }
.aktions-menue-eintrag { display: block; width: 100%; margin: 0; border: 0; border-radius: 0; padding: 12px 16px; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.aktions-menue-eintrag:hover, .aktions-menue-eintrag.fokus, .aktions-menue-eintrag:focus-visible { background: #F3F3F3; outline: none; }
.aktions-menue-eintrag:focus-visible { box-shadow: inset 0 0 0 2px rgba(1, 118, 211, .45); }
.aktions-menue-eintrag.rot { color: var(--rot); }
.aktions-menue-eintrag.rot:hover, .aktions-menue-eintrag.rot.fokus, .aktions-menue-eintrag.rot:focus-visible { background: var(--rot-zart); }
.aktions-menue-eintrag.rot:disabled { color: #c48b86; cursor: not-allowed; background: transparent; }
.aktions-menue-eintrag:disabled { color: #a2adb8; cursor: not-allowed; background: transparent; }
.aktions-menue-trenner { display: block; height: 0; margin: 6px 0; border: 0; border-top: 1px solid var(--linie); }
.aktions-menue-eintrag:disabled:hover, .aktions-menue-eintrag:disabled.fokus { background: transparent; }
.knopf-zweit.knopf-rot { color: var(--rot); border-color: #f3c3be; }
.knopf-zweit.knopf-rot:hover:not(:disabled) { background: var(--rot-zart); border-color: var(--rot); }
.gruppe-aktion { flex: 0 0 auto; margin: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--grau); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.gruppe-aktion:hover, .gruppe-aktion:focus-visible { color: var(--text); background: rgba(15, 23, 42, 0.06); }
.gruppe-aktion:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 1px; }
.uebernehmen-dialog { width: min(560px, calc(100vw - 24px)); }
.uebernehmen-suche, .uebernehmen-treffer, .uebernehmen-quelle, .uebernehmen-liste, .uebernehmen-leiste { grid-column: 1 / -1; }
.uebernehmen-suche { width: 100%; box-sizing: border-box; min-height: 40px; margin: 0 0 8px; padding: 0 12px; }
.dialog-raster .uebernehmen-aufgabe input[type=checkbox] { width: auto; height: auto; min-width: 18px; min-height: 18px; padding: 0; margin: 0; flex: 0 0 auto; }
.uebernehmen-aufgabe { display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.uebernehmen-aufgabe span { flex: 1 1 auto; min-width: 0; color: var(--text); font-size: 14px; font-weight: 500; text-align: left; }
.uebernehmen-treffer { list-style: none; margin: 0 0 12px; padding: 0; max-height: 160px; overflow: auto; border: 1px solid var(--linie); border-radius: 8px; }
.uebernehmen-treffer li { margin: 0; padding: 0; }
.uebernehmen-treffer button { display: block; width: 100%; margin: 0; border: 0; border-bottom: 1px solid var(--linie); padding: 10px 12px; background: #fff; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.uebernehmen-treffer button:hover, .uebernehmen-treffer button:focus-visible { background: #F7FBFF; }
.uebernehmen-treffer li:last-child button { border-bottom: 0; }
.uebernehmen-quelle { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.uebernehmen-liste { max-height: min(360px, 50vh); overflow: auto; margin: 0 0 8px; padding: 0; border: 1px solid var(--linie); border-radius: 8px; }
.uebernehmen-gruppe { margin: 0; padding: 8px 12px 4px; font-size: 12px; font-weight: 700; color: var(--grau); }
.uebernehmen-aufgabe { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.uebernehmen-aufgabe:hover { background: #F7FBFF; }
.uebernehmen-aufgabe input { margin-top: 3px; flex: 0 0 auto; }
.uebernehmen-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.uebernehmen-leiste .klein { margin: 0; }
@media (max-width: 600px) {
  .aktions-menue { min-width: 0; width: min(280px, calc(100vw - 16px)) !important; }
  .uebernehmen-dialog { width: calc(100vw - 16px); }
}

.foerder-zeile { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.35rem 0; }
.foerder-zeile input[type="text"] { flex: 1 1 8rem; min-width: 7rem; }

/* ---------- Angebote (Paket 7, an DP-Maske angelehnt) ---------- */
.angebot-dialog { width: min(820px, calc(100vw - 24px)); height: fit-content; min-height: 0; max-height: 100vh; max-height: 100dvh; max-height: var(--dialog-max-h, 100vh); max-height: calc(var(--dialog-max-h, 100dvh) - 24px); box-sizing: border-box; display: block; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; margin: 12px auto; overscroll-behavior: contain; padding: 0; border: 0; border-radius: 8px; box-shadow: 0 24px 60px -12px rgba(20, 40, 56, .45); color: var(--text); }
/* min-height:min-content (an dialog/dialog[open]) würde max-height aushebeln: der Dialog wächst mit dem Inhalt, overflow greift nicht. */
dialog.angebot-dialog, dialog.angebot-dialog[open] { min-height: 0; }
.angebot-dialog::backdrop { background: rgba(20, 34, 46, .5); }
.angebot-dialog-kopf { display: flex; align-items: center; gap: 12px; padding: 14px var(--dialog-einzug, 22px); background: #032D60; color: #fff; border-radius: 8px 8px 0 0; flex: 0 0 auto; position: sticky; top: 0; z-index: 4; }
.angebot-dialog-kopf h2 { margin: 0; font-size: 16px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.angebot-dialog-koerper { overflow-y: auto; padding: 16px var(--dialog-einzug, 22px) calc(8px + env(safe-area-inset-bottom, 0px)); max-height: none; flex: 0 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: #fff; }
.angebot-dialog-fuss { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px var(--dialog-einzug, 22px) calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--linie); background: #f9fbfc; border-radius: 0 0 8px 8px; position: sticky; bottom: 0; flex: 0 0 auto; z-index: 3; }
.angebot-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.angebot-feld > span, .angebot-feld > button.leise { font-size: 11px; font-weight: 600; color: var(--grau); }
.angebot-feld input, .angebot-feld select, .angebot-feld textarea { height: 36px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--linie-stark); border-radius: 0; background: transparent; font-size: 14px; color: var(--text); width: 100%; }
.angebot-feld textarea { height: auto; padding: 8px 0; resize: vertical; }
.angebot-feld input:focus, .angebot-feld select:focus, .angebot-feld textarea:focus { outline: none; border-bottom-color: var(--blau); }
.angebot-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.angebot-raster .breit { grid-column: 1 / -1; }
.angebot-raster .halb-links { grid-column: 1; }
.angebot-klapp { background: none; border: 0; padding: 0; color: var(--blau); font-size: 11px; font-weight: 600; cursor: pointer; text-align: right; }
.angebot-pos-tabelle { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.angebot-pos-kopf, .angebot-pos-zeile { display: grid; grid-template-columns: 36px 36px minmax(8rem, 1fr) 72px 56px 108px 108px 28px; gap: 6px; align-items: center; }
.angebot-pos-kopf { font-size: 11px; font-weight: 600; color: var(--grau); padding: 8px 0 4px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.angebot-pos-zeile { padding: 6px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.angebot-pos-zeile:hover { background: var(--blau-zart); }
.angebot-pos-zeile .zahl, .angebot-pos-kopf .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.angebot-pos-kopf .pos-nr, .angebot-pos-zeile .pos-nr { text-align: right; font-variant-numeric: tabular-nums; }
.angebot-griff { cursor: grab; color: var(--grau-hell); display: flex; align-items: center; justify-content: center; }
.angebot-griff:active { cursor: grabbing; }
.angebot-pos-aktionen { display: flex; gap: 8px; padding: 8px 0 16px; }
.angebot-pos-aktionen button { border: 0; background: none; color: var(--blau); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.angebot-pos-aktionen button:hover { background: var(--blau-zart); }
.angebot-summen { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin: 8px 0 16px; }
.angebot-summen .sz { display: grid; grid-template-columns: 160px 110px; gap: 8px; font-size: 13px; }
.angebot-summen .sz .z { text-align: right; }
.angebot-summen .sz.fett { font-weight: 700; font-size: 14px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--text); }
.angebot-summen .sz a, .angebot-summen .sz button.link { background: none; border: 0; color: var(--blau); font-size: 13px; cursor: pointer; padding: 0; text-align: left; }
.status-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 650; border: 0; font: inherit; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: visible; }
.status-chip.entwurf { background: #eef1f4; color: #3e4a54; }
.status-chip.versendet, .status-chip.offen { background: #d6e8fb; color: #014486; }
.status-chip.angenommen, .status-chip.bestaetigt { background: var(--gruen-zart); color: var(--gruen); }
.status-chip.abgelehnt { background: var(--rot-zart); color: var(--rot); }
.status-chip.abgerechnet { background: #D9EFE8; color: #0D6B56; }
button.status-wahl { cursor: pointer; font-family: inherit; }
button.status-wahl:hover, button.status-wahl:focus-visible { filter: brightness(0.97); box-shadow: inset 0 0 0 2px rgba(3, 45, 96, .18); outline: none; }
button.status-wahl:disabled { cursor: default; opacity: .85; }
.status-zelle { vertical-align: middle; min-width: 8rem; white-space: nowrap; overflow: visible; }
/* Angebots-Statuswahl gleiche Pillenform wie Rechnungs-Statuschips, nicht zellenfüllend. */
.status-zelle .status-wahl { width: auto; min-width: 88px; min-height: 0; height: auto; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 650; }
.aktions-menue-eintrag.status-menue-eintrag { font-size: 14px; }
.aktions-menue-eintrag.status-menue-eintrag.aktiv { background: #F3F3F3; font-weight: 650; }
.status-chip.im-kopf { margin-left: auto; }
.vorschau-status-wahl { display: flex; align-items: center; }
.vorschau-status-wahl .status-wahl { min-height: 0; }
.deal-angebot-info .status-wahl { margin-left: 8px; }
.status-chip.uebergeben { background: #d6e8fb; color: #014486; }
.status-chip.in_arbeit { background: #fff3cd; color: #7a5b00; }
.status-chip.erledigt { background: var(--gruen-zart); color: var(--gruen); }
.angebot-liste-kopf { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.angebot-liste-kopf .kennzahl { display: flex; flex-direction: column; align-items: flex-end; }
.angebot-liste-kopf .kennzahl span { font-weight: 700; font-size: 16px; }
.angebot-liste-kopf .kennzahl small { color: var(--grau); font-size: 11px; font-weight: 600; }
.tabelle .status-zelle { text-align: center; }
.angebots-karte { border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; margin: 16px 0; background: #fff; }
.angebots-karte-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #032D60; color: #fff; }
.angebots-karte-kopf .titel { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.angebots-karte-kopf button { background: none; border: 0; color: #fff; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; }
.angebots-karte-kopf button:hover { background: rgba(255,255,255,.12); }
.angebots-karte-zeile { display: grid; grid-template-columns: 48px minmax(0, 1fr) 100px 100px; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--linie); }
.angebots-karte-zeile .z { text-align: right; }
.angebots-karte-aktionen { display: flex; gap: 16px; padding: 10px 14px; }
.angebots-karte-aktionen button { background: none; border: 0; color: var(--blau); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; padding: 4px 0; }
.plus-knopf { position: fixed; right: 28px; bottom: 28px; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--blau); color: #fff; font-size: 32px; line-height: 1; cursor: pointer; box-shadow: var(--schatten-hoch); z-index: 20; }
.plus-knopf:hover { background: var(--blau-dunkel); }
.typ-dialog { width: min(560px, calc(100vw - 24px)); }
.typ-gruppe { margin: 16px 0; }
.typ-gruppe h3 { margin: 0 0 10px; font-size: 13px; font-weight: 650; }
.typ-gruppe .reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.typ-gruppe button { min-width: 140px; }
.typ-gruppe button:disabled { opacity: .45; cursor: not-allowed; }
.vorschau-dialog { width: min(920px, calc(100vw - 16px)); height: fit-content; min-height: 0; max-height: 100vh; max-height: 100dvh; max-height: var(--dialog-max-h, 100vh); max-height: calc(var(--dialog-max-h, 100dvh) - 24px); box-sizing: border-box; display: block; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; margin: 12px auto; overscroll-behavior: contain; padding: 0; border: 0; border-radius: 8px; }
dialog.vorschau-dialog, dialog.vorschau-dialog[open] { min-height: 0; }
.vorschau-dialog::backdrop { background: rgba(16, 24, 32, .65); }
.vorschau-leiste { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #1c242c; color: #fff; border-radius: 8px 8px 0 0; position: sticky; top: 0; z-index: 4; }
.vorschau-leiste .titel { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vorschau-leiste button, .vorschau-leiste select { background: #fff; color: #1c242c; border: 0; border-radius: 4px; height: 32px; padding: 0 10px; cursor: pointer; font-weight: 650; }
.vorschau-leiste button.ico-btn { background: transparent; color: #fff; width: 36px; padding: 0; }
.vorschau-leiste iframe, .vorschau-frame { flex: 1; width: 100%; border: 0; background: #e8eaed; min-height: 0; }
.vorschau-leiste .vorschau-tab-link { color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 0 8px; border-radius: 4px; }
.vorschau-leiste .vorschau-tab-link:hover, .vorschau-leiste .vorschau-tab-link:focus-visible { text-decoration: underline; background: rgba(255,255,255,.12); }
.vorschau-body { flex: 1; min-height: 0; overflow: auto; background: #e8eaed; display: flex; flex-direction: column; }
.vorschau-status { margin: 12px 16px; font-size: 14px; color: #3E3E3C; }
.vorschau-status[hidden] { display: none; }
.vorschau-seiten { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 12px 24px; }
.vorschau-seite { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 8px rgba(16,24,32,.18); }
.rte { border-bottom: 1px solid var(--linie-stark); }
.rte-leiste { display: flex; gap: 4px; margin-bottom: 4px; }
.rte-knopf { width: 28px; height: 28px; border: 1px solid var(--linie); border-radius: 4px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 700; }
.rte-editor { min-height: 72px; padding: 6px 0; font-size: 14px; line-height: 1.5; outline: none; }
.rte-editor:focus { /* untere Linie vom parent */ }
.pos-dialog { width: min(720px, calc(100vw - 24px)); }
.pos-dialog .angebot-dialog-kopf { background: #032D60; }
.pos-zahlen { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.5fr) 80px minmax(130px, 0.55fr) minmax(130px, 0.55fr); gap: 10px; }
.pos-zahlen .zahl-eingabe, .dialog-raster .zahl-eingabe { text-align: right; font-variant-numeric: tabular-nums; padding-right: 12px; }
input.zahl-eingabe::-webkit-outer-spin-button,
input.zahl-eingabe::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.zahl-eingabe { appearance: textfield; -moz-appearance: textfield; }
.pos-links { display: flex; gap: 16px; margin: 8px 0 12px; }
.pos-links button { background: none; border: 0; color: var(--blau); cursor: pointer; font-size: 13px; padding: 0; }
.steuer-link { background: none; border: 0; color: var(--blau); font-size: 12px; cursor: pointer; padding: 0; }
.angebot-filter { height: 40px; border: 1px solid var(--linie-stark); border-radius: 8px; background: #fff; padding: 0 10px; font-weight: 650; }

.mail-dialog { width: min(720px, calc(100vw - 24px)); }
.mail-dialog .dialog-fuss { flex-wrap: wrap; }
.mail-anhang { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--grau); font-weight: 500; }

.aktionen-zeile { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 8px; }
.uebergabe-dialog { width: min(640px, calc(100vw - 24px)); }
.uebergabe-dringend { display: flex; flex-direction: column; gap: 6px; font-weight: 650; color: var(--text); font-size: 14px; }
.uebergabe-dringend span { display: inline-flex; align-items: center; gap: 0; }
.uebergabe-dringend .hinweis { font-weight: 500; color: var(--grau); font-size: 12px; }
.uebergabe-liste { display: flex; flex-direction: column; gap: 10px; }
.uebergabe-karte { border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; background: #fff; }
.uebergabe-karte.dringend { border-color: #c9a227; background: #fffdf5; }
.uebergabe-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.uebergabe-flag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: #fff3cd; color: #7a5b00; font-size: 12px; font-weight: 700; }
.uebergabe-flag.kopie { background: #e8eef6; color: #1e3a5f; border: 1px solid #c5d4e8; }
.uebergabe-verteiler-hinweis { display: block; margin-top: 4px; }
.uebergabe-objekt { margin: 0 0 6px; font-size: 13px; color: var(--grau); }
.uebergabe-auftrag { margin: 0 0 6px; white-space: pre-wrap; }
.uebergabe-meta { margin: 0; font-size: 13px; color: var(--grau); }
.uebergabe-ergebnis { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--linie); }


/* ---------- Paket 10: Deal-Übersicht zweispaltig wie DP ---------- */
.deal-uebersicht { align-items: flex-start; }
.deal-uebersicht > .links { flex: 2 1 560px; }
.deal-uebersicht > .rechts { flex: 1 1 320px; max-width: 420px; }
.deal-uebersicht .deal-leiste-karte,
.deal-angebot-kasten,
.deal-stamm,
.historie-deal,
.deal-beteiligte { padding: 0; overflow: hidden; }

.deal-stamm-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; }
.deal-stamm-titel { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.deal-stamm-name { display: flex; align-items: flex-start; gap: 10px; font-size: 18px; line-height: 1.25; color: var(--text); }
.deal-stamm-name strong { font-weight: 700; overflow-wrap: anywhere; }
.deal-stamm-ico { flex: 0 0 auto; display: inline-flex; color: var(--grau); margin-top: 2px; }
.deal-stamm-mehr { flex: 0 0 auto; margin-top: 0; align-self: flex-start; }
.deal-sterne { display: flex; gap: 2px; padding-left: 30px; }
.deal-stern { width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #C9A227; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.deal-stern svg, .deal-stern svg * { display: block; pointer-events: none; }
.deal-stern svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.deal-stern.an svg path { fill: currentColor; stroke-width: 1.2; }
.deal-stern:hover, .deal-stern:focus-visible { background: var(--grund); }
.deal-stern:focus-visible { outline: 2px solid var(--blau); outline-offset: 1px; }
.deal-stern:not(.an) { color: #C4C4C4; }
/* Hover- und Tastaturvorschau: Sterne bis zum Zeiger bzw. Fokus füllen */
.deal-sterne:has(.deal-stern:hover) .deal-stern,
.deal-sterne:has(.deal-stern:focus-visible) .deal-stern { color: #C4C4C4; }
.deal-sterne:has(.deal-stern:hover) .deal-stern svg path,
.deal-sterne:has(.deal-stern:focus-visible) .deal-stern svg path { fill: none; stroke-width: 1.6; }
.deal-sterne:has(.deal-stern:nth-child(1):hover) .deal-stern:nth-child(-n+1),
.deal-sterne:has(.deal-stern:nth-child(2):hover) .deal-stern:nth-child(-n+2),
.deal-sterne:has(.deal-stern:nth-child(3):hover) .deal-stern:nth-child(-n+3),
.deal-sterne:has(.deal-stern:nth-child(4):hover) .deal-stern:nth-child(-n+4),
.deal-sterne:has(.deal-stern:nth-child(5):hover) .deal-stern:nth-child(-n+5),
.deal-sterne:has(.deal-stern:nth-child(1):focus-visible) .deal-stern:nth-child(-n+1),
.deal-sterne:has(.deal-stern:nth-child(2):focus-visible) .deal-stern:nth-child(-n+2),
.deal-sterne:has(.deal-stern:nth-child(3):focus-visible) .deal-stern:nth-child(-n+3),
.deal-sterne:has(.deal-stern:nth-child(4):focus-visible) .deal-stern:nth-child(-n+4),
.deal-sterne:has(.deal-stern:nth-child(5):focus-visible) .deal-stern:nth-child(-n+5) { color: #C9A227; }
.deal-sterne:has(.deal-stern:nth-child(1):hover) .deal-stern:nth-child(-n+1) svg path,
.deal-sterne:has(.deal-stern:nth-child(2):hover) .deal-stern:nth-child(-n+2) svg path,
.deal-sterne:has(.deal-stern:nth-child(3):hover) .deal-stern:nth-child(-n+3) svg path,
.deal-sterne:has(.deal-stern:nth-child(4):hover) .deal-stern:nth-child(-n+4) svg path,
.deal-sterne:has(.deal-stern:nth-child(5):hover) .deal-stern:nth-child(-n+5) svg path,
.deal-sterne:has(.deal-stern:nth-child(1):focus-visible) .deal-stern:nth-child(-n+1) svg path,
.deal-sterne:has(.deal-stern:nth-child(2):focus-visible) .deal-stern:nth-child(-n+2) svg path,
.deal-sterne:has(.deal-stern:nth-child(3):focus-visible) .deal-stern:nth-child(-n+3) svg path,
.deal-sterne:has(.deal-stern:nth-child(4):focus-visible) .deal-stern:nth-child(-n+4) svg path,
.deal-sterne:has(.deal-stern:nth-child(5):focus-visible) .deal-stern:nth-child(-n+5) svg path { fill: currentColor; stroke-width: 1.2; }
.wahrscheinlichkeit-feld .deal-sterne,
.dialog .wahrscheinlichkeit-sterne { padding-left: 0; gap: 4px; min-height: 40px; align-items: center; }
.dialog-raster input[type=hidden] { display: none; }
@media (max-width: 600px) {
  .deal-stern { width: 40px; height: 40px; }
}
.deal-stamm-zeile { display: flex; align-items: flex-start; gap: 10px; padding: 8px 16px; font-size: 14px; line-height: 1.4; }
.deal-stamm-zeile .avatar { width: 28px; height: 28px; font-size: 11px; flex: 0 0 28px; }
.deal-stamm-zeile a { color: var(--blau); font-weight: 600; text-decoration: none; }
.deal-stamm-zeile a:hover { text-decoration: underline; }
.deal-stamm-neben { font-size: 12px; color: var(--grau); margin-top: 2px; }
.deal-stamm-text { align-items: flex-start; }
.deal-stamm-meta { margin: 0; padding: 4px 16px 8px 46px; font-size: 13px; color: var(--grau); }
.deal-stamm .zeile { padding-left: 16px; padding-right: 16px; }
.deal-stamm .meldung { padding: 8px 16px 14px; }

.deal-angebot-kopf { display: flex; align-items: center; gap: 10px; padding: 16px 20px 14px; background: #fff; color: var(--text); border-bottom: 1px solid var(--linie); }
.deal-angebot-kopf h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.deal-angebot-kopf .deal-stamm-ico { color: var(--blau); margin-top: 0; }
.deal-angebot-body { padding: 18px 16px 16px; }
.deal-angebot-leer { margin: 0 0 16px; font-size: 15px; color: var(--text); }
.deal-angebot-aktionen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.deal-angebot-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.deal-angebot-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; background: var(--grund); }
.deal-angebot-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.deal-angebot-nr { color: var(--blau); font-weight: 700; text-decoration: none; }
.deal-angebot-nr:hover { text-decoration: underline; }
.deal-angebot-rechts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.deal-angebot-summe { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.deal-angebot-aktionen-zeile { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.deal-angebot-pdf { min-height: 32px; padding: 0 10px; font-size: 13px; }
.tabellenrahmen:has(.angebot-listen-aktionen) {
  overflow-x: auto;
  max-width: 100%;
}
.tabellenrahmen:has(.angebot-listen-aktionen) .tabelle th {
  top: 0;
}
.tabelle:has(.angebot-listen-aktionen) {
  width: 100%;
  min-width: 48rem;
  table-layout: auto;
}
.tabelle:has(.angebot-listen-aktionen) th,
.tabelle:has(.angebot-listen-aktionen) td {
  padding-left: 10px;
  padding-right: 10px;
}
.tabelle:has(.angebot-listen-aktionen) th.zahl,
.tabelle:has(.angebot-listen-aktionen) td.zahl {
  width: 6rem;
  white-space: nowrap;
}
.tabelle th.brutto,
.tabelle td.brutto {
  position: sticky;
  top: auto;
  right: 4rem;
  z-index: 2;
  width: 6rem;
  min-width: 6rem;
  box-shadow: none;
  border-left: none;
}
.tabelle td.brutto { background: #fff; }
.tabelle th.brutto {
  top: 0;
  background: #f7f9fb;
  z-index: 4;
}
.tabelle tbody tr:hover td.brutto {
  background: #f2f6f9;
}
.tabelle th.angebot-listen-aktionen,
.tabelle td.angebot-listen-aktionen {
  width: 4rem;
  min-width: 4rem;
  padding-left: 8px;
  padding-right: 8px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
  position: sticky;
  top: auto;
  right: 0;
  z-index: 3;
  box-shadow: none;
  border-left: none;
}
.tabelle td.angebot-listen-aktionen { background: #fff; }
.tabelle th.angebot-listen-aktionen {
  top: 0;
  background: #f7f9fb;
  z-index: 5;
}
.tabelle tbody tr:hover td.angebot-listen-aktionen {
  background: #f2f6f9;
}
.tabelle:has(.brutto) th.status-zelle,
.tabelle:has(.brutto) td.status-zelle {
  position: sticky;
  right: 10rem;
  z-index: 2;
  box-shadow: none;
}
.tabelle:has(.brutto) td.status-zelle { background: #fff; }
.tabelle:has(.brutto) th.status-zelle {
  top: 0;
  background: #f7f9fb;
  z-index: 4;
}
.tabelle thead th {
  background: #f7f9fb;
}
.tabelle:has(.brutto) tbody tr:hover td.status-zelle {
  background: #f2f6f9;
}

.tabelle th.faellig,
.tabelle td.faellig {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.angebot-listen-aktionen-inner {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  vertical-align: middle;
}
.angebot-listen-aktionen .symbol,
.angebot-listen-aktionen button.karten-mehr {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 22px;
  box-sizing: border-box;
  flex: 0 0 auto;
}
@media (hover: none), (max-width: 900px) {
  .angebot-listen-aktionen button.karten-mehr { width: 44px; height: 44px; }
}

.deal-angebot-rechts .symbol,
.deal-angebot-rechts button.karten-mehr {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 22px;
  box-sizing: border-box;
}
@media (hover: none), (max-width: 900px) {
  .deal-angebot-rechts button.karten-mehr { width: 44px; height: 44px; }
}

.deal-seitenkopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 8px 16px; position: relative; }
.deal-seitenkopf .abschnitt { margin: 0; padding: 0; }
.deal-seitenkopf .whatsup-plus { position: static; flex: 0 0 36px; }
.deal-beteiligt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 16px 12px; font-size: 14px; }
.deal-beteiligt .avatar { width: 28px; height: 28px; font-size: 11px; flex: 0 0 28px; }
.deal-beteiligt a { color: var(--blau); font-weight: 600; text-decoration: none; }
.deal-beteiligt a:hover { text-decoration: underline; }
.deal-beteiligte .leer { padding: 4px 16px 16px; }

#tab-angebote > .historie-deal,
#tab-rechnungen > .historie-deal,
.projektseite .links > .historie-deal { margin-top: 16px; overflow: visible; }
.projektseite .links > .historie-deal.historie-chat { overflow: hidden; }
.historie-deal .historie-tab.aktiv { color: var(--blau); border-bottom-color: var(--blau); }
.historie-deal .historie-tab:hover { color: var(--blau); }
.historie-eintrag-dp .kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text); font-size: 13px; }
.historie-eintrag-dp .historie-avatar { width: 32px; height: 32px; font-size: 11px; flex: 0 0 32px; }
.historie-eintrag-dp .historie-von { flex: 1 1 160px; min-width: 0; font-weight: 700; font-size: 13px; }
.historie-eintrag-dp .historie-datum { margin-left: auto; color: var(--grau); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.historie-eintrag-dp .historie-von {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.historie-liste .eintrag .aktionen,
.historie-eintrag-dp .aktionen {
  display: inline-flex; flex-wrap: nowrap; flex: 0 0 auto; gap: 0;
  align-items: center; margin-left: 4px;
}
.historie-liste .eintrag .aktionen .symbol,
.historie-eintrag-dp .aktionen .symbol {
  width: 32px; height: 32px; margin: 0; padding: 0;
  line-height: 0; font-size: 16px; box-sizing: border-box; border-radius: 8px;
}
@media (max-width: 430px) {
  .historie-eintrag-dp .kopfzeile { gap: 6px 8px; }
  .historie-liste .eintrag .aktionen .symbol,
  .historie-eintrag-dp .aktionen .symbol { width: 32px; height: 32px; }
}

@media (max-width: 900px) {
  .deal-uebersicht { flex-direction: column; }
  .deal-uebersicht > .rechts { order: -1; max-width: none; flex-basis: auto; width: 100%; }
  .deal-uebersicht > .links { flex-basis: auto; width: 100%; }
  .deal-sterne { padding-left: 30px; }
}
@media (max-width: 600px) {
  .deal-angebot-aktionen { flex-direction: column; align-items: stretch; }
  .historie-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .historie-tab { white-space: nowrap; }
}

.historie-uebergaben-pin { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.historie-pin-titel { margin: 4px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }
.historie-uebergaben-pin .uebergabe-karte { margin: 0; }
.historie-assistent { margin: 0 16px 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--linie); border-radius: 4px; }
.historie-assistent-felder { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.historie-assistent-felder label { display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 12px; font-weight: 600; color: var(--grau); }
.historie-assistent-felder input, .historie-assistent-felder select, .historie-assistent-felder textarea { width: 100%; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); }
.historie-assistent-felder textarea { min-height: 88px; padding: 8px 10px; resize: vertical; }
.historie-assistent-felder input, .historie-assistent-felder select { min-height: 40px; padding: 0 10px; }
.historie-assistent-felder input[type="checkbox"] { width: auto; min-width: 18px; min-height: 18px; padding: 0; flex: 0 0 auto; }
.historie-assistent-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 2px; }
.historie-assistent-dringend { font-weight: 500; color: var(--text); font-size: 14px; }
.historie-assistent-dringend span { display: inline-flex; align-items: center; gap: 8px; }
.historie-assistent .hinweis { display: block; font-weight: 400; color: var(--grau); }

/* Paket 11: Textbausteine, Katalog, Option-Checkbox, Menü in Dialogen */
.angebot-option { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.angebot-option input[type="checkbox"] { width: auto; min-width: 18px; min-height: 18px; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--blau); }
.angebot-baustein { margin: 8px 0 16px; }
.angebot-baustein > .angebot-feld { margin-bottom: 6px; }
.katalog-suche-feld { position: relative; }
.katalog-vorschlaege { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--linie); border-radius: 8px; box-shadow: var(--schatten-hoch); max-height: 220px; overflow-y: auto; }
.katalog-treffer, .katalog-zeile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0; padding: 8px 12px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.katalog-treffer:hover, .katalog-zeile:hover { background: #F3F3F3; }
.katalog-zeile span { font-size: 12px; color: var(--grau); }
.katalog-liste { display: flex; flex-direction: column; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; max-height: 360px; overflow-y: auto; }
.katalog-liste .leer { padding: 16px; margin: 0; }

/* Paket 12: Einstellungen als Kachel-Übersicht */
.einstellungen { padding: 8px 28px 40px; box-sizing: border-box; width: 100%; }
@media (max-width: 900px) {
  .einstellungen { padding: 8px 16px 32px; }
}
.einstellungen-werkzeug { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 18px; }
.einstellungen-krumen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--grau); margin: 0; }
.einstellungen-krumen a { color: var(--blau); text-decoration: none; font-weight: 600; }
.einstellungen-krumen a:hover { text-decoration: underline; }
.einstellungen-krumen .hier { color: var(--text); font-weight: 650; }
.einstellungen-suche { position: relative; flex: 1 1 240px; max-width: 420px; }
.einstellungen-suche input { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--linie); border-radius: 8px; font-size: 14px; background: #fff; color: var(--text); }
.einstellungen-suche input:focus { outline: 2px solid rgba(1,118,211,.35); border-color: var(--blau); }
.einstellungen-suche::before { content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: no-repeat center / 16px 16px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%235E6A78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3-3'/></svg>"); }
.einstellungen-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .einstellungen-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .einstellungen-kacheln { grid-template-columns: 1fr; } }
.einstell-kachel { background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(20,40,56,.12), 0 8px 18px -10px rgba(20,40,56,.18); overflow: hidden; min-height: 120px; }
.einstell-kachel-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; font-size: 16px; font-weight: 650; }
.einstell-kachel-kopf .ico-kreis { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.einstell-kachel-kopf svg { display: block; }
.einstell-kachel[data-farbe="stamm"] .einstell-kachel-kopf { background: #5B6B7C; }
.einstell-kachel[data-farbe="angebot"] .einstell-kachel-kopf { background: #3D4F61; }
.einstell-kachel[data-farbe="assistent"] .einstell-kachel-kopf { background: #0E7A73; }
.einstell-kachel-liste { list-style: none; margin: 0; padding: 8px 0 12px; }
.einstell-kachel-liste li { margin: 0; }
.einstell-kachel-liste a, .einstell-kachel-liste .spaeter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; color: var(--text); text-decoration: none; font-size: 14px; }
.einstell-kachel-liste a:hover { background: #F4F7F9; }
.einstell-kachel-liste .spaeter { color: #8A96A3; cursor: default; }
.einstell-kachel-liste .badge-spaeter { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A96A3; border: 1px solid #D5DCE3; border-radius: 4px; padding: 1px 6px; }
.einstellungen-leer { color: var(--grau); padding: 24px 8px; }
.einstell-seite { display: flex; flex-direction: column; gap: 16px; }
.einstell-seite .karte { margin: 0; }
.einstell-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.einstell-toolbar .knopf { margin-left: auto; }
.baustein-karte, .katalog-karte { padding: 14px 16px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; }
.baustein-karte h3, .katalog-karte h3 { margin: 0 0 6px; font-size: 15px; }
.baustein-kopf, .katalog-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.baustein-kopf .knopf, .baustein-kopf .knopf-zweit, .katalog-kopf .knopf, .katalog-kopf .knopf-zweit { margin: 0; }
.badge-standard { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #E8F4FC; color: #0176D3; border-radius: 4px; padding: 2px 6px; }
.badge-aus { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #F1F3F5; color: #5E6A78; border-radius: 4px; padding: 2px 6px; }
.baustein-vorschau { margin: 0; font-size: 13px; color: var(--grau); white-space: pre-wrap; max-height: 5.5em; overflow: hidden; }
.katalog-meta { margin: 0; font-size: 13px; color: var(--grau); }
.gruppe-leistungen { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gruppe-leistungen li { font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--linie); }
.katalog-liste-sort { display: flex; flex-direction: column; gap: 10px; }
.baustein-typ { display: flex; flex-direction: column; gap: 10px; }
.baustein-typ-titel { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.baustein-karte, .katalog-karte { display: flex; gap: 10px; align-items: flex-start; }
.baustein-karte.zieht { opacity: .55; }
.katalog-karte-inhalt { flex: 1; min-width: 0; }
.katalog-karte.zieht, .gruppe-leistungen li.zieht { opacity: .55; }
.sortier-werkzeug { display: flex; flex-direction: column; align-items: center; gap: 0; flex: 0 0 auto; padding-top: 2px; }
.katalog-griff { width: 22px; height: 22px; color: var(--grau); }
.sortier-pfeile { display: flex; flex-direction: column; }
.sortier-pfeil { border: 0; background: none; color: var(--grau); cursor: pointer; padding: 0 4px; line-height: 1.1; font-size: 10px; }
.sortier-pfeil:hover:not(:disabled) { color: var(--blau); }
.sortier-pfeil:disabled { opacity: .28; cursor: default; }
.gruppe-leistungen li { display: flex; align-items: center; gap: 8px; }
.gruppe-leistungen li .sortier-werkzeug { padding-top: 0; }
.angebot-dialog-fuss .angebot-loeschen { margin-right: auto; }
@media (pointer: coarse), (max-width: 700px) {
  .sortier-pfeil { font-size: 14px; padding: 4px 8px; min-width: 32px; min-height: 28px; }
  .angebot-pos-kopf, .angebot-pos-zeile { grid-template-columns: 44px 36px minmax(8rem, 1fr) 72px 52px 100px 100px 28px; }
}

.wahl-liste { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 8px; }
.wahl-liste li label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; }
.wahl-liste li label:hover { background: #F4F7F9; }
.assistent-zeile { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 20px; padding: 10px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.assistent-zeile:last-child { border-bottom: 0; margin-bottom: 8px; }
.assistent-zeile .name { font-weight: 650; }
.hinweis-box { background: #F7F9FB; border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; }
.karte > .hinweis-box { margin: 4px 20px 16px; }
.hinweis-box code { font-size: 13px; }

.status-chip.teilweise { background: #fff3cd; color: #7a5b00; }
.status-chip.bezahlt { background: #D9EFE8; color: #0D6B56; }
.status-chip.ueberfaellig { background: var(--rot-zart); color: var(--rot); }
.status-chip.storniert { background: #eef1f4; color: #3e4a54; text-decoration: line-through; }
.status-chip.gutschrift { background: #ede7f6; color: #4527a0; }
.status-chip.mahn-offen { background: #eef1f4; color: #3e4a54; }
.status-chip.mahn-erinnert { background: #fff3cd; color: #7a5b00; }
.status-chip.mahn-gemahnt { background: var(--rot-zart); color: var(--rot); }
.status-chip.mahn-inkasso { background: #f3e5f5; color: #6a1b9a; }
.status-chip.mahn-ausgebucht { background: #eef1f4; color: #3e4a54; text-decoration: line-through; }
.tabelle tbody tr.zu-mahnen td { background: #fdecea; }
.tabelle tbody tr.zu-mahnen td.naechste-mahnung,
.tabelle td.naechste-mahnung.mahn-faellig { color: var(--rot); font-weight: 650; }
.tabelle tbody tr.zu-mahnen:hover td,
.tabelle tbody tr.zu-mahnen:hover td.angebot-listen-aktionen {
  background: #f8d7d4;
}
.tabelle th.naechste-mahnung,
.tabelle td.naechste-mahnung {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tabelle.rechnung-liste {
  min-width: 68rem;
}
.rechnung-pos-liste .angebot-pos-zeile { cursor: pointer; }
.rechnung-seitenumbruch { font-size: 11px; color: var(--grau); padding: 4px 0 0 36px; border-top: 1px dashed var(--linie-stark, #999); }
.rechnung-betreff-block { margin: 8px 0 4px; }
.rechnung-pos-aktionen { display: flex; gap: 8px; margin: 10px 0 4px; }
.rechnung-summen { margin: 12px 0 8px auto; max-width: 280px; }
.rechnung-summen .sum-zeile, .rechnung-summen .sum-fett { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.rechnung-summen .sum-fett { font-weight: 700; border-top: 1px solid #1c2614; padding-top: 6px; margin-top: 4px; }
.rechnung-liste { list-style: none; margin: 0; padding: 0; }
.rechnung-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eee; }
.rechnung-neben { margin-top: 16px; }
.typ-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
@media (max-width: 700px) {
  .rechnung-pos-zeile input, .rechnung-pos-zeile select { min-width: 0; }
}



/* Nummernkreise: eigene Karten je Belegart, Zeilen mit Rand, Buttons nebeneinander */
.nummernkreis-liste { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nummernkreis-karte { overflow: visible; min-width: 0; }
.nummernkreis-karte > .abschnitt { margin: 0; }
.nummernkreis-zeile {
  display: flex; flex-direction: column; gap: 12px;
  margin: 0 20px 16px; padding: 14px 0 16px;
  border-top: 1px solid var(--linie); min-width: 0;
}
.nummernkreis-karte > .abschnitt + .nummernkreis-zeile { border-top: 0; padding-top: 12px; }
.nummernkreis-karte > .leer { margin: 12px 20px 16px; }
.nummernkreis-kopf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nummernkreis-mandant { font-size: 15px; font-weight: 650; color: var(--text); }
.nummernkreis-meta { font-size: 14px; color: var(--grau); overflow-wrap: anywhere; word-break: break-word; }
.nummernkreis-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nummernkreis-aktionen .knopf,
.nummernkreis-aktionen .knopf-zweit { width: auto; max-width: 100%; flex: 0 1 auto; }

/* Historie-Karte in Angebots- und Rechnungsmaske */
.angebot-dialog-koerper .historie-beleg {
  margin: 20px 0 8px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.einstell-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.einstell-check input[type="checkbox"] { width: auto; min-width: 18px; min-height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--blau); }

/* Einstellungen Mandanten: ruhiges Abschnittsformular */
.mandant-liste { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mandant-karte { overflow: visible; min-width: 0; }
.mandant-kopf {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--linie); min-width: 0;
}
.mandant-kopf > .abschnitt {
  flex: 1 1 auto; margin: 0; padding: 0; border: 0 !important; min-width: 0;
  overflow-wrap: anywhere; white-space: normal;
}
.mandant-kopf .mandant-kreis { margin-left: auto; }
.mandant-logo-vorschau {
  display: block; height: 40px; width: auto; max-width: 180px;
  object-fit: contain; flex: 0 0 auto; background: #fff;
}
.mandant-form { display: flex; flex-direction: column; margin: 0; padding: 0; min-width: 0; }
.mandant-block { padding: 18px 20px 14px; border-top: 1px solid var(--linie); min-width: 0; }
.mandant-form > .mandant-block:first-child { border-top: 0; }
.mandant-block h3 {
  margin: 0 0 12px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--grau);
}
.mandant-logo-box {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--linie); border-radius: var(--radius-klein);
  background: var(--grund); min-width: 0;
}
.mandant-logo-gross { display: block; height: 56px; width: auto; max-width: min(280px, 100%); object-fit: contain; background: #fff; }
.mandant-raster {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px; min-width: 0; align-items: start;
}
.mandant-raster > label {
  display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--grau);
}
.mandant-lab { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.mandant-raster input, .mandant-raster textarea {
  width: 100%; max-width: 100%; box-sizing: border-box;
  min-height: 40px; padding: 0 12px; border: 1px solid var(--linie-stark);
  border-radius: var(--radius-klein); background: #fff; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500;
}
.mandant-raster textarea { min-height: 108px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.mandant-raster input.iban-feld {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: .04em; min-width: 0;
}
.mandant-raster .span-4 { grid-column: 1 / -1; }
.mandant-raster .span-3 { grid-column: span 3; }
.mandant-raster .span-2 { grid-column: span 2; }
.mandant-raster .span-1 { grid-column: span 1; }
.mandant-raster .span-plz { grid-column: span 1; }
.mandant-raster .span-ort { grid-column: span 3; }
.mandant-hilfe { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--grau); overflow-wrap: anywhere; }
.mandant-block .einstell-check { margin: 14px 0 0; }
.mandant-fuss { padding: 16px 20px 20px; border-top: 1px solid var(--linie); }
.mandant-fuss .knopf { margin: 0; }
@media (max-width: 900px) {
  .mandant-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mandant-raster .span-4 { grid-column: 1 / -1; }
  .mandant-raster .span-3, .mandant-raster .span-2, .mandant-raster .span-1,
  .mandant-raster .span-plz, .mandant-raster .span-ort { grid-column: span 1; }
}
@media (max-width: 600px) {
  .mandant-raster { grid-template-columns: 1fr; }
  .mandant-raster .span-4, .mandant-raster .span-3, .mandant-raster .span-2,
  .mandant-raster .span-1, .mandant-raster .span-plz, .mandant-raster .span-ort { grid-column: 1 / -1; }
  .mandant-kopf { padding: 14px 16px; gap: 10px; }
  .mandant-block, .mandant-fuss { padding-left: 16px; padding-right: 16px; }
}

.wv-umschalter {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 20px 14px; margin: 0;
}
.wv-umschalter button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--linie-stark); border-radius: 999px;
  background: #fff; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.wv-umschalter button:hover { background: var(--blau-zart); border-color: var(--blau-hell); color: var(--blau); }
.wv-umschalter button.aktiv {
  background: var(--blau-zart); border-color: var(--blau); color: var(--blau); font-weight: 700;
}
.wv-umschalter button:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 2px; }
.wv-zahl {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4rem; height: 1.4rem; padding: 0 6px;
  border-radius: 999px; background: #eaecf0; color: var(--text);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.wv-umschalter button.aktiv .wv-zahl { background: var(--blau); color: #fff; }
@media (max-width: 430px) {
  .wv-umschalter { padding: 4px 12px 12px; }
  .wv-umschalter button { flex: 1 1 calc(50% - 6px); }
}

#teil-aufgaben #aufgaben { gap: 0; }
.wv-erinnerung-liste { display: flex; flex-direction: column; gap: 0; margin: 0 0 8px; }
.wv-gruppe { border-bottom: 1px solid var(--linie); }
.wv-gruppe:last-child { border-bottom: 0; }
.wv-gruppe-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; background: #f3f3f3; color: #6b6b6b;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.wv-gruppe-alle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--grau); cursor: pointer;
}
.wv-gruppe-alle:hover, .wv-gruppe-alle:focus-visible { color: var(--blau); background: var(--blau-zart); }
.wv-gruppe-alle:focus-visible { outline: 3px solid rgba(1, 118, 211, .45); outline-offset: 1px; }
.wv-er-pack { border-top: 1px solid #eee; }
 .wv-er-zeile {
  display: grid; overflow: visible;
  grid-template-columns: 3px 22px minmax(5.5rem, 11rem) minmax(5rem, 1fr) minmax(7rem, 1.5fr) auto;
  align-items: center; column-gap: 8px;
  min-height: 36px; padding: 0 8px 0 0;
  cursor: pointer; background: #fff; position: relative;
}
.wv-er-zeile:hover { background: #F7FBFF; }
.wv-er-zeile.offen { background: #F3F9FF; }
.wv-er-akzent { align-self: stretch; width: 3px; background: transparent; }
.wv-er-zeile.offen .wv-er-akzent { background: var(--blau); }
.wv-er-glocke { display: inline-flex; align-items: center; justify-content: center; color: var(--grau); }
.wv-er-kontakt { font-weight: 700; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wv-er-bezug { font-size: 13px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wv-er-text { font-size: 13px; color: #4a4a4a; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.wv-er-text-inner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.wv-bei-lena { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 1px 7px 1px 4px; border-radius: 999px; background: #FFF6E8; color: #7A4E14;
  font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.wv-bei-lena .lena-herz { width: 14px; height: 14px; flex: 0 0 auto; }
.wv-lena-knopf { display: inline-flex; align-items: center; gap: 6px; }
.wv-lena-knopf .lena-herz { width: 16px; height: 16px; flex: 0 0 auto; }
.uebergabe-lena-titel { display: flex; align-items: center; gap: 8px; }
.uebergabe-lena-titel .lena-herz { width: 22px; height: 22px; flex: 0 0 auto; }
.uebergabe-vorschau { display: flex; flex-direction: column; gap: 4px; padding: 0 0 8px; }
.uebergabe-vorschau .zeile { display: grid; grid-template-columns: 8.5rem 1fr; gap: 8px; align-items: start; }
.uebergabe-vorschau .bez { color: var(--grau); font-size: 12px; font-weight: 650; }
.uebergabe-vorschau .wert { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wv-er-aktionen {
  position: relative;
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  opacity: 0; pointer-events: none;
}
.wv-er-zeile:hover .wv-er-aktionen,
.wv-er-zeile:focus-within .wv-er-aktionen,
.wv-er-zeile.offen .wv-er-aktionen { opacity: 1; pointer-events: auto; }
.wv-er-uhr, .wv-er-haken, .wv-er-lena {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--grau); cursor: pointer;
}
.wv-er-uhr svg, .wv-er-haken svg {
  width: 16px; height: 16px; display: block; flex: 0 0 auto;
}
/* Herz füllt die ViewBox weniger als Uhr/Haken; optisch auf 16px-Kreis angleichen */
.wv-er-lena .lena-herz {
  width: 22px; height: 22px; display: block; flex: 0 0 auto;
}
.wv-er-uhr:hover, .wv-er-haken:hover, .wv-er-lena:hover,
.wv-er-uhr:focus-visible, .wv-er-haken:focus-visible, .wv-er-lena:focus-visible { color: var(--blau); background: var(--blau-zart); }
.wv-er-detail {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 12px 12px 33px; background: #F3F9FF;
}
.wv-er-detail[hidden] { display: none; }
.wv-er-detail .knopf-zweit { min-height: 32px; padding: 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.wv-uhr-menue {
  z-index: 10000; min-width: 200px; padding: 6px;
  background: #fff; border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: var(--schatten-hoch);
}
.wv-uhr-eintrag {
  display: block; width: 100%; margin: 0; padding: 8px 10px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.wv-uhr-eintrag:hover, .wv-uhr-eintrag:focus-visible { background: var(--blau-zart); color: var(--blau); outline: none; }
.wv-uhr-anpassen { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; align-items: center; }
.wv-uhr-anpassen input { min-height: 32px; padding: 0 8px; font: inherit; font-size: 13px; }
@media (max-width: 430px) {
  .wv-er-zeile {
    grid-template-columns: 3px 22px minmax(0, 1fr) auto;
    grid-template-areas:
      "akzent glocke kontakt aktionen"
      "akzent glocke bezug   aktionen"
      "akzent text   text    text";
    row-gap: 2px; column-gap: 8px; padding: 8px 8px 8px 0; align-items: start;
  }
  .wv-er-akzent { grid-area: akzent; }
  .wv-er-glocke { grid-area: glocke; align-self: start; margin-top: 2px; }
  .wv-er-kontakt { grid-area: kontakt; white-space: normal; }
  .wv-er-bezug { grid-area: bezug; white-space: normal; }
  .wv-er-text { grid-area: text; white-space: normal; overflow: visible; padding-bottom: 2px; }
  .wv-er-aktionen { grid-area: aktionen; opacity: 1; pointer-events: auto; align-self: start; }
  .wv-er-detail { padding-left: 16px; }
}

/* Historie: Antworten eingerückt, übernommenes Notizfeld */
.historie-liste .eintrag.historie-antwort { margin-left: 24px; border-left: 2px solid var(--linie); padding-left: 12px; }
.historie-uebernommen { margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--grau); text-transform: uppercase; letter-spacing: .04em; }
.info-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-kopf h2, .info-kopf .abschnitt { flex: 1 1 auto; margin: 0; }
.info-kopf .symbol { margin-left: auto; }
.info-kopf .karten-mehr { margin-left: auto; }
.dialog-fuss .dialog-loeschen,
.formular .knoepfe .dialog-loeschen,
.info-form-fuss .dialog-loeschen { margin-right: auto; }

/* Erwähnungen: Antworten / Erledigt */
.wv-erw-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wv-erw-antwort { margin-top: 10px; }
.wv-erw-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--grau); }
.wv-erw-erledigt-eintrag { opacity: .7; }
@media (max-width: 430px) {
  .historie-liste .eintrag.historie-antwort { margin-left: 12px; padding-left: 8px; }
}

/* Historie im Chat-Stil (Mischform) */
#historie.historie-chat,
.historie-deal.historie-chat,
.historie-dp.historie-chat {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}
.historie-chat .historie-kopf { flex: 0 0 auto; padding-bottom: 10px; }
.historie-chat.historie-ausgeblendet {
  min-height: 0 !important;
  max-height: none !important;
}
.historie-chat.historie-ausgeblendet .historie-verlauf,
.historie-chat.historie-ausgeblendet .historie-komponist,
.historie-chat.historie-ausgeblendet .historie-uebergaben-pin,
.historie-chat.historie-ausgeblendet > .meldung {
  display: none !important;
}
.historie-chat .historie-verlauf {
  flex: 1 1 auto; min-height: 200px; overflow-y: auto;
  padding: 10px 14px 16px; background: #e9edef;
}
.historie-chat .historie-liste { padding: 0 0 12px; display: flex; flex-direction: column; gap: 0; }
.historie-tag-pille {
  align-self: center; margin: 10px auto; width: fit-content; max-width: 90%;
  padding: 4px 12px; border-radius: 8px; background: #fff; color: #54656f;
  font-size: 12px; font-weight: 600; box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
}
.historie-blase-zeile { display: flex; margin: 2px 0 6px; width: 100%; }
.historie-blase-zeile.eigen { justify-content: flex-end; }
.historie-blase-zeile.fremd { justify-content: flex-start; }
.historie-blase {
  max-width: min(78%, 540px); padding: 6px 8px 4px;
  border-radius: 8px 8px 8px 2px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
  position: relative; word-wrap: break-word; overflow-wrap: anywhere;
}
.historie-blase.eigen { background: #d9fdd3; border-radius: 8px 8px 2px 8px; }
.historie-blase.fremd { background: #fff; }

/* Menschliche Notizen: zentriertes Post-it (klassisch 76×76 mm, am Schirm 272×272 px).
   Farben per PIL vom macOS-Haftnotiz-Beispiel: Füllung #FDFAD6, Rand #BEBCA0. */
.historie-blase-zeile.historie-notiz-zeile {
  justify-content: center;
  margin: 10px 0 14px;
}
.historie-notiz-zeile .historie-blase-pack {
  width: 272px;
  max-width: 272px;
  flex: 0 0 auto;
  container-type: inline-size;
}
.historie-notiz-zeile .historie-blase-pack .historie-blase,
.historie-blase.historie-notiz-zettel {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 272px;
  min-height: 100cqw;
  display: flex;
  flex-direction: column;
  background: #FDFAD6;
  background-color: #FDFAD6;
  border: 1px solid #BEBCA0;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(90, 80, 30, .12), 0 3px 8px rgba(90, 80, 30, .14);
  color: #111b21;
  padding: 12px 14px 10px;
}
.historie-blase.historie-notiz-zettel.geloescht {
  background: #F7F0C8;
  background-color: #F7F0C8;
  color: #667781;
}
/* Innere Elemente dürfen den grauen Seitenhintergrund (.inhalt = --grund #F3F3F3)
   nicht durchscheinen oder überdecken: durchgehend Haftnotiz-Gelb, auch Hover/Fokus. */
.historie-blase.historie-notiz-zettel .inhalt,
.historie-blase.historie-notiz-zettel .historie-notiz-erste,
.historie-blase.historie-notiz-zettel .historie-notiz-text,
.historie-blase.historie-notiz-zettel .historie-notiz-fuss,
.historie-blase.historie-notiz-zettel .historie-notiz-meta,
.historie-blase.historie-notiz-zettel .historie-mail-mehr,
.historie-blase.historie-notiz-zettel .historie-anhaenge,
.historie-blase.historie-notiz-zettel .historie-reaktionen,
.historie-blase.historie-notiz-zettel .historie-zitat,
.historie-blase.historie-notiz-zettel .historie-blase-kenn {
  background: transparent;
  background-color: transparent;
  box-shadow: none;
}
.historie-blase.historie-notiz-zettel .inhalt,
.historie-blase.historie-notiz-zettel .inhalt:hover,
.historie-blase.historie-notiz-zettel .inhalt:focus,
.historie-blase.historie-notiz-zettel .inhalt:focus-visible {
  flex: none;
  min-height: 0;
  border-radius: 0;
  display: block;
  background: transparent;
  background-color: transparent;
  color: #111b21;
}
.historie-blase.historie-notiz-zettel .historie-notiz-text,
.historie-blase.historie-notiz-zettel .historie-notiz-text:hover,
.historie-blase.historie-notiz-zettel .historie-notiz-text:focus,
.historie-blase.historie-notiz-zettel .historie-notiz-text:focus-visible,
.historie-blase.historie-notiz-zettel .historie-mail-mehr:hover,
.historie-blase.historie-notiz-zettel .historie-mail-mehr:focus,
.historie-blase.historie-notiz-zettel .historie-mail-mehr:focus-visible,
.historie-blase.historie-notiz-zettel .historie-notiz-fuss:hover,
.historie-blase.historie-notiz-zettel .historie-notiz-meta:hover,
.historie-blase.historie-notiz-zettel:hover,
.historie-blase.historie-notiz-zettel:focus,
.historie-blase.historie-notiz-zettel:focus-visible {
  background: transparent;
  background-color: transparent;
}
.historie-notiz-zeile .historie-blase-pack .historie-blase:hover,
.historie-notiz-zeile .historie-blase-pack .historie-blase:focus,
.historie-notiz-zeile .historie-blase-pack .historie-blase:focus-visible,
.historie-blase.historie-notiz-zettel:hover,
.historie-blase.historie-notiz-zettel:focus,
.historie-blase.historie-notiz-zettel:focus-visible {
  background: #FDFAD6;
  background-color: #FDFAD6;
}
.historie-blase.historie-notiz-zettel.geloescht:hover,
.historie-blase.historie-notiz-zettel.geloescht:focus,
.historie-blase.historie-notiz-zettel.geloescht:focus-visible {
  background: #F7F0C8;
  background-color: #F7F0C8;
}
.historie-blase-fuss.historie-notiz-fuss {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
  margin-top: auto;
  padding-right: 28px;
  background: transparent;
}
.historie-notiz-meta {
  display: block;
  width: 100%;
  font-size: 11px;
  line-height: 1.35;
  color: #6b5e2e;
  font-variant-numeric: tabular-nums;
  text-align: left;
  background: transparent;
}
.historie-notiz-loeschen {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  background-color: transparent;
  color: #EC6863;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.historie-notiz-loeschen svg { display: block; width: 22px; height: 22px; }
.historie-notiz-zeile:hover .historie-notiz-loeschen,
.historie-notiz-zeile:focus-within .historie-notiz-loeschen,
.historie-notiz-loeschen:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.historie-notiz-loeschen:hover,
.historie-notiz-loeschen:focus-visible {
  background: rgba(236, 104, 99, .12);
  outline: none;
}
.historie-notiz-zeile .historie-hover-akts {
  left: 100%;
  right: auto;
  margin: 0 0 0 6px;
  top: 4px;
}
@media (max-width: 430px) {
  .historie-notiz-zeile .historie-blase-pack {
    width: 75%;
    max-width: 75%;
  }
  .historie-notiz-zeile .historie-blase-pack .historie-blase,
  .historie-blase.historie-notiz-zettel {
    width: 100%;
    max-width: 100%;
    min-height: 272px;
    min-height: 100cqw;
    padding: 12px 12px 10px;
  }
  .historie-notiz-loeschen {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (hover: none) {
  .historie-notiz-loeschen {
    opacity: 1;
    pointer-events: auto;
  }
}

.historie-blase.geloescht { background: #eef0f2; color: #667781; }
.historie-blase-name { font-size: 12px; font-weight: 700; color: #04a784; margin: 0 0 3px; }
.historie-blase .inhalt { font-size: 14.5px; line-height: 1.4; color: #111b21; }
.historie-blase .inhalt p { margin: 0 0 4px; }
.historie-geloescht-text { font-style: italic; color: #667781; }
.historie-blase-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin-top: 2px; }
.historie-blase-meta { font-size: 11px; color: #667781; line-height: 1.2; }
.historie-blase .aktionen { margin-left: 2px; }
.historie-blase .aktionen .symbol {
  width: 26px; height: 26px; border: 0; background: transparent; color: #667781;
  border-radius: 999px; cursor: pointer;
}
.historie-blase .aktionen .symbol:hover { background: rgba(0,0,0,.06); color: var(--text); }
.historie-zitat {
  display: flex; align-items: stretch; gap: 8px;
  width: 100%; text-align: left; border: 0; cursor: pointer;
  border-left: 3px solid #06cf9c; background: rgba(0,0,0,.05);
  border-radius: 6px; padding: 4px 4px 4px 8px; margin: 0 0 6px; font: inherit;
  overflow: hidden; min-width: 0; box-sizing: border-box;
}
.historie-blase.eigen .historie-zitat { border-left-color: #25d366; }
.historie-zitat-links {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 2px 0;
}
.historie-zitat-autor { font-size: 12px; font-weight: 700; color: #04a784; }
.historie-zitat-autor.eigen { color: #04a784; }
.historie-zitat-text { font-size: 13px; color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.historie-zitat-bild {
  flex: 0 0 52px; width: 52px; height: 52px;
  border-radius: 6px; overflow: hidden;
  align-self: center; background: #d1d7db;
}
.historie-zitat-bild img {
  display: block; width: 52px; height: 52px; object-fit: cover;
}
.historie-antwort-leiste { display: flex; align-items: stretch; gap: 8px; padding: 8px 10px 0; }
.historie-antwort-leiste .historie-zitat { margin: 0; flex: 1 1 auto; cursor: default; }
.historie-antwort-weg {
  flex: 0 0 32px; width: 32px; border: 0; background: transparent; color: var(--grau);
  font-size: 20px; cursor: pointer; border-radius: 8px;
}
.historie-antwort-weg:hover { background: var(--grund); color: var(--text); }

/* E-Mail als kompakte Historie-Blase */
.historie-blase-mail { padding: 8px 10px 6px; }
.historie-blase.eigen.historie-blase-mail {
  background: #d4f8ce;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13), inset 0 0 0 1px rgba(18, 140, 70, .16);
}
.historie-mail-zeile .historie-blase-pack { max-width: min(86%, 580px); }
.historie-mail-kopf {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  column-gap: 8px; align-items: start;
  padding-right: 18px;
}
.historie-mail-ico { display: inline-flex; align-items: center; justify-content: center; color: #54656f; margin-top: 1px; }
.historie-blase.eigen .historie-mail-ico { color: #1b7a4a; }
.historie-mail-kopf-text { min-width: 0; }
.historie-mail-absender, .historie-mail-betreff, .historie-mail-titel {
  font-weight: 700; font-size: 13.5px; line-height: 1.35; color: #111b21;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.historie-mail-titel { white-space: normal; }
.historie-blase-mail.mail-offen .historie-mail-betreff { white-space: normal; }
.historie-mail-zeit { font-size: 11px; color: #667781; line-height: 1.3; padding-top: 1px; white-space: nowrap; }
.historie-mail-meta {
  margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: #54656f;
  overflow-wrap: anywhere;
}
.historie-mail-kurz { margin: 8px 0 0; }
.historie-mail-punkte {
  margin: 0; padding: 0 0 0 1.15em; font-size: 14px; line-height: 1.45; color: #111b21;
}
.historie-mail-punkte li { margin: 0 0 2px; }
.historie-mail-punkte li.historie-mail-offen { font-weight: 650; }
.historie-mail-vorschau { margin: 0; font-size: 14px; line-height: 1.4; color: #111b21; overflow-wrap: anywhere; }
.historie-mail-text {
  margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: #111b21;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.historie-mail-voll { display: none; }
.historie-blase-mail.mail-offen .historie-mail-voll { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(17, 27, 33, .08); }
.historie-mail-proto-voll { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(17, 27, 33, .08); }
.historie-mail-text.leer { color: #667781; font-style: italic; }
.historie-mail-mehr {
  display: inline-block; margin: 2px 0 0; padding: 0;
  border: 0; background: transparent; color: var(--blau, #0176D3);
  font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.historie-mail-mehr:hover, .historie-mail-mehr:focus-visible { text-decoration: underline; outline: none; }
.historie-mail-fuss {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 6px; font-size: 12px; color: #54656f;
}
.historie-mail-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.historie-mail-link { color: var(--blau, #0176D3); font-weight: 650; text-decoration: none; }
.historie-mail-link:hover, .historie-mail-link:focus-visible { text-decoration: underline; }
.historie-mail-klammer { display: inline-flex; align-items: center; gap: 3px; color: #54656f; font-weight: 650; }
@media (max-width: 430px) {
  .historie-mail-zeile .historie-blase-pack { max-width: 92%; }
  .historie-mail-absender, .historie-mail-betreff, .historie-mail-titel { white-space: normal; }
  .historie-mail-kopf { padding-right: 16px; column-gap: 6px; }
  .historie-mail-fuss { gap: 6px 10px; }
}
.historie-proto { margin: 8px 20px; }
.historie-proto-kopf {
  display: flex; align-items: flex-start; gap: 8px; width: 100%;
  border: 0; background: transparent; padding: 0; cursor: pointer;
  text-align: left; font: inherit; color: #54656f;
}
.historie-proto-ico { flex: 0 0 18px; display: inline-flex; color: #667781; margin-top: 1px; }
.historie-proto-text { flex: 1 1 auto; min-width: 0; font-size: 12.5px; line-height: 1.35; }
.historie-proto-zeit { flex: 0 0 auto; font-size: 11px; color: #8696a0; }
.historie-proto-detail {
  margin: 6px 0 0 26px; padding: 8px 10px; background: #fff;
  border-radius: 8px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
  font-size: 13px; color: var(--text);
}
.historie-hervor, .historie-blase-zeile.historie-hervor .historie-blase,
.historie-proto.historie-hervor { animation: historie-highlight 1.6s ease; }
@keyframes historie-highlight {
  0%, 25% { box-shadow: 0 0 0 3px rgba(1, 118, 211, .45); }
  100% { box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13); }
}
.historie-chat .historie-komponist {
  margin: 0; border: 0; border-top: 1px solid var(--linie); border-radius: 0;
  position: relative; background: #fff; padding: 6px 8px 8px;
  overflow: visible;
}
.historie-chat .meldung { margin: 0; padding: 4px 16px; }
.historie-chat .historie-pill-zeile {
  display: flex; align-items: flex-end; gap: 6px;
}
.historie-chat .historie-plus,
.historie-chat .historie-senden,
.historie-chat .historie-pill-ico {
  flex: 0 0 36px; width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent;
  color: #54656f; cursor: pointer;
}
.historie-chat .historie-plus:hover { background: #e9edef; color: var(--text); }
.historie-chat .historie-senden {
  background: var(--blau); color: #fff;
}
.historie-chat .historie-senden:hover, .historie-chat .historie-senden:focus-visible {
  background: var(--blau-dunkel, #014a8a);
}
.historie-chat .historie-senden:disabled {
  background: #d1d7db; color: #fff; cursor: default; opacity: 1;
}
.historie-chat .historie-pill {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: flex-end;
  background: #f0f2f5; border-radius: 22px;
  padding: 4px 4px 4px 14px; min-height: 36px; gap: 2px;
}
.historie-chat .historie-pill .historie-mini-wrap {
  position: relative; flex: 0 0 32px; width: 32px;
  align-self: flex-end; margin-bottom: 0;
}
.historie-chat .historie-pill .historie-pill-emoji {
  flex: 0 0 32px; width: 32px; height: 32px;
  color: #1f2c33;
}
.historie-chat .historie-pill .historie-pill-emoji:hover,
.historie-chat .historie-pill .historie-pill-emoji:focus-visible {
  background: #e4e6e9; color: #111b21;
}
.historie-chat .historie-pill .historie-pill-emoji svg {
  width: 22px; height: 22px; display: block;
}
.historie-chat .historie-editor {
  flex: 1 1 auto; min-width: 0;
  min-height: 22px; max-height: calc(1.45em * 6);
  overflow-y: auto; padding: 5px 0;
  font: inherit; font-size: 15px; line-height: 1.45;
  color: var(--text); outline: none; background: transparent;
}
.historie-chat .historie-editor[data-leer="ja"]:before { color: #667781; }
.historie-chat .historie-mentions {
  position: absolute; left: 48px; right: 48px; bottom: calc(100% - 2px);
  margin: 0; z-index: 12;
}
.historie-chat .historie-mini-wrap { position: relative; flex: 0 0 36px; }
.historie-chat .historie-emoji-menue {
  top: auto; bottom: calc(100% + 6px); left: auto; right: 0;
}
.historie-chat .historie-antwort-leiste,
.historie-chat .historie-bearbeiten-leiste {
  display: flex; align-items: stretch; gap: 8px; padding: 2px 4px 6px 44px;
}
.historie-chat .historie-antwort-leiste[hidden],
.historie-chat .historie-bearbeiten-leiste[hidden] { display: none; }
.historie-chat .historie-bearbeiten-hinweis {
  flex: 1 1 auto; font-size: 13px; font-weight: 700; color: var(--blau);
  padding: 6px 8px; border-left: 3px solid var(--blau);
  background: var(--blau-zart, #eef6fc); border-radius: 4px;
}
.historie-chat .historie-bezug { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.angebot-dialog-kopf .symbol {
  background: none; border: 0; color: #fff; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 6px; font-size: 18px; line-height: 1;
}
.angebot-dialog-kopf .symbol:hover { background: rgba(255,255,255,.12); }
.aufgabe-kopf .info-kopf { padding-right: 0; align-items: center; }

.historie-blase-pack { position: relative; width: fit-content; max-width: min(78%, 540px); }
.historie-blase-pack .historie-blase { max-width: 100%; }
.historie-hover-akts {
  position: absolute; top: 4px; display: flex; gap: 4px;
  opacity: 0; pointer-events: none; z-index: 5;
}
.historie-blase-zeile.fremd .historie-hover-akts { left: 100%; margin-left: 6px; }
.historie-blase-zeile.eigen .historie-hover-akts { right: 100%; left: auto; margin-right: 6px; }
@media (hover: hover) and (pointer: fine) {
  .historie-blase-zeile:hover .historie-hover-akts,
  .historie-blase-zeile:focus-within .historie-hover-akts,
  .historie-blase-zeile.historie-akts-offen .historie-hover-akts {
    opacity: 1; pointer-events: auto;
  }
}
.historie-blase-zeile.historie-akts-offen .historie-hover-akts {
  opacity: 1; pointer-events: auto;
}
.historie-hover-knopf {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px;
  background: #fff; color: #54656f; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(11, 20, 26, .18), 0 1px 1px rgba(11, 20, 26, .08);
}
.historie-hover-knopf:hover, .historie-hover-knopf:focus-visible { background: #f0f2f5; color: var(--text); }
.historie-reaktionsleiste {
  position: fixed; z-index: 10050; display: flex; align-items: center; gap: 2px;
  padding: 4px 6px; background: #fff; border-radius: 999px;
  box-shadow: 0 2px 12px rgba(11, 20, 26, .18);
}
.historie-reaktionswahl {
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; font-size: 22px; line-height: 1;
}
.historie-reaktionswahl:hover, .historie-reaktionswahl:focus-visible { background: #f0f2f5; }
.historie-reaktionswahl.ich { background: #e7fce3; }
.historie-reaktionen { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.historie-reaktionen[hidden] { display: none; }
.historie-reaktion {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #e9edef; background: #fff; border-radius: 999px;
  padding: 1px 7px 1px 5px; font: inherit; font-size: 13px; line-height: 1.3;
  color: #111b21; cursor: pointer;
}
.historie-reaktion:hover, .historie-reaktion:focus-visible { border-color: #cfd4d8; background: #f7f8f9; }
.historie-reaktion.ich { background: #e7fce3; border-color: #b6e3b0; }
.historie-reaktion-emoji { font-size: 14px; line-height: 1; }
.historie-reaktion-zahl { font-size: 12px; font-weight: 600; color: #54656f; }
.historie-blase-zeile { touch-action: pan-y; transition: transform .15s ease; }
@media (max-width: 430px) {
  .historie-blase-pack { max-width: 88%; }
  .historie-hover-akts { display: none; }
  .historie-blase-zeile.historie-akts-offen .historie-hover-akts { display: flex; }
}

@media (max-width: 430px) {
  #historie.historie-chat, .historie-deal.historie-chat, .historie-dp.historie-chat {
    min-height: 360px; max-height: calc(100dvh - 7.5rem);
  }
  .historie-blase { max-width: 88%; }
  .historie-proto { margin: 8px 4px; }
  .historie-kopf { gap: 8px; flex-wrap: nowrap; }
  .historie-filter-menue { min-width: 0; width: max-content; max-width: calc(100vw - 16px); }
  .historie-chat .historie-komponist {
    position: sticky; bottom: 0; z-index: 3; background: #fff;
  }
}

.historie-blase { padding-right: 22px; }
.historie-blasen-chevron {
  position: absolute; top: 2px; right: 1px;
  width: 22px; height: 18px; padding: 0; border: 0;
  background: transparent; color: #54656f; opacity: 0;
  pointer-events: none; cursor: pointer; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
@media (hover: hover) and (pointer: fine) {
  .historie-blase-zeile:hover .historie-blasen-chevron,
  .historie-blase-zeile:focus-within .historie-blasen-chevron,
  .historie-blase-zeile.historie-akts-offen .historie-blasen-chevron {
    opacity: .65; pointer-events: auto;
  }
}
.historie-blase-zeile.historie-akts-offen .historie-blasen-chevron,
.historie-blasen-chevron:focus-visible {
  opacity: .8; pointer-events: auto;
}
.historie-blasen-chevron:hover { background: rgba(0,0,0,.06); color: #111b21; opacity: 1; }
.historie-blasen-menue {
  position: fixed; z-index: 80; width: 260px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(11, 20, 26, .24);
  padding: 6px 0; overflow: hidden;
}
.historie-blasen-menue-eintrag {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: 0; background: transparent;
  padding: 10px 16px; font: inherit; font-size: 15px; color: #111b21;
  text-align: left; cursor: pointer;
}
.historie-blasen-menue-eintrag:hover, .historie-blasen-menue-eintrag:focus-visible { background: #f5f6f6; }
.historie-blasen-menue-ico {
  flex: 0 0 22px; width: 22px; height: 22px; color: #54656f;
  display: inline-flex; align-items: center; justify-content: center;
}
.historie-blasen-menue-eintrag.zerstoerend { color: #ea0038; }
.historie-blasen-menue-eintrag.zerstoerend .historie-blasen-menue-ico { color: #ea0038; }
.historie-blasen-menue-trenn { height: 1px; background: #e9edef; margin: 6px 0; }
.historie-blase-kenn { display: inline-flex; align-items: center; gap: 2px; margin-right: auto; color: #667781; }
.historie-blase-kenn svg { width: 12px; height: 12px; display: block; }
.historie-blase-stern { color: #e6b422; }
.historie-fixiert {
  position: sticky; top: 0; z-index: 4;
  background: #efeae2; padding: 6px 8px 8px;
  border-bottom: 1px solid rgba(11, 20, 26, .08);
  margin: 0 -4px 6px;
}
.historie-fixiert-kopf {
  font-size: 12px; font-weight: 700; color: #54656f;
  padding: 2px 8px 6px;
}
.historie-wl-auswahl { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 12px; }
.historie-wl-wahl { width: 100%; }
.historie-wl-suche {
  width: 100%; margin: 0 0 8px; padding: 8px 10px;
  border: 1px solid var(--rand, #d1d7db); border-radius: 8px; font: inherit;
}
.historie-wl-liste { max-height: 280px; overflow: auto; display: flex; flex-direction: column; }
.historie-wl-person {
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 8px; font: inherit; cursor: pointer; border-radius: 8px;
}
.historie-wl-person:hover { background: #f5f6f6; }
.historie-info-liste { display: grid; grid-template-columns: 8.5rem 1fr; gap: 6px 12px; margin: 0 0 12px; }
.historie-info-liste dt { color: #54656f; font-weight: 600; }
.historie-info-liste dd { margin: 0; white-space: pre-wrap; }
@media (max-width: 430px) {
  .historie-fixiert { margin: 0; }
  .historie-info-liste { grid-template-columns: 1fr; }
}

.historie-zuordnungs-chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin: 6px 12px 0; padding: 4px 10px; border: 0; border-radius: 999px;
  background: #e9edef; color: #111b21; font: inherit; font-size: 12.5px; font-weight: 600;
  max-width: calc(100% - 24px);
}
.historie-zuordnungs-chip[hidden] { display: none !important; }
.historie-zuordnungs-chip:disabled { cursor: default; color: #3b4a54; }
.historie-zuordnungs-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historie-proto-zeile { display: flex; align-items: flex-start; gap: 4px; }
.historie-proto-zeile .historie-proto-kopf { flex: 1 1 auto; }
.historie-proto-antwort {
  flex: 0 0 28px; width: 28px; height: 28px; margin-top: -2px;
  border: 0; background: transparent; color: #667781; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.historie-proto-antwort:hover, .historie-proto-antwort:focus-visible { background: rgba(0,0,0,.06); color: #111b21; }

.historie-plus-raster {
  position: fixed; z-index: 80; width: 280px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px;
  background: #fff; border-radius: 16px; padding: 14px 10px 12px;
  box-shadow: 0 4px 16px rgba(11, 20, 26, .24);
}
.historie-plus-kachel {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: inherit; font-size: 12px; color: #111b21;
}
.historie-plus-kreis {
  width: 52px; height: 52px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(11,20,26,.18);
}
.historie-plus-kachel-text { font-weight: 600; color: #54656f; }
.historie-zuordnungs-chip:not(:disabled) { cursor: pointer; }
.historie-zuordnungs-chip:not(:disabled):hover { background: #dfe3e6; }
.historie-anhaenge-leiste {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px 0;
}
.historie-anhaenge-leiste[hidden] { display: none !important; }
.historie-anhang-vorschau, .historie-anhang-kachel {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-width: 120px; max-width: 180px; padding: 8px 10px; border-radius: 10px;
  background: #f0f2f5; color: inherit; text-decoration: none; font: inherit;
}
.historie-anhang-vorschau.bild, .historie-anhang-bild {
  padding: 0; min-width: 0; background: transparent; overflow: hidden; border-radius: 10px;
}
.historie-anhang-vorschau img, .historie-anhang-bild img {
  display: block; max-width: 180px; max-height: 140px; object-fit: cover;
}
.historie-anhang-name { font-size: 13px; font-weight: 600; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historie-anhang-groesse { font-size: 11px; color: #667781; }
.historie-anhang-weg {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border: 0; border-radius: 999px; background: #111b21; color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
.historie-anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; width: 100%; }
.historie-anhaenge .historie-pdf-karte { flex: 1 1 100%; width: 100%; max-width: 100%; }
.historie-pdf-karte {
  display: block; text-decoration: none; color: inherit; font: inherit;
  border-radius: 10px; overflow: hidden; background: #f0f2f5;
  box-sizing: border-box;
}
.historie-blase.eigen .historie-pdf-karte { background: rgba(0, 0, 0, .08); }
.historie-blase.fremd .historie-pdf-karte { background: #f0f2f5; }
.historie-pdf-bild {
  display: block; width: 100%; aspect-ratio: 2 / 1;
  background: #e4e6e9; overflow: hidden;
}
.historie-pdf-bild img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}
.historie-pdf-fuss {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px 9px;
}
.historie-pdf-ico { flex: 0 0 26px; width: 26px; height: 32px; display: flex; color: #E53935; }
.historie-pdf-ico svg { display: block; width: 26px; height: 32px; }
.historie-pdf-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
.historie-pdf-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: break-word;
  font-size: 13.5px; font-weight: 600; line-height: 1.25; color: #111b21;
}
.historie-pdf-meta { font-size: 12px; line-height: 1.25; color: #667781; }
.historie-anhang-vorschau.historie-pdf-vorschau {
  min-width: min(100%, 280px); max-width: min(100%, 360px); padding: 0; background: transparent;
}
.historie-anhang-vorschau.historie-pdf-vorschau .historie-pdf-karte { background: #f0f2f5; }
@media (max-width: 430px) {
  .historie-pdf-name { font-size: 13px; }
  .historie-pdf-meta { font-size: 11.5px; }
  .historie-anhang-vorschau.historie-pdf-vorschau { max-width: 100%; min-width: 0; width: 100%; }
}
.historie-formatleiste {
  position: fixed; z-index: 85; display: flex; gap: 2px; padding: 4px;
  background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(11,20,26,.2);
}
.historie-formatleiste[hidden] { display: none !important; }
.historie-format-knopf {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #111b21; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700;
}
.historie-format-knopf:hover, .historie-format-knopf:focus-visible { background: #f0f2f5; }
.historie-chat .historie-komponist.ablage { outline: 2px dashed var(--blau, #0b6e4f); outline-offset: -2px; background: #f3faf6; }
@media (max-width: 430px) {
  .historie-plus-raster { width: min(280px, calc(100vw - 16px)); }
  .historie-anhang-vorschau img, .historie-anhang-bild img { max-width: 140px; }
}


/* Beteiligte: Dialog und Autocomplete (Kontakt / Benutzer) */
.beteiligte-dialog { width: min(520px, calc(100vw - 24px)); }
.beteiligte-raster { grid-template-columns: 1fr; }
@media (min-width: 431px) {
  .beteiligte-dialog { overflow: visible; }
  .beteiligte-dialog .dialog-form { overflow: visible; max-height: none; }
  .beteiligte-raster { overflow: visible; }
}
.beteiligte-suche-feld { display: flex; flex-direction: column; gap: 6px; }
.beteiligte-suche-feld > label { display: block; font-size: 12px; font-weight: 600; color: var(--grau); }
.pflicht-stern { color: #c23934; }
.beteiligte-suche-box { position: relative; }
.beteiligte-suche-box input[type=search] { height: 40px; padding: 0 12px; font-size: 14px; width: 100%; }
.beteiligte-vorschlaege {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20;
  margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 12px 28px -8px rgba(20, 40, 56, .28);
  max-height: min(320px, 45vh); overflow-y: auto;
}
.beteiligte-vorschlag {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 14px; color: var(--text);
}
.beteiligte-vorschlag:hover, .beteiligte-vorschlag.aktiv { background: #f0f6fb; }
.beteiligte-vorschlag.schon { opacity: .65; }
.beteiligte-vorschlag.anlegen { font-weight: 600; color: var(--blau); align-items: center; }
.beteiligte-plus { font-size: 18px; font-weight: 700; width: 18px; text-align: center; line-height: 1; }
.beteiligte-ico { flex: 0 0 18px; color: var(--grau); margin-top: 2px; }
.beteiligte-ico svg { display: block; }
.beteiligte-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.beteiligte-name { font-weight: 600; }
.beteiligte-unter { font-size: 12px; font-weight: 400; color: var(--grau); }
.beteiligte-dialog .dialog-fuss { flex-wrap: wrap; }
@media (max-width: 430px) {
  .beteiligte-dialog { width: calc(100vw - 16px); height: fit-content; max-height: 100vh; max-height: 100dvh; max-height: var(--dialog-max-h, 100vh); overflow: hidden; }
  .beteiligte-dialog .dialog-form { overflow: hidden !important; max-height: 100% !important; }
  .beteiligte-raster { overflow-y: auto !important; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .beteiligte-dialog .dialog-fuss { flex-direction: column-reverse; align-items: stretch; position: sticky; bottom: 0; }
  .beteiligte-dialog .dialog-fuss .knopf,
  .beteiligte-dialog .dialog-fuss .knopf-zweit { width: 100%; justify-content: center; min-height: 44px; }
  .beteiligte-vorschlaege {
    position: static; max-height: min(240px, 36vh);
    box-shadow: none; margin-top: 6px;
  }
}

.deal-beteiligt { position: relative; }
.deal-beteiligt-text { flex: 1; min-width: 0; }
.deal-beteiligt-firma { font-size: 12px; color: var(--grau); margin-top: 2px; }
.beteiligte-mehr {
  margin-left: auto; flex: 0 0 auto; align-self: center;
}

/* Drei-Punkte in Listen/Tabellen: nur bei Zeilen-Hover, Fokus oder offenem Menü */
.tabelle tbody tr button.symbol,
.deal-angebot-zeile button.symbol,
.aufgabe-zeile button.symbol {
  opacity: 0;
  transition: opacity .12s ease;
}
.tabelle tbody tr:hover button.symbol,
.tabelle tbody tr:focus-within button.symbol,
.tabelle tbody tr button.symbol:focus,
.tabelle tbody tr button.symbol:focus-visible,
.tabelle tbody tr button.symbol[aria-expanded="true"],
.deal-angebot-zeile:hover button.symbol,
.deal-angebot-zeile:focus-within button.symbol,
.deal-angebot-zeile button.symbol:focus,
.deal-angebot-zeile button.symbol:focus-visible,
.deal-angebot-zeile button.symbol[aria-expanded="true"],
.aufgabe-zeile:hover button.symbol,
.aufgabe-zeile:focus-within button.symbol,
.aufgabe-zeile button.symbol:focus,
.aufgabe-zeile button.symbol:focus-visible,
.aufgabe-zeile button.symbol[aria-expanded="true"] {
  opacity: 1;
}
@media (hover: none) {
  .tabelle tbody tr button.symbol,
  .deal-angebot-zeile button.symbol,
  .aufgabe-zeile button.symbol {
    opacity: 1;
  }
}

/* Dezente Drei-Punkte in Stammdaten-Kopfkarten */
button.karten-mehr {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--grau);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, background .12s ease, color .12s ease;
}
.punkte-host:hover button.karten-mehr,
.punkte-host:focus-within button.karten-mehr,
tbody tr:hover button.karten-mehr,
tbody tr:focus-within button.karten-mehr,
.deal-angebot-zeile:hover button.karten-mehr,
.deal-angebot-zeile:focus-within button.karten-mehr,
.aufgaben-kopf:hover button.karten-mehr,
.aufgaben-kopf:focus-within button.karten-mehr,
.aufgabe-kopf:hover button.karten-mehr,
.aufgabe-kopf:focus-within button.karten-mehr,
.aufgabe-zeile:hover button.karten-mehr,
.aufgabe-zeile:focus-within button.karten-mehr,
.deal-beteiligt:hover button.karten-mehr,
.deal-beteiligt:focus-within button.karten-mehr,
.whatsup-karte:hover button.karten-mehr,
.whatsup-karte:focus-within button.karten-mehr,
button.karten-mehr:focus,
button.karten-mehr:focus-visible,
button.karten-mehr[aria-expanded="true"] {
  opacity: 1;
}
button.karten-mehr:hover,
button.karten-mehr:focus-visible,
button.karten-mehr[aria-expanded="true"] {
  background: #F3F3F3;
  color: var(--text);
}
button.karten-mehr:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
}
@media (hover: none) {
  button.karten-mehr { opacity: 1; width: 44px; height: 44px; }
}
@media (max-width: 900px) {
  button.karten-mehr { width: 44px; height: 44px; }
}

/* Floating Action Button (wie DP): Neuanlage auf Listen */
.fab-host {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  width: 100dvw; height: 100dvh;
  pointer-events: none;
  z-index: 200;
}
.fab {
  position: absolute;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 1;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e5533d;
  color: #fff;
  box-shadow: 0 6px 16px rgba(32, 16, 12, .28), 0 2px 4px rgba(32, 16, 12, .16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.fab::before, .fab::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  pointer-events: none;
}
.fab::before { width: 20px; height: 3px; }
.fab::after { width: 3px; height: 20px; }
.fab svg, .fab svg * { display: none; pointer-events: none; }
@media (hover: hover) {
  .fab:hover { background: #d24733; }
}
.fab:active { background: #c43f2d; }
.fab:focus-visible { outline: 3px solid #032D60; outline-offset: 3px; }
html.dialog-offen .fab-host,
body.dialog-offen .fab-host,
body:has(dialog[open]) .fab-host,
body:has(#neu-formular:not([hidden])) .fab-host { display: none !important; }
body.hat-fab main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) {
  body.hat-fab main,
  body.hat-fab main.projektseite { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .fab {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}


@media (max-width: 900px) {
  .leiste { background: #2D3E50; z-index: 80; }
  .symbol { width: 44px; height: 44px; }
  .mandantwahl, .mandant-chip { width: 44px; height: 44px; flex: 0 0 44px; }
  .mandant-knopf, .mandant-kreis, .avatar { width: 44px; height: 44px; flex: 0 0 44px; }
  .wv-er-uhr, .wv-er-haken, .wv-er-lena { width: 44px; height: 44px; }
  .suche-lupe { width: 44px; height: 44px; }
}

/* Benutzerverwaltung in den Einstellungen */
.benutzer-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.benutzer-kopf .abschnitt { margin: 0; }
.benutzer-karte { padding: 0; overflow: auto; }
.benutzer-tabelle { width: 100%; }
.benutzer-tabelle th { position: sticky; top: 0; }
.benutzer-tabelle th:last-child, .benutzer-tabelle td.benutzer-aktionen { width: 56px; text-align: right; padding-right: 12px; }
.benutzer-tabelle tr.inaktiv td { color: #8A96A3; }
.benutzer-tabelle tr.inaktiv td:first-child { color: #8B0E1A; }
.badge-aktiv, .badge-inaktiv { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px; }
.badge-aktiv { background: #E6F4EA; color: #2E844A; }
.badge-inaktiv { background: #F9E6E8; color: #8B0E1A; }
.benutzer-dialog { width: min(640px, calc(100vw - 24px)); max-height: min(92vh, 100dvh); }
.benutzer-dialog .dialog-form { flex: 1 1 auto; min-height: 0; max-height: min(92vh, 100dvh); }
.benutzer-dialog .dialog-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.benutzer-dialog .dialog-raster label, .benutzer-dialog .recht-gruppe { grid-column: span 1; }
.benutzer-dialog .dialog-raster label:has(input[type="email"]),
.benutzer-dialog .dialog-raster .recht-gruppe { grid-column: 1 / -1; }
.recht-gruppe { margin: 0; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; }
.recht-gruppe legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--grau); padding: 0 4px; }
.recht-gruppe.aus { opacity: .55; }
.recht-wahl, .recht-haken { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.recht-admin-hinweis { margin: 0; grid-column: 1 / -1; }
.passwort-link-feld { width: 100%; font-size: 13px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; margin: 8px 0 12px; }
@media (max-width: 640px) {
  .benutzer-dialog .dialog-raster { grid-template-columns: 1fr; }
  .benutzer-tabelle { font-size: 13px; }
  .benutzer-tabelle th, .benutzer-tabelle td { padding: 10px 12px; }
}


/* ---------- Letztstand-Karte (Projekt- und Deal-Übersicht) ---------- */
.letztstand-karte {
  border-left: 3px solid var(--blau);
}
.letztstand-kopf {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--linie);
}
.letztstand-titel {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--blau);
}
.letztstand-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--grau);
}
.letztstand-koerper { padding: 12px 20px 16px; }
.letztstand-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.letztstand-karte.offen .letztstand-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.letztstand-aktionen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  min-height: 32px;
}
.letztstand-mehr, .letztstand-zur {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blau);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
}
.letztstand-mehr:hover, .letztstand-zur:hover { text-decoration: underline; }
.letztstand-mehr:focus-visible, .letztstand-zur:focus-visible {
  outline: 2px solid var(--blau);
  outline-offset: 2px;
  border-radius: 4px;
}
.letztstand-block { margin: 0 0 14px; }
.letztstand-block:last-of-type { margin-bottom: 0; }
.letztstand-label {
  margin: 0 0 4px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1.35;
}
.letztstand-status {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
.letztstand-absatz {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.letztstand-punkte {
  margin: 6px 0 0;
  padding: 0 0 0 1.2em;
  list-style: disc;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.letztstand-punkte li {
  margin: 0 0 3px;
  padding: 0;
  overflow-wrap: anywhere;
}
.letztstand-punkte li:last-child { margin-bottom: 0; }
.letztstand-karte:not(.offen) .letztstand-block:nth-child(n+3) { display: none; }
.letztstand-risiko,
.letztstand-risiko .letztstand-label,
.letztstand-risiko .letztstand-absatz,
.letztstand-risiko .letztstand-punkte { color: var(--warn); }
.letztstand-frist-dringend {
  color: var(--rot);
  font-weight: 700;
}

@media (max-width: 900px), (hover: none) {
  .letztstand-mehr, .letztstand-zur { min-height: 44px; }
  .letztstand-kopf { padding: 14px 16px 10px; }
  .letztstand-koerper { padding: 12px 16px 14px; }
}


/* ---------- Dashboard ---------- */
a.menue-start {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  margin: -2px -4px;
  padding: 2px 4px;
  cursor: pointer;
}
a.menue-start:hover,
a.menue-start:focus-visible {
  background: var(--menue-hover);
  outline: none;
}
a.menue-start:focus-visible {
  box-shadow: 0 0 0 2px var(--menue-linie, rgba(24,24,24,.35));
}
@media (min-width: 901px) {
  header.leiste #menue-knopf { display: none; }
  .menue.zu a.menue-start { pointer-events: none; }
}
@media (max-width: 900px) {
  .menue { z-index: 90; }
  .menue.zu ~ .schleier { z-index: 85; }
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  padding: 0 0 28px;
  min-width: 0;
}
.dashboard-spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-karte { overflow: hidden; }
.dash-karten-inhalt { padding: 0 0 8px; min-width: 0; }
.dash-gruppe + .dash-gruppe { border-top: 1px solid var(--linie); }
.dash-gruppe-titel {
  margin: 0;
  padding: 12px 20px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--grau);
}
.dash-liste { min-width: 0; }
.dash-zeile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px 20px;
  border-top: 1px solid var(--linie);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.dash-zeile-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 12px 8px 10px;
  border-top: 1px solid var(--linie);
  min-width: 0;
}
.dash-liste > .dash-zeile:first-child,
.dash-liste > .dash-zeile-box:first-child { border-top: 0; }
.dash-zeile-box .dash-zeile {
  flex: 1;
  min-width: 0;
  padding: 2px 8px 2px 0;
  border: 0;
}
.dash-zeile-box .wv-er-haken { flex: 0 0 auto; margin-top: 2px; }
a.dash-zeile:hover, a.dash-zeile:focus-visible { background: #f9fbfc; outline: none; }
.dash-zeile-box:hover { background: #f9fbfc; }
.dash-zeile.dringend { box-shadow: inset 3px 0 0 var(--rot); }
.dash-zeile-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--grau); }
.dash-titel {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dash-zeile-vorgang .dash-zeile-kopf {
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px 12px;
  font-size: 14px;
  color: var(--text);
}
.dash-zeile-vorgang .dash-titel {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.dash-zeile-text {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dash-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--grau);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dash-zeit { font-weight: 600; color: var(--text); margin-left: auto; white-space: nowrap; }
.dash-zeit.dringend, .dash-zeile.dringend .dash-zeile-text { color: var(--rot); }
.dash-summe, .dash-mehr {
  margin: 8px 20px 10px;
  font-size: 12px;
  color: var(--grau);
}
.dash-karte > .kopf { padding-bottom: 12px; }
.dash-karte-lena { grid-column: 1 / -1; }
.dash-karte-lena > .kopf { gap: 10px; }
.dash-karte-lena .dash-karte-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
}
.dash-karte-lena .dash-karte-ico svg { display: block; width: 32px; height: 32px; }
@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
  .dash-karte-lena { grid-column: 1; }
}


/* ---------- Historie: schnelle Suche ---------- */
.historie-suche {
  padding: 0 16px 10px 20px;
  border-bottom: 1px solid var(--linie);
}
.historie-suche[hidden] { display: none !important; }
.historie-suche-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.historie-suche-feld {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 10px;
}
.historie-suche-feld:focus-within {
  border-color: var(--blau);
  box-shadow: var(--ring);
}
.historie-suche-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--grau);
  flex: 0 0 auto;
  line-height: 0;
}
.historie-suche-ico svg { width: 16px; height: 16px; display: block; }
.historie-suche-feld input:not([type=checkbox]):not([type=radio]),
.historie-suche-feld input:not([type=checkbox]):not([type=radio]):focus,
.historie-suche-feld input:not([type=checkbox]):not([type=radio]):focus-visible {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font: inherit;
  font-size: 14px;
  line-height: 38px;
  color: var(--text);
}
.historie-suche-feld input[type="search"]::-webkit-search-decoration,
.historie-suche-feld input[type="search"]::-webkit-search-cancel-button,
.historie-suche-feld input[type="search"]::-webkit-search-results-button,
.historie-suche-feld input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.historie-suche-nav { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.historie-suche-nav .historie-werk {
  width: 40px;
  height: 40px;
}
.historie-suche-zaehler {
  min-width: 4.5em;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--grau);
  white-space: nowrap;
  padding: 0 4px;
}
.historie-suche-sprung:disabled { opacity: .38; cursor: default; }
.historie-suche-filter { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.historie-suche-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.historie-suche-chip {
  appearance: none;
  margin: 0;
  padding: 4px 10px;
  min-height: 28px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.historie-suche-chip:hover, .historie-suche-chip:focus-visible { border-color: var(--blau-hell); color: var(--blau); outline: none; }
.historie-suche-chip.aktiv, .historie-suche-chip[aria-pressed="true"] {
  background: var(--blau-zart);
  border-color: var(--blau);
  color: var(--blau-dunkel);
}
mark.historie-treffer {
  background: #FFE58F;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
mark.historie-treffer-aktiv { background: #FFD24D; box-shadow: 0 0 0 1px rgba(186, 130, 0, .35); }
.historie-suche-treffer { box-shadow: inset 3px 0 0 #E6A817; }
.historie-blase-zeile.historie-suche-aktuell .historie-blase,
.historie-proto.historie-suche-aktuell,
.historie-suche-aktuell {
  outline: 2px solid #E6A817;
  outline-offset: 2px;
}
.historie-werk.historie-suche-knopf.aktiv,
.historie-werk.historie-suche-knopf[aria-expanded="true"] { background: var(--blau-zart); color: var(--blau-dunkel); }
@media (max-width: 900px) {
  .historie-suche { padding: 0 12px 12px 12px; }
  .historie-suche-zeile { flex-wrap: wrap; }
  .historie-suche-feld { flex: 1 1 100%; width: 100%; min-height: 44px; }
  .historie-suche-feld input:not([type=checkbox]):not([type=radio]),
  .historie-suche-feld input:not([type=checkbox]):not([type=radio]):focus,
  .historie-suche-feld input:not([type=checkbox]):not([type=radio]):focus-visible {
    height: 42px;
    min-height: 42px;
    line-height: 42px;
    font-size: 16px;
  }
  .historie-suche-nav { width: 100%; justify-content: flex-end; }
  .historie-suche-nav .historie-werk,
  .historie-suche-sprung, .historie-suche-zu { width: 44px; height: 44px; }
  .historie-suche-chip { min-height: 36px; padding: 6px 12px; }
}

.historie-chat.historie-suche-offen .historie-blase-zeile,
.historie-chat.historie-suche-offen .historie-proto {
  scroll-margin-top: 210px;
}
@media (max-width: 900px) {
  .historie-chat.historie-suche-offen .historie-blase-zeile,
  .historie-chat.historie-suche-offen .historie-proto {
    scroll-margin-top: 260px;
  }
}

.personwahl-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.personwahl-unter { font-size: 12px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mail-vorb-knopf { flex: 0 0 auto; font-size: 13px; padding: 6px 12px; min-height: 32px; }
.info-kopf .mail-vorb-knopf, .deal-stamm-kopf .mail-vorb-knopf { margin-left: auto; }
.info-kopf-aktionen, .deal-stamm-aktionen { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.info-kopf-aktionen .karten-mehr, .deal-stamm-aktionen .karten-mehr { margin-left: 0; }

.mail-vorb-dialog { width: min(560px, calc(100vw - 24px)); }
.mail-vorb-dialog .personwahl-knopf { height: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.mail-vorb-anhang-titel { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mail-vorb-anhang-liste { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--linie); border-radius: var(--radius-klein); background: #fff; }
.mail-vorb-gruppe { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--grau); margin: 8px 0 4px; }
.mail-vorb-gruppe:first-child { margin-top: 0; }
.mail-vorb-anhang { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.mail-vorb-anhang input { margin-top: 3px; flex: 0 0 auto; }

@media (max-width: 720px) {
  .mail-vorb-dialog .dialog-fuss { flex-direction: column-reverse; align-items: stretch; position: sticky; bottom: 0; }
  .mail-vorb-dialog .dialog-fuss .knopf,
  .mail-vorb-dialog .dialog-fuss .knopf-zweit { width: 100%; justify-content: center; min-height: 44px; }
  .info-kopf-aktionen, .deal-stamm-aktionen { flex-wrap: wrap; justify-content: flex-end; }
}

/* Versandstatus an Rechnungsliste und -detail */
.rechnung-versendet { font-size: 11px; font-weight: 500; color: var(--grau); margin: 2px 0 0; }
.rechnung-titel-box { min-width: 0; }
.rechnung-titel-box h2 { margin: 0; }


/* Gemeinsamer Projekt-Reiter Angebote/Rechnungen (DP-Überblick) */
.belege-kopf { flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.belege-filter select {
  height: 36px; min-width: 9.5rem; padding: 0 28px 0 12px;
  border: 1px solid var(--linie-stark); border-radius: 8px;
  background: #fff url(/pfeil.svg) no-repeat right 10px center / 14px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  appearance: none; -webkit-appearance: none;
}
.belege-filter select:focus-visible { outline: none; border-color: var(--blau); box-shadow: var(--ring); }
.belege-kennzahlen { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 8px 18px; }
.belege-kennzahlen .kennzahl { align-items: flex-end; padding: 0; }
.belege-kennzahlen .kennzahl span { font-size: 16px; font-weight: 700; }
main.projektseite > #projekt-belege {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  order: -1;
  min-width: 0;
}
.tabellenrahmen:has(.belege-tabelle) { overflow-x: auto; }
.tabelle.belege-tabelle {
  width: 100%; min-width: 44rem;
  font-size: 14px; font-weight: 400;
}
.tabelle.belege-tabelle th {
  font-size: 11px; font-weight: 700;
}
.tabelle.belege-tabelle td {
  font-size: 14px; font-weight: 400; line-height: 1.35;
  vertical-align: middle; padding-top: 10px; padding-bottom: 10px;
  color: var(--text);
}
/* Nicht die globale Kopf-Klasse .titel (20px/700, display:-webkit-box) auf Tabellenzellen. */
.tabelle.belege-tabelle td.belege-titel {
  display: table-cell;
  font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.35;
  max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  -webkit-line-clamp: unset; -webkit-box-orient: initial;
  background: transparent; box-shadow: none; border-radius: 0;
  color: var(--text);
}
.tabelle.belege-tabelle td:nth-child(4) { color: var(--text); }
.tabelle.belege-tabelle th.brutto,
.tabelle.belege-tabelle td.brutto,
.tabelle.belege-tabelle th.status-zelle,
.tabelle.belege-tabelle td.status-zelle,
.tabelle.belege-tabelle th.angebot-listen-aktionen,
.tabelle.belege-tabelle td.angebot-listen-aktionen {
  position: static; right: auto; box-shadow: none; min-width: 0;
}
.tabelle.belege-tabelle tbody tr.belege-zeile td { border-left: 0; }
.tabelle.belege-tabelle tbody tr.belege-zeile td:first-child {
  border-left: 4px solid #6F9A4C;
  padding-left: 12px;
}
.tabelle.belege-tabelle tbody tr.belege-storniert td {
  text-decoration: line-through;
  color: var(--grau);
}
.tabelle.belege-tabelle tbody tr.belege-storniert td.status-zelle,
.tabelle.belege-tabelle tbody tr.belege-storniert .status-chip,
.tabelle.belege-tabelle tbody tr.belege-storniert .belege-status-zusatz,
.tabelle.belege-tabelle tbody tr.belege-storniert td.angebot-listen-aktionen,
.tabelle.belege-tabelle tbody tr.belege-storniert td.versendet,
.tabelle.belege-tabelle tbody tr.belege-storniert td.bezahlt {
  text-decoration: none;
  color: inherit;
}
.tabelle.belege-tabelle td.zahl,
.tabelle.belege-tabelle td.brutto {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  white-space: nowrap;
}
.tabelle.belege-tabelle td.zahl.negativ { color: var(--rot, #9B1C1C); }
.tabelle.belege-tabelle td.versendet { text-align: center; width: 3rem; }
.belege-versendet,
.belege-aus-dp,
.belege-bezahlt-ohne {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grau); min-width: 20px; height: 22px;
}
.belege-versendet .ico { display: block; }
.belege-aus-dp {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: var(--grau); text-transform: uppercase;
}
.belege-bezahlt-ohne { color: var(--grau); font-variant-numeric: tabular-nums; }
.belege-status { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.belege-status-zusatz {
  font-size: 11px; font-weight: 600; color: var(--grau); line-height: 1.2; text-align: center;
}
.tabelle.belege-tabelle td.bezahlt { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.tabelle.belege-tabelle tbody tr.belege-zeile { cursor: pointer; }
.belege-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 10px 16px 14px; border-top: 1px solid var(--linie);
}
.belege-pager-stand { font-size: 13px; color: var(--grau); font-variant-numeric: tabular-nums; margin: 0 6px; }
.belege-fab-menue {
  z-index: 40; min-width: 200px; padding: 6px;
  background: #fff; border: 1px solid var(--linie); border-radius: 12px;
  box-shadow: var(--schatten-hoch);
}
.belege-fab-menue button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); cursor: pointer;
}
.belege-fab-menue button:hover,
.belege-fab-menue button:focus-visible { background: #F3F3F3; }

/* Kartenraster unter der Belegliste: gleiche Abstände, gleiche Köpfe, keine leere Grauzone */
.projektseite:has(#projekt-belege:not([hidden])) {
  align-items: stretch;
  gap: 20px;
}
.projektseite:has(#projekt-belege:not([hidden])) .links,
.projektseite:has(#projekt-belege:not([hidden])) .rechts {
  gap: 20px;
}
.projektseite:has(#projekt-belege:not([hidden])) .links > .historie-deal {
  margin-top: 0;
}
.projektseite:has(#projekt-belege:not([hidden])) #historie.historie-chat,
.projektseite:has(#projekt-belege:not([hidden])) .historie-deal.historie-chat {
  min-height: 0;
  max-height: none;
}
.projektseite:has(#projekt-belege:not([hidden])) .historie-chat .historie-verlauf {
  min-height: 0;
  flex: 0 1 auto;
  max-height: min(48vh, 480px);
}
.projektseite:has(#projekt-belege:not([hidden])) .historie-chat .historie-verlauf:not(:has(.historie-liste:not(:empty))) {
  padding: 0;
  background: transparent;
}
.projektseite #historie .historie-kopf,
.projektseite #info > .info-kopf {
  box-sizing: border-box;
  min-height: 56px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--linie);
  align-items: center;
}
.projektseite #historie .historie-titel,
.projektseite #info > .info-kopf .abschnitt {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
@media (max-width: 900px) {
  .belege-kopf { align-items: stretch; }
  .belege-filter select { width: 100%; }
  .belege-kennzahlen { width: 100%; justify-content: space-between; gap: 8px 10px; }
  .belege-kennzahlen .kennzahl { align-items: flex-start; }
  .tabellenrahmen:has(.belege-tabelle) { overflow: visible; }
  .tabelle.belege-tabelle,
  .tabelle.belege-tabelle thead { min-width: 0; }
  .tabelle.belege-tabelle thead { display: none; }
  .tabelle.belege-tabelle, .tabelle.belege-tabelle tbody { display: block; width: 100%; }
  .tabelle.belege-tabelle tbody tr.belege-zeile {
    display: block;
    background: #fff;
    border: 1px solid var(--linie);
    border-radius: 12px;
    border-left: 4px solid #6F9A4C;
    margin: 0 0 10px;
    padding: 10px 12px 10px 12px;
    box-shadow: var(--schatten, 0 1px 2px rgba(20,40,56,.06));
  }
  .tabelle.belege-tabelle tbody tr.belege-zeile td {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    width: auto; padding: 4px 0; border: 0; border-left: 0 !important;
    background: transparent !important; white-space: normal;
    position: static !important;
    font-size: 14px; font-weight: 400;
  }
  .tabelle.belege-tabelle tbody tr.belege-zeile td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px; font-weight: 700; color: var(--grau);
    text-transform: uppercase; letter-spacing: .04em;
  }
  .tabelle.belege-tabelle tbody tr.belege-zeile td.belege-titel {
    display: flex;
    max-width: none; white-space: normal;
    font-size: 14px; font-weight: 500;
    text-overflow: unset; overflow: visible;
  }
  .tabelle.belege-tabelle tbody tr.belege-zeile td.versendet { justify-content: space-between; }
  .tabelle.belege-tabelle tbody tr.belege-zeile td.angebot-listen-aktionen {
    justify-content: flex-end; padding-top: 6px;
  }
  .tabelle.belege-tabelle tbody tr.belege-zeile td.angebot-listen-aktionen::before { content: none; }
  .tabelle.belege-tabelle tbody tr.belege-zeile td.status-zelle { align-items: flex-start; }
  .belege-status { align-items: flex-end; }
  .belege-pager { justify-content: center; flex-wrap: wrap; }
  .projektseite:has(#projekt-belege:not([hidden])) .historie-chat .historie-verlauf {
    max-height: min(40vh, 360px);
  }
}

.dialog-select { display: block; width: 100%; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--linie-stark, var(--linie)); border-radius: 8px; font: inherit; background: #fff; }
.dialog-select:disabled { opacity: .55; }

/* HS-35: Auftragsbedingungen kompakt + Bearbeiten-Fenster */
.ab-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 4px 0 8px; border-bottom: 1px solid var(--linie-stark); }
.ab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ab-status { font-size: 14px; font-weight: 600; color: var(--text); }
.ab-zeile[data-art="angepasst"] .ab-status { color: #8a5300; }
.ab-zeile[data-art="leer"] .ab-status { color: var(--grau); font-weight: 500; }
.ab-info { font-size: 12px; color: var(--grau); }
.ab-bearbeiten { flex: 0 0 auto; }
dialog.ab-dialog { width: min(900px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
.ab-koerper { display: flex; flex-direction: column; gap: 8px; }
.ab-hinweis { margin: 0; font-size: 12px; color: var(--grau); }
.ab-dialog .ab-eingabe { display: block; width: 100%; box-sizing: border-box; height: auto; min-height: min(62vh, 600px); padding: 10px 12px; border: 1px solid var(--linie-stark); border-radius: 6px; font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; color: var(--text); background: #fff; }
.ab-dialog .ab-eingabe:focus { outline: none; border-color: var(--blau); }
.ab-dialog .ab-eingabe[readonly] { background: #f9fbfc; }
.ab-zaehler { font-size: 12px; color: var(--grau); text-align: right; }
.ab-zaehler.voll { color: #b3261e; font-weight: 600; }
.ab-dialog .ab-zuruecksetzen { margin-right: auto; }
@media (max-width: 600px) {
  dialog.ab-dialog, dialog.ab-dialog[open] { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; margin: 0; border-radius: 0; display: flex; flex-direction: column; }
  .ab-dialog .angebot-dialog-kopf, .ab-dialog .angebot-dialog-fuss { border-radius: 0; }
  .ab-dialog .angebot-dialog-koerper { flex: 1 1 auto; min-height: 0; }
  .ab-dialog .ab-eingabe { flex: 1 1 auto; min-height: 0; font-size: 16px; resize: none; }
  .ab-dialog .ab-zuruecksetzen { flex: 1 1 100%; margin-right: 0; }
  .ab-info-pdf { display: none; }
  .ab-status { font-size: 13px; }
}

/* HS-38: Beleg-Dialoge (Rechnung/Angebot) – Abschnitte, niedrigere Felder, Weitere Angaben, Fußleiste */
.angebot-dialog-koerper.beleg-koerper { display: flex; flex-direction: column; gap: 0; }
.beleg-abschnitt { padding: 10px 0 12px; border-top: 1px solid var(--linie); }
.beleg-abschnitt:first-child { border-top: 0; padding-top: 0; }
.beleg-abschnitt-titel { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); }
.beleg-meta.fliess, .beleg-meta { margin: 0 0 8px; padding: 0; font-size: 12px; color: var(--grau); }
.beleg-abschnitt .angebot-raster { gap: 8px 20px; }
.beleg-abschnitt .angebot-feld { gap: 2px; }
.beleg-abschnitt .angebot-feld input, .beleg-abschnitt .angebot-feld select { height: 30px; }
.beleg-abschnitt .angebot-feld textarea { padding: 4px 0; }
.beleg-textkarte + .beleg-textkarte, .beleg-textkarte + .ab-feld { margin-top: 6px; }
.beleg-abschnitt .ab-zeile { min-height: 34px; padding: 2px 0 6px; }
.beleg-textvorschau { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.beleg-textvorschau.leer { color: var(--grau); }
.beleg-text-dialog .rte-editor { min-height: min(55vh, 520px); }
.beleg-rabatt-zeile .link { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--blau); cursor: pointer; }
.beleg-rabatt-zeile .link:hover { text-decoration: underline; }
.beleg-rabatt-zeile .link:disabled { color: var(--grau); cursor: default; text-decoration: none; }
.beleg-weitere-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); cursor: pointer; }
.beleg-weitere-knopf:hover { color: var(--blau); }
.beleg-weitere-pfeil { width: 10px; }
.beleg-weitere-zahl { font-weight: 500; letter-spacing: 0; text-transform: none; }
.beleg-weitere-zahl::before { content: '·'; margin-right: 6px; }
.beleg-weitere-liste { display: flex; flex-direction: column; }
.beleg-weitere-zeile { display: flex; gap: 12px; align-items: baseline; width: 100%; padding: 5px 0; border: 0; border-bottom: 1px solid var(--linie); background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text); }
.beleg-weitere-zeile:hover { background: #f6f9fc; }
.beleg-weitere-name { flex: 0 0 170px; font-size: 12px; font-weight: 600; color: var(--grau); }
.beleg-weitere-wert { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beleg-zeitraum { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.beleg-skonto-reihe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.beleg-abschnitt .beleg-skonto-reihe input { width: 70px; height: 30px; }
.beleg-skonto-satz { margin: 4px 0 0; font-size: 12px; color: var(--grau); }
.beleg-vorschlag { font-style: normal; font-weight: 500; color: #8a5300; margin-left: 4px; }
.beleg-fuss .beleg-mehr { margin-right: auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--linie); border-radius: 6px; background: #fff; color: var(--grau); cursor: pointer; padding: 0; }
.beleg-fuss .beleg-mehr:hover { color: var(--text); border-color: var(--linie-stark); }
.beleg-rabatt-dialog { width: min(420px, calc(100vw - 24px)); }
.beleg-rabatt-koerper { display: flex; flex-direction: column; gap: 10px; }
.beleg-rabatt-wahl { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 6px; overflow: hidden; align-self: flex-start; }
.beleg-rabatt-wahl button { border: 0; background: #fff; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.beleg-rabatt-wahl button + button { border-left: 1px solid var(--linie-stark); }
.beleg-rabatt-wahl button.aktiv { background: var(--blau); color: #fff; }
.beleg-rabatt-vorschau { margin: 0; font-size: 12px; color: var(--grau); }
.beleg-rabatt-dialog .beleg-rabatt-entfernen { margin-right: auto; }
@media (max-width: 600px) {
  .beleg-rabatt-dialog .angebot-feld input { font-size: 16px; }
}
@media (max-width: 600px) {
  .beleg-abschnitt .angebot-raster { grid-template-columns: 1fr 1fr; }
  .beleg-abschnitt .angebot-raster > .angebot-feld:not(.breit) { grid-column: auto; }
  .beleg-kopf-raster > .angebot-feld:first-child, .beleg-kopf-raster > .angebot-feld:nth-child(2) { grid-column: 1 / -1; }
  .beleg-weitere-raster.angebot-raster { grid-template-columns: 1fr; }
  .beleg-weitere-name { flex-basis: 120px; }
  .beleg-abschnitt .angebot-feld input, .beleg-abschnitt .angebot-feld select { font-size: 16px; }
  .beleg-fuss .knopf { flex: 1 1 auto; }
}

/* HS-38 Nacharbeit: Positionen ohne abgeschnittenes ⋮, alle Felder und Text-Vorschauen mit Rahmen */
.angebot-pos-kopf, .angebot-pos-zeile { grid-template-columns: 36px 36px minmax(8rem, 1fr) 72px 56px 108px 108px 40px; }
.angebot-pos-zeile > button.symbol { justify-self: end; }
@media (pointer: coarse), (max-width: 700px) {
  .angebot-pos-kopf, .angebot-pos-zeile { grid-template-columns: 44px 32px minmax(8rem, 1fr) 72px 52px 100px 100px 44px; }
  .angebot-pos-zeile > button.symbol { width: 44px; height: 44px; }
}
@media (max-width: 720px) {
  /* Schmal: zweizeilig – oben Nr. + Bezeichnung + ⋮, darunter Menge · Einheit · Netto · Gesamt */
  .angebot-pos-tabelle { overflow-x: visible; }
  .angebot-pos-kopf, .angebot-pos-zeile { grid-template-columns: 40px 22px auto auto minmax(0, 1fr) auto 44px; gap: 2px 6px; }
  .angebot-pos-kopf > :nth-child(1), .angebot-pos-zeile > :nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .angebot-pos-kopf > :nth-child(2), .angebot-pos-zeile > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .angebot-pos-kopf > :nth-child(3), .angebot-pos-zeile > :nth-child(3) { grid-column: 3 / 7; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
  .angebot-pos-kopf > :nth-child(4), .angebot-pos-zeile > :nth-child(4) { grid-column: 3; grid-row: 2; }
  .angebot-pos-kopf > :nth-child(5), .angebot-pos-zeile > :nth-child(5) { grid-column: 4; grid-row: 2; }
  .angebot-pos-kopf > :nth-child(6), .angebot-pos-zeile > :nth-child(6) { grid-column: 5; grid-row: 2; }
  .angebot-pos-kopf > :nth-child(7), .angebot-pos-zeile > :nth-child(7) { grid-column: 6 / 8; grid-row: 2; white-space: nowrap; }
  .angebot-pos-kopf > :nth-child(8), .angebot-pos-zeile > :nth-child(8) { grid-column: 7; grid-row: 1; align-self: start; }
  .angebot-pos-zeile > :nth-child(n+4):nth-child(-n+6) { font-size: 12px; color: var(--grau); white-space: nowrap; }
  .angebot-pos-zeile > :nth-child(6) { overflow: hidden; text-overflow: ellipsis; }
  .angebot-pos-zeile > :nth-child(7) { font-weight: 600; }
  .angebot-pos-kopf > :nth-child(-n+3) { display: none; }
  .angebot-pos-kopf { padding-top: 4px; }
}

/* Eingabefelder im Beleg-Dialog: einheitlich umrahmt, 36 px hoch */
.beleg-abschnitt .angebot-feld input:not([type=checkbox]):not([type=radio]),
.beleg-abschnitt .angebot-feld select,
.beleg-abschnitt .angebot-feld textarea,
.beleg-abschnitt .angebot-feld .datumsfeld-anzeige,
.beleg-rabatt-dialog .angebot-feld input:not([type=checkbox]):not([type=radio]) {
  height: 36px; min-height: 36px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background-color: #fff;
}
.beleg-abschnitt .angebot-feld .datumsfeld-anzeige { padding-right: 34px; }
.beleg-abschnitt .angebot-feld select {
  -webkit-appearance: none; appearance: none; padding-right: 34px;
  background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px;
}
.beleg-abschnitt .angebot-feld textarea { height: auto; min-height: 72px; padding: 8px 10px; line-height: 1.45; }
.beleg-abschnitt .angebot-feld input:not([type=checkbox]):not([type=radio]):focus,
.beleg-abschnitt .angebot-feld select:focus,
.beleg-abschnitt .angebot-feld textarea:focus,
.beleg-rabatt-dialog .angebot-feld input:focus { outline: none; border-color: var(--blau); box-shadow: var(--ring); }
.beleg-abschnitt .angebot-feld input:disabled, .beleg-abschnitt .angebot-feld select:disabled,
.beleg-abschnitt .angebot-feld textarea:disabled, .beleg-abschnitt .angebot-feld input[readonly] { background-color: #f6f8fa; }
.beleg-abschnitt .beleg-skonto-reihe input { height: 36px; }

/* Text-Vorschauzeilen (Einleitung/Vortext, Nachtext, Auftragsbedingungen) wie Eingabefelder, Knopf bündig daneben */
.beleg-abschnitt .ab-zeile { min-height: 0; padding: 0; border-bottom: 0; gap: 8px; align-items: stretch; }
.beleg-abschnitt .beleg-textvorschau,
.beleg-abschnitt .ab-zeile > .ab-text {
  flex: 1 1 auto; min-width: 0; height: 36px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: #fff;
  line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.beleg-abschnitt .beleg-textvorschau:hover, .beleg-abschnitt .ab-zeile > .ab-text:hover { border-color: var(--grau-hell); }
.beleg-abschnitt .ab-zeile > .ab-text { display: block; }
.beleg-abschnitt .ab-zeile > .ab-text .ab-status { font-size: 13px; }
.beleg-abschnitt .ab-zeile > .ab-text .ab-info { margin-left: 8px; }
.beleg-abschnitt .ab-zeile > .ab-bearbeiten { flex: 0 0 auto; height: 36px; min-height: 36px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }

/* Eingeklappte Zeilen unter „Weitere Angaben“ */
.beleg-weitere-liste { gap: 6px; }
.beleg-weitere-zeile {
  align-items: center; height: 36px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background: #fff;
}
.beleg-weitere-zeile:hover { background: #fff; border-color: var(--grau-hell); }

/* HS-38: Schließen-X im Dialogkopf ganz rechts oben, schlicht weiß, dezenter Hover/Fokus, Touch-Ziel 44 px */
.angebot-dialog-kopf > button.symbol:last-child {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; box-sizing: border-box;
  align-self: flex-start; margin: -10px calc(6px - var(--dialog-einzug, 22px)) -10px 16px;
  border: 0; border-radius: 8px; background: transparent; color: #fff; opacity: .85;
  box-shadow: none; outline: none; transition: background .15s, opacity .15s;
}
.angebot-dialog-kopf > button.symbol:last-child:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.angebot-dialog-kopf > button.symbol:last-child:active { background: rgba(255, 255, 255, .22); }
.angebot-dialog-kopf > button.symbol:last-child:focus { outline: none; box-shadow: none; }
.angebot-dialog-kopf > button.symbol:last-child:focus-visible { opacity: 1; background: rgba(255, 255, 255, .10); outline: 2px solid rgba(255, 255, 255, .65); outline-offset: -4px; }
.angebot-dialog-kopf > button.symbol:last-child svg { width: 20px; height: 20px; }
.angebot-dialog-koerper[tabindex="-1"]:focus, .angebot-dialog-koerper[tabindex="-1"]:focus-visible { outline: none; }
.angebot-dialog-kopf > .rechnung-titel-box { flex: 1 1 auto; }

/* HS-38: Dialogkopf weiß statt dunkelblau – Titel dunkel, Untertitel grau, X dunkelgrau, dünne Trennlinie */
.angebot-dialog-kopf, .pos-dialog .angebot-dialog-kopf {
  background: #fff; color: #2D3E50; border-bottom: 1px solid var(--linie);
}
.angebot-dialog-kopf h2 { color: #2D3E50; }
.angebot-dialog-kopf .rechnung-versendet { color: #5f6b76; font-size: 12px; }
.angebot-dialog-kopf .status-chip { box-shadow: inset 0 0 0 1px rgba(45, 62, 80, .10); }
.angebot-dialog-kopf .symbol { color: #5f6b76; }
.angebot-dialog-kopf > button.symbol:last-child { color: #5f6b76; opacity: 1; }
@media (hover: hover) {
  .angebot-dialog-kopf .symbol:hover, .angebot-dialog-kopf > button.symbol:last-child:hover { background: #eef1f4; color: #2D3E50; }
}
@media (hover: none) {
  .angebot-dialog-kopf .symbol:hover, .angebot-dialog-kopf > button.symbol:last-child:hover { background: transparent; color: #5f6b76; }
}
.angebot-dialog-kopf > button.symbol:last-child:active { background: #e2e7ec; }
.angebot-dialog-kopf > button.symbol:last-child:focus-visible { background: #f4f6f8; color: #2D3E50; outline: 2px solid rgba(1, 118, 211, .55); outline-offset: -4px; }

/* Leistungsdatum wie in DP: Anzeige-Feld + Karte mit Datum | Zeitraum */
.leistung-wrap { position: relative; min-width: 0; }
.leistung-anzeige {
  display: flex; align-items: center; width: 100%; height: 36px; min-height: 36px; box-sizing: border-box;
  padding: 0 34px 0 10px; border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px; color: var(--text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.leistung-anzeige .leistung-wert { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leistung-anzeige.ist-leer .leistung-wert { color: var(--grau); }
.leistung-anzeige:focus-visible, .leistung-anzeige[aria-expanded="true"] { outline: none; border-color: var(--blau); box-shadow: var(--ring); }
.leistung-anzeige:disabled { background-color: #f6f8fa; cursor: default; }
@media (hover: hover) { .leistung-anzeige:not(:disabled):hover { border-color: var(--grau-hell); } }
.leistung-karte {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: 320px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 14px;
  background: #fff; border: 1px solid var(--linie-stark); border-radius: 10px; box-shadow: var(--schatten-hoch);
  display: flex; flex-direction: column; gap: 12px;
}
.leistung-karte[hidden] { display: none; }
.leistung-modi { display: flex; gap: 18px; }
.leistung-modus { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; min-height: 32px; }
.leistung-modus input { width: 18px; height: 18px; margin: 0; accent-color: var(--blau); }
.leistung-datum[hidden], .leistung-zeitraum[hidden], .leistung-warnung[hidden] { display: none; }
.leistung-zeitraum { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.beleg-abschnitt .leistung-karte .angebot-feld .datumsfeld-anzeige {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b76' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat right 10px center / 17px;
}
.leistung-warnung { margin: 0; font-size: 12px; color: var(--rot, #c23934); }
.leistung-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.leistung-leeren { border: 0; background: none; padding: 6px 0; color: var(--blau); font: inherit; font-size: 13px; cursor: pointer; }
.leistung-fertig { min-height: 32px; }
@media (max-width: 640px) {
  .leistung-anzeige { font-size: 16px; }
  .beleg-abschnitt .beleg-kopf-raster > .angebot-feld.leistung-feld { grid-column: 1 / -1; }
  .leistung-karte { width: calc(100vw - 48px); }
  .leistung-modus { font-size: 16px; min-height: 40px; }
  .leistung-fertig, .leistung-leeren { min-height: 40px; }
}

/* Dauerrechnung (Abo) – Knopf im Beleg-Fuß, Dialog, Listen-Marke */
.beleg-fuss .beleg-mehr:has(+ .beleg-abo) { margin-right: 0; }
.beleg-fuss .beleg-abo { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.beleg-abo-knopf { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 1px solid var(--linie-stark); background: #fff; color: var(--grau); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.beleg-abo-knopf:hover:not(:disabled) { color: var(--blau); border-color: var(--blau); }
.beleg-abo-knopf.aktiv { background: var(--blau); border-color: var(--blau); color: #fff; }
.beleg-abo-knopf.aktiv:hover:not(:disabled) { background: var(--blau-dunkel); border-color: var(--blau-dunkel); color: #fff; }
.beleg-abo-knopf:focus-visible, .beleg-abo-info:focus-visible, .beleg-abo-frage:focus-visible { outline: none; box-shadow: var(--ring); }
.beleg-abo-knopf:disabled { cursor: default; opacity: .6; }
.beleg-abo-info { border: 1px solid var(--blau-hell); background: var(--blau-zart); color: var(--blau-dunkel); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.beleg-abo-info[hidden] { display: none; }
.beleg-abo-info:hover:not(:disabled) { border-color: var(--blau); }
.beleg-abo-dialog { width: min(480px, calc(100vw - 24px)); }
.beleg-abo-koerper { display: flex; flex-direction: column; gap: 12px; padding: 16px var(--dialog-einzug, 22px); }
.beleg-abo-intro { margin: 0; color: var(--grau); font-size: 13px; }
.beleg-abo-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.beleg-abo-dialog .angebot-feld > span { font-size: 12px; color: var(--grau); font-weight: 600; }
.beleg-abo-dialog .angebot-feld input:not([type=checkbox]):not([type=radio]),
.beleg-abo-dialog .angebot-feld select,
.beleg-abo-dialog .angebot-feld .datumsfeld-anzeige {
  height: 36px; min-height: 36px; box-sizing: border-box; padding: 0 10px; width: 100%;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); background-color: #fff; font-size: 14px; color: var(--text);
}
.beleg-abo-dialog .angebot-feld .datumsfeld-anzeige { padding-right: 34px; }
.beleg-abo-dialog .angebot-feld select { -webkit-appearance: none; appearance: none; padding-right: 34px; background: #fff url(/pfeil.svg) no-repeat right 10px center / 16px; }
.beleg-abo-dialog .angebot-feld input:focus, .beleg-abo-dialog .angebot-feld select:focus { outline: none; border-color: var(--blau); box-shadow: var(--ring); }
.beleg-abo-vorschau { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.beleg-abo-hinweiszeile { display: flex; align-items: flex-start; gap: 8px; }
.beleg-abo-hinweis { margin: 0; flex: 1; color: var(--rot); font-size: 13px; line-height: 1.45; }
.beleg-abo-frage { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--linie-stark); background: #fff; color: var(--grau); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.beleg-abo-frage:hover, .beleg-abo-frage[aria-expanded="true"] { color: var(--blau); border-color: var(--blau); }
.beleg-abo-hilfe { margin: 0; padding: 10px 12px; background: #f6f8fa; border: 1px solid var(--linie); border-radius: var(--radius-klein); font-size: 13px; line-height: 1.5; color: var(--grau); }
.beleg-abo-dialog .beleg-abo-beenden { margin-right: auto; }
.beleg-abo-dialog .meldung { padding: 0; }
.rechnung-abo-marke { display: inline-flex; align-items: center; margin-left: 6px; vertical-align: -2px; color: var(--grau-hell); }
.rechnung-abo-marke.aktiv { color: var(--blau); }
@media (max-width: 640px) {
  .beleg-abo-reihe { grid-template-columns: 1fr; }
  .beleg-abo-dialog .angebot-feld input:not([type=checkbox]):not([type=radio]), .beleg-abo-dialog .angebot-feld select { font-size: 16px; }
  .beleg-abo-info { max-width: 46vw; padding: 6px 10px; }
}
