:root {
  --coral: #E9684B;
  --blue: #3E8DC4;
  --ink: #23262b;
  --muted: #6b7280;
  --line: #e6e8eb;
  --bg: #f6f7f9;
  --ok: #2e9e5b;
  --warn: #d9822b;
  --bad: #d7443e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 28px 18px 80px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 22px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
label { display: block; font-weight: 600; margin-bottom: 6px; }
select {
  width: 100%; padding: 11px 12px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.hint { color: var(--muted); font-size: .9rem; margin: 8px 0 16px; min-height: 1.2em; }

.btn {
  width: 100%; padding: 14px; font-size: 1.05rem; font-weight: 600;
  border: none; border-radius: 12px; cursor: pointer; color: #fff;
  transition: filter .15s;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn:not(:disabled):hover { filter: brightness(1.05); }
.primary { background: var(--coral); }
.danger { background: var(--bad); }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.callBtns { display: flex; gap: 10px; flex-wrap: wrap; }
.callBtns .btn { width: auto; flex: 1; min-width: 180px; }

/* Суфлёр — подсказка «забыл фразу» */
.hintBox { border: 1.5px solid var(--blue); background: #eef6fc; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; }
.hintBox.pending { border-style: dashed; color: var(--muted); font-size: .92rem; }
.hintLabel { font-weight: 700; color: var(--blue); font-size: .82rem; text-transform: uppercase;
  letter-spacing: .3px; display: block; margin-bottom: 4px; }
.hintText { font-size: 1.15rem; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* Точный код товара (клиент диктует; на слух модель путает цифры) */
.codeBox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 2px solid var(--ok); background: #eafaf0; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; }
.codeLabel { font-weight: 700; color: var(--ok); font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; }
.codeDigits { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.7rem; font-weight: 800;
  letter-spacing: 3px; color: var(--ink); }

.statusRow { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: 0.5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--ok); animation: pulse 1.2s infinite; }
.dot.speaking { background: var(--blue); }
.dot.error { background: var(--bad); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.mic { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
#micBar { height: 100%; width: 0%; background: var(--blue); transition: width .08s; }

.transcript { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.turn { padding: 9px 12px; border-radius: 10px; max-width: 85%; }
.turn.manager { align-self: flex-end; background: #eaf3fb; }
.turn.client { align-self: flex-start; background: #f3f0ee; }
.turn .who { font-size: .72rem; color: var(--muted); display: block; margin-bottom: 2px; }

.gradeBadge { display: inline-block; font-weight: 700; font-size: 1.1rem; padding: 6px 14px; border-radius: 999px; color: #fff; margin-bottom: 12px; }
.g-A { background: var(--ok); }
.g-B { background: #4a9e6b; }
.g-C { background: var(--warn); }
.g-D { background: var(--bad); }
.gate { padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.gate.pass { background: #e7f6ec; color: var(--ok); }
.gate.fail { background: #fdeceb; color: var(--bad); }
.block { margin-bottom: 14px; }
.block h3 { font-size: .95rem; margin: 0 0 6px; }
.block ul { margin: 0; padding-left: 18px; }
.mistake { border-left: 3px solid var(--bad); padding: 4px 0 4px 10px; margin-bottom: 8px; }
.mistake b { color: var(--ink); }
.err { color: var(--bad); font-weight: 600; }
.who { font-weight: 600; color: var(--blue); margin: 0 0 16px; min-height: 1.2em; }

/* ---------- Разбор Call-QA как в CRM (report.js) ---------- */
.report { font-size: .95rem; }
.rHead { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.rTitle { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.rMeta { display: grid; grid-template-columns: 1fr; gap: 4px; }
.rMeta > div { display: flex; gap: 8px; font-size: .9rem; }
.rMeta > div > span { color: var(--muted); min-width: 140px; flex: none; }
.rGrade { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.rGradeLabel { color: #fff; font-weight: 700; padding: 4px 14px; border-radius: 999px; font-size: 1.05rem; }
.rGradePct { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.rGate { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.rGate.pass { background: #e7f6ec; color: var(--ok); }
.rGate.fail { background: #fdeceb; color: var(--bad); }
.rBlock { margin-top: 14px; }
.rBlock h3 { font-size: .95rem; margin: 0 0 6px; }
.rQuote { border-left: 3px solid var(--blue); padding: 4px 0 4px 10px; margin: 6px 0; color: #444; }
.rSkill { background: #eef6fc; border-radius: 10px; padding: 10px 14px; }
.rSkill h3 { color: var(--blue); }
.rCrits { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rCrit { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f0f2f4; font-size: .9rem; }
.rCrit:last-child { border-bottom: none; }
.rcId { font-weight: 700; color: var(--muted); min-width: 44px; flex: none; }
.rcTitle { flex: 1; }
.rcComment { color: var(--muted); font-size: .85rem; }
.rcStatus { white-space: nowrap; font-weight: 600; flex: none; }
.rRecs { margin: 0; padding-left: 22px; }
.rRecs li { margin: 4px 0; }
