/* Mr. Bell Cockpit v5 – Mission Control. Dunkel als Standard, hell per Umschalter. */
@font-face { font-family: 'Geist'; src: url('/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0c0f; --grid: rgba(150, 175, 200, .035); --panel: #101317; --panel-2: #14181d; --raise: #1a1f25; --hover: #1d232a;
  --line: #1f252c; --line-2: #2a313a; --text: #e6e9ed; --text-2: #aeb6c0; --muted: #78818c; --dim: #4d5560;
  --accent: #56d4ec; --accent-2: #2fb4cf; --accent-ink: #04222a; --accent-soft: rgba(86, 212, 236, .10); --accent-line: rgba(86, 212, 236, .35);
  --ok: #3fd18f; --ok-soft: rgba(63, 209, 143, .12); --warn: #f0b440; --warn-soft: rgba(240, 180, 64, .12); --bad: #ff5f5f; --bad-soft: rgba(255, 95, 95, .12); --info: #9db0ff; --info-soft: rgba(157, 176, 255, .12);
  --bubble-in: #161b21; --bubble-out: #0f2a31; --bubble-out-line: #1c4752;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r: 6px; --rail: 224px; color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef1f4; --grid: rgba(20, 40, 60, .045); --panel: #ffffff; --panel-2: #f6f8fa; --raise: #eef2f5; --hover: #eaf0f4;
  --line: #dde3e9; --line-2: #cbd3db; --text: #0d1217; --text-2: #3b4550; --muted: #5f6974; --dim: #98a1ab;
  --accent: #0789a3; --accent-2: #066f85; --accent-ink: #ffffff; --accent-soft: rgba(7, 137, 163, .09); --accent-line: rgba(7, 137, 163, .35);
  --ok: #0f8a57; --ok-soft: rgba(15, 138, 87, .10); --warn: #a86a08; --warn-soft: rgba(200, 130, 10, .12); --bad: #cf3535; --bad-soft: rgba(207, 53, 53, .09); --info: #3d55c7; --info-soft: rgba(61, 85, 199, .09);
  --bubble-in: #f2f4f7; --bubble-out: #e3f4f8; --bubble-out-line: #b9e1ea; color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; background-attachment: fixed;
  color: var(--text); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01', 'cv11'; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Rahmen ---------- */
.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.brand svg.logo { width: 30px; height: 25px; flex: none; }
.brand b { font-weight: 600; letter-spacing: -.01em; font-size: 15px; display: block; line-height: 1.1; }
.brand small { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { padding: 10px 8px; display: grid; gap: 1px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 5px; color: var(--text-2); font-weight: 450; position: relative; }
.nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 2px; background: var(--accent); border-radius: 2px; }
.nav svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav .badge { margin-left: auto; font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--raise); color: var(--text-2); }
.nav .badge.hot { background: var(--accent); color: var(--accent-ink); }
.nav .badge.bad { background: var(--bad); color: #fff; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.railFuss { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 10px; font: 11px/1.4 var(--mono); color: var(--muted); }
.railFuss .zeile2 { display: flex; gap: 6px; }
.railFuss button { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; cursor: pointer; color: var(--text-2); font: 500 11px/1 var(--mono); letter-spacing: .04em; }
.railFuss button:hover { border-color: var(--line-2); color: var(--text); }
.live { display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .1em; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: puls 2.4s ease-in-out infinite; }
.live.alt i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.live.aus i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: none; }
@keyframes puls { 50% { opacity: .45; } }

.haupt { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.top h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.top .eyebrow { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.top .rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 4px; cursor: pointer; color: var(--muted); font: 500 12px/1 var(--mono); letter-spacing: .02em; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.ibtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 11px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; cursor: pointer; color: var(--text-2); font: 500 12px/1 var(--mono); white-space: nowrap; }
.ibtn:hover { border-color: var(--line-2); color: var(--text); text-decoration: none; }
.ibtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ibtn.primaer { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ibtn.primaer:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.ibtn:disabled { opacity: .5; cursor: default; }
.ibtn.dreh svg { animation: dreh 1s linear infinite; } @keyframes dreh { to { transform: rotate(360deg); } }
main#m { padding: 22px 28px 60px; display: grid; gap: 16px; align-content: start; max-width: 1640px; width: 100%; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.ph { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); min-height: 42px; }
.ph .lbl { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.ph .meta { margin-left: auto; font: 11px/1 var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.pb { padding: 14px; }
.pb.dicht { padding: 0; }
.raster { display: grid; gap: 16px; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .r12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stapel { display: grid; gap: 16px; align-content: start; }
.leer { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.klein { font-size: 12.5px; color: var(--muted); }
.lbl2 { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { padding: 14px 16px 10px; border-right: 1px solid var(--line); position: relative; min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi .lbl2 { display: flex; justify-content: space-between; gap: 6px; }
.kpi .wert { font: 500 32px/1.1 var(--mono); letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .unter { display: flex; align-items: center; gap: 8px; margin-top: 4px; font: 11px/1.2 var(--mono); color: var(--muted); min-height: 15px; }
.kpi svg.spark { display: block; width: 100%; height: 36px; margin-top: 8px; }
.delta { font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 3px; }
.delta.hoch { color: var(--ok); background: var(--ok-soft); } .delta.runter { color: var(--bad); background: var(--bad-soft); } .delta.gleich { color: var(--muted); background: var(--raise); }
.spark path.l { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark path.f { fill: url(#sparkFill); }
.spark line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--accent); }

/* Listen */
.liste { display: grid; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--line); color: inherit; min-width: 0; }
.li:last-child { border-bottom: 0; }
a.li:hover, .li.klick:hover { background: var(--hover); text-decoration: none; cursor: pointer; }
.li .k { flex: 1; min-width: 0; }
.li .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .z { font: 11px/1.4 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.li.aktiv { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 5px; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; background: var(--raise); color: var(--text-2); white-space: nowrap; border: 1px solid transparent; }
.chip.ok { color: var(--ok); background: var(--ok-soft); } .chip.warn { color: var(--warn); background: var(--warn-soft); } .chip.bad { color: var(--bad); background: var(--bad-soft); }
.chip.info { color: var(--info); background: var(--info-soft); } .chip.ak { color: var(--accent); background: var(--accent-soft); } .chip.rand { background: none; border-color: var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--dim); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.ak { background: var(--accent); }

/* Filterleiste */
.leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; color: var(--text-2); font-size: 13px; }
.filter b { font: 500 11px/1 var(--mono); color: var(--muted); }
.filter[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.filter[aria-pressed="true"] b { color: var(--accent); }
.suche { flex: 1; min-width: 180px; max-width: 320px; height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); outline: none; }
.suche:focus { border-color: var(--accent-line); }

/* Potenzial */
.pot { display: grid; grid-template-columns: 4px 1fr auto; gap: 0 14px; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.pot:last-child { border-bottom: 0; }
.pot .bar { border-radius: 0 3px 3px 0; background: var(--dim); }
.pot.p1 .bar { background: var(--accent); } .pot.p2 .bar { background: var(--warn); } .pot.p3 .bar { background: var(--line-2); }
.pot .kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pot .titel { font-weight: 600; letter-spacing: -.005em; }
.pot .text { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.pot .aktion { margin-top: 7px; font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.pot .aktion::before { content: '→'; font-family: var(--mono); color: var(--accent); }
.pot .knoepfe { display: flex; gap: 6px; align-items: flex-start; }
.ki { display: grid; gap: 0; }
.ki .abschnitt { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.ki .abschnitt:last-child { border-bottom: 0; }
.ki h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ki .zeile { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.ki .zeile span:first-child { font: 500 10.5px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ki .zeile.tun { color: var(--text); } .ki .zeile.tun span:first-child { color: var(--accent); }
.ki .fazit { background: var(--accent-soft); }
.gruppe { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 16px 6px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }

/* Trichter & Verteilung */
.stufen { display: grid; gap: 9px; padding: 14px; }
.stufe { display: grid; grid-template-columns: 116px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.stufe .n { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stufe .b { height: 8px; background: var(--raise); border-radius: 2px; overflow: hidden; }
.stufe .b i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.stufe .w { font: 500 12px/1 var(--mono); text-align: right; } .stufe .w small { color: var(--muted); font-weight: 400; margin-left: 5px; }
.vert .stufe { grid-template-columns: minmax(90px, 140px) 1fr 44px; }
.vert .stufe .b i { background: color-mix(in srgb, var(--accent) 70%, var(--text) 0%); }

/* Pipeline */
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); }
.pipe > div { padding: 14px 16px; border-right: 1px solid var(--line); position: relative; }
.pipe > div:last-child { border-right: 0; }
.pipe .wert { font: 500 26px/1.1 var(--mono); margin-top: 8px; }
.pipe .quote { font: 11px/1 var(--mono); color: var(--muted); margin-top: 4px; }
.pipe > div.voll { background: var(--accent-soft); }

/* Balkendiagramm */
.chart { padding: 12px 14px 8px; }
.chart svg { display: block; width: 100%; height: 150px; }
.chart .bar { fill: var(--accent); opacity: .8; } .chart .bar:hover { opacity: 1; }
.chart .bar2 { fill: var(--warn); }
.chart .gl { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.achse { display: flex; justify-content: space-between; font: 10.5px/1 var(--mono); color: var(--muted); padding: 6px 2px 0; }
.legende { display: flex; gap: 14px; font: 11px/1 var(--mono); color: var(--muted); } .legende i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--accent); vertical-align: -1px; } .legende i.w { background: var(--warn); }

/* Tabellen */
.tab { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td input, td select { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 5px 6px; outline: none; }
td input:hover, td select:hover { border-color: var(--line); }
td input:focus, td select:focus { border-color: var(--accent-line); background: var(--panel-2); }
td select option { background: var(--panel); }

/* Chats */
.chatlayout { display: grid; grid-template-columns: 340px minmax(0, 1fr) 280px; height: calc(100vh - 150px); min-height: 520px; padding: 0; overflow: hidden; }
.chatlayout > * { min-height: 0; }
.chatliste { border-right: 1px solid var(--line); overflow-y: auto; }
.chatliste .li { padding: 11px 14px; }
.chatliste .li .t { display: flex; gap: 6px; align-items: center; }
.chatliste .li .t span:first-child { overflow: hidden; text-overflow: ellipsis; }
.fenster { display: flex; flex-direction: column; min-width: 0; }
.fenster .ph { flex: none; }
.verlauf { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.blase { max-width: min(560px, 78%); padding: 8px 11px 6px; border-radius: 8px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; position: relative; border: 1px solid var(--line); }
.blase.user { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 2px; }
.blase.assistant { align-self: flex-end; background: var(--bubble-out); border-color: var(--bubble-out-line); border-top-right-radius: 2px; }
.blase small { display: block; text-align: right; font: 10px/1 var(--mono); color: var(--muted); margin-top: 5px; }
.blase .nrTag { font: 500 10px/1 var(--mono); color: var(--accent); display: block; margin-bottom: 4px; }
.sys { align-self: center; font: 11px/1 var(--mono); color: var(--muted); padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 20px; margin: 4px 0; }
.sys.anruf { color: var(--accent); border-color: var(--accent-line); }
.tagTrenner { align-self: center; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.chatmeta { border-left: 1px solid var(--line); overflow-y: auto; }
.chatmeta dl { margin: 0; display: grid; gap: 0; }
.chatmeta dl > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chatmeta dt { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.chatmeta dd { margin: 0; font-size: 13px; word-break: break-word; }
.zurueck { display: none; }

/* Demo-Block */
.demoKopf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.demoKopf > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.demoKopf > div:last-child { border-right: 0; }
.demoKopf b { display: block; font: 500 22px/1.2 var(--mono); margin-top: 6px; }
.stunden { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 46px; }
.stunden i { background: var(--accent); opacity: .75; border-radius: 1px; min-height: 1px; }
.fragenListe .li .t { white-space: normal; font-weight: 400; }

/* Hinweise */
.hinweis { padding: 10px 14px; border-radius: 5px; font-size: 13.5px; border: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 10px; }
.hinweis::before { content: ''; width: 3px; border-radius: 2px; background: var(--muted); flex: none; }
.hinweis.rot::before { background: var(--bad); } .hinweis.gelb::before { background: var(--warn); } .hinweis.info::before { background: var(--info); } .hinweis.gruen::before { background: var(--ok); }

/* System */
.check { display: grid; grid-template-columns: 10px minmax(160px, 240px) 1fr minmax(160px, 300px); gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check .dot { margin: 0; }
.hist { display: flex; gap: 2px; height: 18px; align-items: stretch; justify-content: flex-end; }
.hist i { width: 3px; border-radius: 1px; background: var(--ok); opacity: .8; } .hist i.n { background: var(--bad); opacity: 1; } .hist i.u { background: var(--dim); }

/* Formulare */
.feld { display: grid; gap: 6px; }
.feld label { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.feld input, .feld textarea, .feld select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; outline: none; }
.feld input:focus, .feld textarea:focus { border-color: var(--accent-line); }
.feld .hilfe { font-size: 12px; color: var(--muted); }
.form { display: grid; gap: 16px; padding: 16px; max-width: 640px; }
.schalter { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.schalter input { width: 32px; height: 18px; appearance: none; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; position: relative; cursor: pointer; transition: background .15s; }
.schalter input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.schalter input:checked { background: var(--accent-soft); border-color: var(--accent-line); } .schalter input:checked::after { transform: translateX(14px); background: var(--accent); }
.fehler { color: var(--bad); font-size: 13px; min-height: 18px; }
.ok-text { color: var(--ok); font: 12px var(--mono); }

/* Kosten */
.kostenbalken { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--raise); }
.kostenbalken i { display: block; height: 100%; }
.kat-leg { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; margin-top: 12px; font-size: 12.5px; }
.kat-leg div { display: flex; gap: 8px; align-items: center; } .kat-leg i { width: 9px; height: 9px; border-radius: 2px; flex: none; } .kat-leg b { margin-left: auto; font: 500 12px var(--mono); }
.strahl { display: grid; }
.strahl .li .z { min-width: 86px; }
tr.offen td:nth-child(2) input { color: var(--warn); }

/* Anmelden */
.anmelden { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.anmelden form { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 26px; display: grid; gap: 16px; }
.anmelden h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.anmelden .qr { background: #fff; padding: 10px; border-radius: 6px; justify-self: center; }
.anmelden .code { font: 13px var(--mono); word-break: break-all; background: var(--panel-2); border: 1px solid var(--line); padding: 8px 10px; border-radius: 5px; }
.skel { height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--raise), var(--hover), var(--raise)); background-size: 200% 100%; animation: skel 1.2s infinite; } @keyframes skel { to { background-position: -200% 0; } }

/* ---------- Responsiv ---------- */
@media (max-width: 1360px) { .chatlayout { grid-template-columns: 300px minmax(0, 1fr); } .chatlayout .chatmeta { display: none; } .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } .kpi .wert { font-size: 26px; } }
@media (max-width: 1100px) { .r21, .r12, .r3 { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpi:nth-child(3) { border-right: 0; } .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); } .demoKopf { grid-template-columns: repeat(3, 1fr); } .demoKopf > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 20; border-right: 0; border-top: 1px solid var(--line); flex-direction: row; padding-bottom: env(safe-area-inset-bottom); }
  .brand, .railFuss, .nav .sep { display: none; }
  .nav { display: flex; overflow-x: auto; padding: 6px; gap: 2px; width: 100%; scrollbar-width: none; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 10px; font-size: 10.5px; min-width: 64px; align-items: center; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav .badge { position: absolute; top: 2px; right: 6px; margin: 0; padding: 2px 4px; font-size: 9.5px; }
  .top { padding: 12px 16px; flex-wrap: wrap; gap: 10px; } .top .rechts { width: 100%; margin: 0; } .top .rechts .seg { flex: 1; } .top .rechts .seg button { flex: 1; }
  main#m { padding: 14px 16px 110px; }
  .r2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi { border-bottom: 1px solid var(--line); } .kpi:nth-child(odd) { border-right: 1px solid var(--line); } .kpi:nth-child(even) { border-right: 0; } .kpi:nth-child(3) { border-right: 1px solid var(--line); }
  .pipe { grid-template-columns: repeat(2, 1fr); } .pipe > div { border-bottom: 1px solid var(--line); }
  .chatlayout { grid-template-columns: 1fr; height: calc(100vh - 230px); }
  .chatlayout.offen .chatliste { display: none; } .chatlayout:not(.offen) .fenster { display: none; }
  .zurueck { display: inline-flex; }
  .check { grid-template-columns: 10px 1fr; } .check .info, .check .hist { grid-column: 2; justify-content: flex-start; }
  .stufe { grid-template-columns: 96px 1fr 56px; }
  .demoKopf { grid-template-columns: repeat(2, 1fr); }
  .ki .zeile { grid-template-columns: 1fr; gap: 2px; }
}

/* v5.1 */
.kpi .unter span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sysmini { display: grid; grid-template-columns: 1fr 1fr; }
.sysmini a { display: flex; gap: 8px; align-items: center; padding: 9px 14px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sysmini a:nth-child(odd) { border-right: 1px solid var(--line); }
.sysmini a:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.sysmini .dot { margin: 0; }
td.num { white-space: nowrap; }
tr.katZeile td { background: var(--panel-2); font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); padding: 10px 12px; }
tr.katZeile:hover td { background: var(--panel-2); }
.kq { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
table.edit { min-width: 1320px; }
table.edit td:nth-child(1) { width: 220px; } table.edit td:nth-child(2) { width: 100px; } table.edit td:nth-child(3) { width: 90px; } table.edit td:nth-child(4) { width: 120px; } table.edit td:nth-child(5) { width: 110px; } table.edit td:nth-child(6) { width: 180px; } table.edit td:nth-child(7) { width: 150px; } table.edit td:nth-child(8) { width: 80px; }
@media (max-width: 900px) { .pot { grid-template-columns: 4px 1fr; } .pot .knoepfe { grid-column: 2; margin-top: 10px; } .sysmini { grid-template-columns: 1fr; } .sysmini a:nth-child(odd) { border-right: 0; } }
