:root { --ink: #14181f; --muted: #667085; --line: #e4e7ec; --bg: #f5f6f8; --card: #fff; --brand: #4338ca; --danger: #c0283f; font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2 { margin: 0; }
h1 { font-size: 20px; }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code { font-size: 12px; background: #eef0f4; padding: 1px 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: #101828; color: #fff; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.logo { color: #a5b4fc; }
.sub { font-weight: 400; color: #98a2b3; font-size: 12px; }
.back { color: #98a2b3; font-weight: 500; font-size: 12.5px; text-decoration: none; margin-right: 6px; }
.back:hover { color: #fff; }
.topbar-right { display: flex; gap: 8px; }
.pill { background: #22c55e; color: #052e16; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.pill--muted { background: #344054; color: #e4e7ec; font-weight: 500; }
.setup { max-width: 560px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input, select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; }
.setup input { flex: 1; }
.btn { font: inherit; font-weight: 600; border: 0; background: var(--brand); color: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn--danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.hint, .muted { color: var(--muted); font-size: 12.5px; }
.layout { flex: 1; display: grid; grid-template-columns: 260px 1fr 280px; gap: 14px; padding: 14px; min-height: 0; }
.clients, .record, .log { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 0; }
.clients-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.client-list button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font: inherit; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.client-list button[aria-current="true"], .client-list button:hover { background: #eef2ff; }
.client-list .who { font-weight: 600; }
.client-list .preview { grid-column: 1 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: #22c55e; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; align-self: center; }
.record { display: flex; flex-direction: column; gap: 12px; }
.record-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.controls { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; }
.record-body { flex: 1; display: grid; grid-template-columns: 260px 1fr; gap: 14px; min-height: 0; }
.facts { display: grid; gap: 8px; align-content: start; }
.facts label { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.facts .check { display: flex; gap: 6px; align-items: center; }
.conversation-wrap { min-height: 640px; display: flex; }
.conversation { flex: 1; height: 640px; }
.log ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12px; max-height: 70vh; overflow: auto; }
.log li { border-bottom: 1px solid var(--line); padding: 4px 0; }
.log li b { display: block; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 90vw; }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } .record-body { grid-template-columns: 1fr; } }
