:root {
  /* MR-Gruppe Design System (wie www.mr-holding.de / NeuroBodyGym-KI): Ink + Gold */
  --ink: #07090C;
  --ink-2: #0B0E13;
  --ink-3: #11151C;
  --ink-4: #1A1F2A;
  --gold: #C9A96A;
  --gold-lo: #8E7743;
  --gold-hi: #F0DFB4;
  --akzent: #0B0E13;
  --akzent-hell: #8E7743;
  --akzent-2: #C9A96A;
  --bg: #F4F3F0;
  --card: #ffffff;
  --text: #11151C;
  --muted: #6B7280;
  --line: #E5E2DB;
  --ok: #15803d;
  --warn: #b45309;
  --fehler: #b91c1c;
  --hover: #F7F3EA;
  --sel: #F0E6D0;
  --radius: 10px;
  --sidebar: 230px;
  --display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--gold-lo); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--display); font-size: 21px; margin: 0 0 12px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
h2 { font-family: var(--display); font-size: 15px; margin: 0 0 10px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
h3 { font-size: 11.5px; margin: 14px 0 6px; font-weight: 600; color: var(--gold-lo); text-transform: uppercase; letter-spacing: .18em; }

/* Layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%); color: #E7E9ED; padding: 14px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid rgba(201,169,106,.16); }
.sidebar .brand { display: block; padding: 6px 4px 12px; border-bottom: 1px solid rgba(201,169,106,.25); margin-bottom: 8px; text-decoration: none; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand img { display: block; width: 100%; height: auto; }
.sidebar .brand .produkt { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; padding: 0 4px; font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .14em; color: #fff; }
.sidebar .version { font-family: var(--display); font-weight: 500; color: var(--gold); font-size: 10.5px; letter-spacing: .12em; }
.sidebar .version:hover { color: var(--gold-hi); text-decoration: underline; }
.sidebar nav a { display: block; color: #C4CBD6; padding: 7px 10px; border-radius: 6px; margin-bottom: 1px; font-size: 13.5px; border-left: 2px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.aktiv { background: rgba(201,169,106,.14); color: var(--gold-hi); font-weight: 600; border-left-color: var(--gold); }
.sidebar nav .gruppe { display: flex; align-items: center; width: 100%; background: none; border: none; cursor: pointer; font: inherit; color: var(--gold); font-size: 10px; text-transform: uppercase; letter-spacing: .28em; padding: 9px 10px 5px; margin-top: 8px; opacity: .9; text-align: left; }
.sidebar nav .gruppe:hover { opacity: 1; color: var(--gold-hi); }
.sidebar nav .gruppe .pfeil { margin-left: auto; font-size: 11px; transition: transform .15s; }
.sidebar nav .navgruppe.offen .gruppe .pfeil { transform: rotate(90deg); }
.sidebar nav .navgruppe .punkte { display: none; }
.sidebar nav .navgruppe.offen .punkte { display: block; }
.sidebar::-webkit-scrollbar { width: 0; height: 0; }
.sidebar { scrollbar-width: none; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 22px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .mandant select { font-family: var(--display); font-weight: 700; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: #fff; color: var(--ink); }
.topbar .spacer { flex: 1; }
.topbar .user { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.content { padding: 18px 22px 40px; }
.content.breit { padding: 14px 16px 40px; }

/* Karten / Meldungen */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card.kompakt { padding: 10px 12px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; border: 1px solid; font-weight: 500; }
.flash.ok { background: #ecfdf3; border-color: #a7f3c9; color: var(--ok); }
.flash.warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.flash.fehler { background: #fef2f2; border-color: #fecaca; color: var(--fehler); }
.hinweis { color: var(--muted); font-size: 12.5px; }
.leer { color: var(--muted); padding: 24px; text-align: center; }

/* Split: Liste + Maske */
.split { display: grid; grid-template-columns: minmax(380px, 5fr) minmax(520px, 7fr); gap: 16px; align-items: start; }
.split.breit-maske { grid-template-columns: minmax(340px, 4fr) minmax(600px, 8fr); }
@media (max-width: 1250px) { .split, .split.breit-maske { grid-template-columns: 1fr; } }
.liste-pane { position: sticky; top: 62px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.liste-pane .tabelle-scroll { overflow: auto; flex: 1; }
.maske-pane { min-width: 0; }

/* Tabellen */
table.tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tabelle th { text-align: left; font-weight: 600; color: var(--gold-lo); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 7px 8px; border-bottom: 2px solid var(--gold); white-space: nowrap; position: sticky; top: 0; background: var(--card); z-index: 1; }
table.tabelle td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tabelle tr.zeile { cursor: pointer; }
table.tabelle tr.zeile:hover { background: var(--hover); }
table.tabelle tr.zeile.aktiv { background: var(--sel); }
table.tabelle td.r, table.tabelle th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tabelle tr.summe td { font-weight: 650; border-top: 2px solid var(--gold); }
table.tabelle tr.gruppe td { background: #F8F5EE; font-weight: 650; color: var(--ink); }
table.tabelle .klein { color: var(--muted); font-size: 12px; }
table.tabelle td.aktionen { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 14px; }
.form-grid.zwei { grid-template-columns: 1fr 1fr; }
.form-grid.drei { grid-template-columns: 1fr 1fr 1fr; }
.feld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.feld.voll { grid-column: 1 / -1; }
.feld label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.feld input, .feld select, .feld textarea, input.inline, select.inline {
  border: 1px solid #cfd6e0; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--text); width: 100%;
}
.feld input:focus, .feld select:focus, .feld textarea:focus, input.inline:focus, select.inline:focus { outline: 2px solid rgba(201,169,106,.35); border-color: var(--gold); }
.feld input[readonly] { background: #f6f8fb; color: var(--muted); }
.feld textarea { min-height: 64px; resize: vertical; }
.feld .check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500; padding-top: 6px; }
.feld .check input { width: auto; }
.feld.r input { text-align: right; }
.zeile-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.zeile-aktionen .rechts { margin-left: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfd6e0; background: #fff; color: var(--text); padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primaer { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.btn.primaer:hover { background: var(--ink-4); }
.btn.sekundaer { background: linear-gradient(96deg, var(--gold-lo), var(--gold) 60%, var(--gold-lo)); color: #0a0a0a; border-color: var(--gold-lo); font-weight: 600; }
.btn.gefahr { color: var(--fehler); border-color: #fca5a5; }
.btn.gefahr:hover { background: #fef2f2; }
.btn.klein { padding: 3px 8px; font-size: 12px; }
.btn.icon { padding: 3px 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-gruppe { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Filterleiste */
.filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 10px; }
.filter .feld { min-width: 120px; }
.filter .feld.breit { flex: 1; min-width: 180px; }

/* Status-Badges */
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.entwurf { background: #f3f4f6; color: #4b5563; }
.badge.gebucht { background: #F0E6D0; color: #6B5A2E; }
.badge.versendet { background: #dcfce7; color: #166534; }
.badge.bezahlt { background: #d1fae5; color: #065f46; }
.badge.offen { background: #fef3c7; color: #92400e; }
.badge.ueberfaellig { background: #fee2e2; color: #991b1b; }
.badge.storniert { background: #fee2e2; color: #991b1b; text-decoration: line-through; }
.badge.aktiv { background: #dcfce7; color: #166534; }
.badge.inaktiv { background: #f3f4f6; color: #6b7280; }
.badge.mahn { background: #fde68a; color: #78350f; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kachel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kachel .label { font-size: 10.5px; color: var(--gold-lo); text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
.kachel .wert { font-family: var(--display); font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kachel .wert.klein { font-size: 16px; }
.kachel .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kachel.warn .wert { color: var(--warn); }
.kachel.fehler .wert { color: var(--fehler); }
.kachel a.wert:hover { text-decoration: underline; }

/* Positionen */
table.positionen td { padding: 4px 5px; }
table.positionen input, table.positionen select, table.positionen textarea { border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 4px 5px; font: inherit; font-size: 13px; width: 100%; }
table.positionen input:hover, table.positionen select:hover, table.positionen textarea:hover { border-color: #cfd6e0; background: #fff; }
table.positionen input:focus, table.positionen select:focus, table.positionen textarea:focus { border-color: var(--gold); background: #fff; outline: 2px solid rgba(201,169,106,.35); }
table.positionen textarea { min-height: 28px; resize: vertical; }
table.positionen input.r { text-align: right; }
table.positionen tr.textzeile td { background: #fbfcfe; }
.summenblock { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; justify-content: end; max-width: 380px; margin-left: auto; font-variant-numeric: tabular-nums; }
.summenblock .label { color: var(--muted); }
.summenblock .wert { text-align: right; }
.summenblock .gesamt { font-weight: 700; border-top: 2px solid var(--gold); padding-top: 4px; font-size: 15px; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 0; max-width: 680px; width: min(92vw, 680px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,30,50,.45); }
dialog .dialog-kopf { padding: 12px 18px; border-bottom: 2px solid var(--gold); font-family: var(--display); font-weight: 700; display: flex; align-items: center; }
dialog .dialog-kopf button { margin-left: auto; }
dialog .dialog-inhalt { padding: 16px 18px; }
dialog .dialog-fuss { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs a, .tabs button { padding: 7px 12px; border: none; background: none; font: inherit; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs a.aktiv, .tabs button.aktiv { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--akzent); }

/* Dropzone */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 180px; border: 2px dashed #C9B98F; border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); background: #FBF9F4; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover { background: var(--hover); border-color: var(--gold); }
.dropzone-symbol { font-size: 34px; line-height: 1; color: var(--gold-lo); margin-bottom: 6px; }
.dropzone-titel { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.dropzone-text { font-size: 13px; }
.import-karte { max-width: 820px; }
.import-hinweise { margin-top: 14px; font-size: 13px; color: var(--text); }
.import-hinweises ul, .import-hinweise ul { margin: 6px 0 10px 18px; padding: 0; }
.import-hinweise li { margin: 3px 0; }
.dropzone.aktiv { border-color: var(--gold); background: var(--hover); }

/* Chart */
.chart svg { width: 100%; height: auto; }
.chart .balken { transition: opacity .15s; }
.chart .balken:hover { opacity: .75; }
.legende { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.legende .punkt { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 360px; }
.login-wrap { background: radial-gradient(60vw 60vw at 80% -10%, rgba(201,169,106,.18), transparent 60%), linear-gradient(180deg, #07090C, #0B0E13); }
.login-card { border-color: rgba(201,169,106,.35); }
.login-logo { background: var(--ink-2); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.login-logo img { display: block; width: 100%; height: auto; }
.login-card h1 { color: var(--ink); letter-spacing: .12em; }

.htmx-request .lade { display: inline; }
.lade { display: none; color: var(--muted); font-size: 12px; }
details > summary { cursor: pointer; color: var(--akzent-hell); font-weight: 600; font-size: 13px; }
kbd { font-family: ui-monospace, Menlo, monospace; background: #eef1f5; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
@media print { .sidebar, .topbar, .zeile-aktionen, .filter { display: none !important; } .app { display: block; } .content { padding: 0; } }

/* Sortierbare Spaltenköpfe */
table.tabelle thead th { cursor: pointer; user-select: none; }
table.tabelle thead th:hover { color: var(--ink); }
table.tabelle thead th.unsortierbar { cursor: default; }
table.tabelle thead th.sort-asc::after { content: " ▲"; font-size: 9px; color: var(--gold); }
table.tabelle thead th.sort-desc::after { content: " ▼"; font-size: 9px; color: var(--gold); }

/* Schlüssel/Wert-Tabellen im Verlauf */
table.tabelle.kv td { padding: 4px 8px; }
table.tabelle.kv td:first-child { width: 110px; white-space: nowrap; }

/* Changelog */
.changelog h1 { margin-bottom: 4px; }
.changelog h2 { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--gold-lo); }
.changelog ul { margin: 6px 0 0 18px; padding: 0; }
.changelog li { margin: 4px 0; }
.changelog code { background: #F3F0E8; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
dialog .dialog-kopf { cursor: grab; }

table.positionen input.klein { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Fokus: ein Bereich auf voller Breite, der andere als schmale Leiste */
.split.fokus-liste { grid-template-columns: 1fr 44px; }
.split.fokus-maske { grid-template-columns: 44px 1fr; }
.split > .zu { position: sticky; top: 62px; min-height: 280px; max-height: calc(100vh - 80px); padding: 0; overflow: hidden; cursor: pointer; }
.split > .zu > *:not(.pane-leiste) { display: none !important; }
.pane-leiste { display: none; }
.split > .zu > .pane-leiste { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; min-height: 280px; padding: 10px 0; background: var(--ink-2); border-radius: var(--radius); color: var(--gold); }
.pane-leiste-text { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--display); font-weight: 700; letter-spacing: .18em; font-size: 12px; text-transform: uppercase; flex: 1; display: flex; align-items: center; }
.pane-leiste .pane-beide { background: transparent; color: var(--gold-hi); border-color: rgba(201,169,106,.5); padding: 2px 6px; }
.split > .zu:hover .pane-leiste { background: var(--ink-3); }
.split.fokus-liste > .liste-pane { position: static; max-height: none; }
.split.fokus-liste > .liste-pane .tabelle-scroll { max-height: calc(100vh - 230px); }
@media (max-width: 1250px) { .split.fokus-liste, .split.fokus-maske { grid-template-columns: 1fr; } .split > .zu { display: none; } }

/* PDF-Anzeige */
.pdf-ansicht { width: 100%; background: #e9e6df; border-radius: 6px; padding: 1px; }
.pdf-ansicht canvas { display: block; margin: 0 auto 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* Zebra-Streifen in Listen: weiß / hellgrau im Wechsel (Auswahl und Hover bleiben sichtbar) */
table.tabelle > tbody > tr:nth-child(even):not(.gruppe):not(.summe):not(.aktiv) { background: #F5F4F1; }
table.tabelle > tbody > tr.zeile:hover { background: var(--hover); }
table.tabelle > tbody > tr.zeile.aktiv { background: var(--sel); }

details > summary.kategorie, td details > summary { list-style: none; }
td details > summary::before { content: "▸ "; color: var(--gold-lo); }
td details[open] > summary::before { content: "▾ "; }

/* PDF-Dialog */
dialog.pdf-dialog { width: min(96vw, 1100px); max-width: 1100px; max-height: 94vh; }
dialog.pdf-dialog .pdf-inhalt { max-height: calc(94vh - 56px); overflow: auto; background: #e9e6df; padding: 10px; }
dialog.pdf-dialog .pdf-ansicht { background: transparent; padding: 0; }

/* Ansprechpartner: Aktions-Chips (Filter und Zuordnung) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips-filter { flex-basis: 100%; }
.chips-filter > label { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line, #d9dde3); border-radius: 14px; background: #fff; font-size: 12.5px; cursor: pointer; user-select: none; }
.chip input { margin: 0; accent-color: var(--gold); }
.chip:hover { border-color: var(--gold); }
.chip.gewaehlt { background: #F0E6D0; border-color: var(--gold); color: #6B5A2E; font-weight: 600; }
.chip.inaktiv { opacity: .6; }
.chips.gross .chip { padding: 6px 12px; font-size: 13.5px; }
.chip-x { border: none; background: transparent; color: #991b1b; cursor: pointer; font-size: 12px; padding: 0 2px; line-height: 1; }
.chip-x:hover { color: #7f1d1d; }
.badge.aktion { background: #F0E6D0; color: #6B5A2E; margin: 1px 0; }
.badge.nbg { background: #e0e7ff; color: #3730a3; }
.feld .chip, .chip { display: inline-flex !important; text-transform: none; letter-spacing: normal; font-size: 12.5px; font-weight: 500; color: var(--ink); margin: 0; line-height: 1.3; }
.feld .chip.gewaehlt { font-weight: 600; color: #6B5A2E; }
.feld .chip input[type=checkbox] { width: auto; margin: 0; }

/* Warteseite „Aktualisieren“ */
.fortschritt { height: 6px; background: #eceff3; border-radius: 3px; overflow: hidden; margin: 14px 0 8px; }
.fortschritt .balken { height: 100%; width: 40%; background: var(--gold); border-radius: 3px; animation: fortschritt 1.4s ease-in-out infinite; }
@keyframes fortschritt { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.btn.aktualisieren { color: var(--muted); }
.btn.aktualisieren:hover { color: var(--gold); }

/* Rückfrage-Dialog Ja / Nein */
dialog.frage-dialog { width: min(92vw, 440px); }
dialog.frage-dialog .frage-text { white-space: pre-line; font-size: 14px; line-height: 1.5; }
dialog.frage-dialog .dialog-fuss .btn { min-width: 90px; justify-content: center; }
.btn.gefahr-voll { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.gefahr-voll:hover { background: #991b1b; border-color: #991b1b; }

/* Hinweis „neue Version geladen“ */
.versions-hinweis { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000; background: var(--ink); color: #fff; border: 1px solid var(--gold); border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 13.5px; }

/* Ansprechpartner: Markierung und Versand */
.markier-spalte { width: 30px; text-align: center; }
.markier-spalte input { margin: 0; accent-color: var(--gold); cursor: pointer; }
tr.markiert td { background: #FBF4E4 !important; }
.aktion-leiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; margin: 0 0 8px; border: 1px solid var(--line, #d9dde3); border-radius: 8px; background: #faf8f3; }
.aktion-leiste .markiert-info { margin-right: 8px; font-size: 13px; }
.aktion-leiste .aktion-titel { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-left: 4px; }
.aktion-leiste .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.link { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; }
dialog.versand-dialog { width: min(94vw, 720px); max-width: 720px; }
dialog.versand-dialog .dialog-inhalt { max-height: calc(88vh - 120px); overflow: auto; }
.versand-empfaenger { padding: 8px 10px; background: #f6f4ee; border-radius: 6px; margin-bottom: 10px; font-size: 13.5px; }
.versand-empfaenger ul { margin: 4px 0 0 18px; padding: 0; }
.versand-balken { height: 6px; background: #eceff3; border-radius: 3px; overflow: hidden; margin: 2px 0 6px; }
.versand-balken > div { height: 100%; background: var(--gold); transition: width .3s; }
kbd { border: 1px solid #c9cdd3; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 12px; background: #fff; }
.fehlertext { color: #991b1b; }
table.kompakt-tabelle td { padding-top: 3px; padding-bottom: 3px; }
.badge.versand-offen { background: #fef3c7; color: #92400e; }
.badge.versand-gesendet { background: #dcfce7; color: #166534; }
.badge.versand-testmodus { background: #e0e7ff; color: #3730a3; }
.badge.versand-liste { background: #F0E6D0; color: #6B5A2E; }
.badge.versand-uebersprungen { background: #f3f4f6; color: #6b7280; }
.badge.versand-fehler { background: #fee2e2; color: #991b1b; }

/* Blättern in der Maske */
.blaettern { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.blaettern .btn { min-width: 30px; justify-content: center; font-size: 15px; line-height: 1; padding: 3px 8px; }
.blaettern .btn[disabled] { opacity: .35; cursor: default; }
.blaettern-pos { font-size: 12px; color: var(--muted); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.badge.versand-uebergeben { background: #e0f2fe; color: #075985; }
.modus-wahl { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 0 2px; }
.modus-wahl label.check { font-size: 13.5px; text-transform: none; letter-spacing: normal; color: var(--ink); font-weight: 500; }
.badge.geschenk { background: #fde8e8; color: #9b1c1c; }

/* Auswahl-Dialog mit mehreren Knöpfen (z.B. Ungespeicherte Änderungen) */
dialog.frage-dialog { width: min(94vw, 560px); }
dialog.frage-dialog .dialog-fuss { flex-wrap: wrap; }
dialog.frage-dialog .dialog-fuss .btn { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
/* hidden-Attribut hat immer Vorrang (z.B. „Markierung aufheben“ ohne Markierung) */
[hidden] { display: none !important; }
