/* screens.css — Screen-spezifische Styles (Fall-Arbeitsplatz u.a.) */

/* ---------------------------------------------------------- Overlay ----- */
.ovl { position: fixed; inset: 0; z-index: 100; background: oklch(0.3 0.02 60 / 0.42);
  display: flex; align-items: center; justify-content: center; padding: 40px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.ovl__panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 560px; max-width: 100%; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line-2); animation: pop .16s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.ovl__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ovl__body { padding: 22px 24px; overflow-y: auto; }
.ovl__text { font-size: 14.5px; line-height: 1.72; color: var(--ink); white-space: pre-wrap;
  border-left: 3px solid var(--line-2); padding-left: 16px; font-family: var(--serif); }
.ovl__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }

/* ====================================================== Fall-Kopf ======= */
.casehd { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 28px 0; position: sticky; top: 0; z-index: 15; }
.casehd__top { display: flex; align-items: flex-start; gap: 18px; }
.casehd__id { flex: 1; min-width: 0; }
.casehd__nr { font-family: var(--mono); font-size: 13px; color: var(--ink-3); font-weight: 500; }
.casehd__bc { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 3px; flex-wrap: wrap; }
.casehd__bc > svg { color: var(--line-3); }
.casehd__bclink { display: inline-flex; align-items: center; gap: 5px; border: none; background: transparent; font-family: inherit;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 2px 6px; border-radius: var(--r-sm); }
.casehd__bclink:hover { background: var(--inset); color: var(--wine); }
.casehd__bclink svg { color: var(--ink-4); }
.casehd__bclink:hover svg { color: var(--wine); }
.casehd__bccur { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink); padding: 2px 6px; }
.casehd__bccur svg { color: var(--wine); }
.casehd__title { font-family: var(--serif); font-size: 23px; font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 12px; }
.casehd__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; font-size: 13px; color: var(--ink-2); }
.casehd__meta .dotsep { color: var(--line-3); }
.casehd__meta b { color: var(--ink); font-weight: 600; }
.casehd__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

/* Stepper — Gesamtfortschritt, kompakt */
.stepper { display: flex; align-items: center; gap: 0; width: 100%; }
.step { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-4); white-space: nowrap; flex-shrink: 0; }
.step__lbl { display: inline; }
.step.is-done { color: var(--ink-3); }
.step__dot { width: 22px; height: 22px; border-radius: 100px; border: 2px solid var(--line-3); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: 11px; }
.step.is-done .step__dot { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.step.is-done { color: var(--ink-2); }
.step.is-current .step__dot { background: var(--wine); border-color: var(--wine); color: #fff; box-shadow: 0 0 0 4px var(--wine-tint); }
.step.is-current { color: var(--wine); }
.step__line { flex: 1; min-width: 18px; height: 2px; background: var(--line-2); margin: 0 7px; }
.step__line.is-done { background: var(--gruen); }

/* Tabs */
.tabs { display: flex; gap: 2px; margin-top: 16px; }
.tab { display: flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  border: none; background: transparent; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border-color .12s; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--wine); border-bottom-color: var(--wine); font-weight: 600; }
.tab__badge { font-size: 10.5px; background: var(--inset); color: var(--ink-3); padding: 0 6px; border-radius: 100px; font-weight: 600; }
.tab.is-active .tab__badge { background: var(--wine-tint-2); color: var(--wine); }

/* ====================================================== Übersicht ======= */
.ov { display: grid; grid-template-columns: 1fr 312px; gap: 22px; }
@media (max-width: 1100px) { .ov { grid-template-columns: 1fr; } }
.ov__side { display: flex; flex-direction: column; gap: 16px; }

/* Gesamturteil-Karte */
.verdict { border-radius: var(--r-md); border: 1px solid var(--bernstein-tint-2); overflow: hidden; }
.verdict__bar { height: 4px; background: var(--bernstein); }
.verdict__body { padding: 20px 22px; background: linear-gradient(180deg, var(--bernstein-tint) 0%, var(--surface) 64%); }
.verdict__row { display: flex; align-items: center; gap: 14px; }
.verdict__badge { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 21px;
  color: oklch(0.40 0.10 65); white-space: nowrap; }
.verdict__quote { font-family: var(--serif); font-size: 40px; font-weight: 600; color: oklch(0.44 0.11 65); line-height: 1; letter-spacing: -0.02em; }
.verdict__quote small { font-size: 18px; font-weight: 500; }
.verdict h2 { font-size: 16px; margin: 16px 0 6px; }
.verdict__text { font-size: 14px; line-height: 1.65; color: var(--ink-2); }

.empf { margin-top: 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px; }
.empf__ic { width: 34px; height: 34px; border-radius: 8px; background: var(--wine-tint); color: var(--wine); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.empf__t { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.empf__d { font-weight: 600; font-size: 14px; font-family: var(--serif); }

/* Quotelung-Visualisierungen */
.qz { margin-top: 6px; }
.qz__bar { height: 30px; border-radius: var(--r); overflow: hidden; display: flex; border: 1px solid var(--line-2); }
.qz__seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; }
.qz__seg--ok { background: var(--bernstein); }
.qz__seg--cut { background: var(--rot-tint-2); color: var(--rot); }
.qz__legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12.5px; }
.qz__leg { display: flex; align-items: center; gap: 7px; color: var(--ink-2); }
.qz__sw { width: 11px; height: 11px; border-radius: 3px; }

.calc { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 4px; }
.calc__row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.calc__row:last-child { border-bottom: none; }
.calc__row.is-sub { color: var(--ink-3); font-size: 12.5px; padding: 5px 0 5px 14px; }
.calc__row.is-total { border-top: 2px solid var(--line-2); margin-top: 4px; border-bottom: none; padding-top: 12px; font-weight: 600; }
.calc__val { font-family: var(--mono); font-weight: 600; }
.calc__val.is-cut { color: var(--rot); }
.calc__val.is-big { font-size: 19px; color: var(--gruen); }

/* Donut */
.qz__donutwrap { display: flex; align-items: center; gap: 22px; }
.qz__donutc { font-family: var(--serif); }

/* Skala */
.qz__scale { position: relative; height: 46px; margin: 22px 4px 8px; }
.qz__track { position: absolute; top: 16px; left: 0; right: 0; height: 8px; border-radius: 100px;
  background: linear-gradient(90deg, var(--rot-tint-2), var(--bernstein-tint-2), var(--gruen-tint-2)); }
.qz__range { position: absolute; top: 16px; height: 8px; border-radius: 100px; background: var(--bernstein); }
.qz__marker { position: absolute; top: 6px; width: 3px; height: 28px; background: var(--ink); border-radius: 2px; }
.qz__mlabel { position: absolute; top: -4px; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.qz__ticks { position: absolute; bottom: -2px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-4); }

/* Eckdaten / Side */
.kv { display: flex; flex-direction: column; gap: 0; }
.kv__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv__row:last-child { border-bottom: none; }
.kv__k { color: var(--ink-3); }
.kv__v { font-weight: 600; text-align: right; }
.sidecard__next { background: var(--wine); color: #fff; border-radius: var(--r-md); padding: 16px; }
.sidecard__next .eyebrow { color: oklch(0.86 0.04 20); }
.sidecard__next h3 { color: #fff; font-size: 15.5px; margin: 6px 0 12px; }

.sachv { font-size: 14px; line-height: 1.68; color: var(--ink-2); }
.notebox { background: var(--rot-tint); border: 1px solid var(--rot-tint-2); border-radius: var(--r); padding: 12px 14px; margin-top: 14px; }
.notebox__l { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--rot); margin-bottom: 4px; }
.notebox__t { font-size: 13px; color: var(--ink); line-height: 1.55; }

/* ====================================================== Prüfpfad ======== */
.pp { max-width: 1200px; }
.pp__track { max-width: 880px; }
.ppgrid { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .ppgrid { grid-template-columns: 1fr; } }
.ppdetail { position: sticky; top: 8px; }
.ppsrc { display: flex; flex-direction: column; gap: 12px; }
.ppsrc__g { }
.ppsrc__l { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 6px; }
.ppans { background: var(--bernstein-tint); border: 1px solid var(--bernstein-tint-2); border-radius: var(--r); padding: 11px 13px; }
.ppans__l { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: oklch(0.46 0.10 65); margin-bottom: 3px; }
.ppans__v { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.ppwahl { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 100px; font-size: 12.5px; font-weight: 700; background: var(--inset); color: var(--ink); border: 1px solid var(--line-2); }
.ppsrcitem { display: flex; align-items: flex-start; gap: 8px; }
.ppsrccut { font-size: 12px; line-height: 1.45; color: var(--ink-2); font-style: italic; min-width: 0; }
.pppop__foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pp__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); margin-bottom: 22px; position: sticky; top: 0; z-index: 5; }
.pp__bar .vtag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--inset); padding: 4px 10px; border-radius: 100px; }
.pp__legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.pp__legend span { display: inline-flex; align-items: center; gap: 5px; }
.pp__legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* Recalc-Banner */
.recalc { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 18px;
  background: var(--blau-tint); border: 1px solid var(--blau-tint-2); }
