/* Ergänzungen zum Prototyp-Design: Anmeldung, Dialoge, Feedback, Ideen, Änderungen, Benutzer, Audio. */
:root { --good-2: #86CF9F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --good-2: #24683A; } }
:root[data-theme="dark"] { --good-2: #24683A; }
.stack-legend.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ico { display: inline-flex; flex: none; }
.ico svg { display: block; }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--muted); }
.boot .wordmark { font-size: 28px; }
.boot-l { font-size: 13px; }

.att-list { max-height: 318px; }

/* Kopfzeile: oben Marke und Bedienung, darunter die Bereiche */
.topbar-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding-bottom: 8px; }
.topbar-in .brand { grid-column: 1; grid-row: 1; }
.topbar-in .tb-right { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.topbar-in .variants { grid-column: 1 / -1; grid-row: 2; margin-left: 0; justify-self: start; }
.variants button { display: inline-flex; align-items: center; gap: 6px; }
.nbadge { background: var(--accent); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.theme-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; color: var(--ink-2); }
.pill-stand { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fb-quick { display: inline-flex; align-items: center; gap: 6px; }
.uwrap { position: relative; }
.ubtn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.av { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; letter-spacing: .02em; }
.umenu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 240px; z-index: 60; display: flex; flex-direction: column; }
.umenu[hidden] { display: none; }
.um-h { padding: 8px 10px 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; }
.um-h .muted { font-size: 12px; }
.um-theme { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-i { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 13px; color: var(--ink-2); }
.um-i:hover { background: var(--surface-2); }

/* Formulare */
.inp { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--ink); }
textarea.inp { resize: vertical; line-height: 1.5; min-height: 70px; }
.inp:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.inp.mono, .mono.inp { font-family: var(--f-mono); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .flabel { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fhint { font-size: 12px; color: var(--muted); }
.ferr { color: var(--bad-ink); font-size: 13px; min-height: 0; }
.ferr:empty { display: none; }
.two-f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chk input { margin-top: 3px; accent-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn.primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.btn.danger { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.big { padding: 11px 16px; font-size: 14.5px; font-weight: 600; }
.btn:disabled { opacity: .55; cursor: default; }
.linkbtn.danger { color: var(--bad-ink); display: inline-flex; align-items: center; gap: 4px; }
.icon-btn { border: 0; background: var(--surface-3); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--line); }

/* Anmeldung */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 15% -10%, var(--primary-wash), transparent 60%), radial-gradient(900px 500px at 110% 110%, var(--accent-wash), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 30px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.login-card .wordmark { font-size: 24px; }
.login-card h1 { font-size: 26px; font-weight: 800; margin-top: 6px; }
.login-card > p { margin: -6px 0 6px; font-size: 13.5px; }
.login-foot { font-size: 12px; margin: 4px 0 0; text-align: center; }

/* Dialog */
.modal-scrim { z-index: 95; }
.modal { position: fixed; z-index: 96; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(760px, calc(100% - 24px)); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 18px; font-weight: 750; }
.modal-h .dr-close { margin-left: auto; }
.modal-b { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-b p { margin: 0; font-size: 14px; color: var(--ink-2); }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-f .btn.danger { margin-right: auto; }

/* Toast */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); transition: opacity .3s, transform .3s; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* Hinweise */
.notice { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.notice .ico { margin-top: 2px; color: var(--primary-ink); }
.notice.acc { background: var(--accent-wash); border-color: transparent; }
.notice.acc .ico { color: var(--accent-ink); }
.page > .notice { margin-bottom: 14px; }
.kpi.na .val { color: var(--faint); }
.kpi .lab { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; overflow-wrap: anywhere; }
.kpi .lab .badge-int { margin-left: 0 !important; }
.kpi .sub .internal { font-size: 11.5px; }
.share { font-size: 12px; font-weight: 500; }
.src .k.kw, .k.kw { background: var(--good-wash); color: var(--good-ink); }
.src-chip { font-family: var(--f-body); letter-spacing: 0; text-transform: none; font-size: 10.5px; font-weight: 500; background: var(--surface-3); border-radius: 6px; padding: 1px 6px; margin-left: 8px; color: var(--muted); }
.chip.internal-chip { background: var(--accent-wash); color: var(--accent-ink); }
/* lange Hinweistexte (z. B. Grund aus dem Datenfeld „kritisch“) dürfen umbrechen */
.chip { max-width: 100%; }
.conv .chips .chip, .att .as .chip, .fb-m .chip { white-space: normal; line-height: 1.35; padding-top: 3px; padding-bottom: 3px; }
.chip.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chips-row { gap: 6px !important; }

/* Gespräch: Aktionen, Audio, Transkript */
.conv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.audio.live { gap: 10px; padding: 8px 10px; }
.audio.live .ico { color: var(--primary-ink); }
.audio.live audio { flex: 1; min-width: 0; height: 36px; }
.msg { position: relative; }
.msg .ts { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--primary-ink); font-variant-numeric: tabular-nums; text-decoration: underline dotted; text-underline-offset: 2px; }
.msg .fb-btn { position: absolute; top: 6px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.msg.user .fb-btn { right: -32px; }
.msg.agent .fb-btn { left: -32px; }
.msg:hover .fb-btn, .msg .fb-btn:focus-visible { opacity: 1; }
.msg .fb-btn:hover { color: var(--accent-ink); border-color: var(--accent); }
@media (hover: none) { .msg .fb-btn { opacity: .75; } }
.fb-mini { display: flex; flex-direction: column; gap: 4px; }
.fb-mini-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 10px; text-align: left; font-size: 13px; }
.fb-mini-row:hover { background: var(--surface-2); }
.fb-mini-row .fbt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
dl.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 12.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Feedback-Formular */
.type-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.tp { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.tp[aria-checked="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--primary); }
.tp.bad .ico { color: var(--bad-ink); } .tp.warn .ico { color: var(--warn-ink); } .tp.acc .ico { color: var(--accent-ink); } .tp.info .ico { color: var(--primary-ink); } .tp.good .ico { color: var(--good-ink); }
.fb-ctx { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; text-align: left; border: 0; width: 100%; color: inherit; }
.fb-ctx .ico { margin-top: 2px; color: var(--primary-ink); }
.fb-ctx .muted { font-size: 12px; }
.fb-ctx.linkish:hover { background: var(--surface-3); }
.fb-quote { margin: 8px 0 0; padding: 9px 12px; border-left: 3px solid var(--accent); background: var(--accent-wash); border-radius: 0 10px 10px 0; font-size: 13px; color: var(--ink); }
.fb-quote .who { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 2px; }
.fb-body { white-space: pre-wrap; font-size: 14px; color: var(--ink); line-height: 1.55; }
.fb-body.rich { white-space: normal; }
.fb-body.rich p { margin: 0 0 10px; }
.fb-body.rich p:last-child { margin-bottom: 0; }

/* Feedback: Liste */
.head-x.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.head-x.row h1 { font-size: 26px; font-weight: 800; }
.head-x.row p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.fb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.fb-side { display: flex; flex-direction: column; gap: 12px; }
.sh3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.fb-stats { display: flex; flex-direction: column; gap: 8px; }
.fb-stats > div { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.fb-list { display: flex; flex-direction: column; margin-top: 8px; }
.fb-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; border: 0; background: transparent; text-align: left; padding: 12px; margin: 0 -12px; border-radius: 12px; width: calc(100% + 24px); }
.fb-row + .fb-row { box-shadow: 0 -1px 0 var(--line); }
.fb-row:hover { background: var(--surface-2); box-shadow: none; }
.fb-row:hover + .fb-row { box-shadow: none; }
.fb-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.fb-ic.bad { background: var(--bad-wash); color: var(--bad-ink); } .fb-ic.warn { background: var(--warn-wash); color: var(--warn-ink); } .fb-ic.acc { background: var(--accent-wash); color: var(--accent-ink); } .fb-ic.info { background: var(--primary-wash); color: var(--primary-ink); } .fb-ic.good { background: var(--good-wash); color: var(--good-ink); }
.fb-t { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.fb-row.unread .fb-t { font-weight: 750; }
.fb-m { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.fb-m .ico svg { width: 12px; height: 12px; }
.fb-m > span { display: inline-flex; align-items: center; gap: 3px; }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; display: inline-block; }

/* Detail */
.vote-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vote { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.vote b { font-variant-numeric: tabular-nums; }
.vote:hover { border-color: var(--primary); }
.vote.on { background: var(--primary-wash); border-color: transparent; color: var(--primary-ink); }
.vote.sm { padding: 3px 9px; font-size: 12px; }
.ev-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.ev-metrics > div { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; }
.ev-metrics .mv { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.ev-metrics .ml { font-size: 11.5px; color: var(--muted); }
.r2box { background: var(--accent-wash); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.r2box h4 { margin-bottom: 0 !important; }
.r2grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r2grid .select { width: 100%; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cmt { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.cmt.r2 { background: var(--primary-wash); }
.cmt.internal-c { background: var(--accent-wash); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.cmt-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 4px; }
.cmt-h .av { width: 22px; height: 22px; font-size: 9.5px; }
.cmt-b { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; }
.hist { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); padding: 0 4px; }
.cmt-form { display: flex; flex-direction: column; gap: 8px; }
.cmt-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Ideen-Board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.bcol { background: var(--surface-3); border-radius: var(--radius); padding: 12px; min-width: 0; }
.bcol-h { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 10px; flex-wrap: wrap; }
.bcol-h h3 { font-size: 15px; font-weight: 750; }
.bcol-h .n { font-size: 12px; font-weight: 700; background: var(--surface); border-radius: 999px; padding: 0 7px; }
.bcol-h .muted { font-size: 12px; }
.bcol-b { display: flex; flex-direction: column; gap: 8px; }
.icard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; box-shadow: var(--shadow); text-align: left; }
.icard:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.icard.draft { border-style: dashed; }
.icard.unread { box-shadow: 0 0 0 2px var(--accent-wash), var(--shadow); }
.icard-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.icard-t { font-weight: 650; font-size: 14px; line-height: 1.35; }
.icard-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.icard-f .muted { display: inline-flex; align-items: center; gap: 3px; }
.icard-f .push { margin-left: auto; }
.empty.small { padding: 14px 0; }
details.rejected { margin-top: 12px; }
details.rejected summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 10px; }

/* Änderungen */
.timeline { display: flex; flex-direction: column; gap: 14px; position: relative; }
.tl-item { display: grid; grid-template-columns: 64px 14px minmax(0, 1fr); gap: 12px; align-items: start; }
.tl-date { text-align: right; padding-top: 16px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; line-height: 1.2; }
.tl-date b { font-size: 15px; }
.tl-date span { font-size: 12px; color: var(--muted); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-top: 20px; box-shadow: 0 0 0 4px var(--accent-wash); position: relative; }
.timeline::before { content: ''; position: absolute; left: 82px; top: 24px; bottom: 24px; width: 2px; background: var(--line); }
.tl-card { display: flex; flex-direction: column; gap: 8px; }
.tl-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-h h3 { font-size: 16px; font-weight: 750; }
.tl-act { margin-left: auto; }
.tl-text { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.tl-fb { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.internal-item .tl-card { border-style: dashed; }
.eff { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.eff-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.eff-h .muted { letter-spacing: 0; text-transform: none; font-weight: 400; }
.eff-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 18px; }
.eff-r { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px auto; gap: 6px; align-items: baseline; font-size: 13px; padding: 3px 0; }
.eff-r .el { color: var(--ink-2); padding-right: 8px; }
.eff-r .ev { min-width: 44px; text-align: right; }
.eff-r .ev.b { font-weight: 650; }
.eff-r .ea { color: var(--faint); text-align: center; }
.eff-r .delta.up { color: var(--good-ink); } .eff-r .delta.down { color: var(--bad-ink); } .eff-r .delta.flat { color: var(--ink); }
.vlist { display: flex; flex-direction: column; gap: 6px; }
.vrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.vrow code { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.vrow .btn { margin-left: auto; }
.fb-pick { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }

/* Benutzer */
.maptable.users { min-width: 680px; }
.maptable.users td { vertical-align: middle; }
.maptable.users td.r { text-align: right; }
.maptable.users tr.inactive td { opacity: .5; }
.v-users .notice { margin-top: 12px; }

/* Datenquellen */
.sync-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.mini-kpis.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ref { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.ref-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.ref-c .rv { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.ref-c .rl { font-size: 13px; color: var(--ink-2); }

/* Responsiv */
@media (max-width: 1180px) { .fb-grid { grid-template-columns: minmax(0, 1fr); } .board { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .pill-stand { display: none; } .fb-quick .long { display: none; } .ubtn .un { display: none; } .ubtn { padding: 3px; } }
@media (max-width: 620px) {
  .two-f, .r2grid { grid-template-columns: minmax(0, 1fr); }
  .mini-kpis.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-item { grid-template-columns: 46px 12px minmax(0, 1fr); gap: 8px; }
  .timeline::before { left: 59px; }
  .msg { max-width: calc(100% - 34px); }
  .msg.user .fb-btn { right: -30px; } .msg.agent .fb-btn { left: -30px; }
  dl.kv { grid-template-columns: minmax(0, 1fr); }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
}

/* Aufgaben */
.task-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.task-kpi.acc .val { color: var(--accent-ink); } .task-kpi.warn .val { color: var(--warn-ink); } .task-kpi.good .val { color: var(--good-ink); }
.task-list { display: flex; flex-direction: column; }
.task-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 0; background: transparent; text-align: left; padding: 12px; margin: 0 -12px; border-radius: 12px; width: calc(100% + 24px); }
.task-row + .task-row { box-shadow: 0 -1px 0 var(--line); }
.task-row:hover { background: var(--surface-2); box-shadow: none; }
.task-row:hover + .task-row { box-shadow: none; }
.task-row.done { opacity: .78; }
.task-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.task-ic.acc { background: var(--accent-wash); color: var(--accent-ink); } .task-ic.warn { background: var(--warn-wash); color: var(--warn-ink); } .task-ic.good { background: var(--good-wash); color: var(--good-ink); }
.task-t { font-weight: 650; font-size: 14px; }
.task-m { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; margin-top: 5px; font-size: 12px; }
.task-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 5px 8px; }
.task-note .ico { margin-top: 2px; color: var(--muted); }
.task-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; text-align: right; white-space: nowrap; }
.task-side b { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.warn-t { color: var(--warn-ink); font-weight: 600; } .good-t { color: var(--good-ink); }
.task-panel { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.task-panel.open { background: var(--accent-wash); border-color: transparent; }
.task-panel.done { background: var(--good-wash); border-color: transparent; }
.tp-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.tp-h .ico { color: var(--accent-ink); }
.tp-done { margin: 0; font-size: 13px; color: var(--ink-2); }
.tp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tp-hist { display: flex; flex-direction: column; gap: 6px; }
.tp-ev { font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tp-note { flex-basis: 100%; color: var(--ink-2); background: var(--surface); border-radius: 8px; padding: 5px 8px; white-space: pre-wrap; }
.nbadge.task { background: var(--warn); }

/* Testanruf */
.test-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.call-card { display: flex; flex-direction: column; gap: 10px; }
.call-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.call-btn { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 22px; font-size: 15px; font-weight: 650; color: #fff; box-shadow: var(--shadow); }
.call-btn.go { background: var(--good); } .call-btn.go:hover { background: var(--good-ink); }
.call-btn.hang { background: var(--bad); } .call-btn.hang:hover { background: var(--bad-ink); }
.call-btn .ico svg { width: 18px; height: 18px; }
.call-info { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.call-status { font-weight: 600; }
.call-timer { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.call-meter { width: 180px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.call-meter b { display: block; height: 100%; width: 0; background: var(--good); transition: width .1s; }
.call-hint { font-size: 12.5px; margin: 0; }
.call-lines { max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.call-wait { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.call-res { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.call-res p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.cr-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scen { display: flex; flex-direction: column; gap: 8px; }
.scen-i { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13px; color: var(--ink-2); }
.scen-i .chip { justify-content: center; }
.test-list .conv[disabled] { cursor: default; opacity: .7; }
@media (max-width: 1180px) { .test-grid { grid-template-columns: minmax(0, 1fr); } .task-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .task-row { grid-template-columns: 30px minmax(0, 1fr); } .task-side { grid-column: 2; align-items: flex-start; text-align: left; } .scen-i { grid-template-columns: minmax(0, 1fr); } }

/* Chat-Demo: Website-Vorschau mit Chatfenster. Das Fenster sitzt auf einer hellen Website und hat deshalb feste helle Farben. */
.chat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
@media (max-width: 1180px) { .chat-grid { grid-template-columns: minmax(0, 1fr); } }
.chat-stage { padding: 12px; }
.chat-cap { font-size: 12px; margin: 8px 2px 0; }
.site-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.site-bar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.site-dots { display: inline-flex; gap: 6px; }
.site-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.site-url { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.site-view { position: relative; height: clamp(600px, 56vw, 820px); background: #fff url('/app/assets/mifuma-vorschau.jpg') center top / cover no-repeat; }

.mw { position: absolute; top: 24px; right: 24px; bottom: 24px; max-width: calc(100% - 32px); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 12px; pointer-events: none; font-size: 14px; line-height: 1.45; color: #3c3e42; }
.mw > * { pointer-events: auto; }
.mw-panel { width: 420px; max-width: 100%; flex: 0 1 660px; min-height: 0; display: flex; flex-direction: column; background: #fff; box-shadow: 0 18px 48px rgba(20, 22, 26, .22), 0 2px 6px rgba(20, 22, 26, .08); overflow: hidden; }
.mw-launch { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; box-shadow: 0 8px 22px rgba(20, 22, 26, .25); }
.mw-launch svg { width: 24px; height: 24px; }
.mw-teaser { background: #fff; padding: 8px 14px; font-weight: 500; box-shadow: 0 6px 18px rgba(20, 22, 26, .16); }
.mw-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid #e3e4e5; }
.mw-av { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; }
.mw-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.mw-title b { font-size: 15px; color: #2d2f33; }
.mw-title span { font-size: 12px; color: #77797d; }
.mw-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #77797d; white-space: nowrap; }
.mw-status i { width: 7px; height: 7px; border-radius: 50%; background: #b6b8bb; }
.mw-status.on i { background: #1fa35b; }
.mw-status.wait i { background: #e0a100; }
.mw-x { border: 0; background: none; color: #77797d; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; flex: none; }
.mw-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.mw-row { display: flex; }
.mw-row.user { justify-content: flex-end; }
.mw-b { max-width: 86%; padding: 9px 12px; overflow-wrap: anywhere; }
.mw-b p { margin: 0; }
.mw-b p + p { margin-top: 8px; }
.mw-b a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mw-info { align-self: center; text-align: center; font-size: 12px; color: #77797d; background: #f4f5f5; padding: 6px 10px; }
.mw-hello { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: #55575b; font-size: 13.5px; }
.mw-hello p { margin: 0; }
.mw-start, .mw-new { display: inline-flex; align-items: center; gap: 8px; border: 0; color: #fff; padding: 0 14px; height: 40px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.mw-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.mw-typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; animation: mwdot 1.2s infinite ease-in-out; }
.mw-typing i:nth-child(2) { animation-delay: .15s; }
.mw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mwdot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-3px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .mw-typing i { animation: none; } }
.mw-quick { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.mw-quick::-webkit-scrollbar { display: none; }
.mw-quick button { flex: none; font: inherit; font-size: 12.5px; padding: 6px 10px; cursor: pointer; background: #fff; white-space: nowrap; }
.mw-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid #e3e4e5; }
.mw-input { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.4; padding: 9px 11px; border: 1px solid #c9cacb; background: #fff; color: #2d2f33; max-height: 110px; }
.mw-input:focus { outline: none; border-color: #54565a; }
.mw-send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; color: #fff; cursor: pointer; }
.mw-send svg { width: 18px; height: 18px; }
.mw-send:disabled, .mw-input:disabled { opacity: .55; cursor: default; }
.mw-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 12px 9px; font-size: 11px; color: #8a8c8f; }
.mw-end { border: 0; background: none; color: #77797d; text-decoration: underline; font-size: 11px; cursor: pointer; padding: 0; white-space: nowrap; }
.mw :focus-visible { outline: 2px solid #2d2f33; outline-offset: 2px; }

/* Look „Mifuma“: Hausfarben der Website, eckige Buttons, NeoSans (hier ersetzt) */
.mw-mifuma { font-family: NeoSans, 'Ubuntu', Arial, Helvetica, sans-serif; }
.mw-mifuma .mw-panel { border-top: 4px solid #e2001a; }
.mw-mifuma .mw-launch, .mw-mifuma .mw-send, .mw-mifuma .mw-new, .mw-mifuma .mw-start, .mw-mifuma .mw-av { background: #e2001a; border-radius: 0; }
.mw-mifuma .mw-b.agent { background: #edeeee; color: #54565a; }
.mw-mifuma .mw-b.agent a { color: #e2001a; }
.mw-mifuma .mw-b.user { background: #54565a; color: #fff; }
.mw-mifuma .mw-quick button { border: 1px solid #e2001a; color: #e2001a; }
.mw-mifuma .mw-quick button:hover { background: #e2001a; color: #fff; }
.mw-mifuma .mw-teaser { border-left: 4px solid #e2001a; color: #54565a; }

/* Look „Neutral“: runde Formen, Blau */
.mw-neutral { font-family: var(--f-body); }
.mw-neutral .mw-panel { border-radius: 18px; }
.mw-neutral .mw-launch { border-radius: 50%; background: #1b77e8; }
.mw-neutral .mw-av { border-radius: 50%; background: #1b77e8; }
.mw-neutral .mw-send { border-radius: 50%; background: #1b77e8; }
.mw-neutral .mw-new, .mw-neutral .mw-start { border-radius: 12px; background: #1b77e8; }
.mw-neutral .mw-b { border-radius: 16px; }
.mw-neutral .mw-b.agent { background: #f1f3f7; color: #1f2937; border-bottom-left-radius: 4px; }
.mw-neutral .mw-b.agent a { color: #1563c4; }
.mw-neutral .mw-b.user { background: #1b77e8; color: #fff; border-bottom-right-radius: 4px; }
.mw-neutral .mw-quick button { border: 1px solid #d5dbe5; color: #1f2937; border-radius: 999px; }
.mw-neutral .mw-quick button:hover { border-color: #1b77e8; color: #1563c4; }
.mw-neutral .mw-input { border-radius: 12px; }
.mw-neutral .mw-teaser { border-radius: 14px; }
.mw-neutral .mw-info { border-radius: 10px; }

.chat-side { margin-top: 12px; padding: 0; }
.chat-side summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 18px; cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
.chat-side summary::-webkit-details-marker { display: none; }
.chat-side summary::before { content: '▸'; color: var(--muted); }
.chat-side[open] summary::before { content: '▾'; }
.chat-side summary .muted { font-weight: 400; font-size: 13px; }
.chat-side-in { padding: 0 18px 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.chat-side-in .sh3 { grid-row: 1; margin: 0 0 8px !important; }
.chat-side-in .chat-list { grid-row: 2; }
.chat-side-in .mw-swatches { grid-column: 3; grid-row: 3; }
@media (max-width: 900px) { .chat-side-in { grid-template-columns: minmax(0, 1fr); } .chat-side-in > * { grid-row: auto !important; grid-column: auto !important; } .chat-side-in .sh3 { margin-top: 12px !important; } }
.chat-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.mw-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mw-swatch { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.mw-swatch i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .12); }
@media (max-width: 560px) {
  .site-view { height: 600px; background-position: 30% top; }
  .mw { top: 10px; right: 10px; bottom: 10px; max-width: calc(100% - 20px); }
}

/* Änderungs-Marker in Diagrammen */
.ev-mark { cursor: help; outline: none; }
.ev-mark:focus-visible circle:first-child { stroke: var(--ink); stroke-width: 2; }
.ev-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.ev-li { display: inline-flex; align-items: center; gap: 6px; }
.ev-li b { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 9.5px; display: inline-grid; place-items: center; flex: none; }
.ev-d { color: var(--muted); font-variant-numeric: tabular-nums; }
.tip .t-r b:empty { display: none; }

/* Ideen-Board: Karten zwischen den Spalten ziehen (nur R2) */
.board-hint { font-size: 12.5px; margin: -6px 0 10px; }
.board.dnd .icard { cursor: grab; }
.board.dnd .icard.dragging { opacity: .45; cursor: grabbing; }
.bcol { transition: background .12s, box-shadow .12s; }
.bcol.drop { background: var(--primary-wash); box-shadow: inset 0 0 0 2px var(--primary); }
