/* ============================================================
   Verwaltungs-KI · Konzept-Demo (app.css)
   Helles Website-Design wie das Demo-Konto (demo/demo.css):
   gleiche Tokens, Hausschrift Ranade (Überschriften, Zahlen) +
   Satoshi (Text), selbst gehostet. Alle Klassen mit Präfix `p-`.
   ============================================================ */

@font-face { font-family: "Ranade"; src: url("/assets/fonts/ranade-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Ranade"; src: url("/assets/fonts/ranade-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --bg-3: #FBF9FD;
  --bg-4: #F4F0F9;
  --ink: #15101C;
  --ink-2: #2B2335;
  --muted: #564C66;
  --muted-2: #7A6F8C;
  --pink: #D6247F;
  --violet: #7C4DEF;
  --line: rgba(21, 16, 28, .09);
  --line-2: rgba(21, 16, 28, .16);
  --grad: linear-gradient(120deg, #EC3D96 0%, #8B5CF6 100%);
  --grad-soft: linear-gradient(120deg, rgba(236, 61, 150, .10), rgba(139, 92, 246, .10));
  --shadow-karte: 0 1px 2px rgba(21, 16, 28, .04), 0 12px 32px -22px rgba(80, 40, 160, .28);
  --shadow-pop: 0 24px 60px -24px rgba(21, 16, 28, .32), 0 2px 8px rgba(21, 16, 28, .06);

  --gruen: #16A34A;  --gruen-text: #15803D;  --gruen-bg: #E8F7EE;
  --gelb: #F59E0B;   --gelb-text: #9A5B05;   --gelb-bg: #FEF5DC;
  --rot: #EF4444;    --rot-text: #B42318;    --rot-bg: #FDECEC;
  --pink-ton: #EC3D96; --pink-text: #BE185D; --pink-bg: #FCE9F3;
  --violett: #8B5CF6;  --violett-text: #6D3FD9; --violett-bg: #F0EBFE;
  --grau: #A79DB5;   --grau-text: #564C66;   --grau-bg: #F2EFF6;
  --markiert: #FFF1A8;

  --font-display: "Ranade", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Satoshi", "Helvetica Neue", Arial, sans-serif;

  --r-karte: 18px;
  --seite-b: 252px;
  --oben-h: 94px;
  --rand: 32px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--oben-h) + 16px); }
body.p-body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; }
::selection { background: rgba(139, 92, 246, .22); }
:focus-visible { outline: 2px solid rgba(124, 77, 239, .6); outline-offset: 2px; }
.p-icon { width: 18px; height: 18px; flex: none; }
.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 13px; }
.p-skip:focus { top: 10px; }