.recalc__sp { width: 18px; height: 18px; border: 2px solid var(--blau); border-right-color: transparent; border-radius: 100px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modul-Gruppe */
.pp__mod { position: relative; padding-left: 46px; padding-bottom: 8px; }
.pp__mod::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: -8px; width: 2px; background: var(--line-2); }
.pp__mod:last-child::before { display: none; }
.pp__mod.is-last-spine::before { bottom: 50%; }
.pp__modhead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; }
.pp__modbadge { position: absolute; left: -46px; width: 34px; height: 34px; border-radius: 100px; background: var(--surface);
  border: 2px solid var(--line-3); display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 12px; font-weight: 600; color: var(--ink-2); z-index: 2; }
.pp__modbadge.t-gruen { border-color: var(--gruen); color: var(--gruen); background: var(--gruen-tint); }
.pp__modbadge.t-bernstein { border-color: var(--bernstein); color: oklch(0.44 0.10 65); background: var(--bernstein-tint); }
.pp__modbadge.t-rot { border-color: var(--rot); color: var(--rot); background: var(--rot-tint); }
.pp__modbadge.t-blau { border-color: var(--blau); color: var(--blau); background: var(--blau-tint); }
.pp__modtitle { font-family: var(--serif); font-weight: 600; font-size: 16px; white-space: nowrap; }
.pp__modtitle small { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 500; margin-right: 8px; }
.pp__krit { font-size: 10.5px; font-weight: 600; color: var(--rot); background: var(--rot-tint); border: 1px solid var(--rot-tint-2);
  padding: 1px 7px; border-radius: 100px; letter-spacing: .03em; }
.pp__nodes { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }

/* Knoten */
.ppnode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ppnode.is-result { border-color: var(--bernstein-tint-2); box-shadow: 0 0 0 1px var(--bernstein-tint-2); }
.ppnode.is-result.t-gruen { border-color: var(--gruen-tint-2); box-shadow: 0 0 0 1px var(--gruen-tint-2); }
.ppnode.is-info { border-color: var(--blau-tint-2); box-shadow: 0 0 0 1px var(--blau-tint-2); }
.ppnode__q { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px 11px; border-bottom: 1px solid var(--line); }
.ppnode.is-result .ppnode__q { background: var(--bernstein-tint); border-color: var(--bernstein-tint-2); }
.ppnode.is-result.t-gruen .ppnode__q { background: var(--gruen-tint); border-color: var(--gruen-tint-2); }
.ppnode.is-info .ppnode__q { background: var(--blau-tint); border-color: var(--blau-tint-2); }
.knodetyp { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  background: var(--inset); border: 1px solid var(--line-2); padding: 3px 7px; border-radius: var(--r-sm); white-space: nowrap; margin-top: 1px; }
.ppnode__qt { font-family: var(--serif); font-weight: 600; font-size: 14.5px; line-height: 1.4; flex: 1; }
.ppnode__body { padding: 13px 16px 14px; }
.ppnode__ans { display: flex; gap: 10px; }
.ppnode__ai { width: 22px; height: 22px; border-radius: 6px; background: var(--wine-tint); color: var(--wine);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.ppnode__anstxt { font-size: 13.5px; line-height: 1.62; color: var(--ink); flex: 1; }
.ppnode__wahl { display: inline-block; font-weight: 600; margin-bottom: 3px; }
.ppnode__wahl.is-ja { color: var(--gruen); }
.ppnode__wahl.is-nein { color: var(--ink-2); }
.ppnode__sources { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-2); }
.ppnode__srclabel { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); margin-right: 2px; }
.ppnode__resultval { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--serif); font-weight: 600; font-size: 17px; color: oklch(0.44 0.11 65); margin-left: auto; }

/* Info-Nachforderung Block */
.infobox { margin-top: 12px; border: 1px dashed var(--blau-tint-2); background: var(--blau-tint); border-radius: var(--r); padding: 12px 14px; }
.infobox__h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--blau); margin-bottom: 8px; }
.infobox__flow { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.infobox__step { background: var(--surface); border: 1px solid var(--blau-tint-2); border-radius: 100px; padding: 3px 10px; font-weight: 500; }
.infobox__ans { font-size: 13px; line-height: 1.55; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 9px 11px; }
.infobox.is-open { border-color: var(--blau); }

.empfnode { background: var(--wine); color: #fff; border-radius: var(--r-md); padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.empfnode .ppnode__ai { background: oklch(1 0 0 / 0.18); color: #fff; }
.empfnode h4 { color: #fff; font-size: 14px; margin-bottom: 5px; }
.empfnode p { font-size: 13.5px; line-height: 1.6; color: oklch(0.94 0.02 20); margin: 0; }

/* Modal Frage ergänzen */
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.fld label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld textarea, .fld select { font-family: inherit; font-size: 13.5px; padding: 9px 11px; border: 1px solid var(--line-2);
  border-radius: var(--r); background: var(--surface); color: var(--ink); outline: none; }
.fld input:focus, .fld textarea:focus, .fld select:focus { border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); }
.fld textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* Prüfpfad — Rahmen-Erklärung */
.pp__intro { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.pp__introic { width: 38px; height: 38px; border-radius: 10px; background: var(--wine-tint); color: var(--wine);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pp__introt { font-weight: 600; font-size: 14px; }
.pp__intros { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }

/* Verzweigungs-Hinweis an einfachen Entscheidungen */
.ppnode__branch { display: flex; align-items: center; gap: 12px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ppnode__branchtaken { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--gruen);
  background: var(--gruen-tint); border: 1px solid var(--gruen-tint-2); padding: 3px 9px; border-radius: 100px; }
.ppnode__branchalt { font-size: 11.5px; color: var(--ink-3); }

/* Echte Verzweigung — parallele / wegsterbende Äste */
.ppnode.is-fork { border-color: var(--line-2); }
.forkhint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2);
  background: var(--inset); border-radius: var(--r); padding: 9px 12px; margin-bottom: 14px; }
.forkhint svg { color: var(--wine); flex-shrink: 0; }
.forklanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 12px; }
.forklane { border: 1px solid var(--line-2); border-radius: var(--r); padding: 13px 14px; background: var(--surface);
  border-top: 3px solid var(--line-3); display: flex; flex-direction: column; gap: 8px; }
.forklane.is-weiter { border-top-color: var(--gruen); background: linear-gradient(180deg, var(--gruen-tint) 0%, var(--surface) 38%); }
.forklane.is-beendet { border-top-color: var(--line-3); opacity: 0.92; }
.forklane.is-primaer { border-top-color: var(--bernstein); box-shadow: 0 0 0 1px var(--bernstein-tint-2); }
.forklane__h { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.forklane__status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.forklane__status.weiter { color: var(--gruen); }
.forklane__status.beendet { color: var(--ink-4); }
.forklane__label { font-weight: 650; font-size: 13.5px; }
.forklane__a { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.forklane__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.forklane__wert { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink); margin-left: auto; }
.forklane__src { display: flex; gap: 6px; flex-wrap: wrap; }
.forkfazit { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.forkfazit svg { color: var(--wine); }

/* Prüfpfad — Fußbereich mit Pfad-Aktionen */
.pp__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 8px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface-2); }
.pp__footinfo { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-3); max-width: 520px; }
.pp__footinfo svg { color: var(--wine); flex-shrink: 0; }

