:root {
  --bg: #050a18;
  --bg-2: #081026;
  --panel: rgba(13, 20, 40, 0.72);
  --panel-solid: #0c1530;
  --card: rgba(15, 23, 46, 0.78);
  --line: rgba(120, 150, 210, 0.14);
  --line-strong: rgba(120, 160, 230, 0.26);
  --text: #e7ecf7;
  --muted: #8a97b4;
  --dim: #5d6a88;
  --cyan: #38bdf8;
  --teal: #2dd4bf;
  --violet: #a78bfa;
  --indigo: #6366f1;
  --pink: #f0abfc;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #ef4444;
  --grad: linear-gradient(100deg, #0ea5e9 0%, #3b82f6 45%, #6366f1 75%, #8b5cf6 100%);
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  font-family: "Inter", "SF Pro Text", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { width: 18px; height: 18px; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- topbar -- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 14px 28px; backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5, 10, 24, .9), rgba(5, 10, 24, .55));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; position: relative;
  background: conic-gradient(from 200deg, #0ea5e9, #6366f1, #a78bfa, #0ea5e9);
  box-shadow: 0 0 22px rgba(99, 102, 241, .45);
  animation: spin 9s linear infinite;
}
.brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 8px rgba(56,189,248,.6); }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font-weight: 600; letter-spacing: .3px; font-size: 15px; }
.brand-name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.tabs { display: flex; gap: 5px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 12px; white-space: nowrap; flex: none;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--muted);
  transition: all .2s ease; position: relative;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab.active {
  color: #e0f2fe; border-color: rgba(56,189,248,.55);
  background: linear-gradient(180deg, rgba(14,165,233,.18), rgba(14,165,233,.06));
  box-shadow: 0 0 0 1px rgba(56,189,248,.15), 0 6px 22px rgba(14,165,233,.18);
}
.live-count {
  font-style: normal; font-size: 11px; background: var(--red); color: #fff; border-radius: 99px;
  padding: 0 6px; margin-left: 2px; animation: pulse 1.4s ease-in-out infinite;
}
.top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.health { display: flex; gap: 5px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.health .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transition: background .3s; }
.health .dot.ok { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.7); }
.health .dot.warn { background: var(--amber); }
.health .dot.err { background: var(--red); }
.lang-switch {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.lang-switch svg { color: var(--cyan); }
.lang-switch select { background: transparent; border: 0; outline: 0; cursor: pointer; width: auto; padding: 0 4px; box-shadow: none; }
.lang-switch option { background: var(--panel-solid); }

main { position: relative; z-index: 1; padding: 22px 28px 40px; }
.view { display: none; animation: fade .35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ agent grid -- */
.agent-grid {
  display: grid; grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr) minmax(290px, 340px);
  gap: 24px; align-items: start;
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px); box-shadow: var(--shadow);
  height: calc(100vh - 120px); min-height: 560px; display: flex; flex-direction: column; overflow: hidden;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 18px;
  border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #c7d2ea; font-weight: 600;
}
.status-pill { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-pill.live i { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.2s infinite; }
.status-pill.live { color: #a7f3d0; }

.messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.messages::-webkit-scrollbar, .insights-body::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb, .insights-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 6px; }
.empty-hint { margin: auto; text-align: center; color: var(--dim); }
.empty-hint svg { width: 42px; height: 42px; opacity: .6; }
.empty-hint p { margin: 8px 0 0; font-size: 13px; }

.msg {
  max-width: 88%; padding: 11px 14px; border-radius: 14px; line-height: 1.5; font-size: 14px;
  animation: pop .28s cubic-bezier(.2,.9,.3,1.2); position: relative; word-wrap: break-word;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.msg.agent { align-self: flex-start; background: linear-gradient(160deg, #3b1d5a 0%, #2a1a4d 100%); border: 1px solid rgba(167,139,250,.22); border-top-left-radius: 4px; }
.msg.user { align-self: flex-end; background: linear-gradient(160deg, #0f2a44 0%, #0c2138 100%); border: 1px solid rgba(56,189,248,.22); border-top-right-radius: 4px; }
.msg.user.backchannel { opacity: .6; font-style: italic; }
.msg.user.partial { opacity: .75; font-style: italic; border-style: dashed; }
.msg.user.partial::after { content: " …"; color: var(--cyan); }
.msg.cut::after { content: "✂"; position: absolute; right: -6px; bottom: -8px; font-size: 12px; background: var(--amber); color: #111; border-radius: 99px; padding: 1px 5px; }
.msg .meta { display: block; margin-top: 5px; font-size: 10.5px; color: rgba(231,236,247,.45); }
.msg.typing::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--violet); margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.speaking-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px;
}
.speaking-chip.user { align-self: flex-end; }
.speaking-chip b { display: inline-flex; gap: 3px; }
.speaking-chip b i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); animation: bounce 1.1s infinite ease-in-out; }
.speaking-chip b i:nth-child(2) { animation-delay: .15s; }
.speaking-chip b i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.tool-chip {
  align-self: center; font-size: 11.5px; color: #c4b5fd; border: 1px dashed rgba(167,139,250,.35);
  padding: 4px 10px; border-radius: 99px; background: rgba(139,92,246,.07); animation: pop .3s ease;
}
.tool-chip.err { color: #fca5a5; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.06); }
.sys-note { align-self: center; font-size: 11.5px; color: var(--dim); }

/* ----------------------------------------------------------------- stage -- */
.stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stage-head { margin-top: 4px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #9fb4da; font-size: 14px; }
.eyebrow svg { color: var(--cyan); }
.title {
  margin: 4px 0 8px; font-size: 42px; font-weight: 700; letter-spacing: -1px; line-height: 1.05;
  background: linear-gradient(90deg, #7dd3fc 0%, #93c5fd 40%, #c4b5fd 70%, #f0abfc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: shimmer 8s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
.badges { display: flex; gap: 8px; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 12.5px;
  border: 1px solid var(--line-strong); background: rgba(56,189,248,.06); color: #cfe3ff; font-weight: 500;
}
.badge svg { width: 15px; height: 15px; color: var(--cyan); }
.badge.bucket.b1 { color: #a7f3d0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.badge.bucket.b2 { color: #fde68a; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.badge.bucket.b3 { color: #fecaca; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08); }

.voice-flow-wrap {
  position: relative; width: min(460px, 96%); aspect-ratio: 1.72; margin: 18px 0 8px;
  isolation: isolate;
}
.voice-flow-wrap::before {
  content: ""; position: absolute; inset: 18% 8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(34,211,238,.09), rgba(139,92,246,.055) 48%, transparent 75%);
  filter: blur(18px); animation: flow-aura 3.2s ease-in-out infinite;
}
#voiceFlow { width: 100%; height: 100%; display: block; }
.voice-flow {
  --pulse-a: #22d3ee; --pulse-b: #8b5cf6; --pulse-c: #ec4899;
  --pulse-scale: 1.05; --pulse-glow: .8;
}
.voice-flow svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pulse-ribbons { transform-box: fill-box; transform-origin: center; transform: scaleY(var(--pulse-scale)); transition: transform .12s ease-out; }
.pulse-ribbons path { fill: none; stroke: url(#pulseGradient); stroke-linecap: round; stroke-linejoin: round; }
.pulse-haze { opacity: .38; }
.pulse-haze path:nth-child(1) { stroke-width: 24; }
.pulse-haze path:nth-child(2) { stroke-width: 20; stroke: url(#pulseGradientReverse); }
.pulse-haze path:nth-child(3) { stroke-width: 16; }
.pulse-lines { opacity: var(--pulse-glow); }
.pulse-lines .r1 { stroke-width: 2.4; }
.pulse-lines .r2 { stroke-width: 1.8; stroke: url(#pulseGradientReverse); opacity: .86; }
.pulse-lines .r3 { stroke-width: 1.25; opacity: .72; }
.pulse-lines .r4 { stroke-width: 1; stroke: url(#pulseGradientReverse); opacity: .62; }
.pulse-lines .r5 { stroke-width: .85; opacity: .55; }
.pulse-particles circle { fill: #fff; filter: drop-shadow(0 0 5px var(--pulse-a)); }
.pulse-particles circle:nth-child(even) { fill: var(--pulse-c); }
.pulse-core { fill: url(#pulseCore); transform-origin: 260px 130px; animation: pulse-core 2.4s ease-in-out infinite; }
.pulse-dot { fill: #fff; filter: drop-shadow(0 0 7px var(--pulse-a)); }
.voice-flow[data-state="thinking"] .pulse-lines { animation: pulse-flash 1.1s ease-in-out infinite; }
.voice-flow[data-state="ended"] .pulse-particles { opacity: .15; }
@keyframes pulse-core { 50% { transform: scale(1.28); opacity: .72; } }
@keyframes pulse-flash { 50% { opacity: .68; } }
@keyframes flow-aura { 50% { transform: scale(1.08, 1.18); opacity: .68; } }
.flow-timer {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); font-variant-numeric: tabular-nums;
  font-size: 12.5px; color: #9fb4da; padding: 3px 10px; border-radius: 99px; background: rgba(5,10,24,.6); border: 1px solid var(--line);
}
.state-line { min-height: 22px; font-size: 15px; color: #c9d6f2; margin-bottom: 8px; transition: color .3s; }
.state-line.err { color: #fca5a5; }
.latency-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; justify-content: center; animation: fade .4s ease; }
.latency-chips span {
  display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 4px 10px; border-radius: 99px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
.latency-chips b { color: var(--muted); font-weight: 500; }
.latency-chips i { font-style: normal; font-variant-numeric: tabular-nums; color: #dbeafe; }
.latency-chips .total { border-color: rgba(52,211,153,.35); }
.latency-chips .total i { color: #6ee7b7; }

.setup { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: left; transition: opacity .3s, max-height .4s; }
.setup.locked { opacity: .45; pointer-events: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.card.row2 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; }
.voice-row { display: flex; gap: 8px; }
.voice-row .select-wrap { flex: 1; }
.btn-round.sm { width: 44px; height: 44px; flex: none; }
.btn-round.sm.playing { color: var(--cyan); border-color: rgba(56,189,248,.6); box-shadow: 0 0 12px rgba(56,189,248,.35); }
.lbl { display: block; font-size: 13.5px; color: #dbe4f6; margin-bottom: 8px; font-weight: 500; }
.lbl em { color: var(--muted); font-style: normal; font-weight: 400; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select, input, textarea {
  width: 100%; background: rgba(3, 7, 18, .75); border: 1px solid var(--line-strong); border-radius: 11px;
  padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s; appearance: none;
}
select:focus, input:focus, textarea:focus { border-color: rgba(56,189,248,.6); box-shadow: 0 0 0 3px rgba(56,189,248,.12); }
select option { background: var(--panel-solid); }
textarea { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.55; resize: vertical; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.test-phones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.test-phones .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; cursor: pointer; user-select: none; font-variant-numeric: tabular-nums; }
.test-phones .chip button { width: 18px; height: 18px; line-height: 1; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: inherit; font-size: 13px; }
.test-phones .chip button:hover { background: rgba(239,68,68,.35); }
.test-call .voice-row input { flex: 1; }
.trunk-row { margin-bottom: 10px; }
.test-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.line-check { list-style: none; margin: 12px 0 0; padding: 0; font-size: 12.5px; display: grid; gap: 5px; }
.line-check li { display: flex; gap: 8px; align-items: baseline; }
.line-check li b { font-weight: 500; white-space: nowrap; }
.line-check li small { color: var(--muted); overflow-wrap: anywhere; }
.line-check .ok::before { content: "✓"; color: #34d399; }
.line-check .bad::before { content: "✕"; color: #f87171; }
.line-check .na::before { content: "•"; color: var(--muted); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(3,7,18,.6); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { flex: 1; display: flex; gap: 7px; align-items: center; justify-content: center; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); transition: all .2s; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: rgba(56,189,248,.14); color: #e0f2fe; box-shadow: inset 0 0 0 1px rgba(56,189,248,.35); }
.debtor-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.debtor-mini div { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.debtor-mini small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.debtor-mini b { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.call-actions { display: flex; gap: 10px; width: min(520px, 100%); margin-top: 16px; }
.btn-call {
  flex: 1; display: flex; gap: 10px; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  padding: 16px 22px; font-size: 16.5px; font-weight: 600; color: #fff; background: var(--grad); background-size: 160% 100%;
  box-shadow: 0 12px 34px rgba(59,130,246,.38); transition: transform .15s, box-shadow .2s, background-position .6s;
}
.btn-call:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 16px 40px rgba(99,102,241,.45); }
.btn-call:active { transform: translateY(1px) scale(.99); }
.btn-call:disabled { opacity: .6; cursor: progress; }
.btn-call.hang { background: linear-gradient(100deg, #ef4444, #dc2626); box-shadow: 0 12px 34px rgba(239,68,68,.35); }
.btn-call.small { flex: none; padding: 10px 18px; font-size: 14px; }
.btn-round { width: 54px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); display: grid; place-items: center; transition: all .2s; }
.btn-round.on { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.5); color: #fecaca; }
.btn-round.ghost { color: var(--cyan); }
.btn-round:hover { border-color: rgba(56,189,248,.5); }
.headset-tip { font-size: 12px; color: var(--dim); margin: 10px 0 0; }
.line-fx { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.line-fx input { width: 15px; height: 15px; margin: 0; accent-color: var(--cyan); cursor: pointer; }

/* -------------------------------------------------------------- insights -- */
.insights-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.outcome-pill { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(52,211,153,.12); color: #a7f3d0; border: 1px solid rgba(52,211,153,.35); }
.outcome-pill.bad { background: rgba(239,68,68,.1); color: #fecaca; border-color: rgba(239,68,68,.4); }
.outcome-pill.mid { background: rgba(251,191,36,.1); color: #fde68a; border-color: rgba(251,191,36,.4); }
.steps { list-style: none; margin: 0; padding: 4px 4px 4px 2px; display: flex; flex-direction: column; gap: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--dim); position: relative; transition: color .3s; }
.steps li i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(120,150,210,.28); flex: none; position: relative; z-index: 1; background: var(--panel-solid); transition: all .35s; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 28px; height: calc(100% - 20px); width: 2px; background: rgba(120,150,210,.15); }
.steps li.active { color: #e0f2fe; }
.steps li.active i { border-color: var(--cyan); box-shadow: 0 0 0 5px rgba(56,189,248,.12), 0 0 14px rgba(56,189,248,.6); animation: pulse 1.6s infinite; }
.steps li.done { color: #c9f5e3; }
.steps li.done i { border-color: var(--green); background: var(--green); }
.steps li.done i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #04131f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.steps li.fail i { border-color: var(--red); background: var(--red); }
.steps li.fail { color: #fecaca; }
@keyframes pulse { 50% { opacity: .55; } }
.ins-card { background: rgba(255,255,255,.028); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; animation: pop .35s ease; }
.ins-label { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ins-value { font-weight: 600; font-size: 15px; }
.ins-quote { color: #aebbd8; font-size: 13px; margin-top: 4px; font-style: italic; }
.promise { border-color: rgba(52,211,153,.3); background: linear-gradient(160deg, rgba(16,185,129,.1), rgba(16,185,129,.02)); }
.promise-amount { font-size: 24px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.promise-meta { color: #b6f0d8; font-size: 13px; margin-top: 2px; }
.strength { text-transform: none; letter-spacing: 0; font-size: 11px; padding: 1px 8px; border-radius: 99px; }
.strength.firm { background: rgba(52,211,153,.2); color: #6ee7b7; }
.strength.tentative { background: rgba(251,191,36,.18); color: #fcd34d; }
.req-list, .tool-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.req-list li { font-size: 13px; display: flex; gap: 8px; align-items: center; }
.req-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.tool-log li { font-size: 12px; color: #b9c5de; display: grid; grid-template-columns: auto 1fr; gap: 8px; animation: pop .3s ease; }
.tool-log li time { color: var(--dim); font-variant-numeric: tabular-nums; }
.tool-log li code { font-family: ui-monospace, Menlo, monospace; color: #c4b5fd; font-size: 11.5px; }
.tool-log li.muted { color: var(--dim); display: block; }

/* ----------------------------------------------------------------- pages -- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 4px 0 0; }
.filters { display: flex; gap: 10px; align-items: center; }
.chips { display: flex; gap: 6px; }
.chip { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); }
.chip.on { color: #e0f2fe; border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.12); }
.search { width: 220px; padding: 8px 12px; }
.table-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(10px); }
.card-title { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; color: #c7d2ea; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(120,150,210,.07); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(56,189,248,.04); }
.table tbody tr.click { cursor: pointer; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.pill { display: inline-block; font-size: 11.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-strong); color: #cbd5e1; white-space: nowrap; }
.pill.b1, .pill.good { color: #a7f3d0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.07); }
.pill.b2, .pill.mid { color: #fde68a; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.07); }
.pill.b3, .pill.bad { color: #fecaca; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.07); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-sm { display: inline-flex; gap: 6px; align-items: center; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); font-size: 12.5px; transition: all .15s; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-sm:hover { border-color: rgba(56,189,248,.55); color: #e0f2fe; }
.btn-sm.primary { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.5); }
.btn-sm:disabled { opacity: .4; cursor: not-allowed; }
.muted { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.stat small { color: var(--muted); font-size: 12px; }
.stat b { display: block; font-size: 26px; margin-top: 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.outcome-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin-bottom: 16px; background: rgba(255,255,255,.04); }
.outcome-bar span { height: 100%; transition: width .6s ease; }

.pron-try code { color: #c4b5fd; }
.stt-controls { display: flex; gap: 12px; align-items: center; margin: 18px 0; flex-wrap: wrap; }
.select-wrap.small select { padding: 9px 36px 9px 12px; }

/* --------------------------------------------------------- drawer/modal -- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-bg { position: absolute; inset: 0; background: rgba(2,6,16,.6); backdrop-filter: blur(3px); animation: fade .2s; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(620px, 100%); background: var(--panel-solid); border-left: 1px solid var(--line-strong); padding: 26px; overflow-y: auto; animation: slide .3s cubic-bezier(.2,.9,.3,1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-x { position: absolute; right: 18px; top: 14px; font-size: 26px; border: 0; background: none; color: var(--muted); }
.drawer h3 { margin: 0 0 6px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 16px 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.transcript { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(2,6,16,.7); backdrop-filter: blur(4px); }
.modal-card { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px; width: min(380px, 92%); display: flex; flex-direction: column; gap: 12px; }
.modal-card h3 { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 70; background: #1e293b; border: 1px solid var(--line-strong); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .3s ease; max-width: 90vw; }
.toast.err { border-color: rgba(239,68,68,.5); color: #fecaca; }

@media (max-width: 1280px) {
  .agent-grid { grid-template-columns: minmax(280px, 330px) 1fr; }
  .insights { grid-column: 1 / -1; height: auto; min-height: 0; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .tabs { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .health { display: none; }
  main { padding: 16px; }
  .agent-grid { grid-template-columns: 1fr; }
  .panel.convo { height: 360px; min-height: 0; order: 2; }
  .insights { order: 3; }
  .title { font-size: 34px; }
  .card.row2 { grid-template-columns: 1fr; }
  .table-card { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pulse-particles { display: none; }
}

/* ------------------------------------------------------------- today -- */
.control-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn-danger {
  display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 12px;
  border: 1px solid rgba(239,68,68,.55); background: rgba(239,68,68,.14); color: #fecaca; font-weight: 600;
  transition: all .15s;
}
.btn-danger svg { width: 14px; height: 14px; }
.btn-danger:hover { background: rgba(239,68,68,.26); box-shadow: 0 0 18px rgba(239,68,68,.25); }
.notice { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(56,189,248,.3); background: rgba(56,189,248,.07); color: #bae6fd; font-size: 13px; }
.notice.warn { border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.08); color: #fde68a; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpis .stat b small { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 14px; align-items: start; }
.today-side { display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-right: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head .card-title { border-bottom: 0; }
.card-head .filters { flex-wrap: wrap; padding: 8px 0; }
.table-scroll { overflow-x: auto; max-height: 70vh; overflow-y: auto; }
.table-scroll .table th { position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.last-cell { min-width: 190px; max-width: 280px; }
.last-cell small { white-space: nowrap; }
#queueTable .num, #queueTable .who b { white-space: nowrap; }
#queueTable td { padding: 10px 12px; }
.summary-snip { margin-top: 4px; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link { border: 0; background: none; padding: 0; text-align: left; }
.link:hover .pill { border-color: rgba(56,189,248,.6); }
.pill.live { color: #bae6fd; border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.12); }
.good-text { color: #a7f3d0; }
.live-card { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(56,189,248,.28); background: rgba(56,189,248,.04); display: flex; flex-direction: column; gap: 8px; animation: pop .3s ease; }
.live-head { display: flex; align-items: center; gap: 10px; }
.live-head .who { flex: 1; min-width: 0; }
.live-head .blip { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1s infinite; flex: none; }
.live-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.live-lines { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; max-height: 190px; overflow-y: auto; }
.live-lines .line { padding: 5px 9px; border-radius: 9px; max-width: 92%; }
.live-lines .line.agent { background: rgba(99,102,241,.14); align-self: flex-start; }
.live-lines .line.user { background: rgba(52,211,153,.12); align-self: flex-end; }
.recent-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.recent-list li { padding: 10px; border-radius: 10px; cursor: pointer; }
.recent-list li:hover { background: rgba(56,189,248,.05); }
.recent-list li + li { border-top: 1px solid rgba(120,150,210,.07); }
.recent-top { display: flex; align-items: center; gap: 8px; }
.recent-top time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.recent-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.recent-list p { margin: 4px 0 0; font-size: 12.5px; color: #b6c2dc; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------- settings -- */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 24px; align-items: start; padding-bottom: 90px; }
.settings-nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; border-left: 2px solid transparent; }
.settings-nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.settings-nav a.active { color: #e0f2fe; border-left-color: var(--cyan); background: rgba(56,189,248,.08); }
.settings-main { display: grid; gap: 16px; min-width: 0; }
.set-group { padding: 4px 22px 10px; scroll-margin-top: 84px; }
.set-group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 0 6px; }
.set-group-head h3 { margin: 0; font-size: 17px; }
.set-group-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(120,150,210,.1); }
.set-row.dirty { box-shadow: inset 3px 0 0 var(--cyan); padding-left: 12px; margin-left: -12px; }
.set-row.has-err { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; margin-left: -12px; }
.set-text label { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.set-text small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.45; max-width: 520px; }
.set-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.set-meta { margin-top: 5px; font-size: 11.5px; color: var(--dim); }
.set-applies { color: var(--dim); }
.link.reset { font-size: 11.5px; color: var(--cyan); }
.set-err { margin-top: 6px; font-size: 12px; color: #fca5a5; }
.set-control { display: flex; justify-content: flex-end; }
.set-input { background: rgba(3,7,18,.6); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; min-width: 120px; color-scheme: dark; }
.set-input.num { width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.set-input:focus { outline: none; border-color: rgba(56,189,248,.6); }
select.set-input { min-width: 200px; }
.set-adv { border-top: 1px solid rgba(120,150,210,.1); margin-top: 2px; }
.set-adv > summary { cursor: pointer; list-style: none; padding: 12px 0; color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.set-adv > summary::-webkit-details-marker { display: none; }
.set-adv > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin: 0 4px 0 2px; }
.set-adv[open] > summary::before { transform: rotate(45deg); }
.set-adv .set-row:first-of-type { border-top: 0; }
.pron-try { display: grid; gap: 12px; padding: 8px 0 14px; border-top: 1px solid rgba(120,150,210,.1); }
.pron-try textarea { font-family: inherit; font-size: 15px; }
.pron-try .stt-controls { margin: 0; }
.set-sub-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0 8px; border-top: 1px solid rgba(120,150,210,.1); }
.set-sub-head b { font-size: 14px; }
.lex-table td input { padding: 8px 10px; }
.lex-table th { padding-left: 0; } .lex-table td { padding-left: 0; }
.day-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.day-chips .chip { padding: 6px 9px; font-size: 12px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(120,150,210,.25); transition: background .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #e2e8f0; transition: transform .2s; }
.switch input:checked + span { background: linear-gradient(100deg, #0ea5e9, #6366f1); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 2px rgba(56,189,248,.6); }
.settings-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; gap: 12px; align-items: center;
  padding: 10px 12px 10px 18px; border-radius: 14px; background: #0f1a36; border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .settings-nav a { border-left: 0; border: 1px solid var(--line); border-radius: 99px; padding: 6px 11px; }
}
@media (max-width: 560px) {
  .set-row { grid-template-columns: 1fr; }
  .set-control { justify-content: flex-start; }
}

/* ----------------------------------------------------------- control -- */
.control-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; margin-bottom: 14px; }
.control-card, .filter-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.control-state { display: flex; align-items: center; gap: 14px; }
.state-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--dim); }
.state-dot.on { background: var(--green); box-shadow: 0 0 0 5px rgba(52,211,153,.15); animation: pulse 1.6s infinite; }
.state-dot.wait { background: var(--amber); box-shadow: 0 0 0 5px rgba(251,191,36,.15); }
.control-title { font-size: 17px; font-weight: 700; }
.control-detail { color: var(--muted); font-size: 13px; margin-top: 2px; }
.control-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-big {
  flex: 1; min-width: 220px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 18px; border-radius: 12px; border: 0; font-weight: 700; font-size: 15px; color: #04130d;
  background: var(--green); transition: filter .15s;
}
.btn-big:hover { filter: brightness(1.08); }
.btn-big:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn-big.stop { background: var(--amber); color: #1a1203; }
.control-card .notice { margin: 0; }
.filter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.filter-head b { font-size: 15px; }
.filter-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.filter-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.range { display: flex; align-items: center; gap: 6px; }
.range i { font-style: normal; color: var(--dim); }
.range input { width: 120px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(3,7,18,.6); font-variant-numeric: tabular-nums; }
#fMinDays, #fMaxDays { width: 76px; }
.range input:focus { outline: none; border-color: rgba(56,189,248,.6); }
.filter-row .btn-sm { padding: 10px 16px; }
.presets .chip { padding: 5px 12px; font-size: 12.5px; }
.active-list { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 90px; }
.btn-sm.danger { border-color: rgba(239,68,68,.5); color: #fecaca; }
.btn-sm.danger:hover { background: rgba(239,68,68,.15); }
.empty-row { padding: 18px; margin: 0; text-align: center; }
@media (max-width: 1100px) { .control-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .btn-big { min-width: 0; }
  .control-actions > * { flex: 1 1 100%; justify-content: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 22px; }
  .card-head .chips { flex-wrap: wrap; }
  .search { width: 100%; }
  .range input { width: 100px; }
}

/* ------------------------------------------------------------- orgs -- */
.org-switch svg { color: var(--violet); }
.org-switch select { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.src-badge { align-self: center; }
.orgs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.orgs-left, .orgs-editor { display: grid; gap: 14px; min-width: 0; }
.card-title-plain { font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: #c7d2ea; margin-bottom: 12px; }
.org-new-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; }
.org-new-row label { display: block; min-width: 0; }
.org-new-row .btn-sm { padding: 12px 16px; }
#orgsTable tr.sel { background: rgba(56,189,248,.08); box-shadow: inset 3px 0 0 var(--cyan); }
#orgsTable code { font-size: 12px; color: var(--muted); }
.editor-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.editor-head h3 { margin: 0; font-size: 18px; }
.editor-head code { color: var(--muted); font-size: 12px; }
.editor-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 12px; }
.form-grid label { display: block; min-width: 0; }
.form-grid .select-wrap { display: block; }
.form-grid .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 24px; }
.form-grid .switch-row .lbl { margin: 0; }
.form-grid .switch { display: inline-block; }
.json-grid { margin-top: 12px; }
.json-grid .set-err { margin-top: 6px; }
.orgs-editor textarea { margin-bottom: 10px; }
.key-card { margin-bottom: 14px; border-color: rgba(251,191,36,.45); }
.key-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.key-x { font-size: 22px; color: var(--muted); line-height: 1; }
.key-card .notice { margin: 0 0 10px; }
.key-row { display: flex; gap: 10px; align-items: center; }
.key-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 10px 12px; border-radius: 10px; background: rgba(3,7,18,.75); border: 1px solid var(--line-strong); font-size: 13px; color: #c4b5fd; user-select: all; }
.csv-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.csv-row input[type="file"] { flex: 1; min-width: 200px; padding: 8px 10px; font-size: 12.5px; }
.csv-spec summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.csv-spec code { display: block; margin-top: 6px; font-size: 12px; color: #c4b5fd; overflow-wrap: anywhere; }
.csv-stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
@media (max-width: 1100px) { .orgs-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .form-grid, .org-new-row { grid-template-columns: 1fr; } .form-grid .switch-row { padding-top: 0; } }

/* ------------------------------------------------------------ leads -- */
.lead-kpis { padding: 8px 16px; flex-wrap: wrap; }
.lead-kpis .chip b { margin-left: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.lead-count { background: rgba(56,189,248,.85); animation: none; }
.pill.hot { color: #fed7aa; border-color: rgba(249,115,22,.55); background: rgba(239,68,68,.12); }
#leadsTable td { vertical-align: top; }
#leadsTable tr.sel { background: rgba(56,189,248,.08); box-shadow: inset 3px 0 0 var(--cyan); }
#leadsTable .who b { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.lead-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.lead-tags .tag { white-space: nowrap; color: #cbd5e1; }
a.tel { color: #bae6fd; text-decoration: none; font-variant-numeric: tabular-nums; }
a.tel:hover { text-decoration: underline; }
select.lead-status { min-width: 130px; padding: 6px 30px 6px 10px; font-size: 12.5px; }
select.lead-status.live { border-color: rgba(56,189,248,.5); color: #bae6fd; }
select.lead-status.good { border-color: rgba(52,211,153,.45); color: #a7f3d0; }
select.lead-status.mid { border-color: rgba(251,191,36,.4); color: #fde68a; }
select.lead-status.bad { border-color: rgba(239,68,68,.4); color: #fecaca; }
.lead-head { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.lead-head select.lead-status { width: auto; }
.lead-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; margin-bottom: 16px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 13px; line-height: 1.5; }
textarea.lead-note { font-family: inherit; font-size: 13.5px; }
