/* ============================================================
   СИГНАЛ — дизайн-система прототипа
   Светлая оперативная диспетчерская: линейки, моно-цифры,
   сигнальный коралл, плотная приборная сетка.
   ============================================================ */

:root {
  --bg: oklch(0.965 0.006 250);
  --grid: oklch(0.915 0.008 250 / 0.5);
  --surface: oklch(0.995 0.002 250);
  --surface-2: oklch(0.955 0.009 250);
  --surface-3: oklch(0.925 0.011 250);
  --ink: oklch(0.215 0.022 258);
  --ink-2: oklch(0.40 0.02 258);
  --ink-3: oklch(0.53 0.018 258);
  --line: oklch(0.885 0.012 252);
  --line-strong: oklch(0.77 0.016 252);

  --signal: oklch(0.62 0.20 38);
  --signal-2: oklch(0.68 0.19 42);
  --signal-ink: oklch(0.47 0.17 38);
  --signal-soft: oklch(0.945 0.038 48);
  --live: oklch(0.52 0.13 158);
  --live-soft: oklch(0.945 0.04 158);
  --wait: oklch(0.68 0.14 74);
  --wait-soft: oklch(0.955 0.05 82);
  --danger: oklch(0.53 0.19 27);
  --danger-soft: oklch(0.95 0.035 27);
  --info: oklch(0.53 0.11 245);
  --info-soft: oklch(0.95 0.03 245);

  --c1: oklch(0.60 0.17 38);
  --c2: oklch(0.54 0.10 242);
  --c3: oklch(0.52 0.12 160);
  --c4: oklch(0.70 0.13 78);
  --c5: oklch(0.56 0.10 300);

  --sans: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r: 3px;
  --pad: 22px;
  --shadow: 0 18px 44px oklch(0.22 0.02 258 / 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 180ms;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  font-feature-settings: 'ss01' on;
  min-width: 1080px;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
::selection { background: var(--signal-soft); color: var(--ink); }

.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-lg { width: 20px; height: 20px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 9px 14px; border-radius: var(--r);
  text-decoration: none; transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 10px; }

:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }

kbd {
  font-family: var(--mono); font-size: 9px; line-height: 1;
  border: 1px solid oklch(0.55 0.01 250 / 0.7); border-bottom-width: 2px;
  border-radius: 3px; padding: 2px 4px; background: oklch(1 0 0 / 0.08);
  color: inherit;
}

/* ---------------- Демо-обвязка ---------------- */

.demo-bar {
  height: 38px; display: flex; align-items: center; gap: 18px;
  padding: 0 18px; background: oklch(0.20 0.018 258); color: oklch(0.94 0.01 250);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em;
  border-bottom: 1px solid oklch(0.12 0.01 258);
  position: relative; z-index: 30;
}
.demo-brand { display: flex; align-items: center; gap: 8px; }
.demo-mark { width: 8px; height: 8px; background: var(--signal); display: block; }
.demo-word { font-family: var(--sans); font-weight: 700; letter-spacing: 0.18em; font-size: 11px; }
.demo-tag { color: oklch(0.72 0.01 250); border: 1px solid oklch(0.46 0.01 250); padding: 1px 5px; font-size: 9px; }
.demo-switch { display: flex; border: 1px solid oklch(0.42 0.012 255); }
.demo-switch button {
  border: 0; background: transparent; color: oklch(0.78 0.01 250);
  height: 26px; padding: 0 11px; font-size: 10.5px; letter-spacing: 0.02em;
}
.demo-switch button + button { border-left: 1px solid oklch(0.42 0.012 255); }
.demo-switch button:hover { color: #fff; background: oklch(0.27 0.015 255); }
.demo-switch button.is-on { background: oklch(0.96 0.005 250); color: oklch(0.20 0.02 258); }
.demo-actions { display: flex; gap: 6px; margin-left: auto; }
.demo-actions button {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  background: transparent; border: 1px solid oklch(0.42 0.012 255); color: oklch(0.82 0.01 250);
  font-size: 10px;
}
.demo-actions button:hover { border-color: oklch(0.72 0.01 250); color: #fff; }
.demo-actions .icon { width: 12px; height: 12px; }
.demo-note { color: oklch(0.66 0.01 250); font-size: 9.5px; }

body.present .demo-bar { display: none; }

/* ---------------- Верхняя панель ---------------- */

.console { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 60px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 var(--pad); background: var(--surface);
  border-bottom: 1px solid var(--ink);
  position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 13px; height: 13px; background: var(--signal); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 4px; background: var(--surface); }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; }
.brand-sub { font-size: 7.5px; font-weight: 600; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; }
.topbar-sep { width: 1px; height: 26px; background: var(--line); }
.topbar-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-title strong { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.topbar-title span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.clock b { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.clock span { font-size: 9px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ink-2); white-space: nowrap; }
.conn-dot { width: 6px; height: 6px; background: var(--live); border-radius: 50%; box-shadow: 0 0 0 3px var(--live-soft); }
.person { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
}
.avatar.is-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.person-meta { display: flex; flex-direction: column; line-height: 1.25; }
.person-meta b { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.person-meta span { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.icon-btn.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Вкладки управляющего */
.nav-tabs { display: flex; align-self: stretch; margin-left: 4px; }
.nav-tab {
  position: relative; border: 0; background: transparent; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  border-bottom: 2px solid transparent;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.is-on { color: var(--ink); border-bottom-color: var(--signal); }
.nav-tab .count {
  font-family: var(--mono); font-size: 9px; padding: 1px 4px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.nav-tab.is-on .count { background: var(--signal-soft); border-color: oklch(0.82 0.06 45); color: var(--signal-ink); }

/* ---------------- Статус-полоса ---------------- */

.statusbar {
  height: 44px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 var(--pad); background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.status-item { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }
.status-item b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink); }
.status-item .icon { width: 13px; height: 13px; color: var(--ink-3); }
.statusbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.badge.is-live { color: var(--live); border-color: oklch(0.80 0.05 158); background: var(--live-soft); }
.badge.is-warn { color: var(--signal-ink); border-color: oklch(0.84 0.07 48); background: var(--signal-soft); }
.badge.is-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------------- Рабочая область и панели ---------------- */

.workspace { padding: 16px var(--pad) 26px; flex: 1; min-width: 0; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.page-title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.page-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.head-tools { display: flex; align-items: center; gap: 8px; }

.panel { background: var(--surface); border: 1px solid var(--line-strong); min-width: 0; position: relative; }
.panel-head {
  min-height: 38px; display: flex; align-items: center; gap: 9px;
  padding: 0 12px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.panel-head.is-tint { background: var(--surface-2); }
.panel-index { font-family: var(--mono); font-size: 9px; color: var(--ink-3); letter-spacing: 0.04em; }
.panel-label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.panel-count { font-family: var(--mono); font-size: 9.5px; padding: 1px 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.panel-head .panel-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.panel-link { border: 0; background: none; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 4px 2px; }
.panel-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.panel-link .icon { width: 12px; height: 12px; }
.panel-body { padding: 12px; }
.panel-note { font-size: 10px; color: var(--ink-3); line-height: 1.5; }

/* ---------------- KPI ---------------- */

.kpi-strip {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line-strong);
  margin-bottom: 14px;
}
.kpi { padding: 11px 13px 9px; border-right: 1px solid var(--line); min-width: 0; position: relative; }
.kpi:last-child { border-right: 0; }
.kpi-label { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.kpi-label .icon { width: 11px; height: 11px; }
.kpi-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 3px; }
.kpi-value { font-family: var(--mono); font-size: 28px; line-height: 1.05; font-weight: 500; letter-spacing: -0.045em; white-space: nowrap; }
.kpi-value small { font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 3px; min-height: 15px; }
.kpi-meta { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; }
.kpi-meta b { color: var(--ink-2); font-weight: 600; }
.kpi-meta.is-bad b { color: var(--danger); }
.kpi-meta.is-warn b { color: var(--signal-ink); }
.kpi-meta.is-good b { color: var(--live); }
.kpi .spark { width: 56px; height: 17px; opacity: 0.85; flex: none; }
.kpi.is-alert { background: var(--signal-soft); }
.kpi.is-alert .kpi-value { color: var(--signal-ink); }

/* ---------------- Таблицы ---------------- */

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th {
  text-align: left; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; padding: 7px 10px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.data-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; height: 41px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background var(--t); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr.is-selected { background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.data-table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; white-space: nowrap; }
.data-table .t-strong { font-weight: 600; }
.data-table .t-sub { display: block; font-size: 9.5px; color: var(--ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tr.is-urgent td { background: oklch(0.965 0.025 45); }
.data-table tr.is-urgent:hover td { background: oklch(0.945 0.04 45); }
.cell-caller { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cell-caller > div { min-width: 0; }
.caller-badge {
  width: 25px; height: 25px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  font-family: var(--mono); font-size: 8.5px; font-weight: 600; color: var(--ink-2);
}
.caller-badge.is-unknown { border-style: dashed; color: var(--ink-3); }
.caller-badge.is-vip { border-color: oklch(0.78 0.08 42); background: var(--signal-soft); color: var(--signal-ink); }
.tag {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  font-size: 8.5px; line-height: 1; padding: 3px 5px;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface);
}
.tag.is-vip { border-color: oklch(0.82 0.07 45); background: var(--signal-soft); color: var(--signal-ink); }
.tag.is-live { border-color: oklch(0.80 0.05 158); background: var(--live-soft); color: oklch(0.40 0.10 158); }
.tag.is-warn { border-color: oklch(0.84 0.06 78); background: var(--wait-soft); color: oklch(0.46 0.10 70); }
.tag.is-quiet { border-color: transparent; background: var(--surface-2); color: var(--ink-3); }
.tag-row { display: flex; gap: 4px; flex-wrap: wrap; }

.wait-cell { display: flex; flex-direction: column; gap: 4px; }
.wait-line { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.wait-track { height: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.wait-fill { height: 100%; background: var(--ink-3); transition: width 1s linear; }
.wait-fill.is-warn { background: var(--wait); }
.wait-fill.is-hot { background: var(--signal); }
.wait-time { font-family: var(--mono); font-size: 11px; font-weight: 500; }
.wait-time.is-warn { color: oklch(0.55 0.13 70); }
.wait-time.is-hot { color: var(--signal-ink); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 600;
  white-space: nowrap; text-decoration: none;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 14px; height: 14px; }
.btn.is-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.is-primary:hover { background: oklch(0.30 0.02 258); border-color: oklch(0.30 0.02 258); }
.btn.is-signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn.is-signal:hover { background: var(--signal-ink); border-color: var(--signal-ink); }
.btn.is-live { background: var(--live); border-color: var(--live); color: #fff; }
.btn.is-live:hover { background: oklch(0.44 0.12 158); border-color: oklch(0.44 0.12 158); }
.btn.is-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.is-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.is-outline { background: transparent; }
.btn.is-danger { background: transparent; border-color: oklch(0.72 0.13 27); color: var(--danger); }
.btn.is-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.is-sm { height: 26px; padding: 0 8px; font-size: 10px; gap: 5px; }
.btn.is-sm .icon { width: 12px; height: 12px; }
.btn.is-xs { height: 22px; padding: 0 6px; font-size: 9px; gap: 4px; }
.btn.is-xs .icon { width: 11px; height: 11px; }
.btn.is-xl { height: 46px; padding: 0 22px; font-size: 13px; }
.btn.is-xl .icon { width: 18px; height: 18px; }
.btn.is-block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: 0.42; pointer-events: none; }
.btn-icon {
  width: 26px; height: 26px; display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
}
.btn-icon:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.btn-icon .icon { width: 14px; height: 14px; }
.btn-icon.is-danger { color: var(--danger); }

/* Статусы */
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-dot.is-ready { background: var(--live); box-shadow: 0 0 0 3px var(--live-soft); }
.status-dot.is-talking { background: var(--signal); }
.status-dot.is-hold { background: var(--wait); }
.status-dot.is-break { background: var(--ink-3); }
.status-dot.is-away { background: var(--wait); }
.status-dot.is-offline { background: var(--line-strong); }
.state-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ink-2); white-space: nowrap; }
.state-label b { font-weight: 600; color: var(--ink); }
.state-label.is-live b { color: var(--signal-ink); }
.state-label.is-ready b { color: oklch(0.40 0.10 158); }

/* ---------------- Пульт управляющего ---------------- */

.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 14px; align-items: start; }
.live-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.live-main .table-wrap { overflow-x: hidden; }
.live-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.queue-table col.c-time { width: 38px; }
.queue-table col.c-caller { width: auto; }
.queue-table col.c-queue { width: 100px; }
.queue-table col.c-wait { width: 92px; }
.queue-table col.c-priority { width: 86px; }
.queue-table col.c-action { width: 118px; }
.queue-table th, .queue-table td { padding-left: 8px; padding-right: 8px; }
.queue-table td:last-child { padding-right: 6px; }
.queue-table td:last-child .btn { max-width: 100%; padding-left: 7px; padding-right: 7px; font-size: 9.5px; }

.queue-table .queue-name { font-size: 10.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.queue-pip { width: 5px; height: 5px; background: var(--ink-3); }
.queue-pip.q-sales { background: var(--c1); }
.queue-pip.q-support { background: var(--c2); }
.queue-pip.q-vip { background: var(--c3); }
.queue-pip.q-returns { background: var(--c4); }

.active-table col.c-agent { width: 142px; }
.active-table col.c-caller { width: auto; }
.active-table col.c-queue { width: 92px; }
.active-table col.c-dur { width: 74px; }
.active-table col.c-state { width: 92px; }
.active-table col.c-act { width: 78px; }
.agent-cell { display: flex; align-items: center; gap: 7px; min-width: 0; }
.agent-cell .avatar { width: 23px; height: 23px; font-size: 8px; }
.agent-cell b { font-size: 11px; display: block; }
.agent-cell span { font-size: 9px; color: var(--ink-3); display: block; }
.row-actions { display: flex; justify-content: flex-end; gap: 1px; }

/* Лента событий */
.events { display: flex; flex-direction: column; }
.event-row { display: grid; grid-template-columns: 58px 8px 1fr; gap: 9px; align-items: baseline; padding: 6px 12px; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.event-row:last-child { border-bottom: 0; }
.event-time { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }
.event-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); align-self: center; }
.event-dot.is-live { background: var(--signal); }
.event-dot.is-return { background: var(--wait); }
.event-dot.is-good { background: var(--live); }
.event-text { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-text b { color: var(--ink); font-weight: 600; }

/* Операторы */
.agent-summary { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.agent-summary span { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--ink-3); white-space: nowrap; }
.agent-summary b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.agent-list { max-height: 220px; overflow-y: auto; }
.agent-row {
  width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) 54px;
  gap: 9px; align-items: center; padding: 7px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; transition: background var(--t);
}
.agent-row:hover { background: var(--surface-2); }
.agent-row:last-child { border-bottom: 0; }
.agent-main { min-width: 0; }
.agent-name { display: flex; align-items: baseline; gap: 6px; font-size: 11px; font-weight: 600; }
.agent-name em { font-family: var(--mono); font-style: normal; font-size: 9px; font-weight: 400; color: var(--ink-3); }
.agent-detail { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-detail b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
.agent-load { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.agent-load span { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.load-track { width: 46px; height: 3px; background: var(--surface-3); }
.load-fill { height: 100%; background: var(--ink-3); }
.load-fill.is-high { background: var(--signal); }
.load-fill.is-mid { background: var(--wait); }
.load-fill.is-good { background: var(--live); }

/* Графики */
.chart { padding: 10px 12px 8px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.chart-total { font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: -0.03em; }
.chart-total small { font-family: var(--sans); font-size: 9px; color: var(--ink-3); font-weight: 400; margin-left: 3px; }
.legend { display: flex; align-items: center; gap: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--ink-3); white-space: nowrap; }
.legend i { width: 6px; height: 6px; background: var(--ink-2); display: inline-block; }
.legend i.is-signal { background: var(--signal); }
.legend i.is-live { background: var(--live); }
.legend i.is-wait { background: var(--wait); }
.bar-chart { position: relative; height: 116px; display: flex; align-items: flex-end; gap: 3px; padding-top: 6px; }
.chart-grid { position: absolute; inset: 6px 0 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; border-top: 1px solid var(--line); }
.bar-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.bar-stack { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 100%; gap: 1px; }
.bar-seg { width: 100%; min-height: 1px; background: var(--ink-2); transition: height 300ms var(--ease); }
.bar-seg.is-missed { background: var(--signal); }
.bar-col:hover .bar-seg { opacity: 0.8; }
.bar-axis { display: flex; gap: 3px; margin-top: 5px; }
.bar-axis span { flex: 1; text-align: center; font-family: var(--mono); font-size: 7.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.target-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ink-3); pointer-events: none; }
.target-line span { position: absolute; right: 0; top: -12px; font-size: 7.5px; color: var(--ink-3); background: var(--surface); padding-left: 3px; }

.sla-list { padding: 4px 12px 10px; }
.sla-row { display: grid; grid-template-columns: 66px 1fr 30px; align-items: center; gap: 8px; padding: 4px 0; }
.sla-row .name { font-size: 9.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sla-row .bar { height: 4px; background: var(--surface-3); }
.sla-row .bar i { display: block; height: 100%; background: var(--live); }
.sla-row .bar i.is-warn { background: var(--wait); }
.sla-row .val { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink-2); }

/* Своя линия */
.self-call {
  position: fixed; right: var(--pad); bottom: 18px; width: 410px; z-index: 70;
  background: var(--ink); color: oklch(0.97 0.005 250); border-left: 3px solid var(--signal);
  box-shadow: 0 18px 44px oklch(0.15 0.02 258 / 0.35);
  animation: rise 220ms var(--ease);
}
.self-call-top { display: flex; align-items: center; gap: 7px; padding: 8px 12px 0; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.74 0.01 250); }
.self-call-top .eq { margin-left: auto; }
.self-call-top .hold-note { margin-left: auto; margin-right: 8px; color: var(--wait); letter-spacing: 0.08em; }
.self-call-main { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; }
.self-call-main .avatar { background: oklch(0.30 0.02 258); border-color: oklch(0.45 0.015 258); color: #fff; }
.self-call-main b { display: block; font-size: 12px; }
.self-call-main span { display: block; font-family: var(--mono); font-size: 9.5px; color: oklch(0.76 0.01 250); }
.self-timer { margin-left: auto; font-family: var(--mono); font-size: 21px; letter-spacing: -0.03em; }
.self-actions { display: flex; gap: 5px; padding: 0 12px 10px; }
.self-actions .btn { height: 26px; font-size: 9.5px; background: transparent; border-color: oklch(0.42 0.012 255); color: oklch(0.9 0.01 250); }
.self-actions .btn:hover { background: oklch(0.30 0.02 258); border-color: oklch(0.6 0.01 250); }
.self-actions .btn.is-danger { border-color: oklch(0.52 0.13 27); color: oklch(0.82 0.08 27); }

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i { width: 2px; height: 4px; background: var(--signal); animation: eq 900ms ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: 120ms; height: 8px; }
.eq i:nth-child(3) { animation-delay: 240ms; height: 5px; }
.eq i:nth-child(4) { animation-delay: 360ms; height: 9px; }

/* ---------------- Аналитика ---------------- */

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 14px; }
.analytics-grid > .panel:first-child { display: flex; flex-direction: column; }
.analytics-side { display: flex; flex-direction: column; gap: 14px; }
.hour-chart { padding: 14px 14px 10px; flex: 1; display: flex; flex-direction: column; }
.hour-chart .bar-chart { height: auto; min-height: 188px; flex: 1; }
.hour-chart .bar-axis span { font-size: 8px; }
.period-switch { display: inline-flex; border: 1px solid var(--line-strong); }
.period-switch button { border: 0; border-right: 1px solid var(--line); background: var(--surface); height: 28px; padding: 0 10px; font-size: 10.5px; color: var(--ink-2); }
.period-switch button:last-child { border-right: 0; }
.period-switch button:hover { background: var(--surface-2); }
.period-switch button.is-on { background: var(--ink); color: #fff; }
.filter-select {
  height: 28px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 24px 0 8px;
  font-size: 10.5px; color: var(--ink-2); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 12px) 12px, calc(100% - 8px) 12px;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}

.reason-body { display: flex; align-items: center; gap: 16px; padding: 14px; }
.donut { width: 112px; height: 112px; border-radius: 50%; position: relative; flex: none; background: conic-gradient(var(--c1) 0 42%, var(--c2) 42% 69%, var(--c3) 69% 87%, var(--c4) 87% 100%); }
.donut::after { content: ''; position: absolute; inset: 26px; background: var(--surface); border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 1; }
.donut-center b { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.donut-center span { font-size: 7.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.reason-legend { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.reason-legend div { display: grid; grid-template-columns: 7px 1fr 28px; gap: 6px; align-items: center; font-size: 9.5px; color: var(--ink-2); }
.reason-legend i { width: 6px; height: 6px; }
.reason-legend b { font-family: var(--mono); font-weight: 500; text-align: right; color: var(--ink); }

.queue-bars { padding: 6px 14px 12px; }
.queue-bar-row { padding: 7px 0; border-bottom: 1px solid var(--line); }
.queue-bar-row:last-child { border-bottom: 0; }
.queue-bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.queue-bar-top span { font-size: 10.5px; font-weight: 500; }
.queue-bar-top b { font-family: var(--mono); font-size: 10px; font-weight: 500; }
.queue-bar-top em { font-style: normal; font-size: 9px; color: var(--ink-3); margin-left: 4px; }
.queue-bar-track { height: 5px; background: var(--surface-3); display: flex; }
.queue-bar-fill { height: 100%; }
.queue-bar-meta { display: flex; justify-content: space-between; margin-top: 3px; font-size: 8.5px; color: var(--ink-3); }
.analytics-table th[data-sort] { cursor: pointer; user-select: none; }
.analytics-table th[data-sort]:hover { color: var(--ink); }
.analytics-table th .sort-ind { color: var(--signal); margin-left: 3px; }
.analytics-table td.is-low { color: var(--danger); font-weight: 600; }
.analytics-table td.is-good { color: oklch(0.40 0.10 158); }
.analytics-table col.c-num { width: 52px; }
.analytics-table col.c-name { width: 180px; }
.analytics-table col.c-ext { width: 62px; }
.analytics-table col.c-talk { width: 90px; }
.analytics-table col.c-load { width: 150px; }
.analytics-table col.c-pct { width: 70px; }
.load-cell { display: flex; align-items: center; gap: 7px; }
.load-cell .load-track { width: 74px; }

/* ---------------- Записи ---------------- */

.recordings-layout { display: grid; grid-template-columns: 490px minmax(0, 1fr); gap: 14px; align-items: start; }
.rec-filters { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 8px; width: 14px; height: 14px; color: var(--ink-3); pointer-events: none; }
.search-field input {
  width: 100%; height: 32px; border: 1px solid var(--line-strong); background: var(--surface);
  padding: 0 8px 0 29px; font-size: 11px; outline-offset: 0;
}
.search-field input::placeholder { color: var(--ink-3); opacity: 1; }
.search-field input:focus { border-color: var(--ink); }
.filter-row { display: flex; align-items: center; gap: 6px; }
.filter-row .filter-select { flex: 1; min-width: 0; }
.result-count { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--ink-3); white-space: nowrap; }
.rec-list { max-height: 640px; overflow-y: auto; }
.rec-row {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px; align-items: center; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; transition: background var(--t);
}
.rec-row:last-child { border-bottom: 0; }
.rec-row:hover { background: var(--surface-2); }
.rec-row.is-on { background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.rec-time { display: flex; flex-direction: column; gap: 1px; font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.rec-time span { font-size: 8px; color: var(--ink-3); }
.rec-main { min-width: 0; }
.rec-name { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-sub { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rec-dur { font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); }
.rec-status { font-size: 7.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--live); display: inline-flex; align-items: center; gap: 3px; }
.rec-status .status-dot { width: 4px; height: 4px; box-shadow: none; }
.rec-detail { min-height: 300px; }
.rec-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.rec-head .caller-badge { width: 38px; height: 38px; font-size: 11px; }
.rec-head-main { min-width: 0; flex: 1; }
.rec-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.rec-head-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; font-size: 10.5px; color: var(--ink-3); }
.rec-head-sub b { color: var(--ink-2); font-weight: 500; }
.rec-head-tools { display: flex; gap: 4px; }
.rec-player { padding: 14px 18px; background: var(--ink); color: #fff; }
.player-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.player-label { font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.74 0.01 250); }
.player-note { margin-left: auto; font-family: var(--mono); font-size: 8.5px; color: oklch(0.7 0.01 250); }
.player-main { display: flex; align-items: center; gap: 12px; }
.player-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid oklch(0.55 0.01 250);
  display: grid; place-items: center; background: transparent; color: #fff; flex: none;
}
.player-btn:hover { background: oklch(0.30 0.02 258); }
.player-btn .icon { width: 16px; height: 16px; }
.wave { flex: 1; height: 42px; display: flex; align-items: center; gap: 2px; cursor: pointer; min-width: 0; }
.wave-bar { flex: 1; min-width: 1px; background: oklch(0.48 0.01 250); transition: background 80ms linear; }
.wave-bar.is-played { background: var(--signal-2); }
.player-time { font-family: var(--mono); font-size: 10px; color: oklch(0.85 0.01 250); white-space: nowrap; }
.player-time b { color: #fff; font-weight: 500; }
.player-controls { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-left: 50px; }
.speed-btn { border: 1px solid oklch(0.40 0.01 250); background: transparent; color: oklch(0.75 0.01 250); height: 20px; padding: 0 6px; font-family: var(--mono); font-size: 8.5px; }
.speed-btn.is-on { background: #fff; color: var(--ink); border-color: #fff; }
.player-controls .spacer { flex: 1; }
.player-controls .hint { font-size: 8.5px; color: oklch(0.65 0.01 250); }

.rec-body { padding: 14px 18px 18px; }
.summary-block { border-left: 2px solid var(--signal); padding: 2px 0 2px 10px; margin-bottom: 12px; }
.summary-block h3 { font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.summary-block p { font-size: 11.5px; line-height: 1.55; color: var(--ink-2); max-width: 75ch; }
.rec-meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 9px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.meta-pair { display: flex; flex-direction: column; gap: 1px; }
.meta-pair span { font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.meta-pair b { font-size: 10.5px; font-weight: 500; }
.transcript-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.transcript-head h3 { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.transcript-head .panel-count { font-size: 8.5px; }
.transcript-search { margin-left: auto; width: 210px; }
.transcript-search input { height: 27px; font-size: 10px; }
.transcript { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); }
.tr-line { display: grid; grid-template-columns: 40px 64px minmax(0, 1fr); gap: 9px; padding: 8px 2px; border-bottom: 1px dashed var(--line); align-items: baseline; }
.tr-line:last-child { border-bottom: 0; }
.tr-line:hover { background: var(--surface-2); }
.tr-time { font-family: var(--mono); font-size: 9px; color: var(--ink-3); cursor: pointer; }
.tr-time:hover { color: var(--signal-ink); text-decoration: underline; }
.tr-speaker { font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tr-speaker.is-agent { color: var(--info); }
.tr-speaker.is-client { color: var(--signal-ink); }
.tr-text { font-size: 12px; line-height: 1.55; color: var(--ink-2); max-width: 78ch; }
.tr-text mark { background: var(--wait-soft); color: var(--ink); padding: 0 1px; }
.tr-line.is-dim { opacity: 0.35; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--ink-3); }
.empty-state .icon { width: 26px; height: 26px; margin: 0 auto 8px; color: var(--line-strong); }
.empty-state b { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
.empty-state p { font-size: 10px; line-height: 1.6; max-width: 260px; margin: 0 auto; }

/* ---------------- УРМ ---------------- */

.agent-status-switch { display: inline-flex; border: 1px solid var(--line-strong); }
.agent-status-switch button {
  border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--ink-3);
  height: 28px; padding: 0 9px; font-size: 10px; display: inline-flex; align-items: center; gap: 5px;
}
.agent-status-switch button:last-child { border-right: 0; }
.agent-status-switch button:hover { background: var(--surface-2); color: var(--ink); }
.agent-status-switch button.is-on { background: var(--live-soft); color: oklch(0.38 0.10 158); font-weight: 600; }
.agent-status-switch button.is-on.is-warn { background: var(--wait-soft); color: oklch(0.42 0.10 70); }
.agent-status-switch button.is-on.is-quiet { background: var(--surface-3); color: var(--ink-2); }
.agent-status-switch button[disabled] { opacity: 0.5; cursor: not-allowed; background: var(--surface-2); }
.agent-status-switch .status-dot { width: 5px; height: 5px; box-shadow: none; }
.shift-clock { display: flex; flex-direction: column; align-items: flex-end; }
.shift-clock b { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.shift-clock span { font-size: 8.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }

.ext-strip { display: flex; align-items: center; gap: 6px; }
.ext-chip {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 7px 0 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  transition: border-color var(--t), background var(--t);
}
.ext-chip:hover { border-color: var(--ink-3); }
.ext-chip.is-on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -2px 0 var(--live); }
.ext-chip.is-target { border-color: var(--signal); box-shadow: inset 0 -2px 0 var(--signal); background: var(--signal-soft); }
.ext-num { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.ext-label { font-size: 9px; color: var(--ink-3); white-space: nowrap; }
.ext-label b { color: var(--ink-2); font-weight: 500; }
.ext-toggle { width: 20px; height: 11px; border: 1px solid var(--line-strong); background: var(--surface-2); position: relative; margin-left: 2px; }
.ext-toggle::after { content: ''; position: absolute; top: 1px; left: 1px; width: 7px; height: 7px; background: var(--ink-3); transition: transform var(--t), background var(--t); }
.ext-chip.is-on .ext-toggle { border-color: var(--live); background: var(--live-soft); }
.ext-chip.is-on .ext-toggle::after { transform: translateX(9px); background: var(--live); }
.ext-note { font-size: 9px; color: var(--ink-3); white-space: nowrap; margin-left: 4px; }

.agent-grid { display: grid; grid-template-columns: 292px minmax(0, 1fr) 354px; gap: 14px; align-items: stretch; }
.agent-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.agent-col > .panel { flex: 1; }
.agent-context { display: flex; flex-direction: column; }

.client-panel { display: flex; flex-direction: column; min-height: 588px; }
.client-head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.client-head .avatar { width: 42px; height: 42px; font-size: 12px; }
.client-head .name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.client-head .company { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.client-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.client-rows { padding: 4px 14px; }
.client-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.client-row:last-child { border-bottom: 0; }
.client-row span { color: var(--ink-3); }
.client-row b { font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.client-note { margin: 8px 14px 12px; padding: 8px 10px; background: var(--surface-2); border-left: 2px solid var(--line-strong); font-size: 10px; line-height: 1.55; color: var(--ink-2); }
.client-note b { display: block; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.client-actions { margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--line); display: flex; gap: 6px; }
.client-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 8px; }
.client-empty .empty-rings { width: 58px; height: 58px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; position: relative; }
.client-empty .empty-rings::before, .client-empty .empty-rings::after { content: ''; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.client-empty .empty-rings::before { inset: 7px; }
.client-empty .empty-rings::after { inset: 15px; }
.client-empty .icon { width: 18px; height: 18px; color: var(--ink-3); }
.client-empty b { font-size: 12px; color: var(--ink-2); }
.client-empty p { font-size: 10px; color: var(--ink-3); line-height: 1.55; max-width: 210px; }

.call-panel { display: flex; flex-direction: column; min-height: 588px; }
.call-spine { display: flex; align-items: center; height: 42px; border-bottom: 1px solid var(--line); background: var(--surface-2); padding: 0 14px; gap: 6px; flex: none; }
.spine-step { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.spine-step i { width: 16px; height: 16px; display: grid; place-items: center; font-family: var(--mono); font-style: normal; font-size: 8px; border: 1px solid var(--line-strong); background: var(--surface); }
.spine-step.is-on { color: var(--ink); font-weight: 600; }
.spine-step.is-on i { background: var(--ink); border-color: var(--ink); color: #fff; }
.spine-step.is-done i { border-color: var(--live); color: var(--live); }
.spine-line { flex: 1; height: 1px; background: var(--line); min-width: 8px; }
.call-stage { flex: 1; display: flex; flex-direction: column; position: relative; min-height: 0; }
.call-inner { padding: 20px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.call-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }

.idle-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.idle-graphic { width: 86px; height: 86px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; position: relative; margin-bottom: 16px; }
.idle-graphic::before { content: ''; position: absolute; inset: 10px; border: 1px dashed var(--line-strong); border-radius: 50%; }
.idle-graphic::after { content: ''; position: absolute; inset: 21px; border: 1px solid var(--line); border-radius: 50%; }
.idle-graphic .icon { width: 24px; height: 24px; color: var(--ink-3); z-index: 1; }
.idle-state h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.idle-state p { font-size: 11px; color: var(--ink-3); margin-top: 4px; max-width: 300px; line-height: 1.55; }
.idle-actions { display: flex; gap: 7px; margin-top: 14px; }
.idle-hint { margin-top: 14px; font-size: 9.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.queue-peek { margin-top: 18px; width: 100%; max-width: 430px; border-top: 1px solid var(--line); padding-top: 8px; }
.queue-peek-head { display: flex; align-items: center; justify-content: space-between; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.peek-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 10px; color: var(--ink-2); }
.peek-row .caller-badge { width: 19px; height: 19px; font-size: 7px; }
.peek-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-row .wait-time { margin-left: auto; font-size: 9.5px; }
.peek-row .tag { font-size: 7.5px; }

.ring-state { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 26px 28px; background: linear-gradient(180deg, var(--signal-soft), var(--surface) 78%); border-top: 2px solid var(--signal); }
.ring-kicker { display: flex; align-items: center; gap: 8px; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-ink); font-weight: 600; }
.ring-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); position: relative; }
.ring-pulse::after { content: ''; position: absolute; inset: -4px; border: 1px solid var(--signal); border-radius: 50%; animation: ring 1.4s ease-out infinite; }
.ring-name { font-size: 33px; font-weight: 600; letter-spacing: -0.035em; margin-top: 14px; line-height: 1.08; max-width: 560px; }
.ring-company { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.ring-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ring-num { font-family: var(--mono); font-size: 13px; }
.ring-target { display: inline-flex; align-items: center; gap: 5px; border: 1px solid oklch(0.8 0.07 45); background: var(--surface); padding: 3px 6px; font-size: 9.5px; color: var(--signal-ink); }
.ring-target b { font-family: var(--mono); }
.ring-wait { font-size: 10px; color: var(--ink-3); margin-top: 8px; }
.ring-wait b { font-family: var(--mono); color: var(--ink-2); }
.ring-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.ring-hint { font-size: 9px; color: var(--ink-3); margin-top: 10px; display: flex; gap: 5px; align-items: center; }

.talk-state { flex: 1; display: flex; flex-direction: column; padding: 18px 20px; min-height: 0; }
.talk-head { display: flex; align-items: flex-start; gap: 16px; }
.talk-timer-wrap { min-width: 0; }
.talk-label { display: flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.talk-timer { font-family: var(--mono); font-size: 52px; font-weight: 400; letter-spacing: -0.055em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.talk-caller { margin-left: auto; text-align: right; min-width: 0; max-width: 45%; }
.talk-caller b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk-caller span { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.talk-caller .tag-row { justify-content: flex-end; margin-top: 5px; }
.talk-client-line { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }
.talk-client-line b { color: var(--ink-2); font-weight: 500; }
.call-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.call-control {
  height: 54px; border: 1px solid var(--line-strong); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 9px; color: var(--ink-2); transition: background var(--t), border-color var(--t);
}

/* ============================================================
   2090000 — услуги провайдера, транскрипты, качество речи
   ============================================================ */

.queue-pip.q-telephony { background: var(--c3); }
.queue-pip.q-intercom { background: var(--c4); }
.queue-pip.q-sales { background: var(--c1); }
.queue-pip.q-support { background: var(--c2); }

/* Услуги и нижний блок аналитики */
.analytics-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}
.analytics-services { min-width: 0; }
.service-table col.c-service { width: 31%; }
.service-table col.c-num { width: 10%; }
.service-table col.c-share { width: 16%; }
.service-table col.c-pct { width: 8.6%; }
.service-table th, .service-table td { padding-left: 12px; padding-right: 12px; }
.service-name { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.share-cell { display: flex; align-items: center; gap: 7px; }
.share-track { width: 76px; height: 4px; background: var(--surface-3); position: relative; flex: none; }
.share-fill { position: absolute; inset: 0 auto 0 0; }
.share-cell span { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }
.connection-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.connection-strip > div {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}
.connection-strip > div:last-child { border-right: 0; }
.connection-strip b { display: block; font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: -0.03em; }
.connection-strip span { display: block; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-top: 1px; }
.insight-list { padding: 2px 12px 12px; }
.insight-row { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.insight-row:last-child { border-bottom: 0; }
.insight-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c2); margin-top: 5px; flex: none; }
.insight-dot.is-warn { background: var(--signal); }
.insight-dot.is-good { background: var(--c3); }
.insight-dot.is-muted { background: var(--ink-3); }
.insight-row b { display: block; font-size: 11.5px; line-height: 1.35; }
.insight-row p { font-size: 10.5px; line-height: 1.45; color: var(--ink-3); margin-top: 2px; }

/* Транскрипты */
.transcript-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 14px;
  align-items: start;
}
.transcript-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.transcript-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.transcript-kpis { margin-bottom: 14px; }
.transcript-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.transcript-filters .search-field { flex: 1; min-width: 220px; }
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 8px;
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-chip.is-on { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.transcript-table col.c-time { width: 62px; }
.transcript-table col.c-main { width: 30%; }
.transcript-table col.c-service { width: 16%; }
.transcript-table col.c-dur { width: 9%; }
.transcript-table col.c-status { width: 16%; }
.transcript-table col.c-acc { width: 10%; }
.transcript-table col.c-lag { width: 9%; }
.transcript-table th, .transcript-table td { padding-left: 12px; padding-right: 12px; }
.transcript-row { cursor: pointer; }
.transcript-row.is-on td { background: var(--surface-2); }
.transcript-row.is-on td:first-child { box-shadow: inset 2px 0 0 var(--signal); }
.transcript-time { font-family: var(--mono); font-size: 10px; color: var(--ink-3); display: flex; flex-direction: column; line-height: 1.3; }
.transcript-time span { font-size: 9px; color: var(--ink-3); }
.transcript-main-cell b { display: block; font-size: 11.5px; }
.transcript-main-cell span { display: block; font-size: 9.5px; color: var(--ink-3); margin-top: 1px; }
.transcript-service { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.transcript-status { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); white-space: nowrap; }
.transcript-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.transcript-status.is-ok i { background: var(--c3); }
.transcript-status.is-work i { background: var(--c2); }
.transcript-status.is-warn i { background: var(--signal); }
.transcript-status.is-fail i { background: var(--c1); }
.transcript-detail-head { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.transcript-detail-head b { font-size: 13px; }
.transcript-detail-head span { font-size: 10px; color: var(--ink-3); display: block; margin-top: 2px; }
.transcript-detail-body { padding: 12px; }
.transcript-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.transcript-meta div { border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.transcript-meta span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); display: block; }
.transcript-meta b { font-size: 11.5px; }
.quality-block { margin-top: 12px; }
.quality-row { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 4px; }
.quality-track { height: 5px; background: var(--surface-3); }
.quality-fill { height: 100%; background: var(--c3); }
.quality-fill.is-warn { background: var(--signal); }
.quote-row { border-left: 2px solid var(--line); padding: 4px 0 4px 8px; margin: 8px 0; }
.quote-row time { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.quote-row p { font-size: 11px; line-height: 1.45; }
.transcript-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.transcript-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.topic-bars { padding: 10px 12px 12px; }
.topic-row { margin-bottom: 9px; }
.topic-row:last-child { margin-bottom: 0; }
.topic-head { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; margin-bottom: 4px; }
.topic-head span:last-child { font-family: var(--mono); color: var(--ink-3); }
.topic-track { height: 5px; background: var(--surface-3); }
.topic-fill { height: 100%; background: var(--c2); }
.quality-chart { display: flex; align-items: flex-end; gap: 7px; height: 94px; padding: 12px; }
.quality-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.quality-bar i { width: 100%; background: var(--c3); display: block; min-height: 2px; }
.quality-bar span { font-family: var(--mono); font-size: 8px; color: var(--ink-3); }
.error-list { padding: 4px 12px 12px; }
.error-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.error-row:last-child { border-bottom: 0; }
.error-row time { font-family: var(--mono); font-size: 9px; color: var(--ink-3); flex: none; }
.error-row p { font-size: 10.5px; line-height: 1.4; }
.error-row b { font-size: 10.5px; display: block; }


/* ---------------- Панель перехвата ---------------- */

.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: oklch(0.20 0.02 258 / 0.42);
  backdrop-filter: blur(1px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: 430px; max-width: calc(100vw - 40px);
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--ink);
  box-shadow: var(--shadow);
}
body.has-drawer { overflow: hidden; }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.drawer-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.drawer-head p { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.drawer-call {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.drawer-call .caller-badge { width: 38px; height: 38px; font-size: 11px; }
.drawer-call > div:nth-child(2) { flex: 1; min-width: 0; }
.drawer-call b { display: block; font-size: 12px; }
.drawer-call span { display: block; font-size: 10px; color: var(--ink-3); }
.drawer-call .num { flex: none; text-align: right; font-family: var(--mono); font-size: 10px; line-height: 1.5; color: var(--ink-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-section + .drawer-section { margin-top: 18px; }
.drawer-section-title {
  font-size: 9px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.dest-list { display: flex; flex-direction: column; gap: 6px; }
.dest-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 1px solid var(--line); background: var(--surface);
  text-align: left; transition: background var(--t), border-color var(--t);
}
.dest-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.dest-row.is-on { border-color: var(--signal); background: var(--signal-soft); box-shadow: inset 2px 0 0 var(--signal); }
.dest-row[disabled] { opacity: 0.45; cursor: not-allowed; }
.dest-self { background: var(--surface-2); }
.dest-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dest-main b { font-size: 11.5px; font-weight: 600; }
.dest-main span { font-size: 10px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-side { flex: none; font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.drawer-foot {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.drawer-foot .hint { display: flex; gap: 7px; font-size: 10px; line-height: 1.45; color: var(--ink-3); }
.drawer-foot .hint .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; color: var(--wait); }

@media (max-width: 1280px) {
  .transcript-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .analytics-lower { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1120px) {
  .transcript-layout { grid-template-columns: 1fr; }
  .transcript-side { display: grid; grid-template-columns: 1fr 1fr; }
  .transcript-lower { grid-template-columns: 1fr; }
  .analytics-lower { grid-template-columns: 1fr; }
}

/* ============================================================
   УРМ: нижняя полоса, контекст разговора, обработка после звонка
   ============================================================ */

.field-label { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.note-field {
  width: 100%; min-height: 64px; padding: 7px 9px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface);
  font-size: 11.5px; line-height: 1.45; color: var(--ink-2);
}
.note-field::placeholder { color: var(--ink-3); }
.note-field:focus { outline: none; border-color: var(--ink); background: #fff; }
.link-quiet { border: 0; background: none; padding: 0; font-size: 10px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.link-quiet:hover { color: var(--ink); }

.idle-stats { display: flex; gap: 26px; justify-content: center; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.idle-stat { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.idle-stat b { font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: -0.03em; }
.idle-stat span { font-size: 8.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }

.call-brief { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); width: 100%; max-width: 540px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.brief-note span, .brief-meta div span { font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.brief-note p { font-size: 11px; line-height: 1.5; color: var(--ink-2); margin-top: 2px; }
.brief-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.brief-meta div { display: flex; flex-direction: column; gap: 1px; }
.brief-meta div b { font-family: var(--mono); font-size: 11px; font-weight: 500; }

.hold-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px; text-align: center; background: linear-gradient(180deg, var(--wait-soft), var(--surface) 72%); border-top: 2px solid var(--wait); }
.hold-state h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.hold-state p { font-size: 11px; color: var(--ink-3); }
.hold-state .talk-timer { margin: 6px 0 10px; }
.hold-state .ring-hint { margin-top: 12px; }
.hold-icon { width: 74px; height: 74px; border: 1px solid var(--wait); border-radius: 50%; display: grid; place-items: center; color: oklch(0.52 0.13 74); margin-bottom: 10px; background: var(--surface); position: relative; }
.hold-icon::after { content: ''; position: absolute; inset: -5px; border: 1px solid var(--wait-soft); border-radius: 50%; }
.hold-icon .icon { width: 22px; height: 22px; }

.wrapup { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.wrapup-right { display: flex; flex-direction: column; gap: 6px; }
.wrapup-right .btn { align-self: flex-start; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-action {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 2px;
  font-size: 10px; color: var(--ink-2);
}
.quick-action:hover { border-color: var(--ink-3); background: var(--surface-2); color: var(--ink); }
.quick-action .icon { width: 12px; height: 12px; }
.call-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.call-footer .spacer { flex: 1; }
.call-footer .panel-note { display: inline-flex; align-items: center; gap: 4px; }
.call-footer .panel-note .icon { width: 12px; height: 12px; color: var(--signal); }
.call-control.is-end { color: var(--danger); border-color: oklch(0.84 0.06 27); }
.call-control.is-end:hover { background: var(--danger-soft); border-color: var(--danger); }

.transfer-menu { margin-top: 10px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 10px 24px oklch(0.22 0.02 258 / 0.10); }
.transfer-menu-head { padding: 7px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.transfer-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.transfer-item:last-child { border-bottom: 0; }
.transfer-item:hover { background: var(--surface-2); }
.transfer-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.transfer-item b { font-size: 11px; font-weight: 600; }
.transfer-item > span:nth-child(2) > span { font-size: 9px; color: var(--ink-3); }
.transfer-item .mono { margin-left: auto; font-size: 9px; color: var(--ink-3); }
.transfer-item .icon { width: 13px; height: 13px; color: var(--ink-3); }

.acw-state { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; min-height: 0; }
.acw-head { display: flex; align-items: flex-start; gap: 11px; }
.acw-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.acw-head p { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.icon-wrap { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid oklch(0.80 0.05 158); background: var(--live-soft); color: oklch(0.42 0.11 158); }
.icon-wrap .icon { width: 16px; height: 16px; }
.acw-count { margin-left: auto; text-align: right; }
.acw-count b { display: block; font-family: var(--mono); font-size: 19px; font-weight: 500; letter-spacing: -0.03em; }
.acw-count span { font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.acw-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.acw-summary { font-size: 10.5px; line-height: 1.5; color: var(--ink-2); }
.acw-summary b { display: block; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.acw-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.acw-note { font-size: 9.5px; line-height: 1.5; color: var(--ink-3); }
.acw-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.acw-meta span { display: block; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.acw-meta b { font-size: 10.5px; font-weight: 500; }
.acw-last { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 10px; }
.acw-last b { display: block; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.acw-last p { font-size: 10.5px; line-height: 1.5; color: var(--ink-2); }
.acw-last strong { color: var(--ink); font-weight: 600; }
.acw-actions { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

.context-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.context-tab { flex: 1; height: 30px; border: 0; border-right: 1px solid var(--line); background: transparent; font-size: 10px; color: var(--ink-3); }
.context-tab:last-child { border-right: 0; }
.context-tab:hover { background: var(--surface); color: var(--ink); }
.context-tab.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--signal); }
.context-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.context-empty { padding: 18px 14px; font-size: 10.5px; line-height: 1.55; color: var(--ink-3); }
.context-empty b { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.context-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 9px; color: var(--ink-3); background: var(--surface-2); }
.context-foot .icon { width: 12px; height: 12px; }

.transcript-live { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.transcript-live .right { margin-left: auto; font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.live-lines { flex: 1; overflow-y: auto; max-height: 430px; }
.live-line { padding: 7px 12px; border-bottom: 1px dashed var(--line); }
.live-line:last-child { border-bottom: 0; }
.live-line-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.live-line-top .agent { color: var(--info); }
.live-line-top .client { color: var(--signal-ink); }
.live-line-top time { font-family: var(--mono); font-size: 9px; letter-spacing: 0; text-transform: none; }
.live-line p { font-size: 11.5px; line-height: 1.5; color: var(--ink-2); margin-top: 2px; }

.history-list { overflow-y: auto; padding: 2px 0; }
.history-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 7px 12px; border-bottom: 1px dashed var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row time { font-family: var(--mono); font-size: 9px; color: var(--ink-3); padding-top: 1px; }
.history-row b { display: block; font-size: 11px; font-weight: 600; }
.history-row span { display: block; font-size: 9px; color: var(--ink-3); margin-top: 1px; }
.history-row .tag { margin-top: 0; font-size: 7.5px; }

.mini-history-head { font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.recent-client { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.recent-client:last-child { border-bottom: 0; }
.recent-client time { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }
.recent-client b { display: block; font-size: 10.5px; font-weight: 600; }
.recent-client span { display: block; font-size: 9px; color: var(--ink-3); }
.recent-client em { font-family: var(--mono); font-style: normal; font-size: 9.5px; color: var(--ink-2); }

.notes-pane { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.notes-pane .note-field { min-height: 200px; }

.agent-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--surface); }
.agent-foot-label { font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.agent-foot-stats { display: flex; gap: 16px; }
.agent-foot-stats div { display: flex; align-items: baseline; gap: 4px; }
.agent-foot-stats b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.agent-foot-stats span { font-size: 9px; color: var(--ink-3); }
.agent-foot-list { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.mini-call { display: inline-flex; align-items: baseline; gap: 6px; font-size: 10px; color: var(--ink-2); }
.mini-call b { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--ink-3); }
.mini-call .mono { font-size: 9px; color: var(--ink-3); }

/* ============================================================
   Транскрипты: паспорт записи и метрики распознавания
   ============================================================ */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }

.transcript-detail { display: flex; flex-direction: column; }
.transcript-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.transcript-toolbar .search-field { flex: 1; min-width: 190px; }
.transcript-file b { display: block; font-size: 11.5px; font-weight: 600; }
.transcript-file span { display: block; font-size: 9.5px; color: var(--ink-3); margin-top: 1px; }
.transcript-id { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--ink-3); }
.transcript-detail-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-top: 1px; }
.transcript-detail-head p { font-size: 10px; color: var(--ink-3); margin-top: 1px; }

.transcript-summary { border-left: 2px solid var(--signal); padding: 2px 0 2px 10px; margin-top: 12px; }
.transcript-summary span { display: block; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.transcript-summary p { font-size: 11px; line-height: 1.5; color: var(--ink-2); }

.quality-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; margin-bottom: 5px; color: var(--ink-2); }
.quality-head b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.quality-meter { height: 6px; background: var(--surface-3); }
.quality-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--c2), var(--live)); }
.quality-notes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 8.5px; color: var(--ink-3); }

.transcript-quotes { margin-top: 12px; }
.transcript-quotes > span { display: block; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.quote-row { display: flex; gap: 8px; align-items: baseline; }
.quote-row p { font-size: 11px; line-height: 1.45; }
.quote-time { font-family: var(--mono); font-size: 9px; color: var(--ink-3); flex: none; }

.error-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); margin-top: 5px; flex: none; }
.error-dot.is-warn { background: var(--signal); }
.error-dot.is-info { background: var(--info); }
.error-dot.is-good { background: var(--live); }
.error-row b { font-size: 10.5px; font-weight: 600; }
.error-row p { font-size: 10px; line-height: 1.45; color: var(--ink-3); margin-top: 1px; }
.topic-list { padding: 8px 12px 12px; }
.topic-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font-size: 8.5px; color: var(--ink-3); }

.speech-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.speech-mini b { display: block; font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -0.03em; }
.speech-mini span { display: block; font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.speech-topics { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.speech-topic { display: grid; grid-template-columns: minmax(0, 1fr) 88px 34px; gap: 8px; align-items: center; font-size: 9.5px; color: var(--ink-2); }
.speech-topic > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speech-topic b { font-family: var(--mono); font-size: 9px; font-weight: 500; text-align: right; color: var(--ink-2); }
.speech-track { height: 4px; background: var(--surface-3); }
.speech-track i { display: block; height: 100%; background: var(--c2); }
.analytics-insights, .analytics-lower-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

@media (max-width: 1180px) {
  .agent-foot-list { margin-left: 0; }
  .acw-body { grid-template-columns: 1fr; }
}

.toast { display: flex; align-items: center; gap: 8px; max-width: 330px; padding: 9px 12px; background: var(--ink); color: #fff; font-size: 11px; line-height: 1.4; border-left: 2px solid var(--live); box-shadow: var(--shadow); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.toast .icon { width: 14px; height: 14px; flex: none; color: oklch(0.86 0.05 158); }
.toast.is-warn { border-left-color: var(--wait); }
.toast.is-warn .icon { color: oklch(0.90 0.07 82); }
.toast.is-error { border-left-color: var(--danger); }
.toast.is-error .icon { color: oklch(0.82 0.10 27); }
.toast.is-hide { opacity: 0; transform: translateY(4px); }

.transcript-status.is-ready i { background: var(--c3); }
.transcript-status.is-processing i { background: var(--c2); }
.transcript-status.is-queued i { background: var(--ink-3); }
.transcript-status.is-failed i { background: var(--signal); }
.transcript-status.is-processing { color: var(--ink-2); }
.transcript-status.is-failed { color: var(--signal-ink); }
