/* WMH Personalkosten – Oberfläche */
:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e1dc;
  --grid: #e6e5e0;
  --text: #16161a;
  --text-2: #52514e;
  --text-3: #7a7974;
  --accent: #1f5fae;
  --accent-ink: #ffffff;
  --accent-soft: #e6eef8;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --good: #0f7b3d; --good-soft: #e3f3e8;
  --warn: #8a5a00; --warn-soft: #fbefd6;
  --bad: #b3261e;  --bad-soft: #fbe5e3;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111110;
    --surface: #1a1a19;
    --surface-2: #232321;
    --border: #33332f;
    --grid: #2c2c29;
    --text: #f4f4f1;
    --text-2: #c3c2b7;
    --text-3: #93928a;
    --accent: #6ea4ec;
    --accent-ink: #0b1522;
    --accent-soft: #1d2a3b;
    --series-1: #3987e5;
    --series-2: #d95926;
    --good: #5cc98a; --good-soft: #15291d;
    --warn: #e7b84f; --warn-soft: #2e2512;
    --bad: #ef7a72;  --bad-soft: #321a18;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.45; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--text-2); }
.klein { font-size: 12.5px; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.nav { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 650; }
.brand img { width: 28px; height: 28px; }
.brand small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.aktiv { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-links { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.btn.geld-schalter { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12.5px; border-radius: 20px; white-space: nowrap; }
.btn.geld-schalter[aria-pressed="true"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.btn.geld-schalter[aria-pressed="false"] { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.btn.nav-knopf { display: none; }
.nav-strich { width: 14px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.nav-strich::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.nav .fuss { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; }
.nav .fuss .wer { padding: 0 10px 8px; color: var(--text-2); }
.fuss-aktionen { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 10px; }
.main { padding: 24px 28px 60px; max-width: 1280px; width: 100%; }
.kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.kopf .titel { display: flex; flex-direction: column; gap: 4px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Karten */
.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.raster { display: grid; gap: 16px; }
.raster.k2 { grid-template-columns: 1.6fr 1fr; }
.raster.k3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stack > * + * { margin-top: 16px; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--text-2); font-size: 13px; }
.kpi .wert { font-size: clamp(20px, 2.1vw, 26px); font-weight: 650; margin-top: 4px; letter-spacing: -.01em; }
.kpi.held .wert { font-size: clamp(26px, 2.7vw, 34px); }
.kpi .unter { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }

/* Szenario-Karten */
.sz-karte { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s; text-decoration: none; color: inherit; }
.sz-karte:hover { border-color: var(--accent); }
.sz-karte .betrag { font-size: 24px; font-weight: 650; }
.sz-karte .zeile { display: flex; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: 13px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.entwurf { background: var(--accent-soft); color: var(--accent); }
.badge.freigegeben { background: var(--good-soft); color: var(--good); }
.badge.archiviert { background: var(--surface-2); color: var(--text-3); }
.badge.admin { background: var(--warn-soft); color: var(--warn); }
.badge.nein::before, .badge.ohne::before { display: none; }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primaer { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primaer:hover { filter: brightness(1.08); }
.btn.gefahr { color: var(--bad); }
.btn.gefahr.voll { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.klein { padding: 4px 9px; font-size: 13px; }
.btn.link { border: none; background: none; padding: 4px 6px; color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label.feld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%;
}
textarea { resize: vertical; min-height: 60px; }
.formular { display: grid; gap: 12px; }
.formular.zwei { grid-template-columns: 1fr 1fr; }
.formular .voll { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
.fehlermeldung { background: var(--bad-soft); color: var(--bad); padding: 9px 12px; border-radius: 8px; font-size: 13.5px; }
.hinweis { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.info { background: var(--accent-soft); color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-weight: 600; color: var(--text-2); font-size: 12.5px; background: var(--surface); position: sticky; top: 0; z-index: 1; }
th.sortierbar { cursor: pointer; user-select: none; }
th.sortierbar:hover { color: var(--text); }
tbody tr.klickbar { cursor: pointer; }
tbody tr.klickbar:hover { background: var(--surface-2); }
tfoot td { font-weight: 650; border-top: 2px solid var(--border); border-bottom: none; }
.werkzeugleiste { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.werkzeugleiste input[type=search] { max-width: 280px; }
.pos { color: var(--bad); }
.neg { color: var(--good); }

/* Diagramm */
.diagramm { position: relative; }
.diagramm svg { display: block; width: 100%; height: auto; overflow: visible; }
/* Beträge maskieren: Schalter im Menü ist aus (Standard) → Balken/Diagramme unkenntlich, Beträge stehen ohnehin als Punkte da */
body.geld-maske .diagramm svg, body.geld-maske .b-diagramm svg { filter: blur(6px); user-select: none; }
body.geld-maske .diagramm::after, body.geld-maske .b-diagramm::after {
  content: "Beträge ausgeblendet"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: color-mix(in srgb, var(--surface) 40%, transparent); pointer-events: none;
}
body.geld-maske .b-diagramm::after { color: var(--p-text2, var(--text-2)); }
.diagramm .achse { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.diagramm .gitter { stroke: var(--grid); stroke-width: 1; }
.diagramm .basis { stroke: var(--border); stroke-width: 1; }
.diagramm .s1 { fill: var(--series-1); }
.diagramm .s2 { fill: var(--series-2); }
.diagramm .treffer { fill: transparent; cursor: default; }
.diagramm .treffer:hover + g .markierung, .diagramm g.hover .markierung { opacity: 1; }
.diagramm .wertlabel { fill: var(--text-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.diagramm .kategorie { fill: var(--text); font-size: 12.5px; }
.legende { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legende i.s1 { background: var(--series-1); }
.legende i.s2 { background: var(--series-2); }
#tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0,0,0,.14); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; min-width: 160px; }
#tooltip .tt-titel { font-weight: 650; margin-bottom: 4px; }
#tooltip .tt-zeile { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
#tooltip .tt-zeile span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
#tooltip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
#tooltip i.s1 { background: var(--series-1); } #tooltip i.s2 { background: var(--series-2); }
details.tabellenansicht summary { cursor: pointer; color: var(--text-2); font-size: 13px; margin-top: 10px; }

/* Seitenpanel */
.panel-hg { position: fixed; inset: 0; background: rgba(10,10,10,.35); z-index: 30; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); z-index: 31; box-shadow: -8px 0 32px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.panel header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel .inhalt { padding: 18px 20px; overflow-y: auto; flex: 1; }
.panel footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: space-between; }
.abschnitt { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.inline-form { display: grid; grid-template-columns: 80px 1fr 1fr auto; gap: 8px; margin-top: 10px; align-items: end; }

/* Dialog */
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,10,10,.4); }
dialog .d-kopf { padding: 18px 20px 0; }
dialog .d-inhalt { padding: 14px 20px; }
dialog .d-fuss { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* Anmeldung */
.login-seite { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-karte { width: min(400px, 100%); }
.login-karte .brand { padding: 0 0 18px; }
.qr { width: 190px; height: 190px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
code.geheim { font-size: 13px; background: var(--surface-2); padding: 3px 6px; border-radius: 6px; word-break: break-all; }

/* Toast */
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast .t { background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: var(--shadow); }
#toast .t.fehler { background: var(--bad); color: #fff; }

.leer { text-align: center; padding: 36px 16px; color: var(--text-2); }
.laden { color: var(--text-3); padding: 24px 0; }
.nur-mobil { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: sticky; top: 0; z-index: 20; height: auto; padding: 8px 12px; gap: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; }
  .brand > div { min-width: 0; flex: 0 0 auto; }
  .btn.nav-knopf { display: inline-flex; margin-left: auto; min-width: 0; flex: 0 1 auto; }
  .nav-knopf span + span { overflow: hidden; text-overflow: ellipsis; }
  .nav-links { display: none; padding-top: 8px; }
  .nav.offen .nav-links { display: flex; }
  .nav.offen { max-height: 100vh; overflow-y: auto; }
  .nav .fuss { margin-top: 8px; padding-top: 8px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
  .nav .fuss .wer { padding: 0 10px; }
  .main { padding: 16px 16px 48px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .raster.k2 { grid-template-columns: 1fr; }
  .formular.zwei { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .nur-breit { display: none; }
}

/* Hilfsklassen (keine Inline-Styles wegen Content-Security-Policy) */
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; } .mt12 { margin-top: 12px; } .m0 { margin: 0; }
.breit { flex: 1; min-width: 220px; }
.rechts { justify-content: flex-end; }
.sz-name { color: var(--text); font-size: 15px; }
.nummern { padding-left: 18px; }
.mitte { vertical-align: middle; }
.nowrap { white-space: nowrap; }
.inline-form .voll { grid-column: 1 / -1; }
.kpi .wert.pos, .pos { color: var(--bad); }
.kpi .wert.neg, .neg { color: var(--good); }
[hidden] { display: none !important; }

/* Layout-Korrekturen: nichts darf die Seite verbreitern */
.shell { grid-template-columns: 220px minmax(0, 1fr); }
.main, .raster > *, .kpis > *, .karte { min-width: 0; }
.diagramm.balken svg { max-width: 520px; }
.werkzeugleiste select { width: auto; max-width: 100%; }
.kopf h1 { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .kpi.held .wert { font-size: 28px; }
}
@media (max-width: 900px) {
  .kpi.held { grid-column: 1 / -1; }
  .kpi .wert { font-size: clamp(17px, 5.2vw, 22px); white-space: nowrap; }
}

/* Personalakten */
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 9px 14px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text); }
.tabs a.aktiv { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .zaehler { background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }
dl.daten { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
dl.daten dt { color: var(--text-2); }
dl.daten dd { margin: 0; overflow-wrap: anywhere; }
.vorformatiert { white-space: pre-wrap; overflow-wrap: anywhere; }
.dok-upload { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 10px; align-items: end; padding: 14px; background: var(--surface-2); border-radius: 8px; }
.dok-upload input[type=file] { font-size: 13px; min-width: 0; width: 100%; }
.btn.link.gefahr { color: var(--bad); padding: 0; }
@media (max-width: 900px) { .dok-upload { grid-template-columns: 1fr; } }

/* Ergänzungen */
input[type=date], input[type=tel], input[type=email] { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primaer { color: var(--accent-ink); }
@media (min-width: 901px) {
  .shell { background: linear-gradient(90deg, var(--surface) 0 219px, var(--border) 219px 220px, transparent 220px); }
  .nav { border-right: none; background: transparent; }
}
.warn-punkt { color: var(--warn); font-weight: 700; margin-left: 4px; }
.nur-mobil-inline { display: none; }
@media (max-width: 900px) { .nur-mobil-inline { display: inline; } }
tr.inaktiv td { color: var(--text-3); }
[data-abfindung][hidden], [data-ersatz][hidden] { display: none !important; }
.mt8 { margin-top: 8px; }
[data-nur-akten][hidden], label.feld[hidden] { display: none !important; }
.durch { text-decoration: line-through; }
td .aktionen.rechts { flex-wrap: nowrap; justify-content: flex-end; }
.si-liste { display: flex; flex-direction: column; gap: 4px; }
.si-liste .check { align-items: flex-start; }

/* Mobil: Registerkarten kompakter, Tabellen als Karten */
@media (max-width: 900px) {
  .tabs a { padding: 8px 10px; }
  .kpi.held .wert { font-size: clamp(22px, 7vw, 28px); }
  .kpi { padding: 12px 14px; }
  .karte { padding: 14px; }
  h1 { font-size: 20px; }
}
@media (max-width: 900px) {
  .main table:not(.ohne-kopf) > thead { display: none; }
  .main table:not(.ohne-kopf), .main table:not(.ohne-kopf) > tbody, .main table:not(.ohne-kopf) > tfoot { display: block; width: 100%; }
  .main table:not(.ohne-kopf) > tbody > tr, .main table:not(.ohne-kopf) > tfoot > tr { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; margin-bottom: 8px; background: var(--surface); }
  .main table:not(.ohne-kopf) > tfoot > tr { background: var(--surface-2); }
  .main table:not(.ohne-kopf) > tbody > tr > td, .main table:not(.ohne-kopf) > tfoot > tr > td { display: block; padding: 5px 0; border: none; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .main table:not(.ohne-kopf) > tbody > tr > td::after { content: ""; display: table; clear: both; }
  .main table:not(.ohne-kopf) > tbody > tr > td + td, .main table:not(.ohne-kopf) > tfoot > tr > td + td { border-top: 1px solid var(--grid); }
  .main table:not(.ohne-kopf) td::before { content: attr(data-label); float: left; margin-right: 12px; max-width: 45%; text-align: left; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
  .main table:not(.ohne-kopf) td[data-label=""]::before { display: none; }
  .main table:not(.ohne-kopf) td[data-label=""] { text-align: left; }
  .main table:not(.ohne-kopf) td > .aktionen { display: flex; }
  .diagramm:not(.balken) { overflow-x: auto; }
  .diagramm:not(.balken) svg { min-width: 560px; }
  .diagramm.balken { overflow-x: auto; }
  .diagramm.balken svg { min-width: 440px; }
  .main table:not(.ohne-kopf) td .aktionen { justify-content: flex-end; flex-wrap: wrap; }
  .main td.nur-breit { display: none !important; }
  .main .tabelle-wrap { overflow-x: visible; }
  .werkzeugleiste input[type=search] { max-width: none; }
  .kpis { gap: 10px; }
  dialog .d-fuss { flex-wrap: wrap; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi.held { grid-column: 1 / -1; }
  .raster.k2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .brand small { display: none; }
  .btn.geld-schalter span { display: none; }
  .btn.geld-schalter { padding: 6px 8px; }
}
.ab-teile { min-width: 220px; }
#ab-tabelle select { min-width: 170px; }
@media (max-width: 900px) { .ab-teile { min-width: 0; } }
.ab-gehalt { min-width: 150px; }
.zaehler { background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; }
.zaehler.warnzahl { background: var(--warn-soft); color: var(--warn); }
.ez-liste { list-style: none; margin: 0; padding: 0; }
.ez-befund { padding: 12px 0; border-bottom: 1px solid var(--border); }
.ez-befund:last-child { border-bottom: none; }

/* ================= Foto & Betriebsausweis ================= */
.nur-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.foto-zeile { display: flex; gap: 16px; align-items: flex-start; }
.pa-foto { width: 96px; height: 128px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); flex: none; }
.leer-foto { display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.foto-aktionen label.btn, .logo-zeile label.btn { color: var(--text); cursor: pointer; font-weight: 600; }
.foto-aktionen { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foto-zuschnitt { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.foto-canvas { width: 240px; height: 320px; border-radius: 8px; border: 1px solid var(--border); cursor: grab; touch-action: none; background: #fff; }
.foto-canvas:active { cursor: grabbing; }
@media (max-width: 560px) { .foto-zuschnitt { grid-template-columns: 1fr; justify-items: center; } }
.logo-zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo-vorschau { max-height: 56px; max-width: 220px; background: #fff; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); }

.ausweis-bereich { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ausweis-bereich { grid-template-columns: 1fr; } }
.ausweis-druck { --mm: 4.4px; --ausweis-farbe: #1f5fae; --ausweis-auf-farbe: #fff; --ausweis-hell: #e4ecf5; --ausweis-mittel: #b1c8e4; }
@media (max-width: 1250px) { .raster.k2 .ausweis-druck { --mm: 3.6px; } }
@media (max-width: 480px) { .ausweis-druck { --mm: 3.5px; } }
.ausweis-seite { display: flex; flex-wrap: wrap; gap: 20px; }
.ausweis-karte {
  position: relative; overflow: hidden; flex: none;
  width: calc(85.6 * var(--mm)); height: calc(54 * var(--mm)); border-radius: calc(3.2 * var(--mm));
  background: #fff; color: #16161a; font-family: var(--font); line-height: 1.15;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 20px rgba(0,0,0,.10); outline: 1px solid rgba(0,0,0,.06);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ausweis-karte img { display: block; }
/* Vorderseite */
.aw-deko { position: absolute; right: 0; top: 0; width: calc(46 * var(--mm)); height: 100%; background: var(--ausweis-hell); clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%); }
.aw-deko::after { content: ""; position: absolute; inset: 0; background: var(--ausweis-mittel); clip-path: polygon(78% 0, 100% 0, 100% 100%, 52% 100%); }
.aw-kopf { position: absolute; left: calc(5 * var(--mm)); right: calc(5 * var(--mm)); top: calc(3.6 * var(--mm)); height: calc(8 * var(--mm)); display: flex; align-items: center; justify-content: space-between; gap: calc(3 * var(--mm)); }
.aw-logo { max-height: calc(8 * var(--mm)); max-width: calc(40 * var(--mm)); object-fit: contain; }
.aw-wortmarke { font-weight: 800; font-size: calc(6.4 * var(--mm)); letter-spacing: .02em; color: var(--ausweis-farbe); }
.aw-typ { position: relative; font-size: calc(2.1 * var(--mm)); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ausweis-auf-farbe); background: var(--ausweis-farbe); padding: calc(1 * var(--mm)) calc(2 * var(--mm)); border-radius: calc(1 * var(--mm)); }
.aw-foto { position: absolute; left: calc(5 * var(--mm)); top: calc(14.5 * var(--mm)); width: calc(22.5 * var(--mm)); height: calc(30 * var(--mm)); border-radius: calc(1.6 * var(--mm)); overflow: hidden; background: var(--ausweis-hell); box-shadow: 0 0 0 calc(.6 * var(--mm)) #fff, 0 0 0 calc(1 * var(--mm)) var(--ausweis-farbe); display: flex; align-items: center; justify-content: center; }
.aw-foto img { width: 100%; height: 100%; object-fit: cover; }
.aw-foto span { font-size: calc(9 * var(--mm)); font-weight: 700; color: var(--ausweis-farbe); text-transform: uppercase; }
.aw-person { position: absolute; left: calc(31.5 * var(--mm)); right: calc(5 * var(--mm)); top: calc(14.8 * var(--mm)); }
.aw-vorname { font-size: calc(3.3 * var(--mm)); color: #33322f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-nachname { font-size: calc(4.8 * var(--mm)); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.08; margin-top: calc(.4 * var(--mm)); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.aw-nachname.lang { font-size: calc(3.9 * var(--mm)); }
.aw-nachname.sehr-lang { font-size: calc(3.1 * var(--mm)); }
.aw-funktion { font-size: calc(2.5 * var(--mm)); font-weight: 600; color: var(--ausweis-farbe); margin-top: calc(1.4 * var(--mm)); max-width: calc(37 * var(--mm)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-abteilung { font-size: calc(2.4 * var(--mm)); color: #52514e; margin-top: calc(.6 * var(--mm)); max-width: calc(37 * var(--mm)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-daten { position: absolute; left: calc(31.5 * var(--mm)); bottom: calc(8.2 * var(--mm)); display: flex; gap: calc(5 * var(--mm)); }
.aw-daten span { display: block; font-size: calc(1.6 * var(--mm)); letter-spacing: .1em; text-transform: uppercase; color: #6b6a65; }
.aw-daten strong { display: block; font-size: calc(2.7 * var(--mm)); margin-top: calc(.3 * var(--mm)); font-variant-numeric: tabular-nums; }
.aw-qr { position: absolute; right: calc(4.5 * var(--mm)); bottom: calc(7.5 * var(--mm)); width: calc(12 * var(--mm)); height: calc(12 * var(--mm)); background: #fff; padding: calc(1 * var(--mm)); border-radius: calc(1 * var(--mm)); }
.aw-qr svg { width: 100%; height: 100%; display: block; }
.aw-fuss { position: absolute; left: 0; right: 0; bottom: 0; height: calc(5 * var(--mm)); background: var(--ausweis-farbe); color: var(--ausweis-auf-farbe); font-size: calc(2 * var(--mm)); font-weight: 600; letter-spacing: .04em; display: flex; align-items: center; padding: 0 calc(5 * var(--mm)); }
/* Rückseite */
.aw-band { position: absolute; left: 0; right: 0; top: 0; height: calc(12.5 * var(--mm)); background: var(--ausweis-farbe); color: var(--ausweis-auf-farbe); padding: calc(2.4 * var(--mm)) calc(5 * var(--mm)) 0; display: flex; flex-direction: column; gap: calc(.6 * var(--mm)); }
.aw-band strong { font-size: calc(2.9 * var(--mm)); }
.aw-band span { font-size: calc(2 * var(--mm)); opacity: .92; }
.aw-text { position: absolute; left: calc(5 * var(--mm)); right: calc(5 * var(--mm)); top: calc(15.5 * var(--mm)); margin: 0; font-size: calc(2.15 * var(--mm)); line-height: 1.35; color: #33322f; }
.aw-unterschrift { position: absolute; left: calc(5 * var(--mm)); bottom: calc(5 * var(--mm)); width: calc(34 * var(--mm)); }
.aw-linie { border-bottom: calc(.25 * var(--mm)) solid #16161a; height: calc(6 * var(--mm)); }
.aw-unterschrift span { display: block; font-size: calc(1.7 * var(--mm)); color: #6b6a65; margin-top: calc(.6 * var(--mm)); }
.aw-ausgestellt { position: absolute; right: calc(18 * var(--mm)); bottom: calc(5 * var(--mm)); width: calc(26 * var(--mm)); font-size: calc(1.7 * var(--mm)); line-height: 1.3; color: #6b6a65; text-align: right; }
.aw-qr.klein-qr { width: calc(10 * var(--mm)); height: calc(10 * var(--mm)); bottom: calc(4.5 * var(--mm)); right: calc(5 * var(--mm)); padding: 0; }

/* Druck: nur in der Ausweis-Ansicht (Seitenformat kommt aus ausweis-karte.css bzw. ausweis-a4.css) */
@media print {
  body.ausweis-modus { background: #fff !important; margin: 0; }
  body.ausweis-modus .nav, body.ausweis-modus .main > :not(.ausweis-bereich), body.ausweis-modus .ausweis-optionen,
  body.ausweis-modus #toast, body.ausweis-modus #tooltip, body.ausweis-modus dialog { display: none !important; }
  body.ausweis-modus .shell, body.ausweis-modus .main, body.ausweis-modus .ausweis-bereich { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; background: #fff !important; }
  body.ausweis-modus .ausweis-druck { --mm: 1mm; }
  body.ausweis-modus .ausweis-karte { box-shadow: none; outline: none; }
}

/* ================= Einstellungs-Listen: Sortieren, Filtern, Gruppen ================= */
button.sortier { all: unset; cursor: pointer; font: inherit; color: inherit; white-space: nowrap; }
button.sortier:hover { color: var(--text); text-decoration: underline; }
button.sortier:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.sort-pfeil { color: var(--accent); }
.auswahl-spalte { width: 32px; }
.einst-tabelle tr.gewaehlt td { background: var(--accent-soft); }
.gruppe-kopf td { background: var(--surface-2); padding: 0 !important; }
.gruppe-knopf { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 8px 12px; font-weight: 600; font-size: 13.5px; color: var(--text); }
.gruppe-knopf:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.klapp-pfeil { width: 12px; color: var(--text-3); }
.auswahl-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 12px; border-radius: 8px; background: var(--accent-soft); font-size: 13.5px; }
.gruppen-liste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.gruppen-liste li { display: grid; grid-template-columns: 1fr 80px auto auto; gap: 8px; align-items: center; }
.gruppe-neu { display: flex; gap: 8px; }
.gruppe-neu input { flex: 1; }
@media (max-width: 560px) { .gruppen-liste li { grid-template-columns: 1fr 64px auto; } .gruppen-liste li .klein { display: none; } }

/* ================= Rechte je Abteilung ================= */
.panel.breit { width: min(980px, 100vw); }
.rechte-tabelle th.mitte, .rechte-tabelle td.mitte { text-align: center; }
.rechte-tabelle th { font-size: 12px; white-space: normal; line-height: 1.25; vertical-align: bottom; }
.rechte-tabelle select { min-width: 130px; }
.rechte-tabelle tr.inaktiv td:not(:first-child):not(:nth-child(2)) { opacity: .45; }
.rt-vorlagen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.panel footer .klein { margin-right: auto; align-self: center; }
.auswahl-leiste select { width: auto; max-width: 100%; }

/* ================= Wiederherstellungscodes ================= */
.wh-codes { columns: 2; column-gap: 24px; margin: 12px 0; padding-left: 28px; font-size: 15px; }
.wh-codes li { margin: 4px 0; break-inside: avoid; }
.wh-codes code { font-size: 15px; letter-spacing: .06em; font-weight: 600; }
@media (max-width: 480px) { .wh-codes { columns: 1; } }

/* ================= Gehaltsauswertung ================= */
.ga-zeitraum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.ga-zeitraum label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.ga-zeitraum input[type=month] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0; }
.ga-umschalter { display: inline-flex; }
.ga-umschalter .btn { border-radius: 0; }
.ga-umschalter .btn:first-child { border-radius: 8px 0 0 8px; }
.ga-umschalter .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.ga-personen { margin-top: 4px; }
.ga-personen .treffer { cursor: pointer; }
.diagramm .ga-zeile { fill: transparent; }
.diagramm .ga-zeile.hover { fill: var(--surface-2); }
.diagramm .ga-median { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.legende i.ga-median-i { width: 14px; height: 0; border-radius: 0; border-top: 1px dashed var(--text-2); }
.ga-ehemalig, .diagramm .ga-ehemalig { font-style: italic; fill: var(--text-3); color: var(--text-3); }
.ga-unter { margin: -6px 0 10px; }
.ga-raster { margin-top: 16px; margin-bottom: 16px; }
.ga-raster.k2 { grid-template-columns: 1fr 1fr; }
.ga-hinweise { margin: 12px 0 0; padding-left: 18px; }
.ga-hinweise li { margin: 3px 0; }
.ga-hinweise b { color: var(--text-2); }
@media (max-width: 900px) { .ga-raster.k2 { grid-template-columns: 1fr; } }
.ga-karte + .ga-karte { margin-top: 16px; }
.main .diagramm.ga-frei { overflow: visible; }
.main .diagramm.ga-frei svg { min-width: 0; max-width: none; }
.ga-personen .wertlabel { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.ga-geschaetzt { display: inline-block; width: .8em; text-align: left; color: var(--warn); font-weight: 700; }
@media (max-width: 640px) {
  .ga-umschalter { display: flex; width: 100%; }
  .ga-umschalter .btn { flex: 1 1 0; justify-content: center; white-space: normal; text-align: center; min-width: 0; }
}

/* Austritt: Schalter Abfindung in der Amortisation */
.au-schalter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.au-schalter .check { font-weight: 600; }
.au-schalter input[role=switch] { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.au-schalter input[role=switch]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.au-schalter input[role=switch]:checked { background: var(--accent); }
.au-schalter input[role=switch]:checked::after { transform: translateX(14px); }
.au-schalter input[role=switch]:disabled { opacity: .55; cursor: not-allowed; }
.au-schalter input[role=switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ================= Bericht: Personalkostenplanung (Druck/PDF) ================= */
.b-wahl { display: grid; gap: 10px; margin-top: 12px; }
.b-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.b-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.b-option input { margin-top: 3px; }
.bericht-werkzeug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 210mm; margin: 0 auto 14px; }
.bericht-werkzeug .bw-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bericht-werkzeug .bw-hinweis { flex-basis: 100%; margin: 0; }
.bericht-werkzeug .ga-umschalter .btn { text-decoration: none; }
.bericht-blatt {
  --p-text: #1b1b1f; --p-text2: #55544f; --p-text3: #7c7b75; --p-linie: #dcdad4; --p-fl: #f4f3ef; --p-akzent: #1f5fae;
  --p-a: #a9a8a2; --p-b: #2a78d6; --p-plus: #d9534f; --p-minus: #1a9e70;
  color-scheme: light; background: #fff; color: var(--p-text); max-width: 210mm; margin: 0 auto; padding: 16mm 15mm 12mm;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 30px rgba(0,0,0,.08); border-radius: 4px; font-size: 13px; line-height: 1.45;
}
.bericht-blatt h2 { font-size: 15px; margin: 0 0 8px; color: var(--p-akzent); border-bottom: 1.5px solid var(--p-akzent); padding-bottom: 3px; }
.bericht-blatt h3 { font-size: 13px; margin: 0 0 4px; }
.b-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--p-linie); padding-bottom: 8px; margin-bottom: 14px; font-size: 11.5px; color: var(--p-text2); }
.b-firma { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--p-text); }
.b-firma img { width: 22px; height: 22px; }
.b-stempel { font-size: 11px; font-weight: 600; padding: 2px 8px; border: 1px solid var(--p-linie); border-radius: 4px; color: var(--p-text2); }
.b-stempel.vertraulich { color: #a1261f; border-color: #e5b1ad; background: #fdf1f0; }
.b-titel { margin-bottom: 16px; }
.b-titel .b-edit { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.b-titel .b-feld.titel .b-druck { font-size: 24px; font-weight: 700; }
.b-unter { margin: 4px 0 0; color: var(--p-text2); }
.b-abschnitt { margin-top: 18px; }
.b-erkl { margin: 0 0 8px; color: var(--p-text2); }
.b-klein { font-size: 11.5px; color: var(--p-text3); }
.b-liste { margin: 6px 0 0; padding-left: 18px; }
.b-liste li { margin: 2px 0; }
.b-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.b-kpi { border: 1px solid var(--p-linie); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.b-kpi span { font-size: 11px; color: var(--p-text2); }
.b-kpi strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.b-kpi em { font-style: normal; font-size: 11px; color: var(--p-text3); }
.b-mehr { color: #b3261e; } .b-weniger { color: #0f7b3d; }
.b-tab { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.b-tab th { text-align: left; font-weight: 600; color: var(--p-text2); border-bottom: 1.5px solid var(--p-text2); padding: 5px 6px; font-size: 11px; background: none; position: static; }
.b-tab td { border-bottom: 1px solid var(--p-linie); padding: 5px 6px; vertical-align: top; }
.b-tab .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-tab tr.b-summe td { font-weight: 700; border-top: 1.5px solid var(--p-text2); border-bottom: none; }
.b-tab.b-kompakt td { padding: 3px 6px; }
.b-positionen td:first-child { width: 26%; }
.b-marke { display: inline-block; margin-top: 3px; font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--p-fl); color: var(--p-text2); }
.b-gruende { margin: 0; padding-left: 16px; }
.b-gruende li { margin: 1px 0; }
.b-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.b-beschreibung { margin: 0 0 4px; color: var(--p-text2); white-space: pre-wrap; }
.b-diagramm { position: relative; }
.b-diagramm svg { display: block; width: 100%; height: auto; }
.b-diagramm text { font-family: inherit; }
.b-diagramm .b-achse { fill: var(--p-text3); font-size: 10.5px; }
.b-diagramm .b-wert { fill: var(--p-text); font-size: 11px; font-weight: 600; }
.b-diagramm .b-gitter { stroke: var(--p-linie); stroke-width: 1; }
.b-diagramm .b-verb { stroke: var(--p-text3); stroke-width: 1; stroke-dasharray: 2 2; }
.b-diagramm .b-a, .b-legende i.b-a { fill: var(--p-a); background: var(--p-a); }
.b-diagramm .b-b, .b-legende i.b-b { fill: var(--p-b); background: var(--p-b); }
.b-diagramm .b-plus { fill: var(--p-plus); } .b-diagramm .b-minus { fill: var(--p-minus); }
.b-legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--p-text2); margin-bottom: 4px; }
.b-legende span { display: inline-flex; align-items: center; gap: 6px; }
.b-legende i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.b-feld { margin: 4px 0; }
.b-edit { width: 100%; box-sizing: border-box; font: inherit; color: var(--p-text); background: #fbfbf9; border: 1px dashed #b9b7b0; border-radius: 4px; padding: 5px 7px; resize: vertical; min-height: 30px; }
.b-edit:focus { outline: 2px solid var(--p-akzent); outline-offset: 1px; border-style: solid; background: #fff; }
.b-edit::placeholder { color: #a3a19b; }
input.b-edit { min-height: 0; }
.b-druck { display: none; white-space: pre-wrap; }
.b-fuss { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--p-linie); font-size: 10.5px; color: var(--p-text3); }
@media screen and (max-width: 760px) {
  .bericht-blatt { padding: 18px 14px; font-size: 12.5px; }
  .b-titel .b-edit, .b-titel .b-feld.titel .b-druck { font-size: 19px; }
  .b-kpis { grid-template-columns: 1fr 1fr; }
  .b-zwei { grid-template-columns: 1fr; }
  .bericht-blatt .b-tab { display: block; overflow-x: auto; }
}
@media print {
  body.bericht-modus { background: #fff !important; margin: 0; }
  body.bericht-modus .nav, body.bericht-modus .bericht-werkzeug, body.bericht-modus #toast, body.bericht-modus #tooltip, body.bericht-modus dialog { display: none !important; }
  body.bericht-modus .shell, body.bericht-modus .main { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; background: #fff !important; }
  body.bericht-modus .bericht-blatt { box-shadow: none; border-radius: 0; padding: 14mm 13mm 16mm; max-width: none; font-size: 9.6pt; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  body.bericht-modus .b-edit { display: none !important; }
  body.bericht-modus .b-druck:not([hidden]) { display: block; }
  body.bericht-modus .b-feld:has(.b-druck[hidden]) { display: none; }
  body.bericht-modus .b-tab { font-size: 8.8pt; }
  body.bericht-modus .b-tab tr, body.bericht-modus .b-kpis, body.bericht-modus .b-diagramm { break-inside: avoid; }
  body.bericht-modus .b-tab thead { display: table-header-group; }
  body.bericht-modus h2 { break-after: avoid; }
  body.bericht-modus .b-umbruch-vermeiden { break-inside: avoid; }
  body.bericht-modus * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.b-kommentar .b-druck::before { content: "Kommentar: "; font-weight: 600; }
.b-kommentar .b-druck { margin-top: 3px; padding: 3px 6px; background: var(--p-fl); border-left: 2px solid var(--p-akzent); }
/* Pauschale Annahmen: Beträge mit Hinweis */
.annahmen-liste li { align-items: flex-start; }
.annahme-hinweis { margin-top: 2px; white-space: pre-wrap; }
.an-art { margin-top: 0; }

/* Detailansicht einer Position im Szenarienvergleich */
.panel h3 { font-size: 14px; margin: 0 0 8px; }
.panel .mt16 { margin-top: 16px; }
.panel ul.kompakt { margin: 0; padding-left: 18px; }
.panel ul.kompakt li { margin: 2px 0; }
.vgl-grund th[scope="row"] { text-align: left; font-weight: 500; color: var(--text-2); white-space: nowrap; vertical-align: top; }
.vgl-grund td { vertical-align: top; }
.vgl-grund thead th:not(:first-child) { width: 40%; }
.vgl-monate td .klein { color: var(--text-2); white-space: nowrap; }

/* Pauschale Beträge: Verteilung auf Mitarbeiter */
dialog.breit { width: min(760px, calc(100vw - 32px)); }
dialog.breit .d-inhalt { max-height: calc(100vh - 170px); overflow-y: auto; }
.an-vert { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.an-vert legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.an-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; max-height: 170px; overflow-y: auto; border: 1px solid var(--grid); border-radius: 8px; padding: 6px 10px; }
.an-auswahl.lang { max-height: 240px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.an-auswahl .check { margin: 0; }
.an-suche { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.an-suche input { flex: 1; min-width: 160px; }
.an-optionen { display: grid; gap: 4px; }
.an-optionen .check { margin: 0; }
.an-staffel { margin-left: 24px; display: grid; gap: 6px; }
.an-stufe { display: flex; align-items: center; gap: 6px; }
.an-stufe input { width: 76px; }
.an-referenz { display: grid; gap: 6px; }
.an-referenz-felder { margin-left: 24px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.an-referenz-felder select { width: auto; }
.an-referenz-felder input[type="number"] { width: 90px; }
.an-referenz-felder p { flex-basis: 100%; }
.an-vorschau { border-top: 1px solid var(--border); padding-top: 10px; }
.an-vorschau-kopf { margin-bottom: 6px; }
.an-vorschau-tab { max-height: 260px; overflow-y: auto; }
.an-vorschau-tab td, .an-vorschau-tab th { padding: 4px 8px; font-size: 12.5px; }
.annahmen-liste .aktionen { display: flex; gap: 6px; flex-shrink: 0; }
.an-staffel > .btn { justify-self: start; }
dialog.breit .formular > * { min-width: 0; }
.an-vorschau-tab table { width: 100%; }