/* ---------- Kopfbereich ---------- */
.p-oben { position: sticky; top: 0; z-index: 60; }
.p-hinweis {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 34px; padding: 6px 16px;
  background: linear-gradient(90deg, #FDEFF6 0%, #F3EEFE 100%);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); text-align: center; line-height: 1.35;
}
.p-hinweis-marke {
  flex: none; font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: #fff; background: var(--grad); padding: 4px 8px 3px; border-radius: 999px;
}
.p-hinweis b { font-weight: 700; color: var(--ink); }
.p-hinweis .kurz { display: none; }
.p-kopf {
  height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 20px 0 18px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.p-kopf .p-kopf-menue { display: none; }
.p-marke { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.p-kuerzel {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .04em;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line-2);
}
.p-kuerzel[data-lang="3"] { font-size: 10.5px; letter-spacing: .02em; }
.p-marke-text { min-width: 0; line-height: 1.2; }
.p-marke-text b { display: block; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-marke-text span { display: block; font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.p-marke-text span i { font-style: normal; color: var(--violet); font-weight: 700; }
.p-pille {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; flex: none;
  background: var(--gruen-bg); color: var(--gruen-text); font-size: 12.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid rgba(22, 163, 74, .18);
}
.p-pille i { width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); animation: p-puls 2.4s ease-out infinite; }
.p-pille .kurz { display: none; }
.p-pille.pausiert { background: var(--gelb-bg); color: var(--gelb-text); border-color: rgba(245, 158, 11, .3); }
.p-pille.pausiert i { background: var(--gelb); animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.p-kopf-luecke { flex: 1; min-width: 0; }
.p-kopf-aktionen { display: flex; align-items: center; gap: 10px; flex: none; }
.p-ich-wrap { position: relative; }
.p-ich {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 6px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; cursor: pointer; text-align: left; transition: background .15s, border-color .15s;
}
.p-ich:hover, .p-ich[aria-expanded="true"] { background: var(--bg-3); border-color: var(--line); }
.p-ich-text { line-height: 1.2; }
.p-ich-text b { display: block; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.p-ich-text span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.p-ich .p-icon { width: 15px; height: 15px; color: var(--muted-2); }

.p-pop {
  position: absolute; z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 8px; animation: p-pop-rein .22s var(--ease);
}
.p-rollen { right: 0; top: calc(100% + 8px); width: 360px; }
.p-rollen-kopf { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.p-rollen-kopf b { display: block; font-family: var(--font-display); font-size: 14px; }
.p-rollen-kopf span { font-size: 12.5px; color: var(--muted); }
.p-rolle {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer;
}
.p-rolle:hover, .p-rolle:focus-visible { background: var(--bg-3); }
.p-rolle[aria-checked="true"] { background: #F7F2FF; }
.p-rolle b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.p-rolle small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.p-rolle .p-icon { width: 16px; height: 16px; color: var(--violet); opacity: 0; }
.p-rolle[aria-checked="true"] .p-icon { opacity: 1; }

/* ---------- App-Raster ---------- */
.p-app { display: grid; grid-template-columns: var(--seite-b) minmax(0, 1fr); align-items: start; }
.p-seite {
  position: sticky; top: var(--oben-h); height: calc(100vh - var(--oben-h)); height: calc(100dvh - var(--oben-h));
  overflow-y: auto; overscroll-behavior: contain; background: var(--bg-3); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 14px 12px 16px; scrollbar-width: thin;
}
.p-inhalt { min-width: 0; overflow-x: clip; min-height: calc(100vh - var(--oben-h)); display: flex; flex-direction: column; }
.p-seiteninhalt { width: 100%; max-width: 1320px; margin: 0 auto; padding: 26px var(--rand) 40px; flex: 1; outline: 0; }
.p-fuss {
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center;
  max-width: 1320px; width: 100%; margin: 0 auto; padding: 18px var(--rand) 26px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted-2);
}
.p-fuss-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-fuss-links img { height: 20px; width: auto; }
.p-fuss nav { display: flex; gap: 16px; }
.p-fuss a { color: var(--muted-2); text-decoration: none; }
.p-fuss a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Seitenleiste ---------- */
.p-nav { display: flex; flex-direction: column; }
.p-nav-gruppe { margin-top: 18px; }
.p-nav-gruppe:first-child { margin-top: 2px; }
.p-nav-gruppe-titel { padding: 0 10px 6px; font-family: var(--font-display); font-weight: 700; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.p-nav-link {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; text-decoration: none;
  font-size: 13.8px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; position: relative;
}
.p-nav-link .p-icon { color: var(--muted-2); transition: color .15s; }
.p-nav-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-nav-link:hover { background: rgba(21, 16, 28, .045); }
.p-nav-link.aktiv { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(21, 16, 28, .06), 0 0 0 1px var(--line); }
.p-nav-link.aktiv .p-icon { color: var(--violet); }
.p-nav-link.aktiv::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.p-nav-zahl { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--pink-text); background: var(--pink-bg); padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.p-nav-schloss { margin-left: auto; color: var(--muted-2); display: inline-flex; }
.p-nav-schloss .p-icon { width: 14px; height: 14px; }
.p-nav-link.gesperrt { color: var(--muted-2); }
.p-seite-fuss { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.p-servermini {
  border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 11px 12px; font-size: 12px; color: var(--muted);
}
.p-servermini-kopf { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: 12.5px; margin-bottom: 6px; }
.p-servermini-kopf .p-icon { width: 15px; height: 15px; color: var(--gruen-text); }
.p-servermini dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.p-servermini dt { color: var(--muted-2); }
.p-servermini dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.p-servermini dd.null { color: var(--gruen-text); }
.p-tourkarte {
  position: relative; overflow: hidden; border-radius: 14px; padding: 12px; background: #fff; border: 1px solid var(--line);
}
.p-tourkarte::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.p-tourkarte b { display: block; font-family: var(--font-display); font-size: 13.5px; margin-bottom: 2px; }
.p-tourkarte p { font-size: 12px; color: var(--muted); margin-bottom: 9px; line-height: 1.45; }
.p-schublade-hg { display: none; }

/* ---------- Seitenkopf ---------- */
.p-seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.p-seitenkopf-text { min-width: 0; max-width: 760px; }
.p-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pink);
}
.p-eyebrow .p-icon { width: 15px; height: 15px; }
.p-h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin-top: 8px; }
.p-unter { margin-top: 6px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.p-seitenkopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.p-ansicht { min-width: 0; animation: p-ansicht-rein .35s var(--ease) both; }

/* ---------- Karten, Raster ---------- */
.p-karte { background: #fff; border: 1px solid var(--line); border-radius: var(--r-karte); box-shadow: var(--shadow-karte); min-width: 0; display: flex; flex-direction: column; }
.p-karte-kopf { display: flex; align-items: center; gap: 10px 14px; padding: 16px 20px 0; flex-wrap: wrap; }
.p-karte-kopf-text { min-width: 0; flex: 1 1 auto; }
.p-karte-titel { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; line-height: 1.3; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.p-karte-titel .p-icon { width: 17px; height: 17px; color: var(--violet); }
.p-karte-unter { font-size: 12.5px; color: var(--muted-2); margin-top: 2px; }
.p-karte-koerper { padding: 14px 20px 20px; flex: 1; min-width: 0; }
.p-karte--buendig > .p-karte-koerper { padding: 10px 0 6px; }
.p-karte--getoent { background: var(--bg-3); box-shadow: none; }
.p-raster { display: grid; gap: 16px; min-width: 0; }
.p-raster > * { min-width: 0; }
.p-raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-raster-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.p-stapel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.p-abstand { margin-top: 16px; }
.p-abstand-gross { margin-top: 22px; }
.p-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.p-muted { color: var(--muted); }
.p-klein { font-size: 12.5px; }
.p-zahl { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- Kacheln ---------- */
.p-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.p-kachel {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 13px; box-shadow: var(--shadow-karte);
  min-width: 0; position: relative; text-decoration: none; color: inherit; display: block;
}
a.p-kachel { transition: border-color .2s, transform .2s; }
a.p-kachel:hover { border-color: rgba(124, 77, 239, .3); transform: translateY(-1px); }
.p-kachel-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); min-width: 0; }
.p-kachel-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-kachel-label .p-icon { width: 15px; height: 15px; color: var(--muted-2); }
.p-kachel-wert { font-family: var(--font-display); font-weight: 700; font-size: 27px; line-height: 1.1; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.p-kachel-wert small { font-size: 14px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; margin-left: 4px; }
.p-kachel-fuss { margin-top: 5px; font-size: 12px; color: var(--muted-2); line-height: 1.4; }
.p-kachel[data-ton]::after { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 0 0 2px 2px; background: var(--kachel-ton, transparent); }
.p-kachel[data-ton="gruen"] { --kachel-ton: var(--gruen); }
.p-kachel[data-ton="gelb"] { --kachel-ton: var(--gelb); }
.p-kachel[data-ton="rot"] { --kachel-ton: var(--rot); }
.p-kachel[data-ton="violett"] { --kachel-ton: var(--violett); }
.p-kachel[data-ton="pink"] { --kachel-ton: var(--pink-ton); }

/* ---------- Chips, Punkte ---------- */
.p-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-body); font-weight: 700; font-size: 11.5px; line-height: 1; letter-spacing: .01em;
  background: var(--chip-bg, var(--grau-bg)); color: var(--chip-fg, var(--grau-text)); vertical-align: middle; border: 0;
}
.p-chip .p-icon { width: 12px; height: 12px; stroke-width: 2.2; }
.p-chip-punkt { width: 6px; height: 6px; border-radius: 50%; background: var(--chip-punkt, var(--grau)); flex: none; }
.p-chip--gruen { --chip-bg: var(--gruen-bg); --chip-fg: var(--gruen-text); --chip-punkt: var(--gruen); }
.p-chip--gelb { --chip-bg: var(--gelb-bg); --chip-fg: var(--gelb-text); --chip-punkt: var(--gelb); }
.p-chip--rot { --chip-bg: var(--rot-bg); --chip-fg: var(--rot-text); --chip-punkt: var(--rot); }
.p-chip--pink { --chip-bg: var(--pink-bg); --chip-fg: var(--pink-text); --chip-punkt: var(--pink-ton); }
.p-chip--violett { --chip-bg: var(--violett-bg); --chip-fg: var(--violett-text); --chip-punkt: var(--violett); }
.p-chip--grau { --chip-bg: var(--grau-bg); --chip-fg: var(--grau-text); --chip-punkt: var(--grau); }
.p-chip--umrandet { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
button.p-chip { cursor: pointer; }
button.p-chip--umrandet:hover { box-shadow: inset 0 0 0 1px rgba(124, 77, 239, .45); color: var(--violet); }
.p-chip.neu { animation: p-chip-wechsel .6s var(--ease); }
.p-punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--grau); flex: none; }
.p-punkt--gruen { background: var(--gruen); }
.p-punkt--gelb { background: var(--gelb); }
.p-punkt--rot { background: var(--rot); }
.p-punkt--violett { background: var(--violett); }
.p-punkt--pink { background: var(--pink-ton); }

/* ---------- Knöpfe ---------- */
.p-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 11px; border: 1px solid transparent; font-family: var(--font-display); font-weight: 500; font-size: 14px;
  line-height: 1; letter-spacing: .005em; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s, opacity .2s;
}
.p-knopf .p-icon { width: 16px; height: 16px; }
.p-knopf--primaer { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(214, 36, 127, .7), inset 0 1px 0 rgba(255, 255, 255, .18); }
.p-knopf--primaer:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(214, 36, 127, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.p-knopf--sekundaer { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(21, 16, 28, .05); }
.p-knopf--sekundaer:hover { background: var(--bg-3); border-color: rgba(124, 77, 239, .35); }
.p-knopf--ghost { background: transparent; color: var(--muted); }
.p-knopf--ghost:hover { background: var(--bg-4); color: var(--ink); }
.p-knopf--erfolg { background: var(--gruen-bg); color: var(--gruen-text); border-color: rgba(22, 163, 74, .2); cursor: default; }
.p-knopf--text { background: transparent; color: var(--violet); padding: 0 2px; height: auto; font-family: var(--font-body); font-weight: 700; font-size: 13px; }
.p-knopf--text:hover { color: var(--pink); }
.p-knopf--klein { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.p-knopf--klein .p-icon { width: 14px; height: 14px; }
.p-knopf--icon { width: 36px; padding: 0; }
.p-knopf--icon.p-knopf--klein { width: 30px; }
.p-knopf:disabled, .p-knopf[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.p-knopf.drueckt { animation: p-druck .5s var(--ease); }
.p-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Hinweise, Info ---------- */
.p-was {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; margin: 16px 0; border-radius: 16px;
  background: linear-gradient(180deg, #FCFAFE 0%, #FFFFFF 100%); border: 1px solid var(--line);
}
.p-was-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--grad-soft); color: var(--violet); display: grid; place-items: center; flex: none; }
.p-was-ico .p-icon { width: 17px; height: 17px; }
.p-was b { display: block; font-family: var(--font-display); font-size: 14px; margin-bottom: 2px; }
.p-was p { font-size: 13.8px; color: var(--muted); line-height: 1.55; }
.p-banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px;
  background: var(--gruen-bg); border: 1px solid rgba(22, 163, 74, .2); color: #14532D; font-size: 13.8px; line-height: 1.5;
}
.p-banner .p-icon { color: var(--gruen-text); width: 20px; height: 20px; }
.p-banner b { color: #0F3D21; }
.p-banner--violett { background: var(--violett-bg); border-color: rgba(124, 77, 239, .22); color: #3B2A6B; }
.p-banner--violett .p-icon { color: var(--violett-text); }
.p-banner--violett b { color: #2A1B57; }
.p-banner--gelb { background: var(--gelb-bg); border-color: rgba(245, 158, 11, .3); color: #6B4104; }
.p-banner--gelb .p-icon { color: var(--gelb-text); }
.p-banner .p-knopf { margin-left: auto; }
.p-rechnung {
  display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--bg-3);
  border: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); line-height: 1.45;
}
.p-rechnung .p-chip { flex: none; }
.p-rechnung b { color: var(--ink); }
.p-grundsatz { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted-2); }
.p-grundsatz .p-icon { width: 15px; height: 15px; color: var(--violet); }

/* ---------- Ampel-Liste ---------- */
.p-ampeln { display: flex; flex-direction: column; gap: 8px; }
.p-ampel {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--grau);
  border-radius: 12px; background: #fff; min-width: 0; text-decoration: none; color: inherit;
}
a.p-ampel { transition: background .15s, border-color .15s; }
a.p-ampel:hover { background: var(--bg-3); }
.p-ampel--gruen { border-left-color: var(--gruen); }
.p-ampel--gelb { border-left-color: var(--gelb); }
.p-ampel--rot { border-left-color: var(--rot); }
.p-ampel--violett { border-left-color: var(--violett); }
.p-ampel-text { min-width: 0; flex: 1; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.p-ampel-text b { color: var(--ink); }
.p-ampel-text small { display: block; color: var(--muted-2); font-size: 12px; margin-top: 1px; }
.p-ampel > .p-icon { width: 16px; height: 16px; color: var(--muted-2); }

/* ---------- Übersicht ---------- */
.p-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch;
  padding: 24px 26px; border-radius: 22px; background: linear-gradient(120deg, #FDF2F8 0%, #F5F0FF 60%, #FBF9FD 100%);
  border: 1px solid var(--line); margin-bottom: 16px;
}
.p-hero h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin-top: 8px; }
.p-hero p { margin-top: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.55; max-width: 620px; }
.p-hero-server { background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 12.8px; }
.p-hero-server-kopf { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gruen-text); margin-bottom: 8px; }
.p-hero-server dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; }
.p-hero-server dt { color: var(--muted); }
.p-hero-server dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.p-hero-server dd.null { color: var(--gruen-text); }
.p-statliste { list-style: none; padding: 0; display: flex; flex-direction: column; }
.p-statliste li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.p-statliste li:last-child { border-bottom: 0; }
.p-statliste .p-zahl { min-width: 34px; height: 30px; border-radius: 9px; background: var(--grad-soft); color: var(--violett-text); display: grid; place-items: center; font-weight: 700; font-size: 15px; padding: 0 6px; }
.p-frist-zeile { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.p-frist-zeile:last-child { border-bottom: 0; }
.p-frist-datum { text-align: center; border-radius: 11px; padding: 5px 0 6px; background: var(--bg-4); line-height: 1.1; }
.p-frist-datum b { display: block; font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.p-frist-datum span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.p-frist-text { min-width: 0; font-size: 13.3px; color: var(--ink-2); line-height: 1.4; }
.p-frist-text b { display: block; color: var(--ink); font-weight: 700; }
.p-frist-text small { color: var(--muted-2); font-size: 12px; }

/* ---------- Gesperrt ---------- */
.p-gesperrt {
  max-width: 560px; margin: 40px auto; text-align: center; padding: 34px 28px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #FCFAFE 0%, #fff 100%); box-shadow: var(--shadow-karte);
}
.p-gesperrt-ico { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 16px; background: var(--grad-soft); color: var(--violet); display: grid; place-items: center; }
.p-gesperrt-ico .p-icon { width: 26px; height: 26px; }
.p-gesperrt h2 { font-size: 21px; }
.p-gesperrt p { margin: 8px auto 18px; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 440px; }

/* ---------- Reiter ---------- */
.p-reiter { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-4); overflow-x: auto; scrollbar-width: none; max-width: 100%; width: max-content; }
.p-reiter::-webkit-scrollbar { display: none; }
.p-reiter button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.p-reiter button:hover { color: var(--ink); }
.p-reiter button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(21, 16, 28, .08), 0 0 0 1px var(--line); }
.p-reiter-zahl { font-size: 11px; font-weight: 700; color: var(--muted-2); background: rgba(21, 16, 28, .06); border-radius: 999px; padding: 1px 6px; }

/* ---------- Formulare ---------- */
.p-feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p-feld-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.p-input, .p-select, .p-textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  font: inherit; font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s; outline: 0;
}
.p-textarea { height: auto; min-height: 150px; padding: 11px 13px; line-height: 1.55; resize: vertical; font-size: 13.8px; }
.p-textarea[readonly] { background: var(--bg-3); color: var(--ink-2); }
.p-select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857A96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; cursor: pointer; }
.p-input:focus, .p-select:focus, .p-textarea:focus { border-color: rgba(124, 77, 239, .55); box-shadow: 0 0 0 4px rgba(124, 77, 239, .1); }
.p-schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink-2); font-weight: 700; }
.p-schalter input { position: absolute; opacity: 0; pointer-events: none; }
.p-schalter-bahn { width: 38px; height: 22px; border-radius: 999px; background: #D9D3E2; position: relative; transition: background .2s; flex: none; }
.p-schalter-bahn::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(21, 16, 28, .25); transition: transform .25s var(--ease); }
.p-schalter input:checked + .p-schalter-bahn { background: var(--gruen); }
.p-schalter input:checked + .p-schalter-bahn::after { transform: translateX(16px); }
.p-schalter input:focus-visible + .p-schalter-bahn { outline: 2px solid rgba(124, 77, 239, .55); outline-offset: 2px; }
.p-schalter input:disabled + .p-schalter-bahn { opacity: .5; }

