:root {
  /* Marke K-I-NG: Petrol #0E3B43, Messing #B08A1E, Sand #F4F1EA (docs/STIL.md) */
  --bg: #f4f1ea; --surface: #ffffff; --surface-2: #f7f4ec; --surface-3: #faf8f2; --dark: #0e3b43;
  --line: #e6e1d5; --border: #ded8cb;
  --text: #15262b; --muted: #5e6b6e; --soft-text: #465558;
  --accent: #b08a1e; --accent-soft: #f4ebd0; --accent-ink: #7a5f12; --navy: #0e3b43; --petrol: #0e3b43; --messing: #b08a1e; --messing-hell: #e3c766; --sand: #f4f1ea;
  --ok: #2f8f5b; --ok-soft: #e3f3e9; --bad: #c8432f; --bad-soft: #fbe6e1; --warn: #a96b12; --warn-soft: #fbf0db;
  /* Grund des QR-Codes beim zweiten Faktor: muss weiß bleiben, damit Authenticator-Apps ihn sicher lesen */
  --qr-grund: #ffffff;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 6px 22px rgba(0, 0, 0, .045);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; margin: 0; }
.i { flex: none; display: block; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login-card { background: var(--surface); padding: 34px 32px 30px; border-radius: 26px; width: 100%; max-width: 400px;
  display: grid; gap: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .08); }
.login-logo { display: block; width: 100%; max-width: 270px; margin: 2px auto 4px; }
.login-card .muted { text-align: center; margin: 0 0 6px; }
.login-card h1 { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; text-align: center; margin: 0; color: var(--muted); font-weight: 600; }

/* Layout: schwebende Fenster auf grauem Grund */
.shell { display: grid; grid-template-columns: 252px 1fr; gap: 14px; min-height: 100vh; padding: 14px; }
.sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; padding: 18px 12px 12px; position: sticky; top: 14px; height: calc(100vh - 28px); overflow-y: auto; }
.brand { display: block; padding: 2px 8px 14px; text-decoration: none; }
.brand img { width: 100%; max-width: 212px; height: auto; display: block; }
/* Kleines Logo (Petrol-Kachel „K|“): Anmeldung und kleine Darstellungen */
.brand-small { display: flex; align-items: center; gap: 11px; }
.brand-small img { width: 40px; height: 40px; display: block; flex: none; }
.brand-small b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--text); line-height: 1.2; }
.brand-small small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.login-brand { flex-direction: column; text-align: center; gap: 12px; margin: 4px 0 2px; }
.login-brand img { width: 64px; height: 64px; }
.login-brand b { font-size: 20px; }
nav { display: grid; gap: 2px; }
nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--soft-text); font-weight: 500; transition: background .15s, color .15s; }
nav a:hover { background: var(--surface-2); color: var(--text); }
nav a.active { background: var(--navy); color: #fff; }
nav a:focus-visible, .btn:focus-visible, .seg a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
nav .ico { width: 18px; display: grid; place-items: center; }
.nav-group { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); padding: 16px 12px 5px; font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px; border-top: 1px solid var(--line); }
.me { font-size: 12px; color: var(--muted); min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me b { display: block; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 6px 4px; }
.titles { flex: 1; min-width: 0; }
.topbar h1 { font-size: 26px; margin: 0; white-space: nowrap; letter-spacing: -.02em; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar .sub:empty { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions { padding: 10px 6px 0; }
.page-actions:empty { display: none; }
/* Reiter zwischen zusammengehörigen Seiten (TABS in app.js) */
.page-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 6px 0; }
.page-tabs:empty { display: none; }
.page-tabs .ptab { text-decoration: none; color: var(--text); font-size: 13px; }
.page-tabs .ptab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-tabs .ptab .ico-svg, .page-tabs .ptab svg { opacity: .8; }
.sub-head { margin: 16px 0 8px; font-size: 14px; }
/* Plattform steuern (Frontend, Backend, Updates) */
.pf-bar { padding: 12px 18px; margin-bottom: 14px; }
.pf-sel { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.pf-sel select { min-width: 220px; }
.pf-intro { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pf-form { display: grid; gap: 18px; }
.pf-group h2 { font-size: 15px; margin: 0 0 10px; }
.pf-multi { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.pf-multi legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.pf-form label small, .pf-int-form label small { display: block; font-weight: 400; }
.pf-int-grid { display: grid; gap: 10px; margin-bottom: 8px; }
.pf-int { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.pf-int.on { border-color: #cfe3d6; }
.pf-int summary { cursor: pointer; display: grid; gap: 4px; }
.pf-int summary .row { gap: 8px; }
.pf-int-form { margin-top: 12px; display: grid; gap: 10px; }
.pf-matrix th, .pf-matrix td { text-align: center; font-size: 12px; padding: 6px 4px; white-space: nowrap; }
.pf-matrix th:first-child, .pf-matrix td:first-child { text-align: left; }
.pf-matrix td.off { color: var(--muted); }
.pf-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #999; margin-right: 3px; vertical-align: middle; }
.pf-dot.ok { background: var(--ok); } .pf-dot.bad { background: var(--bad); } .pf-dot.na { background: #b9bec9; }
.pf-upd select { font-size: 13px; }
.note { background: #fbf7ec; border: 1px solid #ece0b4; border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.page-actions select, .page-actions input:not([type=checkbox]) { width: auto; min-width: 160px; }
.view { padding: 16px 6px 36px; display: grid; gap: 16px; align-content: start; }
.global-search { width: min(320px, 34vw); position: relative; }
.global-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.global-search input { background: var(--surface); border-radius: 999px; padding-left: 40px; height: 42px; box-shadow: var(--shadow); }
.icon-btn, .bell { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.icon-btn:hover, .bell:hover { background: var(--surface-3); }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--accent-ink); color: #fff; font-size: 11px; font-weight: 700; }
.bell .count { position: absolute; top: -3px; right: -4px; border: 2px solid var(--bg); }
nav .count { margin-left: auto; }
nav a.active .count { background: #fff; color: var(--navy); }
.topbar .menu-btn { display: none; }

/* Buttons & Pills */
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: 999px;
  font: inherit; font-weight: 550; font-size: 13.5px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 7px;
  align-items: center; justify-content: center; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-3); border-color: #cfc6b0; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #14505b; border-color: #14505b; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: inherit; }
.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn[disabled][title] { cursor: not-allowed; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.seg a { padding: 7px 15px; border-radius: 999px; text-decoration: none; color: var(--soft-text); font-size: 13px; font-weight: 550;
  border: 1px solid transparent; }
.seg a:hover { background: var(--surface-2); }
.seg a.on { color: var(--accent-ink); background: #fbf7ec; border-color: #e8d9a8; }

/* Kacheln */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.dark { background: var(--dark); border-color: var(--dark); color: #f2f2f2; }
.card.dark h2 { color: #fff; }
.card.dark .btn { background: #fff; color: #0e3b43; border-color: #fff; }
.card.dark .muted { color: #9b9b9b; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(390px, 1fr); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { display: flex; gap: 14px; align-items: center; padding: 16px 18px; text-decoration: none; }
.kpi .ibox { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-3);
  display: grid; place-items: center; color: var(--text); flex: none; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.kpi .num { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; display: flex; align-items: center; gap: 8px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--soft-text); letter-spacing: 0; }
/* Schrift auf den hellen Schildern dunkler als --ok/--bad usw.: Kontrast mindestens 4,5:1 (WCAG AA) bei kleiner Schrift,
   dieselben Töne wie im Testprojekt */
.delta.ok { background: var(--ok-soft); color: #237347; }
.delta.bad { background: var(--bad-soft); color: #b23a27; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.stats small { display: block; font-size: 11.5px; color: #9b9b9b; }
.stats b { font-size: 17px; font-weight: 600; }
.hero { font-size: 34px; font-weight: 650; letter-spacing: -.02em; margin: 2px 0 8px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 550; background: var(--surface-2);
  color: var(--soft-text); white-space: nowrap; }
.badge.gold { background: var(--accent-soft); color: var(--accent-ink); }
.badge.hoch, .badge.bad { background: var(--bad-soft); color: #b23a27; }
.badge.mittel { background: var(--warn-soft); color: #8f5a0e; }
.badge.niedrig, .badge.ok { background: var(--ok-soft); color: #237347; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #c9c9c9; }
.dot.online { background: var(--ok); } .dot.offline, .dot.fehler { background: var(--bad); }
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.list li:last-child { border: 0; }
.empty { color: var(--muted); text-align: center; padding: 28px; }
.progress { height: 6px; border-radius: 99px; background: #ececec; overflow: hidden; margin: 10px 0; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.ticks { display: inline-flex; gap: 2px; align-items: center; }
.ticks i { width: 3px; height: 14px; border-radius: 2px; background: #e4e4e4; }
.ticks i.on { background: var(--accent); }
.dist { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px 14px; align-items: center; font-size: 13.5px; }
.dist .name { display: flex; align-items: center; gap: 10px; }
.dist .name .i { color: var(--muted); }
.dist .pct { color: var(--muted); font-size: 12.5px; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* Diagramme (ui.js) */
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; outline: none; }
.chart-svg .grid { stroke: #ececec; stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font-size: 11px; }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .area { fill: var(--accent); opacity: .1; }
.chart-svg .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart-svg .dot.hover, .chart-svg .cross { opacity: 0; }
.chart-svg.hovering .dot.hover, .chart-svg.hovering .cross { opacity: 1; }
.chart-svg .cross { stroke: #cfcfcf; stroke-width: 1; }
.chart-svg .cbar .bar { fill: #f2f2f2; transition: fill .12s; }
.chart-svg .cbar.on .bar, .chart-svg .cbar:focus .bar { fill: var(--accent); }
.chart-svg .cbar { outline: none; }
.chart-svg .cbar .hit { fill: transparent; }
.chart-svg .base { stroke: #3c3c3c; stroke-width: 1; }
.card.dark .chart-svg .tick { fill: #8d8d8d; }
.chart-tip { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 12px)); background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-size: 12px;
  pointer-events: none; opacity: 0; transition: opacity .1s; white-space: nowrap; display: grid; text-align: center; z-index: 2; }
.chart-tip b { font-size: 14px; }
.chart-tip span { color: var(--muted); }
.chart-tip.on { opacity: 1; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 550; background: var(--surface-3); border-bottom: 0; }
th:first-child { border-radius: 12px 0 0 12px; } th:last-child { border-radius: 0 12px 12px 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafafa; }
td.act { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12px; }

/* Formulare */
input, select, textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176, 138, 30, .16); }
.form-grid input:disabled, .form-grid textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  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='%237b7f8c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center; }
.page-actions select, .page-actions input:not([type=checkbox]) { border-radius: 999px; height: 38px; padding-top: 0; padding-bottom: 0; }
label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--soft-text); }
textarea { min-height: 90px; resize: vertical; }
.search { max-width: 280px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.check input { width: auto; accent-color: var(--accent); }

dialog { border: 1px solid var(--line); border-radius: 24px; padding: 0; width: min(580px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .18); }
dialog::backdrop { background: rgba(30, 30, 30, .32); backdrop-filter: blur(2px); }
#modal-form { padding: 24px; display: grid; gap: 16px; }
#modal-form h3 { margin: 0; font-size: 18px; }
dialog.confirm { width: min(420px, calc(100vw - 32px)); }
dialog.confirm form { padding: 24px; display: grid; gap: 16px; }
dialog.confirm p { margin: 0; white-space: pre-line; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 320px; }
.col h3 { margin: 4px 6px 12px; font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  margin-bottom: 10px; cursor: grab; display: grid; gap: 7px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); transition: box-shadow .15s, transform .15s; }
.task:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .07); transform: translateY(-1px); }
.task:active { cursor: grabbing; }
.task .t { font-weight: 600; display: flex; gap: 7px; align-items: start; line-height: 1.35; }
.task .t .i { margin-top: 1px; color: var(--muted); }
.task small { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.typeicon { display: inline-grid; color: var(--muted); vertical-align: -3px; }

.toast { position: fixed; bottom: 22px; right: 22px; background: var(--dark); color: #fff; padding: 12px 18px;
  border-radius: 14px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: none; }
/* Als Popover in der obersten Ebene (über Dialog und Schleier): Browser-Vorgaben für [popover] aufheben */
.toast[popover] { inset: auto 22px 22px auto; margin: 0; border: 0; max-width: min(560px, calc(100vw - 44px)); overflow: visible; }
/* Sortierbare Spaltenköpfe und Filter über Tabellen */
.th-sort { all: unset; cursor: pointer; font: inherit; color: inherit; border-radius: 6px; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rel-filter { display: inline-flex; align-items: center; gap: 8px; }
.rel-filter input[type=checkbox] { width: auto; height: auto; margin: 0; }
tr.rel-archiv td { opacity: .75; }
.rel-filter select { width: auto; height: 34px; padding-top: 0; padding-bottom: 0; border-radius: 999px; }
.toast.err { background: var(--bad); }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* Zusammenarbeit */
.click { cursor: pointer; }
.card.click, a.card, .thread { transition: box-shadow .15s, transform .15s, border-color .15s; }
.card.click:hover, a.card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); transform: translateY(-1px); }
a.card { text-decoration: none; color: inherit; }
.stack { display: grid; gap: 16px; align-content: start; }
.info { background: #fbf7ec; border-color: #ece0b4; box-shadow: none; padding: 12px 16px; font-size: 13.5px; color: var(--soft-text); }
.bad-text { color: var(--bad); font-weight: 600; }
.list li.click:hover { background: var(--surface-3); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.list li.unread { font-weight: 600; }
.list.compact li { padding: 7px 0; font-size: 13.5px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; margin: 0; }
.hint { margin: 0; font-size: 12px; }
textarea.tall { min-height: 180px; }
textarea.huge { min-height: 380px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; }
.md h3, .md h4, .md h5 { margin: 18px 0 8px; letter-spacing: -.01em; }
.md h3 { font-size: 21px; } .md h4 { font-size: 16px; } .md h5 { font-size: 14px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li.check-item { list-style: none; margin-left: -20px; }
.md li.check-item input { width: auto; vertical-align: middle; accent-color: var(--accent); }
.md a { color: var(--accent-ink); }
.md table { margin: 8px 0 14px; }
.mention { background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 0 4px; font-weight: 600; }
.sec-title { font-size: 13px; margin: 4px 0 10px; color: var(--muted); font-weight: 600; }
.list-card { padding: 4px 20px; }
.thread { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread:last-child { border: 0; }
.thread .row { margin-top: 5px; }
.thread-stats { display: grid; text-align: right; min-width: 90px; align-content: start; }
.thread-stats b { font-size: 18px; }
.idea .vote, .vote { display: grid; place-items: center; min-width: 46px; padding: 6px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-3); color: var(--soft-text); cursor: pointer; font: inherit; line-height: 1.1; }
.vote.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.idea { display: grid; gap: 10px; align-content: start; }
.ms { margin-bottom: 14px; }
.ms:last-child { margin-bottom: 0; }
.timeline { display: grid; gap: 16px; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: #e0e0e0; }
.tl-item { position: relative; }
.tl-dot { position: absolute; left: -28px; top: 24px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-item.reached .tl-dot { background: var(--accent); }
.wiki { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.wiki-nav { display: grid; gap: 2px; position: sticky; top: 14px; padding: 14px; }
.wiki-nav small { margin-top: 12px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 600; padding: 0 8px; }
.wiki-nav small:first-child { margin-top: 0; }
.wiki-nav a { text-decoration: none; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; color: var(--soft-text); }
.wiki-nav a:hover { background: var(--surface-2); }
.wiki-nav a.active { background: var(--navy); color: #fff; font-weight: 550; }
dialog.wide { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
#detail-body { padding: 24px 28px; display: grid; gap: 16px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.detail-head h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.01em; display: flex; gap: 8px; align-items: center; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.meta-grid small { display: block; color: var(--muted); font-size: 11px; font-weight: 550; }
.meta-grid b { font-size: 13.5px; font-weight: 600; }
.detail-sec h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.detail-sec { border-top: 1px solid var(--line); padding-top: 14px; }
.inline-select { width: auto; border-radius: 999px; }
.comments { display: grid; gap: 10px; margin-bottom: 12px; }
.comment { background: var(--surface-2); border-radius: 14px; padding: 11px 15px; }
.comment .md { margin-top: 4px; }
.comment-form { display: grid; gap: 8px; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }
.module { display: grid; gap: 10px; align-content: start; }
.module h2 { margin: 0; }
.module .foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
/* Weg zum Kunden je Modul (app/modul_weg.py): vier Stufen, grün erreicht, gelb teilweise, grau offen */
.mw { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 8px 0 4px; }
.mw-s { font-size: 11px; line-height: 1.3; padding: 5px 7px; border-radius: 8px; background: #efebe2; color: #7c7769; overflow: hidden; text-overflow: ellipsis; }
.mw-s b { display: block; font-size: 12px; font-weight: 600; }
.mw-s.ok { background: #e3efe5; color: #2f6b3d; }
.mw-s.teil { background: #f6eccd; color: #7a5f12; }
.mw-hint { font-size: 12px; color: #7a5f12; margin: 4px 0 0; }
.mw-fn { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.mw-filter { margin: 0 0 12px; }
.module .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.module .meta b { color: var(--text); }

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 10px; }
  .sidebar { position: fixed; inset: 10px auto 10px 10px; width: 260px; height: auto; z-index: 20; transform: translateX(-120%); transition: .2s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .25); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 15; background: rgba(30, 30, 30, .32); }
  .topbar .menu-btn { display: grid; }
  .topbar { flex-wrap: wrap; padding: 4px 2px; }
  .topbar h1 { font-size: 22px; }
  .global-search { order: 5; width: 100%; }
  .page-actions { padding: 8px 2px 0; }
  .view { padding: 12px 2px 24px; }
  .kanban { grid-template-columns: repeat(4, 260px); }
  .wiki, .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .wiki-nav { position: static; }
  .search { max-width: none; }
  /* iOS zoomt bei Eingabefeldern unter 16px automatisch hinein */
  input, select, textarea, textarea.huge { font-size: 16px; }
}
/* In Teams eingebettet: kompakter */
body.in-teams .shell { padding: 8px; gap: 8px; }
body.in-teams .topbar h1 { font-size: 22px; }
.ibox-sm { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-3); display: grid; place-items: center; color: var(--text); }
.ttl { display: flex; gap: 7px; align-items: flex-start; }
.ttl .typeicon { margin-top: 2px; }
/* Einstellungen: Claude-Connector */
.connector { display: grid; gap: 14px; }
.connector h2 { margin: 0; }
.connector h3 { font-size: 13.5px; margin: 4px 0 -6px; }
.connector p { margin: 0; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.copy-row input { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-3); }
.connect-steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.connect-steps > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.connect-steps > div > b { border-left: 3px solid var(--accent); padding-left: 8px; }
.connect-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Testprojekt: Module ohne Weboberfläche ausgegraut */
.test-tile.off { background: var(--surface-3); box-shadow: none; }
.test-tile.off h2 { color: var(--muted); }
.test-tile .foot .hint { flex-basis: 100%; }
.test-tile code { overflow-wrap: anywhere; }

/* ---------- Meetings: Kalender, Planen, Auswertung ---------- */
:root { --hatch: repeating-linear-gradient(135deg, #e8e8e8 0 4px, #f6f6f6 4px 8px); --ki-line: #e9b88f; --ki-bg: #fffaf5; }
.nowrap { white-space: nowrap; }
#mt-body, #mt-body > *, .stack > * { min-width: 0; }
.icon-btn.sm { width: 34px; height: 34px; box-shadow: none; }
.seg.sm { padding: 4px; gap: 4px; box-shadow: none; }
.seg.sm a { padding: 5px 12px; font-size: 12.5px; }
.notice { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; background: var(--warn-soft); color: #6b4708; }
.notice.bad { background: var(--bad-soft); color: #8a2c1e; }
.notice.ok { background: var(--ok-soft); color: #1f6b43; display: flex; gap: 8px; align-items: center; }
.card.notice { box-shadow: none; border: 0; }
.ok-text { color: var(--ok); font-weight: 600; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-title { margin: 0 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.cal-note { display: flex; gap: 12px; align-items: flex-start; }
.cal-note > span:first-child { color: var(--accent-ink); margin-top: 1px; }
#cal-note:empty { display: none; }
#cal-note { display: grid; gap: 10px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--soft-text); align-items: center; padding: 0 4px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 16px; height: 11px; border-radius: 3px; display: inline-block; }
.sw-meeting { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.sw-outlook { background: #fff; border: 1.5px solid var(--navy); }
.sw-belegt { background: var(--hatch); border: 1px solid #d5d5d5; }
.sw-meilenstein { background: var(--dark); border-radius: 99px; }
.sw-ticket { background: var(--surface-2); border: 1px solid #cfcfcf; border-radius: 99px; }

/* Wochenraster 07–20 Uhr (1 Stunde = 48px, siehe HOUR_PX in app.js) */
.cal-week { padding: 10px 12px 14px; overflow-x: auto; }
.wk-row { display: grid; grid-template-columns: 52px repeat(7, minmax(96px, 1fr)); min-width: 760px; }
.wk-head { border-bottom: 1px solid var(--line); }
.wk-dh { text-align: center; padding: 4px 0 8px; display: grid; }
.wk-dh small { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.wk-dh b { font-size: 18px; font-weight: 650; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin: 2px auto 0; }
.wk-dh.today small { color: var(--accent-ink); }
.wk-dh.today b { background: var(--accent); color: #fff; }
.wk-dh.we b { color: var(--muted); }
.wk-dh.today.we b { color: #fff; }
.wk-allday { border-bottom: 1px solid var(--line); }
.wk-lbl { font-size: 10.5px; color: var(--muted); padding: 7px 8px 0 0; text-align: right; }
.wk-ad { padding: 4px 3px; display: grid; gap: 3px; align-content: start; border-left: 1px solid var(--line); min-width: 0; min-height: 32px; }
.wk-body { padding-top: 8px; }
.wk-times { position: relative; }
.wk-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-col { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#f5f5f5 1px, transparent 1px);
  background-size: 100% 48px, 100% 24px; }
.wk-col.we { background-color: #fbfbfb; }
.wk-col.today { background-color: var(--ki-bg); }
.ev { position: absolute; margin-left: 2px; padding: 3px 6px; border-radius: 7px; border: 0; font: inherit; text-align: left; overflow: hidden;
  cursor: pointer; display: grid; align-content: start; line-height: 1.25; z-index: 1; color: var(--text); }
.ev b { font-size: 12px; font-weight: 600; display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft-text); }
.ev:hover { z-index: 3; box-shadow: 0 6px 16px rgba(0, 0, 0, .14); }
.ev:focus-visible, .pill:focus-visible, .mo-ev:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 3; }
.ev-meeting { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.ev-meeting small { color: var(--accent-ink); }
.ev-outlook { background: #fff; border: 1.5px solid var(--navy); color: var(--navy); }
.ev-belegt { background: var(--hatch); border: 1px solid #dcdcdc; color: var(--muted); }
.ev-belegt b { font-weight: 550; }
.ev.short { display: flex; gap: 5px; align-items: baseline; padding-top: 2px; }
.ev.short b { flex: 0 1 auto; min-width: 0; }
.ev.short small { flex: 1 1 0; min-width: 0; }
.ev.early small::before { content: "↑ "; }
.ev.late small::before { content: "↓ "; }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--accent-ink); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink); }
.wk-hover { position: absolute; left: 3px; right: 3px; height: 22px; border-radius: 6px; border: 1.5px dashed var(--accent); background: rgba(176, 138, 30, .07);
  color: var(--accent-ink); font-size: 11.5px; font-weight: 600; padding: 1px 6px; pointer-events: none; opacity: 0; }
.wk-hover.on { opacity: 1; }
.pill { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; padding: 2px 7px; border-radius: 6px; border: 1px solid transparent;
  font: inherit; font-size: 11.5px; font-weight: 550; cursor: pointer; text-align: left; color: var(--text); }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-meeting { background: var(--accent-soft); color: var(--accent-ink); border-left: 3px solid var(--accent); }
.pill-outlook { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.pill-belegt { background: var(--hatch); color: var(--muted); border-color: #dcdcdc; }
.pill-meilenstein { background: var(--dark); color: #fff; border-radius: 99px; }
.pill-meilenstein .i { color: var(--accent); }
.pill-ticket { background: var(--surface-2); color: var(--soft-text); border-color: #dcdcdc; border-radius: 99px; }

/* Monatsansicht */
.cal-month { padding: 10px 12px 12px; overflow-x: auto; }
.mo-head, .mo-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 720px; }
.mo-head span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px 8px; }
.mo-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mo-cell { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px 6px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.mo-cell.we { background: #fcfcfc; }
.mo-cell.other { background: var(--surface-3); }
.mo-cell.other .mo-num { color: #a3a6ae; }
.mo-num { justify-self: start; text-decoration: none; font-size: 12.5px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--soft-text); }
.mo-num:hover { background: var(--surface-2); }
.mo-cell.today .mo-num { background: var(--accent); color: #fff; }
.mo-ev { display: block; min-width: 0; border: 1px solid transparent; background: transparent; font: inherit; font-size: 11.5px; padding: 2px 5px; border-radius: 5px;
  cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.mo-ev .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 5px; }
.mo-ev.ev-meeting { border-left: 3px solid var(--accent); }
.mo-ev.ev-outlook { border: 1.5px solid var(--navy); color: var(--navy); background: #fff; }
.mo-ev.ev-belegt { border-color: #dcdcdc; color: var(--muted); }
.mo-ev:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .1); }
/* Abgesagte Meetings („Abgesagt: …“) belegen keine Zeit: gedämpft und durchgestrichen */
.ev.cancelled, .pill.cancelled, .mo-ev.cancelled { opacity: .55; }
.ev.cancelled b, .pill.cancelled span, .mo-ev.cancelled { text-decoration: line-through; }
tr.cancelled td { color: var(--muted); }
tr.cancelled .ttl b { text-decoration: line-through; font-weight: 550; }
.form-notice { margin-bottom: 12px; }
.mo-more { font-size: 11.5px; color: var(--accent-ink); text-decoration: none; padding: 0 5px; }
.mo-more:hover { text-decoration: underline; }

/* Popover (Outlook-Termin, Belegt) */
.pop { position: absolute; z-index: 40; width: min(340px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16); padding: 14px 16px; display: grid; gap: 8px; }
.pop-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.pop-head b { font-size: 14.5px; line-height: 1.35; padding-top: 4px; overflow-wrap: anywhere; }
.pop-row { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--soft-text); }
.pop .hint { margin: 0; }

/* Liste */
.teams-link { color: var(--navy); display: inline-grid; padding: 2px; border-radius: 6px; }
.teams-link:hover { background: var(--surface-2); }

/* Planen */
.plan-form, .plan-own, .plan-finish { display: grid; gap: 14px; }
.plan-form h2, .plan-finish h2, .plan-own h2 { margin: 0; justify-content: flex-start; }
.plan-own input[type=datetime-local] { width: auto; }
.field { display: grid; gap: 6px; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--soft-text); }
label small.muted { font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chips .chip { padding: 7px 13px; font-size: 13.5px; }
.chip.on, .chip:has(input:checked) { background: #fbf7ec; border-color: #e8d9a8; color: var(--accent-ink); }
.chip input { width: auto; margin: 0; accent-color: var(--accent); }
.plan-check { align-self: end; padding-bottom: 11px; }
.slots { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.slot { display: grid; gap: 8px; align-content: start; }
.slot-time { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.people li { display: flex; gap: 6px; align-items: center; }
.people .free .i { color: var(--ok); }
.people .taken { color: var(--bad); }
.people .taken small { color: var(--muted); }
.plan-finish { border: 1.5px solid var(--navy); }
.plan-when { margin: 0; font-size: 15px; }
.plan-opts { display: grid; gap: 8px; }

/* Auswertung */
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kpis.five .kpi { padding: 14px 16px; gap: 12px; }
.kpis.five .kpi .ibox { width: 38px; height: 38px; border-radius: 12px; }
.kpi .num .unit { font-size: 14px; font-weight: 550; color: var(--muted); }
.kpi-meter { display: grid; gap: 4px; margin-top: 4px; }
.ki-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; }
.ki-card h2 { justify-content: flex-start; }

/* KI-Kennzeichnung und Prüf-Panel */
.badge.ki { background: #f8f1de; color: var(--accent-ink); border: 1px dashed var(--ki-line); }
.ki-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: #f8f1de;
  border: 1px dashed var(--ki-line); border-radius: 999px; padding: 2px 10px; margin: 0 0 10px; }
.md .ki-head { color: var(--accent-ink); font-size: 13px; border-top: 1px dashed var(--ki-line); padding-top: 10px; }
.md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--border); color: var(--soft-text); }
.md blockquote p { margin: 0 0 4px; }
.detail-sec.ki-box { background: var(--ki-bg); border: 1px dashed var(--ki-line); border-radius: 14px; padding: 14px 16px; }
.detail-sec h4 .badge { text-transform: none; letter-spacing: 0; vertical-align: 1px; margin-left: 4px; }
.ki-panel { border: 1.5px dashed var(--ki-line); background: var(--ki-bg); border-radius: 16px; padding: 16px 18px; display: grid; gap: 12px; }
.ki-panel-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ki-panel-head b { font-size: 15px; }
.ki-panel p, .ki-panel .hint { margin: 0; }
.ki-preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-height: 380px; overflow: auto; }
.ki-preview h5 { margin: 12px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ki-preview h5:first-child { margin-top: 0; }
.ki-preview ul { margin: 0 0 8px; padding-left: 20px; }
.ki-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ki-loading { display: flex; gap: 10px; align-items: center; color: var(--soft-text); font-size: 13.5px; }
.card.ki-loading { justify-content: center; padding: 28px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #f1d5bd; border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
details.transcript summary { cursor: pointer; }
.transcript-text { white-space: pre-wrap; font-size: 13px; max-height: 320px; overflow: auto; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }

/* Einstellungen: Microsoft 365, KI, Automatismen */
.settings-pair { align-items: start; }
.set-card { display: grid; gap: 12px; align-content: start; }
.set-card h2 { margin: 0; justify-content: flex-start; }
.set-card > p { margin: 0; }
.setup { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; }
.setup summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.stats.usage { margin: 6px 0 0; }
.stats.usage small { color: var(--muted); }
.routines { list-style: none; margin: 0; padding: 0; display: grid; }
.routines li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.routines li:last-child { border: 0; padding-bottom: 0; }
.r-body { display: grid; gap: 4px; min-width: 0; }
.r-body p { margin: 0; font-size: 13.5px; }
.check.sub { font-size: 13px; margin: 4px 0; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; margin-top: 1px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.switch .slider { position: absolute; inset: 0; background: #d6d6d6; border-radius: 99px; transition: background .15s; pointer-events: none; }
.switch .slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .slider { opacity: .55; }

/* „Frag den Hub“ */
.ask-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; box-shadow: var(--shadow); flex: none; }
.ask-btn .i { color: var(--petrol); }
.ask-btn:hover { background: var(--surface-3); }
.ask-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ask-btn kbd { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 2px 6px; }
dialog.drawer { position: fixed; inset: 14px 14px 14px auto; margin: 0; width: min(440px, calc(100vw - 28px)); height: auto; max-height: none; max-width: none;
  border-radius: 22px; padding: 0; z-index: 30; }
dialog.drawer[open] { display: flex; flex-direction: column; }
dialog.drawer::backdrop { background: rgba(30, 30, 30, .12); backdrop-filter: none; }
.as-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.as-head h2 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.as-head h2 .i { color: var(--petrol); }
.as-head .row { flex-wrap: nowrap; }
.as-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.as-intro { display: grid; gap: 12px; }
.as-intro p { margin: 0; font-size: 13.5px; }
.as-examples { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.as-examples .chip { text-align: left; }
.msg { max-width: 92%; border-radius: 16px; padding: 10px 14px; font-size: 13.5px; overflow-wrap: anywhere; }
.msg.from-me { align-self: flex-end; background: var(--surface-2); white-space: pre-wrap; border-bottom-right-radius: 6px; }
.msg.from-ki { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.from-ki .md > :last-child { margin-bottom: 0; }
.msg.err { align-self: flex-start; background: var(--bad-soft); color: #8a2c1e; }
.msg.loading { display: flex; gap: 10px; align-items: center; color: var(--soft-text); }
.ki-label { display: block; font-size: 11px; font-weight: 600; color: var(--accent-ink); margin-bottom: 4px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.as-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.as-form textarea { min-height: 44px; max-height: 160px; resize: none; }
.as-form .btn { height: 44px; width: 44px; padding: 0; flex: none; }
@media (max-width: 1180px) {
  .ask-btn span, .ask-btn kbd { display: none; }
  .ask-btn { width: 42px; padding: 0; justify-content: center; }
}

/* ---------- Marketing ---------- */
.filters { gap: 14px; margin: 2px 0 12px; flex-wrap: wrap; }
.inline-filter { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.inline-filter select { border: 1px solid var(--line, #e3e3e3); border-radius: 999px; padding: 4px 10px; background: #fff; font: inherit; color: var(--text); }
.mk-plan tr.group th { background: var(--surface-2); color: var(--soft-text); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: 6px 12px; }
.mk-plan td.late { color: #b23a27; font-weight: 600; }
.mk-page.on { outline: 2px solid var(--accent); }
/* Redaktionskalender: Farbe = Kanal (Orange Instagram, Navy-Rand LinkedIn, dunkel Newsletter), Symbol = Status */
.mk-cal .mo-cell { min-height: 96px; }
.mo-top { align-items: center; margin-bottom: 1px; }
.mo-top .mo-num { cursor: default; }
.mo-top .mo-num:hover { background: transparent; }
.mo-add { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; opacity: 0; }
.mo-cell:hover .mo-add, .mo-add:focus-visible { opacity: 1; }
.mo-add:hover { background: var(--surface-2); color: var(--accent-ink); }
.ch-instagram { background: var(--accent-soft); color: var(--accent-ink); border-left: 3px solid var(--accent); }
.ch-linkedin { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.ch-newsletter { background: var(--dark); color: #fff; }
.ch-newsletter .i { color: var(--accent); }
.ch-webseite { background: var(--surface-2); color: var(--soft-text); border-color: #dcdcdc; }
.ch-presse { background: var(--ok-soft); color: #237347; }
.ch-veranstaltung { background: #fff8f2; color: #944c17; border: 1px dashed var(--accent); }
.ch-sonst { background: var(--surface-2); color: var(--soft-text); }
.mk-pill.st-idee { opacity: .55; }
.mk-pill.st-veroeffentlicht .i { color: var(--ok); }
.ch-newsletter.st-veroeffentlicht .i { color: #8fd9a8; }
.mk-pill.late { box-shadow: inset 0 0 0 1.5px #b23a27; }
.fg-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.fg-line .i { flex: none; margin-top: 1px; }
dialog.confirm textarea { display: block; width: 100%; margin-top: 6px; font: inherit; }
.mk-frame iframe { display: block; width: 100%; height: 78vh; border: 1px solid var(--line, #e3e3e3); border-radius: var(--radius-sm); background: #fff; margin: 10px 0 6px; }
.mk-frame iframe.portrait { width: 405px; max-width: 100%; height: 720px; margin-left: auto; margin-right: auto; }

/* Claude Code am Modul */
.cc-sec .cc-form { gap: 8px; margin-top: 6px; }
.cc-sec .cc-form input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font: inherit; }
.cc-sec p .btn { margin-left: 6px; }

/* KI auf den Seiten */
.ki-dialog { width: min(680px, 94vw); border: none; border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .18); }
.ki-dialog::backdrop { background: rgba(14, 59, 67, .35); }
.ki-dialog textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; resize: vertical; }
.ki-dialog label select { margin-left: 6px; }
.ki-text { background: #fffaf4; border: 1px dashed var(--ki-line, #e8c9a6); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0; }
.kx-steps li, .kx-focus li { margin: 4px 0; }
.kx-steps .btn { margin-left: 6px; }
.kx-day { margin-bottom: 14px; }
.kx-day h2 .badge { vertical-align: 2px; }
.azure-key { margin: 8px 0 10px; display: grid; gap: 6px; }
.azure-key .row { gap: 8px; }
.azure-key input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font: inherit; }

/* Übersicht: Zeitraum, Warnungen, Team, Anpassen */
.dash-bar { margin: 0 0 12px; gap: 12px; flex-wrap: wrap; }
.warn-list li { border-left: 3px solid transparent; padding-left: 10px; }
.warn-list li.warn-bad { border-left-color: #b23a27; }
.warn-list li.warn-gold { border-left-color: var(--accent); }
.warn-list a { color: var(--text); text-decoration: none; }
.warn-list a:hover { text-decoration: underline; }
.team-table td, .team-table th { text-align: center; }
.team-table td:first-child, .team-table th:first-child { text-align: left; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.palette { padding: 14px 16px; }
.palette input[type=search] { width: 100%; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 15px; }
.pal-list { list-style: none; margin: 10px 0 8px; padding: 0; max-height: 52vh; overflow: auto; }
.pal-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.pal-list li.on, .pal-list li:hover { background: var(--surface-2); }
.dupe-hint { background: var(--warn-soft); color: #6b4708; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; }
.dupe-hint a { color: inherit; }
.gap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
.gap-list .check-row { align-items: flex-start; }
.mod-progress { display: grid; gap: 6px; }
.mp-row { display: grid; grid-template-columns: minmax(160px, 1.4fr) auto minmax(120px, 2fr) 110px 120px; gap: 12px; align-items: center; color: var(--text); text-decoration: none; padding: 6px 8px; border-radius: var(--radius-sm); }
.mp-row:hover { background: var(--surface-2); }
.mp-row .progress { margin: 0; }
.mp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row input[type=checkbox] { width: auto; flex: none; margin: 3px 0 0; }
.check-row > span { flex: 1; min-width: 0; }

/* Newsletter-Vorschau am Beitrag */
.nl-sec .mk-frame { padding: 0; box-shadow: none; }
.nl-sec .mk-frame iframe { height: 70vh; background: #f7f5ef; }

/* Änderungsprotokoll (Einstellungen) */
.log-filter { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.log-filter input { flex: 1 1 200px; }
.log-filter select { flex: 0 1 200px; }
.log-table td { vertical-align: top; }
.log-table .nowrap { white-space: nowrap; }
.log-diff { margin-top: 4px; }
.log-diff summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.log-diff dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 6px 0 0; font-size: 12.5px; }
.log-diff dt { font-weight: 600; color: var(--soft-text); }
.log-diff dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-diff del, .log-diff ins { padding: 0 3px; border-radius: 4px; }
.log-diff del { color: var(--bad); background: var(--bad-soft); }
.log-diff ins { color: var(--ok); text-decoration: none; background: var(--ok-soft); }
@media (max-width: 640px) { .log-diff dl { grid-template-columns: 1fr; } .log-diff dt { margin-top: 4px; } }

/* Teams-Chat im Hub */
.chat-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.chat-list { display: grid; gap: 10px; padding: 14px; max-height: calc(100vh - 190px); overflow: auto; position: sticky; top: 12px; }
.chat-search { width: 100%; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font: inherit; }
.chat-items { display: grid; gap: 4px; }
.chat-items .card.empty { box-shadow: none; padding: 12px; }
.chat-item { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none; border: 1px solid transparent; }
.chat-item:hover { background: #f5f5f5; }
.chat-item.on { background: #f8f1de; border-color: #f1c9a6; }
.chat-item .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 14px; }
.chat-item .row.spread { flex-wrap: nowrap; gap: 8px; }
.chat-item small { font-size: 12px; }
.chat-item.is-card .ttl { font-weight: 500; color: var(--muted); }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.chat-thread { display: grid; gap: 14px; padding: 18px 20px; min-height: 320px; }
.chat-msg { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #f7f7f7; }
.chat-msg.mine { background: #f8f1de; }
.chat-msg.is-card { background: transparent; border: 1px dashed var(--border); }
.chat-msg header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.chat-msg header .small-link { margin-left: auto; font-size: 12.5px; }
.chat-msg h3 { margin: 0; font-size: 16px; }
.chat-body { line-height: 1.5; overflow-wrap: anywhere; }
.chat-body p { margin: 0 0 6px; }
.chat-body ol, .chat-body ul { margin: 4px 0 6px; padding-left: 22px; }
.chat-body li { margin: 3px 0; }
.chat-body .mention { color: var(--accent); }
.chat-body code { background: #eee; padding: 1px 5px; border-radius: 5px; }
.chat-card { border-left: 3px solid var(--accent); padding: 6px 10px; background: #fff; border-radius: 8px; display: grid; gap: 3px; font-size: 13.5px; }
.chat-msg .chips .chip { padding: 3px 10px; font-size: 12.5px; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.react { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 2px 9px; font-size: 13px; cursor: pointer; }
.react.empty { opacity: .45; border-color: transparent; background: transparent; }
.chat-msg:hover .react.empty { opacity: .8; }
.react.on { border-color: var(--accent); background: #f8f1de; }
.chat-tools { gap: 8px; }
.chat-replies { display: grid; gap: 10px; padding-left: 18px; border-left: 2px solid #eee; }
.chat-compose { display: grid; gap: 8px; }
.chat-compose textarea, .chat-compose input { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; resize: vertical; }
.ki-dialog .point { display: grid; gap: 6px; }
.setup-card summary { cursor: pointer; }
/* Fachliche Prüfung */
.pf-kpis { margin-bottom: 16px; }
.pf-list { display: grid; gap: 12px; }
.pf p { margin: 8px 0; }
.pf-res { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 10px 0 4px; display: grid; gap: 4px; font-size: 13.5px; }
/* Gelernt (Lehren): Karten wie die Fachliche Prüfung; Entwurf mit Messing-Rand, Zähler 0 grau, eine Kachel hervorgehoben */
.gl-list { display: grid; gap: 12px; }
.gl-kopf { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.gl-id { font-size: 11.5px; font-weight: 700; color: var(--petrol); background: #e3ecec; border-radius: 6px; padding: 2px 6px; }
.gl.gl-entwurf { border-color: var(--messing); }
.gl.gl-entwurf .gl-id { background: var(--accent-soft); color: var(--accent-ink); }
.gl-regel { margin: 8px 0; }
.gl-info { margin: 0 0 10px; }
.gl-voll { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 10px 0 14px; display: grid; gap: 6px; }
.gl-voll p { margin: 0; }
.kpi.gl-hl { background: var(--accent-soft); border-color: var(--messing); }
.kpi .num.gl-null { color: var(--muted); }
.gl-kpis { margin-bottom: 16px; }
.fg-boxes { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 12px; }
.fg-boxes legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
/* Prüfer-Konten: ohne Suche, Glocke und Assistent */
body.pruefer #global-search, body.pruefer #bell, body.pruefer #ask { display: none; }


/* Live-Stand: Module auf einen Blick, Live-Vorschau als Miniatur */
.ls-live { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 30px;
  align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ls-live > div { flex: none; } .ls-live > .ls-commit { flex: 1 1 260px; min-width: 0; }
.ls-commit b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-live small { display: block; color: #a9a9a9; font-size: 11.5px; }
.ls-live b { font-size: 14.5px; font-weight: 600; } .ls-live code { background: #333; color: #fff; border-radius: 6px; padding: 1px 6px; }
.ls-live .badge { font-size: 12px; }
.ls-dot { width: 10px; height: 10px; border-radius: 50%; background: #3ccf6e; display: inline-block; margin-right: 7px;
  box-shadow: 0 0 0 4px rgba(60, 207, 110, .2); }
.ls-dot.warn { background: var(--accent); box-shadow: 0 0 0 4px rgba(176, 138, 30, .25); }
.ls-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 14px 0 6px; }
.ls-kpis .kpi { padding: 14px 16px; }
.ls-kpis .kpi.dark { background: var(--dark); color: #fff; border-color: var(--dark); } .ls-kpis .kpi.dark .lbl { color: #aaa; }
.ls-kpis .kpi.warn .num { color: var(--warn); } .ls-kpis .kpi.bad .num { color: var(--bad); } .ls-kpis .kpi.ok .num { color: var(--ok); }
.ls-head { margin: 18px 0 4px; } .ls-head .sec-title { margin: 0; } .ls-head .chip { cursor: pointer; font: inherit; font-size: 13px; }
.ls-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ls-mod { display: flex; flex-direction: column; gap: 10px; padding: 14px; cursor: pointer; transition: box-shadow .15s; }
.ls-mod:hover, .ls-mod:focus-visible { box-shadow: 0 8px 26px rgba(0, 0, 0, .09); outline: none; }
.ls-mod .progress { margin: 4px 0 0; }
.ls-name { font-size: 15px; }
.ls-thumb { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-3); }
.ls-thumb iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0;
  pointer-events: none; background: #fff; }
.ls-thumb.none, .ls-big.none { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12.5px;
  background: repeating-linear-gradient(45deg, #f6f6f6 0 10px, #f4f1ea 10px 20px); }
.ls-tag { position: absolute; right: 8px; bottom: 8px; background: rgba(14, 59, 67, .86); color: #fff; font-size: 11px;
  border-radius: 99px; padding: 2px 9px; }
.ls-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-work { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-work b { color: var(--text); font-weight: 550; }
.ls-warn { background: var(--warn-soft); color: #7d4f0c; border-radius: 10px; padding: 6px 10px; font-size: 12px; }
.ls-warn.rot { background: var(--bad-soft); color: #9c3524; }
.ls-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 1100px) { .ls-two { grid-template-columns: 1fr; } }
.ls-two .list li { align-items: flex-start; } .ls-two .chips { gap: 5px; justify-content: flex-end; }
.ls-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ls-alerts li { display: flex; gap: 10px; align-items: flex-start; } .ls-alerts .chips { margin-top: 6px; gap: 5px; }
.ls-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-size: 12px; font-weight: 800; background: var(--warn); }
.ls-ic.rot { background: var(--bad); }
.ls-alerts .chip, .ls-two .chip, .ls-table .chip { padding: 2px 9px; font-size: 12px; cursor: pointer; font-family: inherit; }
.ls-table td { vertical-align: top; } .ls-table td:nth-child(3) { min-width: 140px; }
.ls-table td:nth-child(3) .chip { margin: 0 4px 4px 0; }
.ls-dialog { width: min(1400px, 96vw); height: min(900px, 92vh); border: none; border-radius: var(--radius); padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22); }
.ls-dialog[open] { display: flex; flex-direction: column; }
.ls-dialog::backdrop { background: rgba(14, 59, 67, .35); }
.ls-dhead { padding: 12px 18px; border-bottom: 1px solid var(--line); } .ls-dhead .chip { cursor: pointer; font: inherit; font-size: 12.5px; }
.ls-dbody { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.ls-big { position: relative; background: var(--surface-3); min-height: 0; } .ls-big iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ls-side { padding: 14px 18px; overflow: auto; border-left: 1px solid var(--line); font-size: 13.5px; }
.ls-side h4 { margin: 16px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ls-side p { margin: 4px 0; } .ls-side .list li { padding: 7px 0; } .ls-side .row { margin-top: 14px; }

/* Mandanten & Abrechnung: Kundenseiten der Büros (Betreiber-Sicht) */
.md-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.md-table th, .md-table td { white-space: nowrap; } .md-table td:first-child { white-space: normal; min-width: 180px; }
.md-table td:first-child .badge { margin-left: 6px; }
.md-table code { background: var(--surface-2); border-radius: 6px; padding: 1px 6px; font-size: 12px; }
.md-conn { display: inline-flex; align-items: center; gap: 7px; }
.dot.slow { background: var(--accent); }
.spark { display: block; } .spark polyline, .spark line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.spark line { stroke: #d6d6d6; } .spark circle { fill: var(--accent); }
.md-three { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.md-sla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.md-sla .num { font-size: 24px; font-weight: 700; } .md-sla .num.bad { color: var(--bad); } .md-sla .num.ok { color: var(--ok); }
.md-sla .lbl { font-size: 12px; color: var(--muted); }
@media (max-width: 1200px) { .md-three { grid-template-columns: 1fr; } }
.md-bars { display: grid; gap: 8px; }
.md-bar { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.md-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-bar-t { height: 8px; border-radius: 99px; background: #ececec; overflow: hidden; } .md-bar-t span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.md-billing h2 .row { gap: 6px; } .md-billing h2 b { min-width: 120px; text-align: center; font-size: 13.5px; }
.md-bill td { padding: 8px 4px; } .md-bill tr.md-sum td { font-weight: 650; border-top: 2px solid var(--line); border-bottom: 0; }
.md-dialog { width: min(640px, calc(100vw - 32px)); }
.md-form { padding: 24px; display: grid; gap: 14px; } .md-form h3 { margin: 0; font-size: 16px; }
.md-form p { margin: 0; }
.md-token { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.md-token code { flex: 1; word-break: break-all; font-size: 13px; }

/* Alarme und Support-Zugriff (Plattform) */
tr.off td { opacity: .55; }
.md-support { margin: 6px 0 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.md-support summary { cursor: pointer; }
.md-support-list .list { margin: 6px 0 0; padding-left: 18px; }
/* Vertrag & Rechnungen (Büro-Dialog mit Reitern) und Nutzungsanalyse */
.md-head { padding-bottom: 0; gap: 10px; } .md-form[data-sec] { padding-top: 12px; }
.md-tabs .chip { cursor: pointer; }
.vt-form { display: grid; gap: 12px; } .vt-form .hint { margin: 0; }
.md-bill td.act .btn { margin-top: 4px; }
.nz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.nz-chart { width: 100%; height: 220px; display: block; }
.nz-grid { stroke: #e6e6e6; stroke-width: 1; } .nz-lbl { font-size: 10px; fill: var(--muted); }
.nz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; }
.nz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.nz-matrix th, .nz-matrix td { text-align: right; white-space: nowrap; } .nz-matrix th:first-child, .nz-matrix td:first-child { text-align: left; }
.nz-matrix tr.md-sum td { font-weight: 650; border-top: 2px solid var(--line); }
.hz-drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.hz-drei h3 { font-size: 13px; margin: 0 0 4px; } .hz-chart { height: 180px; }
.hz-bar { height: 8px; border-radius: 999px; background: var(--line, #ece8de); overflow: hidden; margin-bottom: 4px; }
.hz-bar span { display: block; height: 100%; background: var(--accent, #b08a1e); } .hz-bar span.voll { background: #b23a27; }
.hz-schritte { margin: 8px 0 0 18px; line-height: 1.7; }
@media (max-width: 900px) { .nz-two, .hz-drei { grid-template-columns: 1fr; } }

/* Mandanten: Onboarding-Assistent und Bereich „Daten“ (app/onboarding.py) */
.md-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.md-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.md-steps span b { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--line); color: var(--text); font-size: 12px; }
.md-steps span.on { background: var(--text); color: #fff; } .md-steps span.on b { background: var(--accent); color: #fff; }
.md-steps span.done b { background: var(--ok-soft); color: #1f6b43; }
.md-summary { padding: 14px 16px; box-shadow: none; border: 1px solid var(--line); } .md-summary h3 { margin: 0 0 8px; font-size: 14px; }
.md-summary td:first-child { color: var(--muted); width: 120px; }
.md-result li .md-token { margin-top: 8px; }
.md-daten { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; } .md-daten h4 { margin: 0; font-size: 14px; }
.md-exporte { margin: 0; padding-left: 18px; } .md-exporte li { margin: 2px 0; }
.md-result .ls-ic.ok { background: var(--ok); }

/* ---------- Werkstatt (Plattform → Frontend/Backend): Datenmodell, SQL-Konsole ---------- */
.md-tabs { margin-bottom: 14px; }
.ws-code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.ws-model { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ws-table { padding: 14px 16px; }
.ws-table h3 { margin: 0 0 6px; font-size: 14px; }
.ws-comment { font-size: 12px; margin: 0 0 8px; }
.ws-cols { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ws-cols td { padding: 3px 6px 3px 0; border-top: 1px solid var(--line); vertical-align: top; }
.ws-cols tr:first-child td { border-top: 0; }
.ws-key { font-size: 10px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; padding: 1px 5px; }
.ws-fk { color: var(--navy); text-decoration: none; font-size: 12px; }
.ws-fk:hover { color: var(--accent-ink); }
.ws-sql { padding: 14px 16px; }
.ws-sql-form { display: grid; gap: 10px; }
.ws-sql-input { width: 100%; }
.ws-sql-result { margin-top: 12px; }
.ws-result { border-collapse: collapse; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ws-result th, .ws-result td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.ws-result th { background: var(--surface-2); position: sticky; top: 0; }

/* Büro-Akte: Verlaufsdiagramme */
.md-verlauf .line { fill: none; stroke: var(--dark, #0e3b43); stroke-width: 1.5; }
.md-verlauf .axis { stroke: var(--line, #ddd); }
.md-verlauf .bad { fill: var(--bad); opacity: .6; }
.md-verlauf .lbl { font-size: 10px; fill: var(--muted); }
.md-check .ls-ic.ok { background: var(--ok); color: #fff; }
.ls-h { margin: 18px 0 6px; font-size: 1.05rem; }
.fn-b { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-size: .85rem; white-space: nowrap; }
.fn-b select { font-size: .8rem; padding: 1px 4px; }

/* Zahlen rechtsbündig in Tabellen (Verkaufskennzahlen u. a.) */
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* KI-Spezialisten (renderSpezialisten): Karten, Ablagefläche, Vorschläge, Wissen */
.sp-grid { margin-top: 16px; }
.sp-card { display: grid; gap: 8px; color: inherit; text-decoration: none; align-content: start; }
.sp-card:hover { border-color: var(--accent); }
.sp-card.off { opacity: .6; }
.sp-name { font-size: 15px; }
.sp-besch { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-zahlen { gap: 6px; }
.sp-drop { display: flex; gap: 14px; align-items: center; padding: 22px; border: 2px dashed #d9cfae; border-radius: var(--radius);
  background: #fbf8ef; cursor: pointer; color: var(--accent-ink); transition: background .15s, border-color .15s; }
.sp-drop div { display: grid; gap: 4px; } .sp-drop .muted { font-size: 12.5px; }
.sp-drop:hover, .sp-drop:focus-visible, .sp-drop.over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.sp-drop-klein { margin-top: 16px; padding: 14px 18px; }
[data-fortschritt] { margin-top: 10px; font-size: 13px; }
.sp-wissen { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.sp-wissen textarea { width: 100%; font: inherit; font-size: 13.5px; }
.sp-wissen select { max-width: 260px; }
.sp-kat { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); margin: 14px 0 4px; }
.sp-liste { list-style: none; margin: 0; padding: 0; }
.sp-liste li { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.sp-anw pre { white-space: pre-wrap; font-size: 12.5px; max-height: 480px; overflow: auto; background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); }
.sp-dialog { width: min(860px, calc(100vw - 32px)); }
.sp-dialog textarea.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; }
.sp-kopf .sp-titel { margin: 0 0 4px; font-size: 20px; justify-content: flex-start; }
.sp-wissen textarea { min-height: 0; }

/* Werkstatt Frontend › Optik & Anmeldung */
.wo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.wo-karte { display: grid; gap: 6px; text-align: left; padding: 10px; border-radius: 16px; border: 1px solid var(--line, #e0dacc); background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.wo-karte:hover:not([disabled]) { border-color: #b08a1e; }
.wo-karte.on { border-color: #0e3b43; box-shadow: 0 0 0 2px #0e3b43; }
.wo-karte.vorschlag { cursor: default; opacity: .62; }
.wo-karte small { line-height: 1.35; }
.wo-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.wo-bild { position: relative; display: grid; place-items: center; height: 96px; border-radius: 11px; overflow: hidden; background: #eee9de; }
.wo-streif { background: radial-gradient(160px 110px at 50% 45%, #134a53, #0a2a30 70%, #071e22); }
.wo-wm { display: flex; align-items: center; font: 800 30px/1 system-ui, sans-serif; }
.wo-wm i { font-style: normal; background: linear-gradient(100deg, #cfc6b0 0 40%, #fff 50%, #cfc6b0 60% 100%); background-size: 320% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wo-streif 2.6s ease-in-out infinite; }
.wo-wm b { display: inline-block; width: 4px; height: 36px; margin: 0 5px; background: linear-gradient(180deg, #b08a1e, #f4e19a 50%, #b08a1e); animation: wo-blitz 2.6s ease-out infinite; }
@keyframes wo-streif { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@keyframes wo-blitz { 0%, 20% { box-shadow: 0 0 0 rgba(227, 199, 102, 0); } 40% { box-shadow: 0 0 22px 4px rgba(255, 236, 170, .85); } 100% { box-shadow: 0 0 8px rgba(227, 199, 102, .4); } }
.wo-lampe { position: absolute; inset: 0; background: radial-gradient(70px 60px at 38% 30%, rgba(255, 206, 128, .45), transparent 70%), linear-gradient(180deg, #2a251c, #14120e); position: relative; }
.wo-lampe::before { content: ""; position: absolute; left: 38%; top: 18%; width: 2px; height: 62%; background: #c8a04a; }
.wo-lampe::after { content: ""; position: absolute; left: 58%; top: 30%; width: 34%; height: 40%; border-radius: 6px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.wo-schalter { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; flex: none; }
.wo-schalter input { width: auto; margin: 0; }
/* Firmenlogo-Vorlagen (logo_platte/logo_hell/logo_seite): Platzhalter-Logo statt Wortmarke */
.wo-lp, .wo-lh { background: radial-gradient(160px 110px at 50% 45%, #134a53, #0a2a30 70%, #071e22); }
.wo-ls { background: radial-gradient(160px 110px at 50% 40%, #fff, #f4f1ea 70%, #e9e3d6); }
.wo-fl { display: grid; justify-items: center; gap: 7px; }
.wo-fl-logo { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 7px; overflow: hidden; font: 700 15px/1 system-ui, sans-serif; }
.wo-fl-logo i { width: 15px; height: 15px; border-radius: 3px; background: #1d1d1b; box-shadow: inset -5px 5px 0 #c8102e; }
.wo-fl-logo em { font-style: normal; color: #1d1d1b; }
.wo-fl-logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%); background-size: 320% 100%; animation: wo-streif 2.6s ease-in-out infinite; }
.wo-fl b { width: 46px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #b08a1e, #f4e19a 50%, #b08a1e); }
.wo-lp .wo-fl-logo { background: #fbfaf7; box-shadow: 0 0 0 1px rgba(227, 199, 102, .55), 0 6px 14px rgba(0, 0, 0, .35); }
.wo-lp .wo-fl b { display: none; }
.wo-lh .wo-fl-logo i { background: #f4f1ea; }
.wo-lh .wo-fl-logo em { color: #f4f1ea; }
.wo-ls .wo-fl b { background: #9e0c14; }
.wo-ls .wo-fl-logo::after { background: linear-gradient(100deg, transparent 42%, rgba(227, 199, 102, .5) 50%, transparent 58%); background-size: 320% 100%; }
/* Werkstatt Frontend › Optik & Anmeldung: Bilder der Oberflächen (Standard, Cockpit-Stil) */
.wo-obf-standard, .wo-obf-cockpit { display: flex; gap: 6px; align-items: flex-end; padding: 12px; box-sizing: border-box; }
.wo-obf-standard { background: #f4f1ea; }
.wo-obf-cockpit { background: radial-gradient(160px 90px at 85% 0%, rgba(240, 207, 94, .35), transparent 70%), linear-gradient(180deg, #f7f3e8, #efe8d6); }
.wo-obf-standard i, .wo-obf-cockpit i { flex: 1; height: 46%; border-radius: 6px; background: #fff; border: 1px solid #e3ded2; }
.wo-obf-cockpit i { border: 0; border-radius: 10px; background: rgba(255, 253, 247, .85); box-shadow: 0 0 0 1px rgba(176, 138, 30, .12), 0 8px 14px -8px rgba(80, 60, 20, .45); }
.wo-obf-cockpit i:first-child { background: linear-gradient(160deg, #134a54, #0e3b43); }
@media (prefers-reduced-motion: reduce) { .wo-wm i, .wo-wm b, .wo-fl-logo::after { animation: none; } }

/* Werkstatt Backend: API-Endpunkte, SQL-Hilfen */
.ws-ep { width: 100%; border-collapse: collapse; font-size: 13px; }
.ws-ep th, .ws-ep td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ws-ep th { background: var(--surface-2); position: sticky; top: 0; }
.ws-ep td:nth-child(2) code { white-space: nowrap; }
.ws-ep td:nth-child(4) { min-width: 240px; }
.ws-ep-m .chip small { opacity: .6; margin-left: 3px; }
.ws-sql-hilfe { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 10px 0 8px; }
.ws-sql-tab { flex: 1; min-width: 240px; max-height: 76px; overflow: auto; gap: 6px; }
.ws-sql-tab .chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; padding: 3px 9px; }

/* Austausch: Dateien zwischen uns (renderAustausch) – Ablegen + Verlauf links, Vorschau rechts */
.ax-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; margin-top: 14px; }
.ax-spalte { display: grid; gap: 14px; min-width: 0; }
.ax-spalte .card h2, .ax-side h2 { margin: 0 0 12px; font-size: 16px; }
.ax-drop { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 26px 18px; border: 2px dashed var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); transition: border-color .15s, background .15s; }
.ax-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.ax-drop b { font-size: 15.5px; }
.ax-drop-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--petrol); color: #fff; display: grid; place-items: center; margin-bottom: 6px; }
.ax-drop label.ax-link { display: inline; margin: 0; color: var(--petrol); font-weight: 600; text-decoration: underline; cursor: pointer; }
.ax-form { display: grid; gap: 14px; margin-top: 16px; }
.ax-form[hidden] { display: none; }
.ax-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ax-feld { display: grid; gap: 6px; align-content: start; border: 0; padding: 0; margin: 0; min-width: 0; }
.ax-feld > span, .ax-feld > legend { font-size: 11.5px; font-weight: 650; color: var(--soft-text); text-transform: uppercase; letter-spacing: .08em; padding: 0; margin-bottom: 6px; }
.ax-feld textarea, .ax-feld select { width: 100%; }
.ax-opt { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 12px;
  background: var(--surface); cursor: pointer; font-weight: 500; margin-bottom: 6px; flex-wrap: wrap; }
.ax-opt input[type=checkbox], .ax-opt input[type=radio] { accent-color: var(--petrol); margin: 0; }
.ax-opt:has(input:checked:not(:disabled)) { border-color: var(--petrol); background: #e9f0f1; }
.ax-opt small { margin-left: auto; color: var(--muted); font-size: 12px; }
.ax-opt.fest { cursor: default; }
.ax-opt input[type=date] { margin-left: auto; padding: 3px 8px; width: auto; }
#ax-melden.aus .ax-opt:not(.fest) { opacity: .5; }
.ax-antwort { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13.5px; }
.ax-antwort[hidden] { display: none; }
.ax-files { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 5px 9px 5px 5px; font: inherit; font-size: 13px; color: inherit; text-align: left; }
.ax-chip.klick { cursor: pointer; }
.ax-chip.klick:hover { border-color: var(--petrol); }
.ax-chip.aktiv { border-color: var(--petrol); box-shadow: 0 0 0 2px #dbe7e9; }
.ax-chip small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-typ { flex: none; width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff;
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ax-typ.pdf { background: #b23a27; } .ax-typ.cad { background: var(--petrol); } .ax-typ.xls { background: #237347; }
.ax-typ.img { background: var(--accent); } .ax-typ.doc { background: #3c5a66; } .ax-typ.zip, .ax-typ.etc { background: #6b7476; }
.ax-x { border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 2px; cursor: pointer; }
.ax-feed { display: grid; gap: 12px; }
.ax-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 650; margin-top: 4px; }
.ax-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ax-item.ungelesen { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ax-item.erledigt { opacity: .65; }
.ax-item.ziel { outline: 2px solid var(--petrol); outline-offset: 2px; }
.ax-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px;
  background: #e1ebed; color: var(--petrol); }
.ax-av.ich { background: var(--accent-soft); color: var(--accent-ink); }
.ax-body { min-width: 0; }
.ax-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ax-text { margin: 6px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.badge.ax-neu { background: var(--accent); color: #fff; font-weight: 700; }
.ax-zahl { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; margin-left: 2px; }
.ax-fuss { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.ax-kan { margin-left: auto; }
.ax-side { position: sticky; top: 14px; }
.ax-pv { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; height: 440px; display: grid; place-items: center; }
.ax-pv img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ax-pv iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ax-pv-leer { text-align: center; padding: 20px; }
.ax-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 12px 0; }
.ax-meta dt { color: var(--muted); } .ax-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ax-hilfe { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; }
.ax-hilfe ol { margin: 6px 0 8px; padding-left: 18px; }
@media (max-width: 1150px) { .ax-grid { grid-template-columns: 1fr; } .ax-side { position: static; } }
@media (max-width: 700px) { .ax-zwei { grid-template-columns: 1fr; } }
.ax-form label.ax-opt { display: flex; font-size: 13.5px; color: var(--text); }
.ax-form .ax-opt input[type=checkbox], .ax-form .ax-opt input[type=radio] { width: auto; padding: 0; flex: none; }
.ax-form label.ax-feld { color: inherit; font-size: inherit; font-weight: inherit; }

/* Zweiter Faktor (TOTP): Anmeldung, Code-Schritt, Einrichten-Dialog */
.trenner { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.trenner::before, .trenner::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.btn.ms { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0; text-decoration: none; }
.ms-logo { display: grid; grid-template-columns: 8px 8px; gap: 2px; flex: none; }
.ms-logo i { width: 8px; height: 8px; display: block; }
/* Bewusste Ausnahme von den KING-Farbtoken: die vier Kachelfarben des Microsoft-Logos sind Markenvorgabe von
   Microsoft und dürfen nicht eingefärbt werden – darum stehen sie hier fest im Code. */
.ms-logo i:nth-child(1) { background: #f25022; }
.ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; }
.ms-logo i:nth-child(4) { background: #ffb900; }
.login-card small.muted { text-align: center; margin: -4px 0 0; font-size: 12.5px; }
.login-card .check { justify-content: center; font-size: 13px; color: var(--muted); }
.code-input { font: 600 24px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .42em; text-align: center; padding: 13px 10px 13px 18px; }
.code-input.klein { font-size: 19px; letter-spacing: .3em; }
.setup-2fa { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: start; }   /* Abstand kommt vom Raster des Dialogs */
.setup-2fa .steps { color: var(--muted); font-size: 13.5px; gap: 4px; }
.qr { width: 180px; height: 180px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--qr-grund);
  display: grid; place-items: center; text-align: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.key { font: 600 14px/1.6 ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px; letter-spacing: .08em; word-break: break-all; }
@media (max-width: 620px) { .setup-2fa { grid-template-columns: 1fr; } .qr { margin: 0 auto; } }

/* Fehler (Präfix fl-, renderFehler in app.js): Sicht und Zeitraum als Umschalter, Gruppenliste mit KI-Entwurf, Detail darunter.
   Telefon: Tabellen werden Karten, Liste und Detail wechseln sich ab (Klasse „det“), alle Ziele mindestens 44 px. Nur Variablen. */
.fl { display: grid; gap: 16px; min-width: 0; }
.fl-al { display: grid; gap: 16px; min-width: 0; }   /* Reiter Alarme (renderAlarme): Karten wie in der Ansicht */
.fl .mono, .fl-tk .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.fl .hint { margin: 0 0 12px; font-size: 12px; }
.fl-filter { display: grid; gap: 12px; }
.fl-z { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fl-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.fl-seg button { padding: 7px 15px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--soft-text); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.fl-seg button:hover { background: var(--surface-2); }
.fl-seg button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--messing-hell); }
.fl-seg button:focus-visible, .fl-zl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fl-f { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 220px)); }
.fl .card h2.fl-h2, .card h2.fl-h2 { justify-content: flex-start; flex-wrap: wrap; }
.fl-tab th, .fl-tab td { padding-left: 10px; padding-right: 10px; }
.fl-tk th { white-space: normal; }
.fl-tk td { vertical-align: top; }
.fl-tk td.nw { white-space: nowrap; }
@media (max-width: 1199px) { .fl-tab { font-size: 13px; } .fl-tab th, .fl-tab td { padding-left: 7px; padding-right: 7px; } }
.fl-tab td:first-child { width: 36%; }
.fl-tab td:nth-child(3) { width: 22%; }
.fl-tab td:last-child .badge { white-space: normal; }
.fl-tab tbody tr { cursor: pointer; }
.fl-tab tbody tr:hover td { background: var(--surface-3); }
.fl-tab tbody tr.gew td { background: var(--surface-2); }
.fl-tab tbody tr.gew td:first-child { box-shadow: inset 4px 0 0 var(--messing); }
.fl-zl { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font-weight: 600; line-height: 1.45; }
.fl-ki { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 999px; border: 1px dashed var(--messing); background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 650; white-space: nowrap; }
.fl-ki.klein { gap: 5px; padding: 1px 8px 1px 3px; font-size: 11px; }
.fl-tab .fl-ki.klein { white-space: normal; border-radius: 12px; }
.fl-regel { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 12px; border: 1px dashed var(--border); color: var(--soft-text); font-size: 11px; font-weight: 600; }
.fl-ki-z { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 12px; font-weight: 400; color: var(--muted); }
.fl-ki-kurz { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--soft-text); }
.fl-zurueck { display: none; margin-bottom: 12px; }
.fl-kopf { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.fl-kopf-t { min-width: 0; flex: 1 1 320px; display: grid; gap: 6px; }
.fl-kopf .mono { font-size: 14px; font-weight: 650; }
.fl-kopf .badge { white-space: normal; }
.fl .btn.primary svg { outline: 1px solid color-mix(in srgb, var(--sand) 40%, transparent); outline-offset: -2px; border-radius: 5px; }
.badge.fl-um { background: none; border: 1px solid var(--border); }
.fl-g { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fl-g > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-width: 0; }
.fl h3 { font-size: 13.5px; font-weight: 650; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13.5px; }
.fl-dl dt { color: var(--muted); }
.fl-dl dd { margin: 0; min-width: 0; }
.fl-vl { display: block; width: 100%; height: 72px; background: var(--surface-3); border-radius: 10px; }
.fl-vl rect { fill: var(--petrol); }
.fl-vl rect.leer { fill: var(--border); }
.fl-vl-a { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.fl-akt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fl-wd { margin: 8px 0 0; font-size: 12.5px; color: var(--soft-text); }
.fl-ki-box { border: 1px dashed var(--messing); border-radius: var(--radius-sm); background: var(--surface-3); padding: 14px; display: grid; gap: 10px; font-size: 13.5px; }
.fl-ki-box h4 { margin: 0 0 2px; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fl-ki-box p { margin: 0; }
.fl-ki-stand { font-size: 12px; color: var(--muted); }
.fl-block { margin-top: 20px; }
.fl-vl-filter { margin: 0 0 12px; width: fit-content; max-width: 100%; }
.fl-vl-filter select { width: auto; }
@media (max-width: 860px) {
  .fl .card, .fl-filter, .fl-liste, .fl-detail { padding: 16px; }
  .fl .btn, .fl .btn.small, .fl-tk .btn, .fl-al .btn, .fl-al-plus { min-height: 44px; padding: 8px 16px; font-size: 13.5px; }
  .fl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; border-radius: var(--radius); }
  .fl-seg button { min-height: 44px; padding: 6px 4px; white-space: normal; line-height: 1.2; }
  .fl-f { grid-template-columns: minmax(0, 1fr); }
  .fl select, .fl-vl-filter select { min-height: 44px; }
  .fl-vl-filter { display: grid; min-width: 0; width: auto; }
  .fl-vl-filter select { min-width: 0; width: 100%; }
  /* Tabellen als Karten: jede Zeile eine Karte, je Zelle „Bezeichnung · Wert“ */
  table.fl-tk, table.fl-tk tbody { display: block; }
  table.fl-tk thead { display: none; }
  table.fl-tk tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
  table.fl-tk tr:last-child { margin-bottom: 0; }
  table.fl-tk td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 4px 0; border: 0; text-align: left; white-space: normal; width: auto; background: none; box-shadow: none; }
  table.fl-tk td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
  table.fl-tk td:not([data-l]) { display: block; }
  table.fl-tk td.act { padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
  table.fl-tk td.act > div { display: contents; }
  table.fl-tk td.act .btn { flex: 1 1 100%; }
  .fl-tab td:first-child, .fl-tab td:nth-child(3) { width: auto; }
  .fl-tab tbody tr.gew td, .fl-tab tbody tr.gew td:first-child, .fl-tab tbody tr:hover td { background: none; box-shadow: none; }
  .fl-zl { min-height: 44px; }
  /* Liste und Detail wechseln sich ab */
  .fl.det .fl-liste, .fl.det .fl-filter { display: none; }
  .fl:not(.det) .fl-detail { display: none; }
  .fl-zurueck { display: inline-flex; }
  .fl-g { grid-template-columns: minmax(0, 1fr); }
  .fl-dl { grid-template-columns: 116px minmax(0, 1fr); }
  .fl-akt > * { flex: 1 1 100%; }
  .fl-akt > .badge { flex: 0 0 auto; }
}

/* Neuer Rahmen „Drei Welten“ (Standard; Präfix rn-, WELTEN in app.js). Greift nur mit Klasse „rn“ an der Shell – ohne sie
   bleiben Seitenleiste, Kopfzeile und Reiter des alten Rahmens unverändert. Farben nur aus den Variablen oben. */
.rn-leiste, .rn-fuss, .rn-welten, .rn-marke, .rn-titel { display: none; }
.rn-schalter { display: flex; align-items: center; gap: 12px; }
.rn-schalter > label:last-child { font-size: 14px; color: var(--text); cursor: pointer; }
/* Leiste links in zwei Formen. Grundform: schmale Symbolleiste (oben die Kachel K|, Namen als Tooltip und bei Tastaturfokus).
   Breit (Wortmarke, alle Namen, Zähler rechts) ab 1100 px, solange sie nicht eingeklappt ist (Klasse „rn-zu“, Knopf unten in
   der Leiste). Was die beiden Formen unterscheidet, steht als Variable an der Shell – „breit“ wird nur hier entschieden. */
.shell.rn { display: block; padding: 0; --rn-b: 66px; --rn-h: 40px; --rn-hl: 32px; --rn-wort: none; --rn-kachel: flex; --rn-welt: none; --rn-zahl: absolute;
  --rn-offen: 8px 0 30px color-mix(in srgb, var(--text) 18%, transparent); --rn-klapp: none; }
@media (min-width: 1100px) {
  .shell.rn { --rn-klapp: flex; }
  .shell.rn:not(.rn-zu) { --rn-b: 232px; --rn-wort: block; --rn-kachel: none; --rn-welt: block; --rn-zahl: static; --rn-offen: var(--shadow); }
}
/* Nur Berührung ab 861 px (Tablet quer): Tooltips gibt es dort nicht – die Leiste ist immer breit und zeigt die Namen dauerhaft.
   Alle Ziele des Rahmens sind dort mindestens 44 px hoch – auch Welten-Umschalter, Suche, „Frag den Hub“, Glocke und Reiter. */
@media (hover: none) and (min-width: 861px) {
  .shell.rn, .shell.rn.rn-zu { --rn-b: 232px; --rn-h: 44px; --rn-hl: 44px; --rn-wort: block; --rn-kachel: none; --rn-welt: block; --rn-zahl: static; --rn-offen: var(--shadow); --rn-klapp: none; }
  .shell.rn .rn-welten a, .shell.rn .global-search input, .shell.rn .ask-btn, .shell.rn .bell { height: 44px; }
  .shell.rn .ask-btn, .shell.rn .bell { min-width: 44px; }
  .shell.rn .page-tabs .rn-tab { min-height: 44px; }
}
.shell.rn .sidebar, .shell.rn .topbar .menu-btn { display: none; }
.shell.rn main { margin-left: calc(var(--rn-b) + 28px); min-height: 100vh; }
/* Die Leiste selbst: weiße, gerundete Karte auf Sand wie die Seitenleiste des alten Rahmens */
.shell.rn .rn-leiste { display: flex; flex-direction: column; gap: 2px; position: fixed; left: 14px; top: 14px; bottom: 14px; z-index: 16; width: var(--rn-b); padding: 16px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; transition: width .16s; }
/* Schmale Form mit Tastaturfokus: Die Leiste öffnet sich über dem Inhalt und zeigt die Namen samt Weltname (die Kachel bleibt).
   Der Klapp-Knopf selbst öffnet sie nicht – sonst bliebe sie nach dem Einklappen per Tastatur offen stehen. */
.shell.rn .rn-leiste:has(:focus-visible:not(.rn-klapp)) { --rn-b: 232px; --rn-welt: block; --rn-zahl: static; box-shadow: var(--rn-offen); }
.rn-bereiche { display: contents; }
.rn-leiste .rn-wort { display: var(--rn-wort); flex: none; padding: 2px 0 8px; border-radius: var(--radius-sm); }
.rn-leiste .rn-wort:hover { background: none; }
.rn-wort img { display: block; width: 100%; max-width: 212px; height: auto; }
.rn-liste, .rn-unten { display: flex; flex-direction: column; gap: 2px; flex: none; }
.rn-liste { flex: 1 1 auto; min-height: 0; overflow: hidden auto; scrollbar-width: thin; }
.rn-leiste .rn-l { position: relative; display: flex; align-items: center; gap: 14px; flex: none; width: 100%; height: var(--rn-h); padding: 0 12px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--soft-text); font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; text-decoration: none; white-space: nowrap; overflow: hidden; cursor: pointer;
  transition: background .15s, color .15s; }
.rn-leiste a.rn-l:hover, .rn-leiste button.rn-l:hover { background: var(--surface-2); color: var(--text); }
.rn-leiste .rn-l.an, .rn-leiste a.rn-l.an:hover { background: var(--petrol); color: var(--surface); }
.rn-leiste .rn-l:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rn-leiste .rn-l.an:focus-visible { outline-color: var(--messing-hell); }
.rn-sym { width: 20px; display: grid; place-items: center; flex: none; }
.rn-leiste .rn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rn-leiste .rn-kachel { display: var(--rn-kachel); height: 46px; margin-bottom: 4px; color: var(--text); }
.rn-leiste .rn-kachel .rn-sym, .rn-leiste .rn-ini { width: 30px; margin: 0 -5px; }
.rn-leiste .rn-l.an.rn-kk svg { outline: 1px solid color-mix(in srgb, var(--sand) 40%, transparent); outline-offset: -2px; border-radius: 6px; }
.rn-leiste .rn-konto { cursor: default; color: var(--text); }
.rn-ini { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; }
/* Dezent: „Zur alten Oberfläche“ und der Knopf zum Ein- und Ausklappen */
.rn-leiste .rn-l.rn-leise { height: var(--rn-hl); color: var(--muted); font-size: 13px; }
.rn-leiste .rn-l.rn-klapp { display: var(--rn-klapp); }
.rn-leiste .count { position: var(--rn-zahl); right: 0; top: 0; flex: none; }
.rn-leiste .rn-l.an .count { background: var(--surface); color: var(--petrol); }
.rn-tr { height: 1px; flex: none; margin: 6px 8px; background: var(--line); }
.rn-weltname { display: var(--rn-welt); flex: none; padding: 6px 12px 4px; font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* Kopfzeile: Welten-Umschalter, Suche, „Frag den Hub“, Glocke */
.shell.rn .topbar { position: sticky; top: 0; z-index: 12; min-height: 60px; padding: 9px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.shell.rn .rn-welten { display: flex; gap: 6px; flex: none; }
.rn-welten a { height: 38px; padding: 0 16px; gap: 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--soft-text); font-size: 14px; font-weight: 600; }
.rn-welten a:hover { background: var(--surface); border-color: var(--petrol); color: var(--text); }
.rn-welten a[aria-current] { background: var(--petrol); border-color: var(--petrol); color: var(--sand); }
.rn-welten a[aria-current] .count { background: var(--messing-hell); color: var(--petrol); }
.rn-welten .count { margin-left: 0; }
.shell.rn .global-search { flex: 1 1 160px; width: auto; max-width: 460px; margin: 0 auto; }
.shell.rn .global-search input { background: var(--surface-3); border-radius: var(--radius-sm); box-shadow: none; }
.shell.rn .ask-btn, .shell.rn .bell { box-shadow: none; }
.shell.rn .bell .count { border-color: var(--surface); }
/* Seitentitel mit Pfad „Welt · Bereich“, darunter eine Reiterzeile für die Seiten des Bereichs */
.shell.rn .rn-titel { display: block; padding: 22px 28px 0; }
.rn-pfad { margin: 0 0 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rn-pfad:empty { display: none; }
.rn-titel h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.rn-titel .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.rn-titel .sub:empty { display: none; }
.shell.rn .page-tabs { flex-wrap: nowrap; gap: 4px; margin: 14px 28px 0; padding: 0; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; scrollbar-width: none; }
.shell.rn .page-tabs::-webkit-scrollbar { display: none; }
.page-tabs .rn-tab { flex: none; gap: 7px; padding: 10px 12px 8px; border-radius: 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.page-tabs .rn-tab:hover { background: none; color: var(--text); }
.page-tabs .rn-tab[aria-current] { color: var(--text); font-weight: 650; border-bottom-color: var(--messing); }
.page-tabs .rn-tab:focus-visible { outline-offset: -2px; }
.page-tabs .rn-tab .count { margin-left: 0; }
.shell.rn .page-actions { padding: 14px 28px 0; }
/* Die Inhaltsspalte ist nie breiter als das Fenster: Breite Tabellen rollen in ihrer eigenen Karte, statt die ganze Seite
   waagerecht unter die feste Leiste zu schieben (im alten Rahmen wächst die Spalte mit dem Inhalt) */
.shell.rn .view { padding: 18px 28px 48px; grid-template-columns: minmax(0, 1fr); }
/* Blatt von unten (Telefon): Bereiche einer Welt bzw. „Mehr“ */
dialog.rn-blatt { width: min(560px, 100vw); max-width: 100vw; max-height: 86vh; margin: auto auto 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
  border-bottom: 0; border-radius: 22px 22px 0 0; overflow-y: auto; }
.rn-blatt h2 { margin: 4px 8px 6px; font-size: 18px; }
.rn-z { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 6px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.rn-z .rn-sym { color: var(--petrol); }
.rn-z .rn-name { flex: 1; min-width: 0; }
.rn-z .rn-ini { margin: 0 -5px; }
.rn-z .rn-name small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.rn-z > .i:last-child { color: var(--muted); }
.rn-z[aria-current] { background: var(--surface-2); box-shadow: inset 4px 0 0 var(--messing); }
.rn-z.rn-konto { cursor: default; }
.rn-z:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }
.rn-blatt .rn-zu { display: block; width: 100%; min-height: 46px; margin-top: 14px; }
@media (min-width: 861px) {
  /* Klebende Seitenteile der bestehenden Seiten unter die klebende Kopfzeile rücken */
  html:has(.shell.rn) { scroll-padding-top: 72px; }
  .shell.rn .wiki-nav, .shell.rn .chat-list, .shell.rn .ax-side { top: 74px; }
}
@media (max-width: 860px) {
  /* Telefon: keine Leiste links, Leiste unten; alle Ziele des Rahmens mindestens 44 px hoch; die Seite scrollt nie waagerecht */
  .shell.rn { overflow-x: clip; }
  .shell.rn main { margin-left: 0; }
  .shell.rn .rn-leiste, .shell.rn .rn-welten { display: none; }
  .shell.rn .topbar { position: static; flex-wrap: wrap; gap: 8px; min-height: 0; padding: 8px 12px 10px; }
  .shell.rn .rn-marke { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: 16px; font-weight: 650; }
  .rn-marke a { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin: 0 -7px; border-radius: 10px; }
  .rn-marke a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .rn-marke span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell.rn .ask-btn, .shell.rn .bell { width: 44px; height: 44px; }
  .shell.rn .global-search { order: 5; flex: 1 1 100%; max-width: none; }
  .shell.rn .global-search input { height: 44px; }
  .shell.rn .rn-titel { padding: 16px 14px 0; }
  .rn-titel h1 { font-size: 22px; }
  .shell.rn .page-tabs { margin: 10px 0 0; padding: 0 6px; }
  .page-tabs .rn-tab { min-height: 44px; }
  .shell.rn .page-actions { padding: 10px 14px 0; }
  .shell.rn .view { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); overflow-x: auto; }
  .shell.rn .rn-fuss { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; position: fixed; left: 0; right: 0; bottom: 0; z-index: 14;
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .rn-fuss a, .rn-fuss button { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 0 2px; border: 0; border-radius: 0;
    background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 500; text-decoration: none; cursor: pointer; }
  .rn-fuss a:hover, .rn-fuss button:hover { background: none; color: var(--text); }
  .rn-fuss a[aria-current], .rn-fuss button[aria-current] { color: var(--petrol); font-weight: 650; }
  .rn-fuss [aria-current]::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--messing); border-radius: 0 0 3px 3px; }
  .rn-fuss a:focus-visible, .rn-fuss button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .rn-fuss .count { position: absolute; top: 5px; left: 54%; margin: 0; }
  #shell.rn ~ .toast { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .shell.rn .rn-leiste, .rn-leiste .rn-l { transition: none; } }

/* ---------- Module & Schalter (Betrieb): Matrix Büros × Module, Katalog, Weitere Schalter ---------- */
.ms-meldung { margin: 0; }
.ms-meldung:not(.ok):not(.bad) { background: var(--surface-2); color: var(--soft-text); }
.ms-meldung.ok { background: var(--ok-soft); color: var(--ok); }
.ms-meldung.bad { background: var(--bad-soft); color: var(--bad); }
.ms-wrap { padding: 0; overflow-x: auto; }
.ms-mx { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.ms-mx th, .ms-mx td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.ms-mx thead th { font-size: 12px; font-weight: 550; color: var(--muted); background: var(--surface-3); }
.ms-mx thead th b { display: block; color: var(--text); font-weight: 600; min-width: 70px; }
.ms-mx thead th small { display: block; font-weight: 400; font-size: 10.5px; color: var(--accent-ink); }
.ms-mx.eng thead th.ms-sp { padding: 10px 2px; }
.ms-mx .ms-vt { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 200px; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ms-mx th.ms-b, .ms-mx th.ms-b0 { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 180px; }
.ms-mx thead th.ms-b0 { z-index: 2; background: var(--surface-3); padding-left: 14px; }
.ms-bk { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 8px; cursor: pointer; font: inherit; color: var(--text); }
.ms-bk:hover { background: var(--surface-3); }
.ms-bk b { display: block; font-weight: 650; font-size: 13.5px; }
.ms-bk span { display: block; font-size: 12px; color: var(--muted); }
.ms-bk .ms-w { color: var(--warn); }
.ms-mx tr.gew th.ms-b .ms-bk { background: var(--accent-soft); border-color: var(--accent); }
.ms-mx tfoot th, .ms-mx tfoot td { border-bottom: 0; font-size: 12px; color: var(--muted); font-weight: 550; }
.ms-mx tfoot th { position: sticky; left: 0; background: var(--surface); text-align: left; padding-left: 16px; }
.ms-z { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 62px; min-height: 40px; padding: 2px 6px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; line-height: 1.2; font: inherit; }
.ms-z b { font-size: 12.5px; font-weight: 650; }
.ms-z i { font-style: normal; font-size: 10px; white-space: nowrap; }
.ms-z.an { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.ms-z.auto { border-style: dashed; }
.ms-z.gesperrt { background: var(--surface-3); color: var(--muted); }
.ms-z.warn::after { content: "!"; position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%; background: var(--warn); color: var(--surface); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ms-z.leer { cursor: default; border-style: dotted; }
button.ms-z:hover { border-color: var(--petrol); }
button.ms-z:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-mx.eng .ms-z { min-width: 44px; padding: 2px 3px; }
.ms-sel select { padding: 5px 26px 5px 8px; font-size: 12.5px; }
.ms-sel i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ms-leg { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--soft-text); align-items: center; }
.ms-leg > span { display: inline-flex; align-items: center; gap: 6px; }
.ms-leg .ms-z { min-width: 40px; min-height: 26px; cursor: default; pointer-events: none; }
.ms-hl { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; overflow-wrap: anywhere; }
.ms-hl li { padding: 8px 12px; border-radius: var(--radius-sm, 10px); font-size: 13px; background: var(--surface-2); color: var(--soft-text); }
.ms-blick-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ms-bk2 { border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); padding: 12px 14px; min-width: 0; font-size: 13px; }
.ms-bk2 h4 { margin: 0 0 6px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ms-bk2 p { margin: 0 0 4px; }
.ms-kat td { vertical-align: top; }
.ms-kat td .sub { display: block; }
.ms-ub { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-wl { display: grid; }
.ms-wz { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 4px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ms-wz:first-child { border-top: 0; }
dialog.ms-dlg { width: min(560px, calc(100vw - 32px)); }
.ms-dlg h3 { margin: 0; font-size: 17px; }
.ms-dlg h4 { margin: 4px 0 0; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ms-dlg ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.ms-dlg li { padding: 8px 12px; border-radius: var(--radius-sm, 10px); background: var(--surface-2); color: var(--soft-text); }
.md-module .md-unter { padding-left: 22px; }
@media (max-width: 720px) {
  .ms-mx th.ms-b, .ms-mx th.ms-b0 { min-width: 140px; }
  .ms-z { min-width: 50px; }
}
.ms-kat select { min-width: 230px; }

/* Betrieb › Verbindungen (static/app.js renderVerbindungen): Ampel-Kacheln, Matrix Verbindung × Büro, Karten der zentralen Dienste,
   Tabelle Hub ↔ Kundenseiten. Farben nur mit Bedeutung: grün in Ordnung, rot gestört, gestrichelt = unbekannt, Umriss = nicht
   eingerichtet bzw. Datei-Schnittstelle (Design-Vorgabe). */
.vb-amp-g { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 6px; }
.vb-amp { display: grid; gap: 4px; padding: 16px 18px; text-decoration: none; color: var(--text); transition: transform .16s, border-color .16s; }
.vb-amp:hover { transform: translateY(-2px); border-color: var(--petrol); }
.vb-amp.an { background: var(--accent-soft); border-color: var(--accent); }
.vb-amp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vb-amp-k { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vb-amp-z { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.vb-amp-t { font-size: 12.5px; color: var(--soft-text); }
.vb-lauf { margin: 4px 2px 10px; }
.vb-lampe { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
  background: var(--surface-3); border: 1.5px solid var(--border); }
.vb-lampe.ok { background: var(--ok); border-color: var(--ok); }
.vb-lampe.bad { background: var(--bad); border-color: var(--bad); }
.vb-lampe.unb { border-style: dashed; border-color: var(--muted); }
.vb-mx th.vb-bk { min-width: 132px; vertical-align: top; text-align: left; }
.vb-mx th.vb-bk b { min-width: 0; font-size: 13px; }
.vb-mx th.vb-bk span { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.vb-mx th.vb-bk .vb-hw { color: var(--warn); overflow-wrap: anywhere; }
.vb-mx th.vb-bk .btn { margin-top: 6px; }
.vb-mx th.vb-bk.gew { background: var(--accent-soft); }
.vb-mx th.vb-n { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 200px; font-weight: 400; }
.vb-mx th.vb-n b { display: block; font-weight: 650; font-size: 13px; }
.vb-mx th.vb-n span { display: block; font-size: 11.5px; color: var(--muted); }
.vb-mx th.vb-n .vb-int { color: var(--accent-ink); }
.vb-mx tr.vb-g th { text-align: left; background: var(--surface-2); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 8px 14px; position: sticky; left: 0; }
.vb-mx tr.vb-g th small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.vb-z { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; min-height: 40px; padding: 2px 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--soft-text); font: inherit; cursor: pointer; }
.vb-z b { font-size: 12.5px; font-weight: 650; }
.vb-z i { font-style: normal; font-size: 10.5px; white-space: nowrap; color: var(--muted); }
.vb-z.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.vb-z.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.vb-z.unb { border-style: dashed; }
.vb-z.alt { border-style: dashed; opacity: .62; }   /* veraltet: letzter Abruf der Verbindungsroute gescheitert */
.vb-z.aus { background: var(--surface-3); }
.vb-z.datei { cursor: default; border-style: dotted; background: var(--surface-3); }
.vb-z.datei.an { border-style: solid; background: var(--surface); }
button.vb-z:hover { border-color: var(--petrol); }
button.vb-z:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-leg .vb-z { min-width: 84px; min-height: 26px; cursor: default; pointer-events: none; }
.vb-leer { display: inline-block; padding: 0 8px; border: 1px dashed var(--border); border-radius: 999px; font-size: 11.5px; color: var(--muted); }
dialog.vb-dlg { width: min(640px, calc(100vw - 32px)); }
.vb-dlg h3 { margin: 0; font-size: 17px; }
.vb-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.vb-tab th, .vb-tab td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.vb-tab th[scope="row"] { width: 38%; color: var(--muted); font-weight: 550; }
.vb-karten { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.vb-karte { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 8px; align-content: start; min-width: 0; font-size: 13px; }
.vb-karte.bad { border-color: var(--bad); }
.vb-karte h3 { margin: 0; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.vb-karte .vb-info { margin: 0; color: var(--soft-text); overflow-wrap: anywhere; }
.vb-karte dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.vb-karte dt { color: var(--muted); }
.vb-karte dd { margin: 0; overflow-wrap: anywhere; }
.vb-hk { font-size: 13px; min-width: 1200px; }
.vb-hk td { vertical-align: top; min-width: 110px; }
.vb-hk td:first-child { min-width: 150px; }
.vb-hk td:nth-child(6) { min-width: 200px; }
.vb-hk td b { display: block; font-weight: 600; }
.vb-hk td small { display: block; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.vb-hk td .btn { margin-top: 6px; }
.vb-takte summary { cursor: pointer; font-size: 12.5px; }
.vb-takte .vb-tab { margin-top: 6px; min-width: 420px; }
.vb-ng { justify-self: start; width: max-content; max-width: 100%; margin-left: 6px; background: var(--surface-3); border: 1px dashed var(--border); color: var(--muted); font-weight: 450; }
.vb-uebergang { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .vb-amp { transition: none; } .vb-amp:hover { transform: none; } }
@media (max-width: 720px) { .vb-mx th.vb-n { min-width: 150px; } .vb-z { min-width: 76px; } }

/* Betriebskarte (Werkstatt › Module): Kennzahlen, Projektlauf, Datenströme, Aufgaben, Register */
.bk-zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.bk-kz { display: grid; gap: 6px; align-content: start; padding: 16px 18px; }
.bk-kz > span { font-size: 12.5px; color: var(--muted); }
.bk-kz > b { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bk-kz > b.ok { color: var(--ok); } .bk-kz > b.warn { color: var(--warn); }
.bk-kz.dunkel { background: var(--petrol); border-color: var(--petrol); color: var(--sand); }
.bk-kz.dunkel > span { color: inherit; opacity: .85; }
.bk-balken { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); }
.bk-balken i, .bk-leg i { display: block; }
.bk-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.bk-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bk-b-auto { background: var(--petrol); } .bk-b-knopf { background: var(--messing); } .bk-b-hand { background: var(--warn); } .bk-b-fehlt { background: var(--bad); } .bk-b-alt { background: var(--muted); }
.bk-fenster { display: grid; gap: 12px; margin-bottom: 14px; min-width: 0; }
.bk-fenster .ls-h { margin: 0; }
.bk-lauf-wrap { overflow-x: auto; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--line); }
.bk-lauf { display: block; min-width: 1000px; width: 100%; height: auto; }
.bk-lauf .bk-st rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.bk-lauf .bk-st.kern rect { fill: var(--petrol); stroke: var(--petrol); }
.bk-lauf .bk-st text { font: 600 13.5px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: var(--text); }
.bk-lauf .bk-st.kern text { fill: var(--sand); }
.bk-lauf .bk-st .klein { font-size: 11.5px; font-weight: 400; fill: var(--muted); }
.bk-lauf .bk-st.kern .klein { fill: var(--sand); opacity: .85; }
.bk-lauf .bk-k { fill: none; stroke-width: 3; }
.bk-lauf .bk-k.auto { stroke: var(--petrol); } .bk-lauf .bk-k.knopf { stroke: var(--messing); }
.bk-lauf .bk-k.fehlt { stroke: var(--bad); stroke-dasharray: 3 6; } .bk-lauf .bk-k.alt { stroke: var(--muted); stroke-dasharray: 8 6; }
.bk-lauf .bk-kt { font: 600 11.5px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: var(--soft-text); }
.bk-lauf .bk-kt.fehlt { fill: var(--bad); }
.bk-lauf .bk-zeile { font: 650 10.5px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .12em; fill: var(--muted); }
.bk-lauf .bk-marke circle { fill: var(--surface); stroke: var(--bad); stroke-width: 2; }
.bk-lauf .bk-marke text { font: 700 11px ui-monospace, Menlo, monospace; fill: var(--bad); text-anchor: middle; dominant-baseline: central; }
.bk-pf-auto { fill: var(--petrol); } .bk-pf-knopf { fill: var(--messing); } .bk-pf-fehlt { fill: var(--bad); } .bk-pf-alt { fill: var(--muted); }
.bk-stroeme { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bk-strom { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: grid; gap: 7px; cursor: pointer; align-content: start; transition: border-color .15s; }
.bk-strom:hover { border-color: var(--petrol); }
.bk-strom[aria-expanded="true"] { border-color: var(--petrol); box-shadow: inset 0 0 0 1px var(--petrol); }
.bk-strom:focus-visible, .bk-aufg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bk-strom .muted { font-size: 12px; }
.bk-zl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bk-zl .bad { color: var(--bad); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.bk-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--soft-text); }
.bk-chip.rot { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.bk-chip.gruen { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.bk-chip.alt { border-style: dashed; }
.bk-detail { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-3); padding: 14px; display: grid; gap: 8px; min-width: 0; }
.bk-detail h3 { margin: 0; font-size: 15px; }
.bk-liste { display: grid; margin: 0; padding: 0; list-style: none; }
.bk-liste li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.bk-liste li:last-child { border-bottom: 0; }
.bk-liste li.fehlt .bk-was { color: var(--bad); }
.bk-w { font: 600 10.5px ui-monospace, Menlo, monospace; padding: 1px 6px; border-radius: 5px; text-align: center; }
.bk-w.auto { background: var(--petrol); color: var(--sand); } .bk-w.knopf { background: var(--accent-soft); color: var(--accent-ink); }
.bk-w.hand { background: var(--warn-soft); color: var(--warn); } .bk-w.fehlt { background: var(--bad-soft); color: var(--bad); }
.bk-ob { font: 10px ui-monospace, Menlo, monospace; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; color: var(--muted); white-space: nowrap; }
.bk-bahnen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.bk-bahn { background: var(--surface-2); border-radius: 16px; padding: 12px; display: grid; gap: 10px; align-content: start; }
.bk-bahn > header { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px; }
.bk-bahn > header b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--petrol); }
.bk-bahn > header span { font-size: 12px; }
.bk-aufg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 7px; cursor: pointer; transition: border-color .15s; }
.bk-aufg:hover { border-color: var(--petrol); }
.bk-aufg.erledigt { opacity: .6; }
.bk-aufg.erledigt .bk-akopf b { text-decoration: line-through; }
.bk-akopf { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.bk-akopf b { font-size: 14px; line-height: 1.3; }
.bk-akopf .chip { padding: 1px 8px; font-size: 11.5px; flex: none; }
.bk-aufg p { margin: 0; font-size: 12.5px; color: var(--soft-text); }
.bk-wirkung { font-size: 11.5px; color: var(--ok); font-weight: 600; }
.bk-afuss { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; }
.bk-wer { font-weight: 650; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.bk-wer.joel { background: color-mix(in srgb, var(--petrol) 12%, var(--surface)); color: var(--petrol); }
.bk-groesse { font: 600 10.5px ui-monospace, Menlo, monospace; border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.bk-status { margin-left: auto; font-weight: 600; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.bk-status.doing { background: var(--accent-soft); color: var(--accent-ink); } .bk-status.review { background: var(--warn-soft); color: var(--warn); }
.bk-status.done { background: var(--ok-soft); color: var(--ok); }
.bk-reg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bk-regsp { display: grid; gap: 6px; align-content: start; }
.bk-regsp > b { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.bk-regsp.offen > b { border-color: var(--bad); } .bk-regsp.teilweise > b { border-color: var(--warn); }
.bk-regsp.erledigt > b { border-color: var(--ok); } .bk-regsp.neu > b { border-color: var(--messing); }
.bk-ri { display: grid; grid-template-columns: 30px 1fr; gap: 6px; font-size: 12px; line-height: 1.35; }
.bk-ri .n { font: 600 10.5px ui-monospace, Menlo, monospace; border-radius: 99px; text-align: center; padding: 1px 0; align-self: start; }
.bk-ri .n.hoch { background: var(--bad-soft); color: var(--bad); } .bk-ri .n.mittel { background: var(--warn-soft); color: var(--warn); }
.bk-ri .n.niedrig { background: var(--surface-2); color: var(--muted); }
@media (max-width: 1100px) { .bk-zahlen { grid-template-columns: 1fr 1fr; } .bk-bahnen { grid-template-columns: 1fr; } .bk-reg { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bk-zahlen, .bk-reg { grid-template-columns: 1fr; } .bk-liste li { grid-template-columns: 40px 1fr; } .bk-liste li > span:last-child { grid-column: 2; } }

/* Dateiablage (static/dateiablage.js): Finder-artig – Leiste, Orte links, Liste/Spalten in der Mitte, Details rechts */
.da-fenster { padding: 0; overflow: hidden; position: relative; display: flex; flex-direction: column; min-height: calc(100vh - 220px);
  --da-hauch: color-mix(in srgb, var(--petrol) 11%, var(--surface)); }
.da-leiste { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.da-pfad { flex: 1; min-width: 180px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.da-pfad a { color: var(--muted); text-decoration: none; border-radius: 8px; padding: 2px 4px; } .da-pfad a:hover { color: var(--text); }
.da-pfad b { color: var(--text); font-weight: 600; } .da-trenner { color: var(--border); }
.da-suche { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 0 12px; background: var(--surface); width: 240px; color: var(--muted); }
.da-suche:focus-within { border-color: var(--petrol); }
.da-suche input { border: 0; outline: 0; background: transparent; padding: 6px 0; width: 100%; font: inherit; font-size: 13px; color: var(--text); }
.da-seg { display: inline-flex; gap: 4px; } .da-seg .btn { padding: 5px 9px; }
.da-seg .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.da-menue-halter { position: relative; }
.da-menue { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; display: flex; flex-direction: column; }
.da-menue[hidden] { display: none; }
.da-menue button { display: flex; gap: 8px; align-items: center; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.da-menue button:hover { background: var(--surface-3); }
.da-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 250px; flex: 1; min-height: 0; }
.da-seite { border-right: 1px solid var(--line); background: var(--surface-3); padding: 10px 8px; overflow: auto; font-size: 13px; }
.da-seite a { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.da-seite a span:not(.da-zahl-chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-seite a:hover { background: var(--surface-2); } .da-seite a[aria-current] { background: var(--da-hauch); color: var(--petrol); font-weight: 600; }
.da-h { font-size: 11px; color: var(--muted); padding: 12px 8px 4px; text-transform: none; letter-spacing: .02em; }
.da-baum { display: flex; align-items: center; padding-left: calc((var(--tiefe) - 1) * 14px); } .da-baum a { flex: 1; }
.da-auf { width: 18px; height: 22px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: grid; place-items: center; flex: none; }
.da-auf.leer { cursor: default; }
.da-zahl-chip { margin-left: auto; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.da-haupt { overflow: auto; min-width: 0; }
.da-tab { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.da-tab th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.da-tab th:first-child { width: 46%; } .da-tab td { padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-tab tr[data-da-id] { cursor: default; user-select: none; } .da-tab tr[data-da-id]:hover td { background: var(--surface-3); }
.da-tab tr.an td, .da-treffer.an, .da-sp-eintrag.an { background: var(--da-hauch); }
.da-name { display: flex; align-items: center; gap: 8px; } .da-name > span:not(.da-sym):not(.da-chip) { overflow: hidden; text-overflow: ellipsis; }
.da-gr { text-align: right; width: 80px; } .da-ort { color: var(--muted); }
.da-sym { display: inline-flex; color: var(--muted); flex: none; }
.da-mini { width: 34px; height: 26px; flex: none; border-radius: 5px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: inline-grid; place-items: center; }
.da-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.da-tab td { vertical-align: middle; } .da-sym.ordner { color: var(--accent); }
.da-chip { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; flex: none; }
.da-chip.ok { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); } .da-chip.warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.da-ziel-an td, .da-ziel-an.da-sp-eintrag, .da-seite a.da-ziel-an, .da-pfad a.da-ziel-an, .da-spalte.da-ziel-an { outline: 2px solid var(--petrol); outline-offset: -2px; background: var(--da-hauch); }
.da-spalten { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); height: 100%; overflow-x: auto; }
.da-spalte { border-right: 1px solid var(--line); padding: 6px; overflow-y: auto; min-height: 320px; }
.da-sp-eintrag { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: default; user-select: none; }
.da-sp-eintrag span:not(.da-sym) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-sp-eintrag:hover { background: var(--surface-3); } .da-sp-leer { color: var(--muted); font-size: 12px; padding: 8px; }
.da-treffer-kopf, .da-korb-kopf { padding: 10px 14px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.da-treffer { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: default; }
.da-treffer:hover { background: var(--surface-3); } .da-treffer > div:first-child { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.da-auszug { color: var(--soft-text); margin-top: 4px; line-height: 1.5; }
.da-auszug mark { background: var(--accent-soft); color: var(--accent-ink); border-radius: 3px; padding: 0 2px; }
.da-leer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 60px 24px; color: var(--muted); max-width: 460px; margin: 0 auto; }
.da-leer b { color: var(--text); }
.da-info { border-left: 1px solid var(--line); padding: 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.da-info-leer { display: flex; flex-direction: column; gap: 4px; } .da-info-leer .muted { margin-top: 8px; font-size: 12px; }
.da-thumb { height: 240px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.da-thumb[role=button] { cursor: zoom-in; } .da-thumb img { max-width: calc(100% - 20px); max-height: calc(100% - 20px); object-fit: contain; border-radius: 4px; box-shadow: var(--shadow); background: var(--surface); }
.da-blatt { width: calc(100% - 28px); height: calc(100% - 20px); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border-radius: 4px; padding: 10px 12px; font-size: 9.5px; line-height: 1.45; color: var(--soft-text); white-space: pre-wrap; word-break: break-word; text-align: left; align-self: center; -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent); mask-image: linear-gradient(to bottom, black 75%, transparent); }
.da-thumb.ordner { color: var(--accent); }
.da-info-name { word-break: break-word; } .da-info-meta { font-size: 12px; line-height: 1.5; }
.da-info-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .da-info-knoepfe .btn { text-decoration: none; }
.da-fuss { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.da-fuss span { display: inline-flex; align-items: center; gap: 6px; } .da-fuss .warn { color: var(--warn); }
.da-balken { width: 140px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; display: inline-block; }
.da-balken i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.da-ueber { position: absolute; inset: 64px 14px 44px; border: 2px dashed var(--petrol); border-radius: 16px; background: color-mix(in srgb, var(--da-hauch) 94%, transparent); color: var(--petrol); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; z-index: 10; }
.da-ueber[hidden] { display: none; } .da-ueber span { font-size: 12.5px; }
.da-ueber-zip { pointer-events: auto; margin-top: 14px; padding: 16px 30px; border: 2px dashed var(--messing); border-radius: 14px; background: var(--surface); color: var(--accent-ink); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: background .15s, transform .15s; }
.da-ueber-zip[hidden] { display: none; } .da-ueber-zip.an { background: var(--accent-soft); transform: scale(1.04); }
.da-ziele { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 8px 0 14px; }
.da-ziele label { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.da-ziele label:hover { background: var(--surface-3); } .da-ziele input { width: auto; margin: 0; accent-color: var(--petrol); }
.da-vorschau { width: min(1100px, calc(100vw - 48px)); padding: 0; }
.da-vs-kopf { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.da-vs-inhalt { height: min(78vh, 900px); display: grid; place-items: center; background: var(--surface-2); }
.da-vs-inhalt iframe { width: 100%; height: 100%; border: 0; background: var(--surface); } .da-vs-inhalt img { max-width: 100%; max-height: 100%; object-fit: contain; }
.da-zip, .da-zip-datei { width: 100%; height: 100%; overflow: auto; align-self: stretch; background: var(--surface); display: flex; flex-direction: column; }
.da-zip-datei > iframe, .da-zip-datei > img { flex: 1; min-height: 0; } .da-zip-datei > img { object-fit: contain; max-width: 100%; }
.da-zip-datei > .da-leer { flex: 1; } .da-zip-datei .da-treffer-kopf { justify-content: flex-start; }
.da-zip .da-tab th:first-child { width: auto; } .da-zip .da-tab th:last-child { width: 56px; }
.da-zip tr[data-da-zip] { cursor: pointer; } .da-zip tr[data-da-zip]:hover td { background: var(--surface-3); }
@media (max-width: 1100px) { .da-grid { grid-template-columns: 180px minmax(0, 1fr); } .da-info { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); } }
@media (prefers-reduced-motion: reduce) { .da-balken i { transition: none; } }
.da-info .da-chip { white-space: normal; align-self: flex-start; }

/* Ideenentwicklung (renderKundenideen) */
.ki-tafel { overflow-x: auto; }
.ki-karte { cursor: pointer; }
.ki-punkte { flex: none; min-width: 30px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--petrol); color: var(--messing-hell); font-size: 12px; font-weight: 600; }
.ki-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ki-quadrant { min-height: 200px; }
.ki-dialog { width: min(760px, calc(100vw - 32px)); }
.ki-bewertung { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.ki-bewertung .row { margin-top: 4px; }

/* Zeichen der K-I-NG-Ablage vor dem Namen (abZeichen in app.js) */
img.ab-zeichen{display:inline-block;vertical-align:-.2em;border-radius:22%}
