:root {
  --brand: #1b5bad;
  --brand-ink: #0f3c78;
  --brand-soft: #e8f0fb;
  --green: #2f9e63;
  --green-soft: #e3f4ea;
  --amber: #b7791f;
  --amber-soft: #fdf3dc;
  --red: #c53030;
  --red-soft: #fde8e8;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #18202c;
  --ink-2: #4a5568;
  --ink-3: #8a94a6;
  --line: #e3e7ee;
  --side-bg: #0f1b2d;
  --side-ink: #c9d3e3;
  --side-ink-2: #7c8aa3;
  --side-hover: #18273f;
  --side-active: #1b5bad;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5b93e0; --brand-ink: #a9c8f2; --brand-soft: #1a2a42;
    --green: #4cc38a; --green-soft: #15302a; --amber: #e0a84a; --amber-soft: #33281a;
    --red: #f07272; --red-soft: #3a1d22;
    --bg: #0d131c; --panel: #151d29; --ink: #e6ebf2; --ink-2: #aab4c3; --ink-3: #6f7b8f; --line: #243042;
    --side-bg: #0a0f17; --side-hover: #141d2b;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
h2 small, h3 small { font-weight: 450; color: var(--ink-3); font-size: 12px; margin-left: 4px; }
h3 { font-size: 13px; font-weight: 650; margin: 14px 0 6px; }
p { margin: 0 0 8px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.pad { padding: 12px 16px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.neg { color: var(--red); font-weight: 600; }
.warn { color: var(--amber); }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { width: 100%; resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 450; color: var(--ink); }
kbd { font: 11px var(--mono); padding: 1px 5px; border-radius: 4px; border: 1px solid #2a3a55; color: var(--side-ink-2); }

.btn-primary, .btn-ghost, .btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px;
  padding: 8px 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.sm { padding: 5px 10px; font-size: 12.5px; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-size: 12.5px; }
.linkish.danger { color: var(--red); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 4px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 300px 1fr; height: 100vh; }
.sidebar { background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: #fff; display: grid; place-items: center; }
.brand-mark img { width: 20px; height: 20px; filter: invert(27%) sepia(68%) saturate(1500%) hue-rotate(198deg) brightness(88%); }
.brand-mark.lg { width: 52px; height: 52px; border-radius: 12px; background: var(--brand); }
.brand-mark.lg img { width: 32px; height: 32px; filter: brightness(0) invert(1); }
.brand-text { font-weight: 700; font-size: 15px; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-weight: 500; color: var(--side-ink-2); font-size: 12px; }
.side-search { margin: 0 14px 10px; position: relative; display: flex; align-items: center; }
.side-search svg { position: absolute; left: 10px; width: 15px; fill: var(--side-ink-2); }
.side-search input { width: 100%; background: #16243a; border: 1px solid #22324d; color: #fff; padding: 8px 34px 8px 32px; border-radius: 8px; }
.side-search input::placeholder { color: var(--side-ink-2); }
.side-search kbd { position: absolute; right: 8px; }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.sidebar .chip { background: transparent; border-color: #22324d; color: var(--side-ink); }
.sidebar .chip.is-on { background: var(--side-active); border-color: var(--side-active); color: #fff; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-weight: 550; }
.chip span { opacity: .7; margin-left: 2px; }
.chip.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.case-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; scrollbar-color: #2a3a55 transparent; }
.case-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none !important; }
.case-item:hover { background: var(--side-hover); }
.case-item.is-active { background: var(--side-active); color: #fff; }
.case-item.is-active .ci-sub { color: #d6e4fa; }
.case-item[hidden] { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--side-ink-2); }
.dot-aktiv { background: #4cc38a; } .dot-neu { background: #5b93e0; } .dot-zahlung { background: #e0a84a; } .dot-abgelehnt { background: #6b7280; }
.ci-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ci-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.ci-sub { font-size: 11.5px; color: var(--side-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-due { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: #1e2e47; color: var(--side-ink); flex: none; }
.ci-due.due-soon { background: #4a3a14; color: #ffd98a; }
.ci-due.due-today { background: #c53030; color: #fff; }
.side-foot { border-top: 1px solid #1c2a40; padding: 10px 14px 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.side-link { color: var(--side-ink-2); font-size: 12.5px; }
.side-link:hover { color: #fff; }
.me { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.me-name { color: #fff; font-weight: 600; display: flex; flex-direction: column; line-height: 1.2; }
.me-name small { color: var(--side-ink-2); font-weight: 450; }
.sidebar .btn-ghost { border-color: #22324d; color: var(--side-ink); }
.sidebar .btn-ghost:hover { background: var(--side-hover); }
.main { overflow-y: auto; padding: 24px 32px 48px; min-width: 0; position: relative; }
.menu-btn, .scrim { display: none; }

/* ---------- generic blocks ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.accent { border-left: 3px solid var(--brand); }
.card.internal { border-style: dashed; }
.card.notice { background: var(--brand-soft); border-color: transparent; }
.card.narrow { max-width: 460px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.page-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; gap: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 650; color: var(--ink-3); margin-bottom: 4px; }
.alert { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.alert.info { background: var(--brand-soft); color: var(--brand-ink); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; }
.b-aktiv, .b-go-go, .b-ja { background: var(--green-soft); color: var(--green); border-color: transparent; }
.b-neu { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.b-zahlung, .b-go-bedingt, .b-unklar { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.b-go-nogo, .b-nein { background: var(--red-soft); color: var(--red); border-color: transparent; }
.hint { font-size: 10.5px; padding: 0 5px; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-weight: 650; cursor: help; }
.missing { font-size: 11.5px; padding: 0 6px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-weight: 600; }
.missing.soft { background: var(--amber-soft); color: var(--amber); }
.tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.tag.t-materiell { background: var(--green-soft); color: var(--green); }
.tag.t-prozessual, .tag.t-taktisch { background: var(--amber-soft); color: var(--amber); }

/* ---------- dashboard ---------- */
.today-banner { background: var(--red-soft); color: var(--red); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.today-banner a { color: var(--red); font-weight: 650; text-decoration: underline; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--ink-3); font-size: 12.5px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.ag { display: grid; grid-template-columns: 128px 70px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ag:last-child { border-bottom: 0; }
.ag-date { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.ag-date small { color: var(--ink-3); font-weight: 450; font-size: 11.5px; }
.ag-today .ag-date, .ag-overdue .ag-date { color: var(--red); }
.ag-soon .ag-date { color: var(--amber); }
.ag-past { opacity: .55; }
.ag-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 1px 6px; border-radius: 4px; justify-self: start; background: var(--bg); color: var(--ink-2); }
.k-termin { background: var(--red-soft); color: var(--red); }
.k-frist { background: var(--amber-soft); color: var(--amber); }
.k-aufgabe { background: var(--brand-soft); color: var(--brand); }

/* ---------- case header ---------- */
.case-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.ch-left { min-width: 0; }
.ch-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ch-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 13px; margin: 0; }
.copy { background: var(--brand-soft); color: var(--brand-ink); border: 0; padding: 1px 8px; border-radius: 6px; font: 600 12.5px var(--mono); cursor: copy; }
.copy-mini { background: none; border: 0; color: var(--ink-3); cursor: copy; padding: 0 2px; }
.copy-mini:hover { color: var(--brand); }
.ch-actions { display: flex; gap: 8px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 8px 4px 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-decoration: none !important; box-shadow: var(--shadow); }
.act svg { width: 20px; height: 20px; fill: currentColor; }
.act:hover { border-color: var(--brand); color: var(--brand); }
.act-phone { color: var(--brand); }
.act-wa { color: #1f9e55; }
.act-wa:hover { border-color: #1f9e55; color: #1f9e55; }
.act-mail { color: var(--brand-ink); }
.act.is-off { opacity: .4; cursor: not-allowed; box-shadow: none; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.kpi-l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650; }
.kpi-v { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.kpi-s { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-alert { border-color: var(--red); background: var(--red-soft); }
.kpi-alert .kpi-v { color: var(--red); }
.meter { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; }
.m-good { background: var(--green); } .m-mid { background: var(--amber); } .m-low { background: var(--red); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--brand); border-bottom-color: var(--brand); }
.count { background: var(--bg); border: 1px solid var(--line); color: var(--ink-3); font-size: 11px; padding: 0 6px; border-radius: 999px; margin-left: 4px; }
.panel { display: none; }
.panel.is-on { display: block; }

/* ---------- overview content ---------- */
.prose { font-size: 14px; line-height: 1.6; }
.bullets { margin: 0; padding-left: 18px; }
.bullets li { margin-bottom: 4px; }
.statusnote { background: var(--bg); padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; white-space: pre-wrap; }
.statusnote.pinned { background: var(--amber-soft); }
.inline-form select { padding: 4px 8px; font-size: 12.5px; }
.attack { margin: 0; padding-left: 20px; }
.attack li { margin-bottom: 10px; }
.attack p { margin: 2px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }
.steps p { margin: 2px 0 0; color: var(--ink-2); }
.step-when { font-weight: 650; font-size: 12.5px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { padding: 5px 0 5px 24px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: "?"; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: 12.5px; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.kv.tight { gap: 4px 10px; font-size: 13px; }
.mini-agenda { list-style: none; margin: 0 0 12px; padding: 0; }
.mini-agenda li { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.mini-agenda li.past { opacity: .5; }
.mini-agenda li.today .ma-date { color: var(--red); font-weight: 700; }
.mini-agenda li.soon .ma-date { color: var(--amber); font-weight: 700; }
.ma-date { font-variant-numeric: tabular-nums; }
.add-task input[name=title] { flex: 1; }
.add-task input[type=date] { width: 140px; }
.sugg li { display: flex; gap: 6px; flex-wrap: wrap; }
details summary { cursor: pointer; color: var(--brand); }

/* ---------- documents ---------- */
.docs { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; height: calc(100vh - 300px); min-height: 520px; }
.doc-list { overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 8px; }
.doc-tools { position: sticky; top: -10px; background: var(--panel); padding: 0 4px 8px; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.doc-tools input { width: 100%; }
.doc-tools .side-chips { padding: 0; }
.doc-dir { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 12px 6px 4px; }
.filelist { list-style: none; margin: 0; padding: 0; }
.filelist a { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none !important; }
.filelist a:hover { background: var(--bg); }
.filelist a.is-on { background: var(--brand-soft); }
.filelist li[hidden] { display: none; }
.fl-name { display: flex; flex-direction: column; min-width: 0; font-size: 13px; word-break: break-word; }
.fl-name small { color: var(--ink-3); font-size: 11.5px; }
.filelist.compact a { padding: 5px 4px; }
.ftype { flex: none; width: 38px; text-align: center; font: 700 10px var(--mono); text-transform: uppercase; padding: 4px 0; border-radius: 5px; background: var(--bg); color: var(--ink-2); }
.t-pdf { background: #fde8e8; color: #b42318; }
.t-jpg, .t-jpeg, .t-png, .t-webp, .t-gif { background: #e6f4ea; color: #1e7b45; }
.t-eml { background: var(--brand-soft); color: var(--brand); }
.t-md, .t-txt, .t-json { background: #f1ecfb; color: #6b46c1; }
.t-odt, .t-docx, .t-doc { background: #e8f0fb; color: #1b5bad; }
@media (prefers-color-scheme: dark) { .t-pdf, .t-jpg, .t-jpeg, .t-png, .t-webp, .t-gif, .t-md, .t-txt, .t-json, .t-odt, .t-docx { background: var(--bg); } }
.doc-view { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.doc-view .empty-state { margin: auto; }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pv-title { display: flex; flex-direction: column; min-width: 0; word-break: break-word; }
.pv-body { flex: 1; overflow: auto; min-height: 0; }
.pv-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.pv-image { background: repeating-conic-gradient(var(--bg) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; display: flex; align-items: flex-start; justify-content: center; padding: 12px; }
.pv-image img { max-width: 100%; box-shadow: var(--shadow); }
.pv-text, .pv-md, .pv-mail { padding: 16px 20px; }
.pv-text .pre { font: 12.5px/1.55 var(--mono); }

/* ---------- mails, timeline, notes ---------- */
.mails { display: flex; flex-direction: column; gap: 8px; }
.mail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.mail summary { display: grid; grid-template-columns: 130px minmax(0, 220px) 1fr auto; gap: 12px; padding: 10px 14px; color: var(--ink); list-style: none; align-items: baseline; }
.mail summary::-webkit-details-marker { display: none; }
.m-date { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12.5px; }
.m-from { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-att { font-size: 12px; color: var(--ink-3); }
.m-body { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.m-body .pre { max-height: 480px; overflow: auto; background: var(--bg); padding: 12px; border-radius: 8px; margin: 8px 0; }
.att-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 112px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 28px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 103px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brand); }
.tl-date { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; color: var(--brand-ink); }
.tl-body p { margin: 0 0 4px; }
.tl-src { font-size: 12px; color: var(--ink-3); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.subtabs .btn-ghost { margin-left: auto; }
[data-subpanel] { display: none; }
[data-subpanel].is-on { display: block; }
.md { line-height: 1.6; max-width: 980px; }
.md h1 { font-size: 20px; margin: 4px 0 12px; }
.md h2 { font-size: 16px; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 14px; }
.md table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.md th { background: var(--bg); }
.md code { font: 12.5px var(--mono); background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.md blockquote { border-left: 3px solid var(--brand); margin: 8px 0; padding: 4px 12px; color: var(--ink-2); background: var(--bg); }
.notes, .tasks { list-style: none; margin: 14px 0 0; padding: 0; }
.notes li { border-top: 1px solid var(--line); padding: 10px 0; }
.notes li.pinned { background: var(--amber-soft); margin: 0 -10px; padding: 10px; border-radius: 8px; }
.n-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.n-actions { margin-left: auto; display: flex; gap: 10px; }
.n-actions form, .tasks form { display: inline; margin: 0; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.t-title { flex: 1; }
.t-due { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tasks li.done .t-title { text-decoration: line-through; color: var(--ink-3); }
.tasks li.overdue .t-due { color: var(--red); font-weight: 700; }
.check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--ink-3); background: var(--panel); cursor: pointer; padding: 0; font-size: 13px; line-height: 1; color: #fff; }
.tasks li.done .check { background: var(--green); border-color: var(--green); }

/* ---------- search, admin ---------- */
.search-big input { flex: 1; font-size: 15px; padding: 10px 14px; }
.hits { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.user-card .row input[name=name] { width: 220px; }
.case-picks { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
.case-picks legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { background: var(--bg); font-size: 12px; color: var(--ink-2); }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background:
  radial-gradient(1200px 600px at 10% -10%, rgba(27, 91, 173, .18), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: 0 10px 40px rgba(16, 24, 40, .1); }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .brand-mark { margin: 0 auto 12px; }
.login-brand h1 span { color: var(--brand); font-weight: 500; }
.login-brand p { margin-top: 6px; font-size: 13px; }
.btn-google { width: 100%; background: var(--panel); border-color: var(--line); color: var(--ink); padding: 10px 14px; }
.btn-google svg { width: 18px; height: 18px; }
.btn-google:hover { background: var(--bg); }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-card .btn-primary { width: 100%; padding: 10px; margin-top: 4px; }
.fine { font-size: 11.5px; color: var(--ink-3); text-align: center; margin: 18px 0 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--panel); padding: 8px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1024px) {
  .grid-main, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: 1fr; height: auto; }
  .doc-list { max-height: 360px; }
  .doc-view { min-height: 70vh; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
  .main { padding: 60px 16px 40px; }
  .menu-btn { display: grid; place-items: center; position: fixed; top: 10px; left: 12px; z-index: 10; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
  .menu-btn svg { width: 20px; fill: var(--ink); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-head { flex-direction: column; }
  .ch-actions { width: 100%; }
  .act { flex: 1; width: auto; }
  .ag { grid-template-columns: 1fr; gap: 2px; }
  .mail summary { grid-template-columns: 1fr; gap: 2px; }
  .timeline::before, .timeline li::before { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .tl-date { text-align: left; }
  .steps li { grid-template-columns: 1fr; gap: 2px; }
  .add-task { flex-wrap: wrap; }
  .add-task input[name=title] { flex: 1 1 100%; }
}
@media print {
  .sidebar, .tabs, .ch-actions, .kpis, .subtabs, .menu-btn { display: none !important; }
  .shell { display: block; height: auto; }
  .main { overflow: visible; padding: 0; }
  .panel { display: none !important; }
  .panel[data-panel=analysen] { display: block !important; }
  .card { box-shadow: none; border: 0; }
}

/* =================== v2: status, inbox, timeline, money =================== */
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px 10px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-ink); font-weight: 600; text-decoration: none !important; }
.side-nav a:hover { background: var(--side-hover); }
.side-nav a.is-on { background: var(--side-hover); color: #fff; }
.side-nav svg { width: 17px; height: 17px; fill: currentColor; opacity: .85; }
.nav-badge { margin-left: auto; background: #e0a84a; color: #1a1205; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; }
.ci-due.due-proposed { outline: 1px dashed #ffd98a; }
.new-case { width: 100%; }
.new-case summary { list-style: none; cursor: pointer; }
.new-case form { margin-top: 6px; }
.new-case input { background: #16243a; border-color: #22324d; color: #fff; flex: 1; }

/* status colours: dot + select + badge */
.st-anfrage, .st-pruefung { --st: #5b93e0; } .st-mandat, .st-klage { --st: #4cc38a; }
.st-einigung { --st: #2fb4b4; } .st-abrechnung { --st: #e0a84a; } .st-bezahlt { --st: #8a94a6; }
.st-abgelehnt, .st-archiv { --st: #6b7280; }
.dot[class*=st-] { background: var(--st); }
.status-select { font-weight: 650; border-color: var(--st) !important; border-width: 1.5px !important; padding: 4px 8px !important; border-radius: 999px !important; }
.badge[class*=st-] { border-color: var(--st); color: var(--ink); }
.status-form { margin: 0; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--amber-soft); border: 1px solid transparent; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; }
.banner.soft { background: var(--brand-soft); }
.banner form { margin: 0; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.todo { margin-bottom: 16px; border-left: 3px solid #e0a84a; }
.todo-grid { display: flex; flex-direction: column; gap: 14px; }
.todo-tile { display: inline-flex; align-items: center; gap: 12px; background: var(--amber-soft); padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 600; align-self: flex-start; text-decoration: none !important; }
.tt-n { font-size: 22px; font-weight: 750; color: var(--amber); }
.todo-block h3 { margin-top: 0; }
.todo-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.todo-line:last-child { border-bottom: 0; }
.todo-line form { margin: 0; }
.big-number { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.ag-proposed .ag-text { font-style: italic; }
.k-gericht { background: var(--red-soft); color: var(--red); }
.k-wiedervorlage { background: var(--brand-soft); color: var(--brand); }

.dl-list { list-style: none; margin: 0 0 12px; padding: 0; }
.dl { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dl-date { font-weight: 650; font-size: 13px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.dl-date small { font-weight: 450; color: var(--ink-3); }
.dl-today .dl-date { color: var(--red); } .dl-soon .dl-date { color: var(--amber); } .dl-past { opacity: .55; }
.dl-proposed { background: var(--amber-soft); margin: 0 -10px; padding: 8px 10px; border-radius: 8px; border-bottom: 0; }
.dl-actions { display: flex; gap: 8px; align-items: center; }
.dl-actions form, form.inline { display: inline; margin: 0; }
.add-task select, .add-task input[type=time] { width: auto; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.checks li:last-child { border: 0; }
.checks form { margin: 0 0 0 auto; }
.ck { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.checks .ok .ck { background: var(--green-soft); color: var(--green); }
.checks .miss .ck { background: var(--red-soft); color: var(--red); }
.checks .miss .ck-label { font-weight: 600; }

.tl { list-style: none; margin: 8px 0 0; padding: 0; }
.tl-day { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ink-3); padding: 14px 0 4px; }
.tl-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tl-item[hidden] { display: none; }
.tl-item.pinned { background: var(--amber-soft); margin: 0 -10px; padding: 8px 10px; border-radius: 8px; }
.tl-ico { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--bg); font-size: 14px; }
.k-mail_in .tl-ico, .k-mail_out .tl-ico { background: var(--brand-soft); color: var(--brand); }
.k-whatsapp .tl-ico, .k-sprachnachricht .tl-ico { background: #e3f6ea; }
.k-anruf .tl-ico { background: #f1ecfb; }
.k-status .tl-ico, .k-zahlung .tl-ico { background: var(--amber-soft); color: var(--amber); }
.tl-main { min-width: 0; flex: 1; }
.tl-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tl-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ink-3); }
.tl-title { font-weight: 600; word-break: break-word; }
.tl-time { margin-left: auto; }
.tl-body { white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.clamp.open { -webkit-line-clamp: unset; }
.note-form textarea { flex: 1; }
.tl-filter { padding: 12px 0 0; }

.money-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.money-row > div { display: flex; flex-direction: column; background: var(--bg); padding: 10px 12px; border-radius: 8px; }
.money-row .neg .kpi-v { color: var(--red); }
.pay-list { margin-top: 12px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-warn { background: var(--amber-soft); }
.table select { max-width: 220px; }

.inbox { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.in-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.in-src { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.src-whatsapp .in-src { color: #1f9e55; }
.in-time { margin-left: auto; }
.in-subj { font-weight: 600; margin: 6px 0 2px; }
.in-body { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.in-files { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.in-files a { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 110px; text-decoration: none !important; color: var(--ink-2); }
.in-files img { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.in-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.in-actions form { margin: 0; }
.in-actions input[list] { width: 180px; }
.inline-details { display: inline-block; }
.inline-details summary { list-style: none; }
.inline-details[open] form { margin-top: 6px; }

.transcript { padding: 14px 18px; background: var(--bg); margin: 12px; border-radius: 8px; }
.pv-audio { padding: 16px; }
.pv-audio audio { width: 100%; }
.sm-select { padding: 4px 8px !important; font-size: 12.5px; }
.log { font: 12px/1.5 var(--mono); max-height: 420px; overflow: auto; background: var(--bg); padding: 10px; border-radius: 8px; }
.mail-form { max-width: 900px; }
.mail-form input[name=to], .mail-form input[name=subject] { width: 100%; }
.att-pick { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.att-pick legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.att-pick label[hidden] { display: none; }
code { font: 12px var(--mono); background: var(--bg); padding: 1px 4px; border-radius: 4px; }
@media (max-width: 820px) {
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .money-row { grid-template-columns: 1fr; }
}
.in-divider { list-style: none; padding: 14px 0 0; }
.in-divider h2 { margin: 0; }

/* Kalkulation */
.calc { margin-bottom: 1rem; }
.calc-form { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: end; margin-bottom: .75rem; }
.calc-form label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted, #667); gap: .15rem; }
.calc-form label.inline { flex-direction: row; align-items: center; gap: .3rem; }
.calc-form input:not([type=checkbox]) { width: 7.5rem; }
.scen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; margin: .75rem 0; }
.scen { border: 1px solid var(--line, #dde); border-radius: 10px; padding: .75rem .9rem; }
.scen h3 { margin: 0 0 .25rem; font-size: .95rem; }
.scen-result { font-size: 1.5rem; font-weight: 650; margin: 0 0 .5rem; display: flex; flex-direction: column; }
.scen-result small { font-size: .75rem; font-weight: 400; color: var(--muted, #667); }
.calc-t { width: 100%; border-collapse: collapse; font-size: .85rem; }
.calc-t td, .calc-t th { padding: .2rem 0; vertical-align: top; }
.calc-t td:last-child, .calc-t th:last-child { text-align: right; white-space: nowrap; padding-left: .5rem; }
.calc-t tr.tot td { border-top: 1px solid var(--line, #dde); padding-top: .35rem; }
.calc-t tr.sub td { padding: 0 0 .2rem; font-size: .8rem; }
.calc-t tr.sub table { width: 100%; }
.calc-t tr.sub table td:last-child { text-align: right; }
.calc-t.staffel { max-width: 420px; margin: .5rem 0; }
.calc-t.staffel th { text-align: left; font-weight: 600; font-size: .8rem; }
.calc-t.staffel tr.cur td { font-weight: 650; }
.pos { color: var(--ok, #1b7f3b); }
.cl { font-size: .85rem; }
.cl > div, .cl-sub > div { display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0; }
.cl span:first-child { min-width: 0; }
.cl span:last-child { white-space: nowrap; text-align: right; }
.cl small { display: block; font-size: .75rem; color: var(--muted, #667); }
.cl-sub { font-size: .8rem; color: var(--muted, #667); padding: 0 0 .25rem .5rem; }
.cl-sub summary { cursor: pointer; color: var(--link, #2456c6); }
.cl-tot { border-top: 1px solid var(--line, #dde); margin-top: .3rem; padding-top: .4rem !important; }
.scen-ist { margin: .5rem 0 .75rem; max-width: 520px; background: var(--surface-2, rgba(36,86,198,.04)); }
.scen-ist h3 small { font-weight: 400; font-size: .75rem; }
/* Vertrag */
.vertrag { margin-bottom: 1rem; }
.vlist li.is-gilt { font-weight: 600; }
.vlist small { display: block; font-weight: 400; }
.badge { background: var(--ok, #1b7f3b); color: #fff; border-radius: 999px; padding: .1rem .55rem; font-size: .75rem; }
.vgen summary { cursor: pointer; color: var(--link, #2456c6); margin: .5rem 0; }
.calc-form .break { flex-basis: 100%; height: 0; }
.kpi-v.sm { font-size: 1rem; }
.vgen .calc-form input:not([type=checkbox]) { width: 11rem; }

/* Eingang: Kontaktzeile + Eckdaten mit Ampel (Port aus RS-Schnellabwicklung) */
.in-contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.in-contact form { margin: 0; }
.in-num { font-family: var(--mono); font-weight: 600; }
.btn-ghost.wa { color: var(--green); border-color: var(--green); }
.eck { display: grid; grid-template-columns: max-content minmax(150px, 240px) 1fr; align-items: center; gap: 2px 10px; margin: 6px 0; max-width: 760px; }
.eck-row, .eck-row label { display: contents; }
.eck-row label { font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.eck-row input, .eck-row textarea, .eck-row strong { font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); width: 100%; box-sizing: border-box;
  padding: 2px 7px; line-height: 1.4; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.eck-row strong { display: block; }
.eck-hint { font-size: .78rem; color: var(--ink-2); }
.eck-row textarea { font-weight: 400; resize: vertical; }
.amp-gruen input, .amp-gruen strong { background: var(--green-soft); border-color: var(--green); }
.amp-gelb input, .amp-gelb strong { background: var(--amber-soft); border-color: var(--amber); }
.amp-rot input, .amp-rot strong { background: var(--red-soft); border-color: var(--red); }
@media (max-width: 640px) { .eck { grid-template-columns: 1fr 1fr; } .eck-hint { grid-column: 1 / -1; } }
.eck-form .row { display: flex; gap: 10px; align-items: center; }

.side-select { margin: 0 0 .5rem; width: 100%; }

.in-sibling { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--line, rgba(128,128,128,.25)); }

.in-tabs { display: flex; gap: .25rem; margin: .5rem 0; }
.in-pane[hidden] { display: none; }
.in-docs { height: 36rem; min-height: 28rem; }
.in-docs .in-docview { min-height: 28rem; }
.in-docs iframe { width: 100%; height: 34rem; border: 0; }

.term-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.term { height: calc(100vh - 300px); min-height: 420px; background: #1e1e1e; border-radius: 8px; padding: 8px; overflow: hidden; }
.in-item .term { height: 34rem; }

/* assistant chat */
.agent-log { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.agent-msg { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); max-width: 52rem; overflow-wrap: anywhere; }
.agent-msg.user { align-self: flex-end; background: var(--panel); white-space: pre-wrap; }
.agent-msg.assistant { align-self: flex-start; }
.agent-msg.error { align-self: flex-start; border-color: #c0392b; color: #c0392b; }
.agent-msg > :first-child { margin-top: 0; } .agent-msg > :last-child { margin-bottom: 0; }
.agent-msg table { border-collapse: collapse; } .agent-msg td, .agent-msg th { border: 1px solid var(--line); padding: 3px 8px; }
.agent-turn { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.agent-tools { display: flex; flex-direction: column; gap: 2px; }
.agent-tool { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); max-width: 52rem; }
.agent-tool summary { cursor: pointer; list-style: none; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.agent-tool summary::-webkit-details-marker { display: none; }
.agent-tool .dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9e5b; flex: none; align-self: center; }
.agent-tool.running .dot { background: #d9a400; animation: agent-pulse 1s infinite; }
.agent-tool.err .dot { background: #c0392b; }
.agent-tool b { color: var(--ink); font-weight: 600; }
.agent-tool .lbl { font-family: inherit; opacity: .8; }
.agent-tool .lbl::before { content: "· "; }
.agent-tool pre { margin: 4px 0 6px 14px; padding: 6px 8px; max-height: 14rem; overflow: auto; white-space: pre-wrap;
  overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.agent-note, .agent-live { color: var(--ink-2, var(--ink)); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 52rem; }
@keyframes agent-pulse { 50% { opacity: .3; } }
.row.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.agent-status { color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.agent-status:empty { display: none; }

.newcase-card { max-width: 48rem; }
.newcase-card textarea { width: 100%; min-height: 16rem; }