/* ---------- Tabelle ---------- */
.p-tabelle-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; scrollbar-width: thin; }
.p-tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.p-tabelle th {
  text-align: left; font-weight: 700; font-size: 11px; line-height: 1.2; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted-2); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff;
}
.p-tabelle td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); line-height: 1.4; }
.p-tabelle tbody tr:last-child td { border-bottom: 0; }
.p-tabelle th:first-child, .p-tabelle td:first-child { padding-left: 20px; }
.p-tabelle th:last-child, .p-tabelle td:last-child { padding-right: 20px; }
.p-tabelle td b { color: var(--ink); }
.p-tabelle td small { display: block; color: var(--muted-2); font-size: 12px; }
.p-tabelle .nw { white-space: nowrap; }
.p-tabelle tbody tr.klickbar { cursor: pointer; }
.p-tabelle tbody tr.klickbar:hover td { background: var(--bg-3); }
.p-tabelle tbody tr.gewaehlt td { background: #F7F2FF; }
.p-tabelle tbody tr.neu td { animation: p-zeile-neu 2s var(--ease); }
.p-matrix th, .p-matrix td { text-align: center; vertical-align: middle; }
.p-matrix th:first-child, .p-matrix td:first-child { text-align: left; }
.p-matrix td:first-child { white-space: nowrap; }
.p-zelle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; padding: 3px 8px; border-radius: 999px; }
.p-zelle .p-icon { width: 13px; height: 13px; stroke-width: 2.2; }
.p-zelle--voll { background: var(--gruen-bg); color: var(--gruen-text); }
.p-zelle--teil { background: var(--violett-bg); color: var(--violett-text); }
.p-zelle--tech { background: var(--grau-bg); color: var(--grau-text); }
.p-zelle--kein { color: var(--muted-2); font-weight: 500; }