/* ==================================================== Korrespondenz ===== */
.esk { display: flex; align-items: stretch; gap: 0; margin-bottom: 8px; }
.eskstep { flex: 1; position: relative; padding: 14px 16px; border: 1px solid var(--line-2); background: var(--surface); }
.eskstep:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.eskstep:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.eskstep:not(:last-child) { border-right: none; }
.eskstep.is-done { background: var(--gruen-tint); border-color: var(--gruen-tint-2); }
.eskstep.is-vorgeschlagen { background: var(--wine-tint); border-color: var(--wine); box-shadow: 0 0 0 1px var(--wine); z-index: 2; }
.eskstep__n { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.eskstep.is-done .eskstep__n { color: var(--gruen); }
.eskstep.is-vorgeschlagen .eskstep__n { color: var(--wine); }
.eskstep__dot { width: 18px; height: 18px; border-radius: 100px; border: 2px solid var(--line-3); display: flex; align-items: center; justify-content: center; }
.eskstep.is-done .eskstep__dot { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.eskstep.is-vorgeschlagen .eskstep__dot { background: var(--wine); border-color: var(--wine); color: #fff; }
.eskstep__t { font-family: var(--serif); font-weight: 600; font-size: 14px; }
.eskstep__s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.esk__quer { display: flex; align-items: center; gap: 9px; padding: 10px 14px; margin-top: 10px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }

/* Editor */
.editor { display: grid; grid-template-columns: 1fr 296px; gap: 18px; }
.editor.is-fokus { grid-template-columns: 1fr; max-width: 820px; }
.editorbox { border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.editor__toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.editor__aibadge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--wine); background: var(--wine-tint); border: 1px solid var(--wine-tint-2); padding: 4px 9px; border-radius: 100px; }
.editor__fields { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.editor__frow { display: flex; gap: 10px; font-size: 13px; align-items: baseline; }
.editor__flabel { width: 78px; flex-shrink: 0; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.editor__finput { flex: 1; border: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--ink); outline: none; padding: 3px 4px; border-radius: var(--r-sm); }
.editor__finput:focus { background: var(--inset); }
.editor__finput.betreff { font-weight: 600; }
.editor__doc { padding: 26px 30px; font-family: var(--serif); font-size: 14.5px; line-height: 1.78; color: var(--ink);
  white-space: pre-wrap; outline: none; min-height: 360px; background:
    repeating-linear-gradient(transparent, transparent 31px, var(--paper-2) 31px, var(--paper-2) 32px); }
.editor__doc:focus { box-shadow: inset 0 0 0 2px var(--wine-tint); }
.editor__foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }

.editor__side { display: flex; flex-direction: column; gap: 14px; }
.bauz { font-size: 12.5px; }
.bauz__item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 7px; background: var(--surface); }
.bauz__ic { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bauz__ic.antwort { background: var(--bernstein-tint); color: oklch(0.44 0.10 65); }
.bauz__ic.quelle { background: var(--wine-tint); color: var(--wine); }
.promptbox { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); background: var(--inset); border: 1px solid var(--line-2); border-radius: var(--r); padding: 11px 13px; font-style: italic; }

/* Verlauf-Timeline */
.tl { position: relative; padding-left: 30px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.tlitem { position: relative; padding-bottom: 18px; }
.tlitem:last-child { padding-bottom: 0; }
.tldot { position: absolute; left: -29px; top: 2px; width: 20px; height: 20px; border-radius: 100px; background: var(--surface);
  border: 2px solid var(--line-3); display: flex; align-items: center; justify-content: center; }
.tldot.out { border-color: var(--wine); color: var(--wine); }
.tldot.in { border-color: var(--blau); color: var(--blau); }
.tlcard { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.tlcard__h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tlcard__t { font-weight: 600; font-size: 13.5px; }
.tlcard__meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.tlcard__pre { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.tlcard.is-rueck { border-color: var(--gruen-tint-2); background: var(--gruen-tint); }

/* ===================================================== Beilagen ========= */
.beil { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.beilcard { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); transition: box-shadow .12s, border-color .12s; cursor: pointer; }
.beilcard:hover { box-shadow: var(--shadow-md); border-color: var(--line-3); }
.beilthumb { height: 104px; display: flex; align-items: center; justify-content: center; position: relative;
  background: repeating-linear-gradient(135deg, var(--inset), var(--inset) 9px, var(--surface-2) 9px, var(--surface-2) 18px); color: var(--ink-4); }
.beilthumb.is-pdf { color: var(--rot); background: var(--rot-tint); }
.beilthumb.is-img { color: var(--blau); }
.beilcard__new { position: absolute; top: 8px; right: 8px; }
.beilcard__b { padding: 10px 12px; }
.beilcard__n { font-size: 12.5px; font-weight: 600; word-break: break-word; line-height: 1.35; }
.beilcard__m { font-size: 11px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 6px; }
.beilcap { font-size: 11px; color: var(--ink-3); font-style: italic; margin-top: 5px; line-height: 1.4; }

/* ===================================================== KI-Chat ========== */
.chat { max-width: 760px; display: flex; flex-direction: column; height: calc(100vh - 280px); min-height: 420px; position: relative; }
.chat.is-dropover { outline: 2px dashed var(--wine); outline-offset: 6px; border-radius: var(--r-md); }
.chat__drophint { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--wine); background: var(--wine-tint); border-radius: var(--r-md); pointer-events: none; }
.chat__scroll { flex: 1; overflow-y: auto; padding: 4px 2px 16px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg__av { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.msg__av.ai { background: var(--wine-tint); color: var(--wine); }
.msg__bubble { padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.6; }
.msg.ai .msg__bubble { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 3px; }
.msg.user .msg__bubble { background: var(--wine); color: #fff; border-top-right-radius: 3px; }
.msg__src { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.chat__input { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 8px 8px 8px 14px; background: var(--surface); }
.chat__input textarea { flex: 1; border: none; outline: none; resize: none; font-family: inherit; font-size: 13.5px; background: transparent; color: var(--ink); line-height: 1.5; max-height: 120px; }
.chat__hint { font-size: 11px; color: var(--ink-4); margin-top: 7px; text-align: center; }
/* KI-Chat: mehrere Chats (Liste links + Unterhaltung rechts) + Bild-Anhänge */
.kichat { display: flex; gap: 16px; height: calc(100vh - 280px); min-height: 440px; }
.kichat__list { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.kichat__listhd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.kichat__items { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.chatitem { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); }
.chatitem:hover { background: var(--inset); }
.chatitem.is-sel { background: var(--wine-tint); color: var(--wine); }
.chatitem__b { flex: 1; min-width: 0; }
.chatitem__n { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatitem.is-sel .chatitem__n { color: var(--wine); }
.chatitem__d { font-size: 11px; color: var(--ink-4); }
.chatitem__del { opacity: 0; flex-shrink: 0; border: none; background: transparent; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; border-radius: 6px; padding: 3px; }
.chatitem:hover .chatitem__del, .chatitem__del.is-confirm { opacity: 1; }
.chatitem__del:hover { color: var(--rot); background: var(--rot-tint); }
.chatitem__del.is-confirm { font-size: 11px; font-weight: 700; color: var(--rot); background: var(--rot-tint); padding: 3px 7px; }
.kichat__main { flex: 1; min-width: 0; display: flex; }
.kichat__thread { max-width: none; width: 100%; height: 100%; }
.kichat__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-4); font-size: 13.5px; border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.msg__time { font-size: 10.5px; opacity: .7; margin-top: 6px; text-align: right; }
.msg.user .msg__time { color: oklch(1 0 0 / 0.85); }
.msg__imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg__img { width: 84px; height: 84px; object-fit: cover; border-radius: 7px; }
.chat__pending { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 2px; }
.chat__pendimg { position: relative; }
.chat__pendimg img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; display: block; }
.chat__pendx { position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; border-radius: 100px; border: none; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ===================================================== Versionen ======== */
.verlist { display: flex; flex-direction: column; gap: 14px; }
.vcard { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.vcard.is-current { border-color: var(--wine-tint-2); box-shadow: 0 0 0 1px var(--wine-tint-2); }
.vcard__h { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.vcard__v { width: 36px; height: 36px; border-radius: 9px; background: var(--inset); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.vcard.is-current .vcard__v { background: var(--wine); color: #fff; }
.vcard__b { padding: 14px 16px; }
.vcard__trig { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.diffrow { display: grid; grid-template-columns: 52px 1fr 18px 1fr; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 12.5px; }
.diffrow .dm { font-family: var(--mono); font-weight: 600; color: var(--ink-3); font-size: 11.5px; }
.diffrow .dv { color: var(--ink-4); text-decoration: line-through; }
.diffrow .dn { font-weight: 600; }
.diffrow .dn.verbessert { color: var(--gruen); }
.diffrow .dn.neu { color: var(--wine); }

/* ===================================================== Annahme-Prüfung == */
.annahme { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .annahme { grid-template-columns: 1fr; } }
.annahme__side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 8px; }

/* Executive Summary */
.exec__top { display: flex; gap: 18px; align-items: stretch; }
.exec__gauge { width: 116px; flex-shrink: 0; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 8px; text-align: center; }
.exec__gauge.t-gruen { background: var(--gruen-tint); border: 1px solid var(--gruen-tint-2); }
.exec__gauge.t-bernstein { background: var(--bernstein-tint); border: 1px solid var(--bernstein-tint-2); }
.exec__gauge.t-rot { background: var(--rot-tint); border: 1px solid var(--rot-tint-2); }
.exec__gaugev { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.exec__gauge.t-gruen .exec__gaugev { color: var(--gruen); }
.exec__gauge.t-bernstein .exec__gaugev { color: oklch(0.44 0.10 65); }
.exec__gaugev small { font-size: 16px; }
.exec__gaugel { font-size: 11px; font-weight: 600; color: var(--ink-3); line-height: 1.2; }
.exec__kpis { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.exec__kpi { background: var(--surface); padding: 11px 14px; }
.exec__kpi.is-share { background: var(--wine-tint); }
.exec__kpil { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.exec__kpiv { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; }
.exec__kpi.is-share .exec__kpiv { color: var(--wine); }
.exec__kpis2 { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.exec__sec { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.exec__fragen { display: flex; flex-direction: column; gap: 10px; }
.execq { display: flex; gap: 11px; align-items: flex-start; }
.execq.is-link { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 11px 13px; cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.execq.is-link:hover { border-color: var(--wine-tint-2); background: var(--wine-tint); box-shadow: var(--shadow); }
.execq__go { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--wine); white-space: nowrap; flex-shrink: 0; align-self: center; opacity: .55; transition: opacity .12s; }
.execq.is-link:hover .execq__go { opacity: 1; }
.execq__mod { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: var(--r-sm); flex-shrink: 0; margin-top: 1px; background: var(--inset); color: var(--ink-2); }
.execq__mod.t-gruen { background: var(--gruen-tint); color: var(--gruen); }
.execq__mod.t-bernstein { background: var(--bernstein-tint); color: oklch(0.44 0.10 65); }
.execq__f { font-size: 13px; font-weight: 600; }
.execq__a { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-top: 1px; }
.exec__risiken { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.exec__risiken li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.exec__risiken svg { color: var(--bernstein); flex-shrink: 0; margin-top: 2px; }

/* Votum-Panel */
.votepanel__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.votecount { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink-3); background: var(--inset); padding: 3px 11px; border-radius: 100px; }
.votecount.is-done { background: var(--gruen-tint); color: var(--gruen); }
.votelist { display: flex; flex-direction: column; gap: 8px; }
.voterow { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r); }
.voterow.is-angenommen { border-color: var(--gruen-tint-2); background: var(--gruen-tint); }
.voterow.is-abgelehnt { border-color: var(--rot-tint-2); background: var(--rot-tint); }
.voterow__n { font-size: 13px; font-weight: 600; }
.voterow__you { color: var(--wine); font-weight: 600; }
.voterow__r { font-size: 11px; color: var(--ink-3); }
.votebadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.votebadge.is-angenommen { color: var(--gruen); }
.votebadge.is-abgelehnt { color: var(--rot); }
.votebadge.is-offen { color: var(--ink-4); }
.voteactions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.votemine { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.voteundo { border: none; background: transparent; color: var(--ink-3); font-family: inherit; font-size: 12px; text-decoration: underline; margin-left: auto; }
.voteundo:hover { color: var(--ink); }

.annres { display: flex; align-items: center; gap: 13px; padding: 15px 16px; border-radius: var(--r-md); }
.annres.is-ok { background: var(--gruen-tint); border: 1px solid var(--gruen-tint-2); }
.annres.is-ok > svg { color: var(--gruen); flex-shrink: 0; }
.annres.is-no { background: var(--rot-tint); border: 1px solid var(--rot-tint-2); }
.annres.is-no > svg { color: var(--rot); flex-shrink: 0; }
.annres__t { font-weight: 600; font-size: 13.5px; }
.annres__s { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }

/* Mandat erteilt — Banner in der Fall-Übersicht */
.mandatok { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--gruen-tint) 0%, var(--surface) 75%); border: 1px solid var(--gruen-tint-2); }
.mandatok__ic { width: 40px; height: 40px; border-radius: 11px; background: var(--gruen-tint-2); color: var(--gruen); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mandatok__t { font-weight: 650; font-size: 15px; }
.mandatok__s { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }

/* ===================================================== Klienten ========= */
.clientgrid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .clientgrid { grid-template-columns: 1fr; } }
.clienthd { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.clienthd__ic { width: 52px; height: 52px; border-radius: 12px; background: var(--wine-tint); color: var(--wine); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.clienthd__n { font-family: var(--serif); font-weight: 600; font-size: 19px; }
.polizze { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 10px; transition: border-color .12s; }
.polizze:hover { border-color: var(--line-3); }
.polizze__ic { width: 38px; height: 38px; border-radius: 9px; background: var(--inset); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.polizze__nr { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.polizze__sp { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.cllist__ic { width: 32px; height: 32px; border-radius: 8px; background: var(--inset); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cldetail__hint { text-align: center; align-self: start; }

/* Klienten-Detail — neuer Aufbau */
.cldet__hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cldet__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cldet__avatar { width: 52px; height: 52px; border-radius: 13px; background: var(--wine-tint); color: var(--wine); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cldet__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.cldet__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 760px) { .cldet__stats { grid-template-columns: repeat(2, 1fr); } }
.cldstat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.cldstat__ic { width: 36px; height: 36px; border-radius: 10px; background: var(--inset); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cldstat__ic.is-warn { background: var(--bernstein-tint); color: oklch(0.46 0.10 65); }
.cldstat__v { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.cldstat__l { font-size: 11.5px; color: var(--ink-3); }
.cldet__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .cldet__grid { grid-template-columns: 1fr; } }

/* Upload / Extraktion */
.dropzone { border: 2px dashed var(--line-3); border-radius: var(--r-md); padding: 26px; text-align: center; color: var(--ink-3); background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover { border-color: var(--wine); background: var(--wine-tint); color: var(--wine); }
.dropzone__ic { margin-bottom: 8px; }
.extract__file { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); margin-bottom: 16px; }
.extract__fic { width: 34px; height: 34px; border-radius: 8px; background: var(--rot-tint); color: var(--rot); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.exfield { display: grid; grid-template-columns: 168px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.exfield:last-child { border-bottom: none; }
.exfield__l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.exfield__v { font-size: 13.5px; font-weight: 600; border: 1px solid transparent; border-radius: var(--r-sm); padding: 5px 9px; background: transparent; font-family: inherit; outline: none; width: 100%; color: var(--ink); }
.exfield__v:hover { border-color: var(--line-2); }
.exfield__v:focus { border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); background: var(--surface); }
.exfield.is-low .exfield__v { background: var(--bernstein-tint); border-color: var(--bernstein-tint-2); }
/* Klienten/Polizzen — Formular, Upload-Drop, PDF-Link */
.clform { display: flex; flex-direction: column; gap: 12px; }
.clf { display: flex; flex-direction: column; gap: 5px; }
.clf > span { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.clf input { font-size: 13.5px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; background: var(--surface); font-family: inherit; outline: none; color: var(--ink); width: 100%; }
.clf input:focus { border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); }
.cldrop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 16px; border: 1.5px dashed var(--line-3); border-radius: var(--r-md); background: var(--inset); color: var(--ink-2); cursor: pointer; transition: border-color .12s, background .12s; }
.cldrop:hover { border-color: var(--wine); background: var(--wine-tint); }
.cldrop.is-over { border-color: var(--wine); border-style: solid; background: var(--wine-tint); box-shadow: 0 0 0 3px var(--wine-tint); }
.cldrop__t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cldrop__s { font-size: 12px; color: var(--ink-3); }
.polizze__pdf { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); border: 1px solid var(--line-2); flex-shrink: 0; }
.polizze__pdf:hover { color: var(--wine); border-color: var(--wine); background: var(--wine-tint); }
/* Beilage/Record-Vorschau-Dialog (MIME-Vorschau im iFrame statt neuem Tab) */
.recordbar { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.recordbar__name { flex: 1; min-width: 160px; font-size: 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 7px 10px; background: var(--surface); font-family: inherit; outline: none; color: var(--ink); }
.recordbar__name:focus { border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); }
.recordview { background: var(--inset); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.recordview iframe, .recordview img { display: block; }
.recordtext { margin: 0; padding: 14px 16px; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); font-family: var(--mono); }
.recordempty { padding: 40px; text-align: center; color: var(--ink-3); font-size: 13px; }
.konf { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.konf.hoch { color: var(--gruen); }
.konf.mittel { color: oklch(0.5 0.10 65); }
.konf.niedrig { color: var(--rot); }
.konf i { width: 7px; height: 7px; border-radius: 100px; background: currentColor; display: inline-block; }

/* ===================================================== Admin ============ */
.adminhd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.adminhd h1 { white-space: nowrap; }
.baumwrap { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .baumwrap { grid-template-columns: 1fr; } }
.baum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; overflow-x: auto; }
.baumrow { display: flex; align-items: stretch; gap: 0; }
.bmod { min-width: 178px; flex: 1; padding: 10px; }
.bmod__h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r); margin-bottom: 8px; font-weight: 600; font-size: 12.5px; }
.bmod__h.t-neutral { background: var(--neutral-tint); color: var(--ink-2); }
.bmod__h.t-gruen { background: var(--gruen-tint); color: var(--gruen); }
.bmod__h.t-bernstein { background: var(--bernstein-tint); color: oklch(0.44 0.10 65); }
.bmod__h .mono { font-size: 11px; }
.bnode { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 6px; font-size: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; position: relative; }
.bnode:hover { border-color: var(--wine); box-shadow: var(--shadow); }
.bnode.is-sel { border-color: var(--wine); box-shadow: 0 0 0 1px var(--wine); }
.bnode.is-result { background: var(--bernstein-tint); border-color: var(--bernstein-tint-2); }
.bnode.is-info { background: var(--blau-tint); border-color: var(--blau-tint-2); }
.bnode__id { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); font-weight: 600; }
.bnode__typ { width: 18px; height: 18px; border-radius: 5px; background: var(--inset); color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bmod__connect { text-align: center; color: var(--line-3); padding-top: 28px; }
.bnode__krit { position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 100px; background: var(--rot); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 9px; }
.inspector .kv__row { padding: 7px 0; }
.adminstat { display: flex; gap: 10px; }
.astat { flex: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; background: var(--surface); }
.astat__v { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.astat__l { font-size: 11.5px; color: var(--ink-3); }

/* Fragenbaum-Editor — Gliederungs-Baum (Bearbeitungsansicht) */
.fttools { display: flex; align-items: center; gap: 10px; }
.ftsearch { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 7px 11px; color: var(--ink-3); }
.ftsearch input { border: none; background: transparent; outline: none; font-family: inherit; font-size: 13px; color: var(--ink); width: 100%; }
mark { background: var(--bernstein-tint-2); color: inherit; border-radius: 3px; padding: 0 1px; }

.btreelegend { display: flex; gap: 18px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.btreelegend span { display: inline-flex; align-items: center; gap: 6px; }
.btreelegend .dot { width: 9px; height: 9px; border-radius: 100px; display: inline-block; }
.btreelegend .dot.t-taken { background: var(--wine); }
.btreelegend svg { color: var(--ink-4); }

.ftree { display: flex; flex-direction: column; }
.ftmod { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.ftmod__h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 15px; border: none; background: transparent; text-align: left; }
.ftmod__h:hover { background: var(--surface-2); }
.ftmod__h > svg:first-child { color: var(--ink-3); flex-shrink: 0; }
.ftmod__id { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--inset); color: var(--ink-2); font-weight: 700; flex-shrink: 0; }
.ftmod__h.t-gruen .ftmod__id { background: var(--gruen-tint); color: var(--gruen); }
.ftmod__h.t-bernstein .ftmod__id { background: var(--bernstein-tint); color: oklch(0.44 0.10 65); }
.ftmod__title { font-weight: 650; font-size: 14px; }
.ftmod__out { margin-left: auto; display: flex; gap: 5px; align-items: center; }
.ftmod__count { font-size: 11.5px; color: var(--ink-4); white-space: nowrap; flex-shrink: 0; }
.ftmod__h .pp__krit { flex-shrink: 0; }
@media (max-width: 760px) { .ftmod__out { display: none; } }

.ftbody { padding: 4px 15px 12px 18px; }
.ftrow { position: relative; padding-left: 24px; }
.ftrow::before { content: ""; position: absolute; left: 7px; top: 0; width: 13px; height: 19px;
  border-left: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); border-bottom-left-radius: 7px; }
.ftrow:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 19px; bottom: 0; width: 1.5px; background: var(--line-2); }

.ftnode { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; border-radius: var(--r); padding: 7px 10px; transition: background .1s, border-color .1s; }
.ftnode:hover { background: var(--surface-2); }
.ftnode.is-sel { background: var(--wine-tint); border-color: var(--wine-tint-2); }
.ftnode__ic { width: 25px; height: 25px; border-radius: 7px; background: var(--inset); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ftnode.is-result .ftnode__ic { background: var(--bernstein-tint); color: oklch(0.44 0.10 65); }
.ftnode.is-info .ftnode__ic { background: var(--blau-tint); color: var(--blau); }
.ftnode__id { font-size: 11.5px; color: var(--ink-3); font-weight: 600; flex-shrink: 0; }
.ftnode__txt { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftnode__typ { font-size: 11px; color: var(--ink-4); flex-shrink: 0; }
.ftnode__dot { width: 7px; height: 7px; border-radius: 100px; background: var(--wine); flex-shrink: 0; }

.ftbranchline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 4px 0 4px 35px; font-size: 11.5px; color: var(--ink-3); }
.ftbranchline > svg { color: var(--ink-4); flex-shrink: 0; }
.ftbr { display: inline-flex; align-items: center; gap: 5px; opacity: .6; }
.ftbr.is-taken { opacity: 1; }
.ftbr__l { font-weight: 600; color: var(--ink-2); }
.ftbr.is-taken .ftbr__l { color: var(--wine); }
.ftbr__weiter { color: var(--ink-2); font-weight: 500; }
.ftbr svg { color: var(--ink-4); }
.ftbr + .ftbr { padding-left: 7px; border-left: 1px solid var(--line-2); }
.ftleaf { display: inline-flex; align-items: center; gap: 3px; }
.ftleaf > svg { color: var(--ink-4); }
.ftpar { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--wine); background: var(--wine-tint); border-radius: 100px; padding: 1px 9px; }

.ftarrow { display: flex; justify-content: center; padding: 1px 0; }
.ftarrow span { width: 1.5px; height: 15px; background: var(--line-2); }

.insp-taken { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--wine); background: var(--wine-tint); border-radius: 100px; padding: 3px 10px; }
.inspbranch { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 12.5px; background: var(--surface); }
.inspbranch.is-taken { border-color: var(--wine-tint-2); background: var(--wine-tint); }
.inspbranch__l { border: none; background: transparent; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); outline: none; width: 92px; }
.inspbranch__l:focus { background: var(--surface); border-radius: 4px; box-shadow: 0 0 0 2px var(--wine-tint); }

/* Votant-Toggle (Benutzerverwaltung) */
.vtoggle { width: 42px; height: 24px; border-radius: 100px; border: none; background: var(--line-3); position: relative; transition: background .15s; padding: 0; cursor: pointer; }
.vtoggle.is-on { background: var(--wine); }
.vtoggle__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 100px; background: #fff; transition: transform .15s; box-shadow: var(--shadow); }
.vtoggle.is-on .vtoggle__knob { transform: translateX(18px); }

/* In-Summary-Flag (Fragenbaum-Inspector) */
.sumflag { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.sumflag.is-on { border-color: var(--violett-tint-2); background: var(--violett-tint); color: var(--violett); }
.sumflag__tog { width: 34px; height: 20px; border-radius: 100px; background: var(--line-3); position: relative; flex-shrink: 0; transition: background .15s; }
.sumflag.is-on .sumflag__tog { background: var(--violett); }
.sumflag__knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 100px; background: #fff; transition: transform .15s; }
.sumflag.is-on .sumflag__knob { transform: translateX(14px); }

/* Echter Fragenbaum — rekursive Darstellung */
.fbbody { padding: 8px 15px 16px 16px; }
.fbnode { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 1px solid transparent;
  background: transparent; border-radius: var(--r); padding: 7px 10px; transition: background .1s, border-color .1s; }
.fbnode:hover { background: var(--surface-2); }
.fbnode.is-sel { background: var(--wine-tint); border-color: var(--wine-tint-2); }
.fbnode.is-result.t-deckung { background: var(--gruen-tint); }
.fbnode.is-result.t-quotelung { background: var(--bernstein-tint); }
.fbnode.is-result.t-ablehnung { background: var(--rot-tint); }
.fbnode.is-result.is-sel { box-shadow: 0 0 0 1px var(--wine); }
.fbnode__ic { width: 24px; height: 24px; border-radius: 7px; background: var(--inset); color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fbnode.is-result.t-deckung .fbnode__ic { background: var(--gruen-tint-2); color: var(--gruen); }
.fbnode.is-result.t-quotelung .fbnode__ic { background: var(--bernstein-tint-2); color: oklch(0.44 0.10 65); }
.fbnode.is-result.t-ablehnung .fbnode__ic { background: var(--rot-tint-2); color: var(--rot); }
.fbnode__txt { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; line-height: 1.35; }
.fbnode.is-result .fbnode__txt { font-weight: 600; }
.fbnode__typ { font-size: 11px; color: var(--ink-4); flex-shrink: 0; white-space: nowrap; }
.fbnode__norm { font-size: 10.5px; color: var(--wine); background: var(--wine-tint); border-radius: 4px; padding: 1px 6px; flex-shrink: 0; }
.fbnode__leaf { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; }
.fbnode__next { font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }

.fbsub, .fbseq { margin-left: 11px; padding-left: 15px; border-left: 1.5px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; margin-top: 3px; }
.fbseq { border-left-color: var(--line); }
.fbbranch { }
.fbwhen { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 4px 0 1px; }
.fbwhen svg { color: var(--wine); }
.fbopts { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 0 7px; }
.fbopt { font-size: 11px; color: var(--ink-3); background: var(--inset); border: 1px solid var(--line); border-radius: 100px; padding: 2px 9px; }
.fbopt.t-gruen { color: var(--gruen); background: var(--gruen-tint); border-color: var(--gruen-tint-2); }
.fbopt.t-bernstein { color: oklch(0.46 0.10 65); background: var(--bernstein-tint); border-color: var(--bernstein-tint-2); }
.fbopt.t-rot { color: var(--rot); background: var(--rot-tint); border-color: var(--rot-tint-2); }
.fbopt--more { color: var(--ink-4); background: transparent; border-style: dashed; }
.fbflags { display: inline-flex; gap: 3px; flex-shrink: 0; }
.fbflag { width: 20px; height: 20px; border-radius: 5px; background: var(--inset); color: var(--ink-4); display: flex; align-items: center; justify-content: center; }

.fbresults { display: flex; flex-direction: column; gap: 5px; }
.fbresult { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 9px 12px; font-size: 13.5px; }
.fbresult:hover { border-color: var(--line-3); background: var(--surface-2); }
.fbresult.is-sel { background: var(--wine-tint); border-color: var(--wine-tint-2); }

.inspopt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.inspopt__dot { width: 8px; height: 8px; border-radius: 100px; background: var(--line-3); flex-shrink: 0; }
.inspopt__dot.t-gruen { background: var(--gruen); } .inspopt__dot.t-bernstein { background: var(--bernstein); } .inspopt__dot.t-rot { background: var(--rot); } .inspopt__dot.t-neutral { background: var(--ink-4); }
.inspopt__to { font-size: 11px; color: var(--wine); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.insp-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.insp-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-4); background: var(--inset); border: 1px solid var(--line); border-radius: 100px; padding: 3px 9px; }
.insp-flag.is-on { color: var(--wine); background: var(--wine-tint); border-color: var(--wine-tint-2); }

/* Baum-Diagramm (Knoten-Link) */
.tvbox { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.tvbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tvbar__hint { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.tvbar__hint svg { color: var(--wine); }
.tvzoom { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 2px 4px; }
.tvzoom__lbl { font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 0 4px; }
.tvzoom__v { font-size: 12px; font-weight: 600; color: var(--ink-2); width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.tv { overflow: auto; height: 600px; cursor: grab; background:
  radial-gradient(var(--line) 0.8px, transparent 0.8px); background-size: 22px 22px; background-color: var(--paper); }
.tv--full { height: calc(100vh - 232px); min-height: 460px; }
.tv.is-grabbing { cursor: grabbing; }
.tv__canvas { position: relative; }
.tv__edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.tvedge { fill: none; stroke: var(--line-3); stroke-width: 1.5; }
.tvedge.is-taken { stroke: var(--wine); stroke-width: 2; }
.tvlabel { position: absolute; transform: translate(-50%, -50%); font-size: 10px; font-weight: 600; color: var(--ink-3);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 100px; padding: 1px 7px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tvlabel.is-taken { color: var(--wine); border-color: var(--wine-tint-2); background: var(--wine-tint); }

.tvnode { position: absolute; display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .12s, border-color .12s; }
.tvnode:hover { box-shadow: var(--shadow-md); border-color: var(--line-3); }
.tvnode.is-sel { border-color: var(--wine); box-shadow: 0 0 0 2px var(--wine-tint); }
.tvnode.is-taken { border-color: var(--wine-tint-2); }
.tvnode__ic { width: 26px; height: 26px; border-radius: 7px; background: var(--inset); color: var(--ink-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tvnode__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.tvnode__label { font-size: 12px; font-weight: 600; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvnode__sub { font-size: 11px; color: var(--ink-2); font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvnode__sub::before { content: "\2192 "; color: var(--ink-4); }
.tvnode.tone-modul .tvnode__sub::before, .tvnode.tone-deckung .tvnode__sub::before, .tvnode.tone-quotelung .tvnode__sub::before, .tvnode.tone-ablehnung .tvnode__sub::before, .tvnode.tone-info .tvnode__sub::before { content: ""; }
.tvnode__dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 100px; background: var(--wine); }
/* Knoten-Badges (Stern = Kernbefund, Urteils-Rolle) — direkt am Knoten sichtbar */
.tvnode__flags { position: absolute; bottom: 6px; right: 7px; display: flex; gap: 4px; align-items: center; pointer-events: none; }
.tvbadge { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 700; line-height: 1; padding: 2px 5px 2px 4px; border-radius: 100px; white-space: nowrap; }
.tvbadge--star { background: var(--bernstein-tint); color: var(--bernstein); }
.tvbadge--verdict { background: var(--wine-tint); color: var(--wine); }
.tvnode.tone-modul .tvbadge--star { background: oklch(1 0 0 / 0.18); color: #F4C770; }
.tvnode.tone-modul .tvbadge--verdict { background: oklch(1 0 0 / 0.18); color: #fff; }
.tvnode.tone-modul { background: var(--ink); border-color: var(--ink); }
.tvnode.tone-modul .tvnode__label { color: var(--paper); }
.tvnode.tone-modul .tvnode__sub { color: oklch(0.75 0.01 70); }
.tvnode.tone-modul .tvnode__ic { background: oklch(1 0 0 / 0.16); color: #fff; }
.tvadd { position: absolute; width: 24px; height: 24px; border-radius: 100px; z-index: 3;
  display: flex; align-items: center; justify-content: center; padding: 0;
  background: var(--wine); color: #fff; border: 2px solid var(--surface); box-shadow: var(--shadow-md);
  opacity: 0; transition: opacity .12s, transform .1s; cursor: pointer; }
.tvnode:hover + .tvadd, .tvadd:hover, .tvadd:focus-visible { opacity: 1; }
.tvadd:hover { transform: scale(1.12); }
.tvnode.tone-deckung { background: var(--gruen-tint); border-color: var(--gruen-tint-2); }
.tvnode.tone-deckung .tvnode__ic { background: var(--gruen-tint-2); color: var(--gruen); }
.tvnode.tone-quotelung { background: var(--bernstein-tint); border-color: var(--bernstein-tint-2); }
.tvnode.tone-quotelung .tvnode__ic { background: var(--bernstein-tint-2); color: oklch(0.44 0.10 65); }
.tvnode.tone-ablehnung { background: var(--rot-tint); border-color: var(--rot-tint-2); }
.tvnode.tone-ablehnung .tvnode__ic { background: var(--rot-tint-2); color: var(--rot); }
.tvnode.tone-info { background: var(--blau-tint); border-color: var(--blau-tint-2); }
.tvnode.tone-info .tvnode__ic { background: var(--blau-tint-2); color: var(--blau); }

/* Prüfpfad-Erreichbarkeit: beantwortet/aktiv = is-taken (Wein, oben);
   pending = erreichbar, aber noch nicht entschieden (gestrichelt, wartend);
   dead = durch eine entschiedene Verzweigung ausgeschlossen → ausgegraut. */
.tvnode.is-pending { border-style: dashed; border-color: var(--line-3); }
.tvnode.is-dead { opacity: 0.4; filter: grayscale(0.95); background: var(--inset); border-color: var(--line-2); box-shadow: none; }
.tvnode.is-dead:hover { opacity: 0.62; box-shadow: none; border-color: var(--line-2); }
.tvnode.is-dead .tvnode__ic { background: var(--line-2); color: var(--ink-4); }
.tvedge.is-dead { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.tvlabel.is-dead { opacity: 0.5; }

/* Legende für die drei Erreichbarkeits-Zustände */
.pp__legend--reach i.lg-answered { background: var(--wine); }
.pp__legend--reach i.lg-pending { background: var(--surface); border: 1px dashed var(--line-3); }
.pp__legend--reach i.lg-dead { background: var(--line-3); opacity: 0.55; }

/* Ansicht-Umschalter */
.viewtoggle { display: inline-flex; background: var(--inset); border-radius: var(--r); padding: 3px; gap: 2px; }
.viewtoggle button { border: none; background: transparent; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 5px 12px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; }
.viewtoggle button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Eigenschaften-Popover am Knoten (Fragenbaum-Diagramm) */
.baumsolo { display: block; }
/* Fragenbaum-Editor: Node-Detail als zentraler Dialog (n8n-Stil) über der Vollbild-Leinwand */
.fbmodal { width: 600px; max-width: calc(100vw - 80px); max-height: 88vh; overflow: auto; }
.fbmodal .inspector { margin: 0; }
.popbackdrop { position: fixed; inset: 0; z-index: 90; }
.nodepop { position: fixed; z-index: 91; border-radius: var(--r-lg); animation: pop .14s ease; }
.nodepop .inspector { border-color: var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: 84vh; overflow-y: auto; }
.nodepop__close { position: absolute; top: 12px; right: 12px; z-index: 3; }
.nodepop .inspector .row:first-child { padding-right: 28px; }
.nodepop__beak { position: absolute; width: 0; height: 0; z-index: 2; }
.nodepop--beak-left .nodepop__beak { left: -9px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-right: 9px solid var(--surface); }
.nodepop--beak-right .nodepop__beak { right: -9px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 9px solid var(--surface); }
.nodepop--beak-left .nodepop__beak::after { content: ""; position: absolute; left: -1px; top: -10px; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right: 10px solid var(--line-2); z-index: -1; }
.nodepop--beak-right .nodepop__beak::after { content: ""; position: absolute; right: -1px; top: -10px; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 10px solid var(--line-2); z-index: -1; }

/* 2-spaltiges Eigenschaften-Popover */
.inspector--2col .inspfields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; align-items: start; margin-top: 4px; }
.inspector--2col .inspfields > .fld { min-width: 0; }
.inspector--2col .inspfields > .fld--wide { grid-column: 1 / -1; }
.inspector--2col .inspfields > .fld select, .inspector--2col .inspfields > .fld input, .inspector--2col .inspfields > .fld textarea { width: 100%; min-width: 0; box-sizing: border-box; }

/* ===================================================== DB-Verwaltung ==== */
.dbtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.dbtab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: none; background: transparent; white-space: nowrap;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dbtab:hover { color: var(--ink); }
.dbtab.is-active { color: var(--wine); border-bottom-color: var(--wine); }
.dbtab__c { font-size: 11.5px; font-weight: 600; background: var(--inset); color: var(--ink-3); padding: 1px 8px; border-radius: 100px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dbtab.is-active .dbtab__c { background: var(--wine-tint); color: var(--wine); }

.dbtools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.dbselect { font-family: inherit; font-size: 13px; padding: 8px 12px; padding-right: 28px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399948c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink); outline: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.dbselect:hover { border-color: var(--line-3); }
.dbselect:focus { border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); }

.dbkz { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--wine);
  background: var(--wine-tint); border: 1px solid var(--wine-tint-2); padding: 2px 8px; border-radius: var(--r-sm); }

.pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 2px; }
.pager__info { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pager__info b { color: var(--ink); font-weight: 600; }
.pager__pg { font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }

.dbfoot { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-4); margin-top: 18px; }
.dbfoot svg { color: var(--ink-4); flex-shrink: 0; }

/* Master-Detail-Browser */
.dbbrowser { display: grid; grid-template-columns: 366px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .dbbrowser { grid-template-columns: 1fr; } }
.dblist { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.dblist__search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.dblist__search input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--ink); }
.dblist__filters { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dblist__filters .dbselect { flex: 1; font-size: 12.5px; padding: 7px 10px; padding-right: 26px; }
.dblist__count { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); padding: 9px 14px 5px; }
.dblist__scroll { overflow-y: auto; padding: 4px 8px 8px; }
.dblist__empty { padding: 30px 16px; text-align: center; color: var(--ink-3); font-size: 13px; }
.dbitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid transparent; border-radius: var(--r); background: transparent; transition: background .1s, border-color .1s; }
.dbitem:hover { background: var(--surface-2); }
.dbitem.is-sel { background: var(--wine-tint); border-color: var(--wine-tint-2); }
.dbitem__t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbitem__s { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbitem__star { color: var(--gruen); font-size: 9px; vertical-align: 1px; }
.dbitem__badge { font-size: 11px; font-weight: 600; background: var(--inset); color: var(--ink-3); padding: 1px 7px; border-radius: 100px; }
.dbnorm { width: 30px; height: 30px; border-radius: 8px; background: var(--wine-tint); color: var(--wine); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dbnorm--sm { width: 26px; height: 26px; border-radius: 7px; }

.dbpane { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; min-height: 480px; }
.dbdetail__head { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dbdetail__t { font-family: var(--serif); font-weight: 600; font-size: 18px; }
.dbdetail__m { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.dbdetail__stats { display: flex; gap: 22px; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.dbdetail__stats b { font-family: var(--mono); color: var(--ink); font-weight: 600; font-size: 14px; margin-right: 3px; }

/* Strukturierte Absätze */
.abslist { padding: 12px 16px 18px; }
.artikel { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; overflow: hidden; }
.artikel.is-open { border-color: var(--line-2); }
.artikel__h { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 13px; border: none; background: var(--surface); color: var(--ink-2); }
.artikel__h:hover { background: var(--surface-2); }
.artikel.is-open .artikel__h { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.artikel__nr { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.artikel__t { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.artikel__c { margin-left: auto; font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.artikel__body { padding: 6px 13px 12px 40px; display: flex; flex-direction: column; gap: 2px; }
.absatz { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.absatz:last-child { border-bottom: none; }
.absatz__nr { font-size: 11px; font-weight: 600; color: var(--wine); flex-shrink: 0; padding-top: 2px; min-width: 30px; }
.absatz__t { font-size: 13px; line-height: 1.6; color: var(--ink); }

/* PDF-Vorschau */
.pdfview { padding: 16px; }
.pdfview__bar { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r) var(--r) 0 0; background: var(--surface-2); color: var(--ink-2); }
.pdfview__pg { font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.pdfview__page { border: 1px solid var(--line-2); border-top: none; border-radius: 0 0 var(--r) var(--r); padding: 30px; display: flex; justify-content: center; background: var(--inset); }
.pdfph { width: 100%; max-width: 460px; aspect-ratio: 1 / 1.414; border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ink-4);
  background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 24px); border: 1px solid var(--line-2); }
.pdfph__t { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pdfph__s { font-size: 11.5px; color: var(--ink-4); max-width: 280px; line-height: 1.5; }

/* Recht-Detail */
.dbsection { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dbsection:last-child { border-bottom: none; }
.normtext { font-size: 14px; line-height: 1.7; color: var(--ink); border-left: 3px solid var(--wine-tint-2); padding-left: 14px; margin: 0 0 12px; }
.rsrow { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .1s, box-shadow .1s; }
.rsrow:hover { border-color: var(--line-3); box-shadow: var(--shadow); }
.rsrow__ic { width: 28px; height: 28px; border-radius: 7px; background: var(--violett-tint); color: var(--violett); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rsrow__rs { font-size: 11px; font-weight: 600; color: var(--violett); background: var(--violett-tint); padding: 1px 7px; border-radius: 100px; }
.rsrow__rs--btn { border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background .12s, border-color .12s; padding: 3px 9px; }
.rsrow__rs--btn:hover { background: var(--violett-tint-2, var(--violett-tint)); border-color: var(--violett); }
.rsrow__th { font-size: 13px; font-weight: 600; margin-top: 3px; }
.rsrow__satz { font-size: 12px; line-height: 1.55; color: var(--ink-2); margin-top: 4px; }

/* ---- NewClaimWizard (Schnellmeldung — clerk simple claim intake) ---- */
.ncw__step { padding: 16px 0; border-top: 1px solid var(--line); }
.ncw__step:first-child { border-top: none; padding-top: 0; }
.ncw__steplbl { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.ncw__stepn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 100px; background: var(--wine, var(--ink)); color: #fff; font-size: 12px; font-weight: 700; }
.ncw__hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.ncw__picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper-2, var(--inset)); }
.ncw__pickedname { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncw__pickedsub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncw__clientlist { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ncw__clientrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm, var(--r)); background: transparent; cursor: pointer; font-family: inherit; transition: background .12s, border-color .12s; }
.ncw__clientrow:hover { background: var(--inset); border-color: var(--line-2); }
.ncw__newclient { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--wine, var(--ink)); font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; padding: 2px 0; }
.ncw__ta { width: 100%; min-height: 150px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r); font-family: inherit; font-size: 14px; line-height: 1.55; box-sizing: border-box; }
.ncw__ta:focus { outline: none; border-color: var(--wine, var(--ink)); }
.ncw__files { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ncw__filerow { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--r-sm, var(--r)); background: var(--inset); }
.ncw__filename { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