/* ---------- Avatar ---------- */
.p-avatar {
  width: var(--p-av, 30px); height: var(--p-av, 30px); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--p-av, 30px) * .37); letter-spacing: .02em;
  background: var(--av-bg, var(--violett-bg)); color: var(--av-fg, var(--violett-text));
}
.p-avatar--verlauf { background: var(--grad); color: #fff; }
.p-avatar--dunkel { background: var(--ink); color: #fff; }
.p-avatar--gruen { --av-bg: var(--gruen-bg); --av-fg: var(--gruen-text); }
.p-avatar--pink { --av-bg: var(--pink-bg); --av-fg: var(--pink-text); }
.p-avatare { display: flex; }
.p-avatare .p-avatar { box-shadow: 0 0 0 2px #fff; }
.p-avatare .p-avatar + .p-avatar { margin-left: -7px; }

/* ---------- Master-Detail ---------- */
.p-md { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.p-md-liste { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.p-md-detail { position: sticky; top: calc(var(--oben-h) + 16px); max-height: calc(100vh - var(--oben-h) - 32px); max-height: calc(100dvh - var(--oben-h) - 32px); overflow-y: auto; border-radius: var(--r-karte); scrollbar-width: thin; min-width: 0; }
.p-md-zurueck { display: none; }
.p-li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; width: 100%;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.p-li:hover { border-color: rgba(124, 77, 239, .28); }
.p-li.aktiv { border-color: rgba(124, 77, 239, .5); box-shadow: 0 0 0 3px rgba(124, 77, 239, .1); background: #FEFCFF; }
.p-li.erledigt { background: var(--bg-3); }
.p-li.erledigt .p-li-titel { color: var(--muted); }
.p-li-ico { grid-row: 1 / span 3; width: 36px; height: 36px; border-radius: 11px; background: var(--bg-4); color: var(--muted); display: grid; place-items: center; }
.p-li-ico .p-icon { width: 17px; height: 17px; }
.p-li-ico--rot { background: var(--rot-bg); color: var(--rot-text); }
.p-li-titel { font-weight: 700; font-size: 13.8px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-li-zeit { font-size: 12px; color: var(--muted-2); white-space: nowrap; text-align: right; }
.p-li-unter { grid-column: 2 / span 2; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-li-chips { grid-column: 2 / span 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.p-li-betrag { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--ink); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

.p-detail-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.p-detail-kopf .p-icon { width: 15px; height: 15px; }
.p-detail-kopf .rechts { margin-left: auto; }
.p-detail h2 { font-size: 20px; line-height: 1.25; margin-top: 8px; }
.p-original {
  margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--bg-3); border: 1px solid var(--line);
  font-size: 13.8px; line-height: 1.6; color: var(--ink-2); white-space: pre-line;
}
.p-original-kopf { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted-2); margin-bottom: 6px; white-space: normal; }
.p-abschnitt { margin-top: 18px; }
.p-abschnitt-titel { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.p-abschnitt-titel .p-icon { width: 16px; height: 16px; color: var(--violet); }
.p-abschnitt-titel .p-chip { margin-left: auto; }
.p-erkannt { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.p-erkannt div { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; min-width: 0; }
.p-erkannt dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted-2); }
.p-erkannt dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: break-word; }
.p-erkannt { margin: 0; }
.p-begruendung { margin-top: 10px; display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: var(--violett-bg); color: #3B2A6B; font-size: 13.4px; line-height: 1.5; }
.p-begruendung .p-icon { width: 16px; height: 16px; color: var(--violett-text); margin-top: 2px; }
.p-auftrag { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.p-auftrag dl { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); }
.p-auftrag dt, .p-auftrag dd { padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13.3px; margin: 0; }
.p-auftrag dt { color: var(--muted-2); font-weight: 700; background: var(--bg-3); }
.p-auftrag dd { color: var(--ink-2); }
.p-auftrag dt:nth-last-of-type(1), .p-auftrag dd:last-child { border-bottom: 0; }
.p-status-zeile { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gruen-text); font-weight: 700; }
.p-status-zeile .p-icon { width: 16px; height: 16px; }
.p-fuss-notiz { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Rechnungsbild ---------- */
.p-beleg { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px 18px; font-size: 12.8px; color: var(--ink-2); box-shadow: inset 0 0 0 4px var(--bg-3); }
.p-beleg-kopf { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.p-beleg-kopf b { font-family: var(--font-display); font-size: 15px; color: var(--ink); display: block; }
.p-beleg-kopf span { color: var(--muted); }
.p-beleg table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.p-beleg td { padding: 6px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.p-beleg td.r { text-align: right; white-space: nowrap; padding-left: 12px; }
.p-beleg tr.summe td { border-bottom: 0; font-weight: 700; color: var(--ink); padding-top: 9px; }
.p-feld-gelesen { position: relative; }
.p-feld-gelesen::after { content: ""; position: absolute; inset: -2px -4px; border-radius: 5px; background: rgba(139, 92, 246, .12); pointer-events: none; }

/* ---------- Fristenradar ---------- */
.p-radar { position: relative; margin: 6px 0 4px; }
.p-radar-monate { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.p-radar-zone { position: absolute; top: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(236, 61, 150, .09), rgba(236, 61, 150, .05)); border-right: 2px dashed rgba(214, 36, 127, .35); pointer-events: none; }
.p-radar-monat { min-height: 116px; padding: 8px 4px 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.p-radar-monat:first-child { border-left: 0; }
.p-radar-monat > span { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.p-radar-monat > span small { display: block; font-size: 9.5px; color: var(--muted-2); text-align: center; letter-spacing: .02em; }
.p-radar-punkt {
  width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px; color: #fff; background: var(--rp, var(--grau));
  box-shadow: 0 0 0 3px #fff, 0 4px 10px -4px rgba(21, 16, 28, .4); transition: transform .15s;
  position: relative; z-index: 1;
}
.p-radar-punkt:hover, .p-radar-punkt.aktiv { transform: scale(1.15); }
.p-radar-legende { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.p-radar-legende span { display: inline-flex; align-items: center; gap: 6px; }
.p-radar-legende i { width: 10px; height: 10px; border-radius: 50%; background: var(--rp); }
.p-radar-heute { position: absolute; left: 0; top: -22px; font-size: 11px; font-weight: 700; color: var(--pink-text); }
[data-art="index"] { --rp: var(--violett); }
[data-art="option"] { --rp: var(--pink-ton); }
[data-art="kuendigung"] { --rp: var(--rot); }
[data-art="sicherheit"] { --rp: var(--gelb); }
[data-art="staffel"] { --rp: #0EA5A0; }
.p-fristen { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--line); }
.p-frist {
  display: grid; grid-template-columns: 28px 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line);
  background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; cursor: pointer; transition: background .15s;
}
.p-frist:hover { background: var(--bg-3); }
.p-frist.aktiv { background: #F7F2FF; }
.p-frist-nr { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--rp); font-family: var(--font-display); font-weight: 700; font-size: 11px; }
.p-frist-tag { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-frist-tag small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 11.5px; color: var(--muted-2); }
.p-frist-inhalt { min-width: 0; font-size: 13.3px; color: var(--ink-2); line-height: 1.4; }
.p-frist-inhalt b { color: var(--ink); }
.p-frist-inhalt small { display: block; color: var(--muted-2); font-size: 12px; margin-top: 1px; }
.p-frist-rechts { display: flex; gap: 6px; align-items: center; }

/* ---------- Vertragsdetail ---------- */
.p-gelesen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.p-gelesen > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; background: #fff; }
.p-gelesen dt { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted-2); }
.p-gelesen dd { margin: 4px 0 0; font-size: 13.5px; color: var(--ink); font-weight: 700; line-height: 1.4; }
.p-fund {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--violett-bg); color: var(--violett-text); font-size: 11.5px; font-weight: 700; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.p-fund:hover { background: #E5DCFD; }
.p-fund .p-icon { width: 12px; height: 12px; }

/* ---------- KI-Chat ---------- */
.p-chat { display: flex; flex-direction: column; height: clamp(520px, calc(100vh - var(--oben-h) - 214px), 820px); height: clamp(520px, calc(100dvh - var(--oben-h) - 214px), 820px); overflow: hidden; }
.p-chat-kopf { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.p-chat-kopf .p-select { width: auto; max-width: 100%; height: 32px; font-size: 13px; }
.p-chat-kopf-info { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.p-chat-kopf-info .p-icon { width: 15px; height: 15px; color: var(--gruen-text); }
.p-chat-verlauf { flex: 1; overflow-y: auto; padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: auto; overscroll-behavior: contain; min-height: 0; }
.p-chat-leer { margin: auto; text-align: center; max-width: 470px; padding: 20px 6px; }
.p-chat-leer-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 16px 30px -16px rgba(214, 36, 127, .7); }
.p-chat-leer-ico .p-icon { width: 24px; height: 24px; }
.p-chat-leer h2 { font-size: 19px; }
.p-chat-leer p { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.55; }
.p-msg { display: flex; gap: 10px; align-items: flex-start; animation: p-blase-rein .3s var(--ease) both; min-width: 0; }
.p-msg--frage { justify-content: flex-end; }
.p-msg--frage .p-blase { background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: min(560px, 86%); font-size: 14px; line-height: 1.5; }
.p-anhang { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .12); font-size: 12.5px; }
.p-anhang .p-icon { width: 14px; height: 14px; }
.p-anhang-text { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 12.8px; line-height: 1.5; white-space: pre-line; color: rgba(255, 255, 255, .88); }
.p-ki-ava { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.p-ki-ava .p-icon { width: 17px; height: 17px; }
.p-antwort { min-width: 0; flex: 1; max-width: 760px; }
.p-antwort-name { font-size: 12px; font-weight: 700; color: var(--muted-2); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.p-antwort-koerper { background: #fff; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 13px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); box-shadow: 0 1px 2px rgba(21, 16, 28, .04); }
.p-antwort-koerper > * + * { margin-top: 9px; }
.p-antwort-koerper strong { color: var(--ink); font-weight: 700; }
.p-antwort-koerper ul, .p-antwort-koerper ol { padding-left: 20px; }
.p-antwort-koerper li + li { margin-top: 5px; }
.p-antwort-koerper li::marker { color: var(--violet); }
.p-antwort-koerper h4 { font-size: 14.5px; margin-top: 12px; }
.p-antwort-koerper h4:first-child { margin-top: 0; }
.p-a-hinweis { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--bg-3); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
.p-a-hinweis .p-icon { width: 14px; height: 14px; margin-top: 2px; color: var(--muted-2); }
.p-entwurf { border: 1px solid var(--line); border-left: 3px solid var(--violet); border-radius: 10px; padding: 11px 14px; background: var(--bg-3); font-size: 13.6px; line-height: 1.6; }
.p-entwurf p + p { margin-top: 8px; }
.p-zitat {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin: 0 1px; border: 0; border-radius: 6px; vertical-align: 1px;
  background: var(--violett-bg); color: var(--violett-text); font-size: 11px; font-weight: 700; cursor: pointer; line-height: 1; font-family: var(--font-body);
}
.p-zitat:hover { background: var(--violett); color: #fff; }
.p-unsichtbar, .p-block-zu { display: none !important; }
.p-quellen { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; animation: p-ansicht-rein .3s var(--ease) both; }
.p-quellen-titel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.p-quelle {
  display: grid; grid-template-columns: 22px 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s;
}
.p-quelle:hover { border-color: rgba(124, 77, 239, .4); background: #FDFBFF; }
.p-quelle-nr { width: 22px; height: 22px; border-radius: 7px; background: var(--violett-bg); color: var(--violett-text); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.p-quelle .p-icon { width: 16px; height: 16px; color: var(--muted-2); }
.p-quelle-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 700; }
.p-quelle-name small { font-weight: 500; color: var(--muted-2); margin-left: 6px; }
.p-quelle-stelle { font-size: 12px; color: var(--violett-text); font-weight: 700; white-space: nowrap; }
.p-antwort-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; color: var(--muted-2); flex-wrap: wrap; }
.p-antwort-meta .p-icon { width: 13px; height: 13px; color: var(--gruen-text); }
.p-antwort-aktionen { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.p-denkt { display: inline-flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 4px 16px 16px 16px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.p-denkt-punkte { display: inline-flex; gap: 4px; }
.p-denkt-punkte i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: p-tippen 1s ease-in-out infinite; }
.p-denkt-punkte i:nth-child(2) { animation-delay: .15s; background: #B05BD8; }
.p-denkt-punkte i:nth-child(3) { animation-delay: .3s; background: var(--pink-ton); }
.p-denkt .p-icon { width: 15px; height: 15px; color: var(--gruen-text); }
.p-chat-fuss { border-top: 1px solid var(--line); padding: 10px 14px 12px; background: var(--bg-3); }
.p-vorschlaege { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; max-height: 96px; overflow-y: auto; scrollbar-width: thin; }
.p-vorschlag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; font-size: 12.8px; color: var(--ink-2); cursor: pointer; text-align: left; line-height: 1.3; transition: border-color .15s, color .15s, background .15s;
  max-width: 100%;
}
.p-vorschlag:hover { border-color: rgba(124, 77, 239, .5); color: var(--violett-text); background: #FDFBFF; }
.p-vorschlag .p-icon { width: 13px; height: 13px; color: var(--violet); }
.p-vorschlag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-eingabe { display: flex; gap: 8px; align-items: center; }
.p-eingabe .p-input { height: 42px; border-radius: 12px; font-size: 14px; }
.p-eingabe .p-knopf { height: 42px; width: 42px; padding: 0; border-radius: 12px; }
.p-chat-hinweis { margin-top: 7px; font-size: 11.5px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; }
.p-chat-hinweis .p-icon { width: 12px; height: 12px; }

/* ---------- Seitenkarten (Bestand, Chat) ---------- */
.p-liste-zahlen { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.p-liste-zahlen li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.3px; color: var(--ink-2); }
.p-liste-zahlen li:last-child { border-bottom: 0; }
.p-liste-zahlen b { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.p-regeln { list-style: none; padding: 0; counter-reset: r; display: flex; flex-direction: column; gap: 9px; }
.p-regeln li { counter-increment: r; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 13.3px; color: var(--ink-2); line-height: 1.45; }
.p-regeln li::before { content: counter(r); width: 24px; height: 24px; border-radius: 8px; background: var(--grad-soft); color: var(--violett-text); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.p-balken { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 110px; margin-top: 8px; }
.p-balken div { display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.p-balken i { display: block; width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: var(--grad); transform-origin: bottom; animation: p-balken .7s var(--ease) both; min-height: 3px; }
.p-balken i.leer { background: var(--bg-4); }
.p-balken span { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.p-balken b { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.p-hbalken { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.p-hbalken-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 90px 36px; gap: 10px; align-items: center; font-size: 12.8px; color: var(--ink-2); }
.p-hbalken-zeile > div { height: 8px; border-radius: 999px; background: var(--bg-4); overflow: hidden; }
.p-hbalken-zeile > div i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.p-hbalken-zeile b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Rechte ---------- */
.p-raeume { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-raum { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fff; min-width: 0; position: relative; overflow: hidden; }
.p-raum::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--raum, var(--violett)); }
.p-raum-kopf { display: flex; align-items: center; gap: 10px; }
.p-raum-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--bg-4); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.p-raum-ico .p-icon { width: 16px; height: 16px; }
.p-raum b { display: block; font-family: var(--font-display); font-size: 14.5px; color: var(--ink); line-height: 1.25; }
.p-raum small { display: block; font-size: 12px; color: var(--muted-2); }
.p-raum-zahlen { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.p-raum-zahlen span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.p-raum-zahlen .p-icon { width: 13px; height: 13px; }
.p-raum-zahlen b { display: inline; font-size: 14px; margin-right: 3px; }
.p-raum-zugriff { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p-raum--streng { background: linear-gradient(180deg, #FFFBF0 0%, #fff 70%); border-color: rgba(245, 158, 11, .3); }
.p-raum-hinweis { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--gelb-text); display: flex; align-items: center; gap: 6px; }
.p-raum-hinweis .p-icon { width: 13px; height: 13px; }
.p-freischalten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }

/* ---------- Datenschutz ---------- */
.p-arch { width: 100%; }
.p-arch-breit { display: block; width: 100%; height: auto; }
.p-arch-hoch { display: none; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.p-arch text { font-family: var(--font-body); }
.p-svg-titel { font-family: var(--font-display) !important; font-weight: 700; fill: var(--ink); }
.p-svg-text { fill: var(--ink-2); font-weight: 500; }
.p-svg-klein { fill: var(--muted); font-weight: 500; }
.p-svg-gruen { fill: var(--gruen-text); font-weight: 700; }
.p-svg-rot { fill: var(--rot-text); font-weight: 700; }
.p-svg-violett { fill: var(--violett-text); font-weight: 700; }
.p-statuspanel { margin: 0; display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); }
.p-statuspanel dt, .p-statuspanel dd { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.3px; margin: 0; }
.p-statuspanel dt { color: var(--muted); padding-right: 14px; }
.p-statuspanel dd { color: var(--ink); font-weight: 700; line-height: 1.4; }
.p-statuspanel dt:nth-last-of-type(1), .p-statuspanel dd:last-of-type { border-bottom: 0; }
.p-statuspanel dd.null { color: var(--gruen-text); font-family: var(--font-display); font-size: 18px; }
.p-auslastung { display: flex; align-items: center; gap: 10px; }
.p-auslastung > div { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-4); overflow: hidden; max-width: 180px; }
.p-auslastung > div i { display: block; height: 100%; background: var(--gruen); border-radius: inherit; }
.p-checkliste { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.p-checkliste li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.3px; color: var(--ink-2); line-height: 1.45; }
.p-haken { width: 20px; height: 20px; border-radius: 50%; background: var(--gruen-bg); color: var(--gruen-text); display: inline-grid; place-items: center; flex: none; margin-top: 0; }
.p-haken .p-icon { width: 12px; height: 12px; stroke-width: 2.6; }
.p-checkliste b { color: var(--ink); }
.p-wer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-wer > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; }
.p-wer h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.p-wer h3 .p-icon { width: 16px; height: 16px; color: var(--violet); }
.p-wer ul { padding-left: 18px; margin-top: 8px; font-size: 13.3px; color: var(--ink-2); line-height: 1.5; }
.p-wer li::marker { color: var(--violet); }
.p-wer > div:first-child { background: linear-gradient(180deg, #FCF7FF 0%, #fff 100%); border-color: rgba(124, 77, 239, .25); }

/* ---------- Toast ---------- */
.p-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 950; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.p-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 16px 10px 10px;
  border-radius: 13px; font-size: 13.5px; font-weight: 500; line-height: 1.4; box-shadow: 0 20px 40px -18px rgba(21, 16, 28, .6);
  animation: p-toast-rein .35s var(--ease); max-width: 420px;
}
.p-toast.raus { animation: p-toast-raus .25s ease forwards; }
.p-toast-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--gruen); color: #fff; }
.p-toast-ico .p-icon { width: 14px; height: 14px; stroke-width: 2.5; }
.p-toast--ki .p-toast-ico { background: var(--grad); }
.p-toast--gelb .p-toast-ico { background: var(--gelb); }

/* ---------- Modal ---------- */
.p-modal-hg {
  position: fixed; inset: 0; z-index: 800; background: rgba(21, 16, 28, .42); display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: p-einblenden .2s ease;
}
.p-modal {
  width: min(640px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; box-shadow: 0 40px 100px -30px rgba(21, 16, 28, .5); animation: p-pop-rein .28s var(--ease); overflow: hidden;
}
.p-modal-kopf { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0 22px; }
.p-modal-kopf h2 { font-size: 18px; flex: 1; min-width: 0; }
.p-modal-koerper { padding: 14px 22px 20px; overflow: auto; }
.p-modal-fuss { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg-3); }
.p-brief { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; font-size: 13.8px; line-height: 1.65; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 4px var(--bg-3); }
.p-brief p + p { margin-top: 10px; }
.p-brief b { color: var(--ink); }

/* ---------- Dokument-Vorschau ---------- */
.p-doc-hg { position: fixed; inset: 0; z-index: 79; background: rgba(21, 16, 28, .3); opacity: 0; pointer-events: none; transition: opacity .25s; }
.p-doc-hg.offen { opacity: 1; pointer-events: auto; }
.p-doc {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(600px, 100vw); background: var(--bg-3); display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform .35s var(--ease); box-shadow: -30px 0 80px -30px rgba(21, 16, 28, .45); visibility: hidden;
}
.p-doc.offen { transform: none; visibility: visible; }
.p-doc-kopf { padding: 16px 18px 14px 22px; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.p-doc-kopf-text { min-width: 0; flex: 1; }
.p-doc-kopf h2 { font-size: 17px; line-height: 1.3; margin-top: 6px; }
.p-doc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.p-doc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.p-doc-meta .p-icon { width: 13px; height: 13px; }
.p-doc-scroll { flex: 1; overflow-y: auto; padding: 22px; overscroll-behavior: contain; }
.p-papier {
  background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(21, 16, 28, .08), 0 20px 50px -30px rgba(21, 16, 28, .3);
  padding: 34px 36px 40px; font-size: 13.6px; line-height: 1.7; color: #2A2433; position: relative;
}
.p-papier-kopf { text-align: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.p-papier-kopf h3 { font-size: 18px; letter-spacing: .01em; }
.p-papier-kopf p { margin-top: 6px; color: var(--muted); font-size: 12.8px; line-height: 1.5; }
.p-papier h4 { font-size: 14px; margin: 18px 0 6px; }
.p-papier p + p { margin-top: 8px; }
.p-papier .klein { font-size: 12px; color: var(--muted-2); }
.p-papier table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.8px; font-variant-numeric: tabular-nums; }
.p-papier th, .p-papier td { border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; text-align: left; }
.p-papier th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.p-papier td.r, .p-papier th.r { text-align: right; }
.p-markiert { background: var(--markiert); border-radius: 4px; box-shadow: 0 0 0 4px var(--markiert); transition: background 1s; }
.p-markiert.blitz { animation: p-markieren 1.6s var(--ease); }
.p-seitenzahl { position: absolute; right: 18px; bottom: 12px; font-size: 11px; color: var(--muted-2); }
.p-doc-fuss { padding: 11px 22px; border-top: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-doc-fuss .p-icon { width: 14px; height: 14px; color: var(--gruen-text); }

/* ---------- Rundgang ---------- */
.p-tour { position: fixed; inset: 0; z-index: 900; }
.p-tour-sperre { position: fixed; inset: 0; background: transparent; }
.p-tour-ring {
  position: fixed; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 6px rgba(236, 61, 150, .75), 0 0 0 200vmax rgba(21, 16, 28, .55);
  transition: top .4s var(--ease), left .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .3s;
}
.p-tour-pop {
  position: fixed; width: 390px; max-width: calc(100vw - 24px); background: #fff; border-radius: 18px;
  box-shadow: 0 30px 80px -24px rgba(21, 16, 28, .6), 0 0 0 1px rgba(21, 16, 28, .06); padding: 18px 18px 14px;
  transition: top .4s var(--ease), left .4s var(--ease), opacity .25s ease, transform .25s ease;
}
.p-tour-pop.wechsel { opacity: 0; transform: translateY(6px); }
.p-tour-zeile { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.p-tour-eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--pink); flex: 1; min-width: 0; }
.p-tour-zahl { font-size: 12px; font-weight: 700; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-tour-x { width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.p-tour-x:hover { background: var(--bg-4); color: var(--ink); }
.p-tour-x .p-icon { width: 16px; height: 16px; }
.p-tour-balken { height: 3px; border-radius: 999px; background: #EEE9F5; overflow: hidden; margin-bottom: 14px; }
.p-tour-balken i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .45s var(--ease); }
.p-tour-pop h3 { font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.p-tour-text { font-size: 14px; color: var(--muted); line-height: 1.55; margin-top: 6px; }
.p-tour-fuss { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.p-tour-luecke { flex: 1; }
.p-tour-tasten { font-size: 11px; color: var(--muted-2); }

/* ---------- Animationen ---------- */
@keyframes p-dreh { to { transform: rotate(360deg); } }
@keyframes p-einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes p-pop-rein { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes p-ansicht-rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes p-toast-rein { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes p-toast-raus { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes p-zeile-neu { 0% { background: #EFE6FF; } 70% { background: #F8F3FF; } 100% { background: transparent; } }
@keyframes p-chip-wechsel { 0% { transform: scale(.85); opacity: .4; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: none; } }
@keyframes p-blase-rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes p-tippen { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes p-puls { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes p-balken { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes p-markieren { 0% { background: #FFE35C; box-shadow: 0 0 0 8px #FFE35C; } 100% { background: var(--markiert); box-shadow: 0 0 0 4px var(--markiert); } }
@keyframes p-druck { 0% { transform: scale(1); } 35% { transform: scale(.94); } 100% { transform: scale(1); } }

/* ---------- Responsiv ---------- */
@media (max-width: 1280px) {
  .p-raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-raster-3 > :last-child { grid-column: 1 / -1; }
  .p-freischalten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-freischalten .p-knopf { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1180px) {
  .p-raster-21 { grid-template-columns: minmax(0, 1fr); }
  .p-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-hero { grid-template-columns: minmax(0, 1fr); }
  .p-raeume { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-ich-text { display: none; }
}
@media (max-width: 1100px) {
  .p-pille .lang { display: none; }
  .p-pille .kurz { display: inline; }
}
@media (max-width: 1023px) {
  :root { --rand: 24px; }
  .p-app { grid-template-columns: minmax(0, 1fr); }
  .p-kopf .p-kopf-menue { display: inline-flex; }
  .p-seite {
    position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(86vw, 300px); z-index: 75; background: var(--bg-3);
    transform: translateX(-104%); transition: transform .32s var(--ease); box-shadow: 0 0 60px -10px rgba(21, 16, 28, .35); padding-top: 16px; visibility: hidden;
  }
  body.p-schublade-offen .p-seite { transform: none; visibility: visible; }
  .p-schublade-hg { display: block; position: fixed; inset: 0; z-index: 74; background: rgba(21, 16, 28, .38); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.p-schublade-offen .p-schublade-hg { opacity: 1; pointer-events: auto; }
  body.p-schublade-offen { overflow: hidden; }
  .p-raster-2, .p-raster-3 { grid-template-columns: minmax(0, 1fr); }
  .p-md { grid-template-columns: minmax(0, 1fr); }
  .p-md-detail { position: static; max-height: none; overflow: visible; }
  .p-md[data-zeige="detail"] .p-md-liste { display: none; }
  .p-md[data-zeige="liste"] .p-md-detail { display: none; }
  .p-md-zurueck { display: inline-flex; margin-bottom: 10px; }
  .p-wer { grid-template-columns: minmax(0, 1fr); }
  .p-chat { height: clamp(500px, calc(100dvh - var(--oben-h) - 110px), 760px); }
}
@media (max-width: 860px) {
  .p-arch-breit { display: none; }
  .p-arch-hoch { display: block; }
  .p-checkliste { grid-template-columns: minmax(0, 1fr); }
  .p-gelesen { grid-template-columns: minmax(0, 1fr); }
  .p-raeume { grid-template-columns: minmax(0, 1fr); }
  /* Tabellen als Karten */
  .p-tabelle--karten thead { display: none; }
  .p-tabelle--karten, .p-tabelle--karten tbody, .p-tabelle--karten tr, .p-tabelle--karten td { display: block; width: 100%; }
  .p-tabelle--karten tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .p-tabelle--karten tbody tr:last-child { border-bottom: 0; }
  .p-tabelle--karten td { padding: 3px 0 !important; border: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .p-tabelle--karten td::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); padding-top: 2px; }
  .p-tabelle--karten td.kopfzelle { grid-template-columns: minmax(0, 1fr); padding-bottom: 6px !important; }
  .p-tabelle--karten td.kopfzelle::before { display: none; }
  .p-tabelle--karten tbody tr.klickbar:hover td { background: transparent; }
  .p-tabelle--karten tbody tr.gewaehlt { background: #F7F2FF; }
  .p-tabelle--karten tbody tr.gewaehlt td { background: transparent; }
  .p-tabelle--karten tbody tr.neu { animation: p-zeile-neu 2s var(--ease); }
  .p-tabelle--karten tbody tr.neu td { animation: none; }
}
@media (max-width: 767px) {
  .p-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .p-radar-monat { min-height: 96px; padding: 6px 1px 8px; }
  .p-radar-monat > span { font-size: 9.5px; letter-spacing: 0; }
  .p-radar-monat > span small { font-size: 8.5px; }
  .p-radar-punkt { width: 20px; height: 20px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
  .p-frist { grid-template-columns: 26px minmax(0, 1fr); gap: 4px 10px; }
  .p-frist-tag { grid-column: 2; }
  .p-frist-inhalt { grid-column: 2; }
  .p-frist-rechts { grid-column: 2; }
  .p-frist-nr { grid-row: 1 / span 2; align-self: start; }
}
@media (max-width: 640px) {
  :root { --rand: 16px; }
  body.p-body { font-size: 14px; }
  .p-hinweis { font-size: 11.5px; gap: 8px; padding: 5px 12px; min-height: 30px; }
  .p-hinweis .lang { display: none; }
  .p-hinweis .kurz { display: inline; }
  .p-kopf { gap: 8px; padding: 0 12px 0 10px; height: 58px; }
  .p-kuerzel { width: 32px; height: 32px; font-size: 11px; }
  .p-marke-text b { font-size: 13.5px; }
  .p-marke-text span { font-size: 11.5px; }
  .p-pille { height: 28px; padding: 0 9px 0 8px; font-size: 11.5px; gap: 6px; }
  .p-pille .kurz { display: none; }
  .p-kopf-aktionen { gap: 4px; }
  .p-rundgang-text { display: none; }
  #p-rundgang-knopf { width: 36px; padding: 0; }
  .p-ich { padding: 0 4px; height: 40px; gap: 4px; }
  .p-ich > .p-icon { display: none; }
  .p-rollen { position: fixed; left: 12px; right: 12px; top: calc(var(--oben-h) + 6px); width: auto; }
  .p-seiteninhalt { padding-top: 18px; }
  .p-h1 { font-size: 23px; }
  .p-unter { font-size: 14px; }
  .p-hero { padding: 20px 18px; border-radius: 18px; }
  .p-hero h1 { font-size: 24px; }
  .p-hero p { font-size: 14px; }
  .p-kachel { padding: 12px 13px; }
  .p-kachel-wert { font-size: 22px; }
  .p-karte-kopf { padding: 14px 16px 0; }
  .p-karte-koerper { padding: 12px 16px 16px; }
  .p-tabelle th:first-child, .p-tabelle td:first-child { padding-left: 16px; }
  .p-tabelle th:last-child, .p-tabelle td:last-child { padding-right: 16px; }
  .p-toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .p-toast { max-width: none; }
  .p-modal-hg { align-items: flex-end; padding: 0; }
  .p-modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; max-height: 92dvh; }
  .p-doc { width: 100vw; }
  .p-doc-scroll { padding: 14px; }
  .p-papier { padding: 24px 20px 32px; font-size: 13.4px; }
  .p-chat-verlauf { padding: 14px 12px 8px; }
  .p-chat-kopf { padding: 10px 12px; }
  .p-chat-kopf-info { margin-left: 0; }
  .p-ki-ava { width: 28px; height: 28px; border-radius: 9px; }
  .p-antwort-koerper { padding: 11px 13px; font-size: 13.8px; }
  .p-msg--frage .p-blase { max-width: 92%; }
  .p-quelle { grid-template-columns: 22px minmax(0, 1fr); }
  .p-quelle .p-icon { display: none; }
  .p-quelle-stelle { grid-column: 2; white-space: normal; }
  .p-vorschlaege { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 2px; }
  .p-vorschlag { flex: none; max-width: 82vw; }
  .p-erkannt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-auftrag dl { grid-template-columns: 96px minmax(0, 1fr); }
  .p-freischalten { grid-template-columns: minmax(0, 1fr); }
  .p-statuspanel { grid-template-columns: minmax(0, 1fr); }
  .p-statuspanel dt { border-bottom: 0; padding-bottom: 0; }
  .p-banner { align-items: flex-start; padding: 12px 14px; }
  .p-banner > .p-icon { margin-top: 1px; }
  .p-kachel-label { align-items: flex-start; }
  .p-kachel-label span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .p-rechnung { flex-direction: column; align-items: flex-start; gap: 8px; }
  .p-li-titel { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
  .p-reiter button { padding: 0 9px; gap: 5px; }
  .p-chat-kopf .p-reiter { width: 100%; }
  .p-chat-kopf .p-reiter button { flex: 1; justify-content: center; }
  .p-reiter .lang { display: none; }
  body.p-tour-an .p-chat { height: max(300px, calc(100dvh - var(--oben-h) - var(--tour-blatt-h, 240px) - 34px)); }
  .p-tour-pop { left: 12px !important; right: 12px; width: auto; max-width: none; top: auto !important; bottom: 12px; padding: 16px 16px 12px; }
  .p-tour-pop h3 { font-size: 17px; }
  .p-tour-text { font-size: 13.5px; }
  .p-tour-tasten { display: none; }
  body.p-tour-an .p-toasts { bottom: calc(var(--tour-blatt-h, 230px) + 8px); }
  .p-fuss { flex-direction: column; align-items: flex-start; }
}
@media (max-height: 820px) and (min-width: 1024px) {
  .p-tourkarte p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .p-oben, .p-seite, .p-tour, .p-toasts, .p-doc { display: none !important; }
  .p-app { display: block; }
}

/* ---------- Ergänzungen ---------- */
.p-ansicht.still, .p-ansicht.still .p-msg, .p-ansicht.still .p-quellen { animation: none; }
.p-markiert { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.p-markiert--block { display: block; padding: 2px 8px; margin: 10px -8px; border-radius: 8px; box-shadow: none; }
.p-markiert--block table { margin: 4px 0; }
.p-matrix th { white-space: normal; min-width: 96px; line-height: 1.3; }
.p-tabelle--mitte td { vertical-align: middle; }
.p-reiter .kurz { display: none; }
@media (max-width: 640px) { .p-reiter .kurz { display: inline; } }
@media (min-width: 641px) {
  body.p-tour-an .p-toasts { left: 20px; right: auto; align-items: flex-start; }
}
@media (min-width: 1024px) {
  body.p-tour-an .p-chat { height: clamp(520px, calc(100vh - var(--oben-h) - 36px), 900px); height: clamp(520px, calc(100dvh - var(--oben-h) - 36px), 900px); }
}
.p-banner--gelb b { color: #4A2C02; }
.p-antwort-meta span { flex: 1; min-width: 0; }
@media (max-width: 640px) { .p-erkannt dd { font-size: 13px; } .p-erkannt div { padding: 8px 10px; } }
@media (max-width: 640px) {
  body.p-tour-an .p-inhalt { padding-bottom: calc(var(--tour-blatt-h, 240px) + 24px); }
}

/* ---------- Abnahme 19.10.2026: Vertragstabelle, Knöpfe mobil, Firmenname ---------- */
.p-marke-text b em { font-style: normal; }
.p-firma-kurz { display: none; }
.p-raster-vt { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); }
.p-raster--oben { align-items: start; }
.p-tabelle--vt th, .p-tabelle--vt td { padding-left: 10px; padding-right: 10px; }
.p-tabelle--vt td small { hyphens: manual; }
.p-tabelle--vt td.nw small { white-space: normal; }
@media (max-width: 1360px) {
  .p-raster-vt { grid-template-columns: minmax(0, 1fr); }
  .p-raster-vt .p-gelesen { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 860px) {
  .p-raster-vt .p-gelesen { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 767px) {
  .p-frist-rechts { flex-wrap: wrap; min-width: 0; }
}
@media (max-width: 640px) {
  .p-seitenkopf-aktionen { margin-left: 0; max-width: 100%; }
  .p-seitenkopf-aktionen .p-knopf { max-width: 100%; font-size: 13.5px; padding: 0 12px; }
  .p-firma-lang { display: none; }
  .p-firma-kurz { display: inline; }
}
