:root {
  color-scheme: light;
  --surface: #fff; --surface-2: #f8fafc; --surface-3: #f3f4f6; --border-strong: #d1d5db; --border-hover: #9ca3af;
  --text-2: #374151; --bad-soft: #fff7f7; --bad-line: #fca5a5; --warn-soft: #fffbeb; --warn-line: #fcd34d;
  --orange-soft: #ffedd5; --orange: #9a3412; --info-soft: #eff6ff; --info-line: #93c5fd;
  --bg: #f4f5f7; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e5e7eb;
  --brand: #e2231a; --brand-d: #b81a13; --brand-rgb: 226, 35, 26; --brand-ring: #fde2e1; --brand-tint: #fff5f5;
  --accent: #e2231a; --top-bg: #111827; --top-bg2: #1f2937; --top-fg: #cbd5e1; --on-accent: #fff; --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7;
  --bad: #b91c1c; --bad-bg: #fee2e2; --info-bg: #e0e7ff; --info: #3730a3; --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0 0 6px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 14px; margin: 16px 0 6px; }
code { background: var(--surface-3); padding: 1px 4px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; }

/* header */
.top { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 54px; background: var(--top-bg); color: #fff; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 18px; }
.brand span { color: var(--brand); font-weight: 600; font-size: 13px; margin-left: 4px; }
.top nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.top nav a { color: var(--top-fg); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.top nav a.on, .top nav a:hover { background: var(--top-bg2); color: #fff; text-decoration: none; }
.top .right { display: flex; align-items: center; gap: 12px; }
.top .who { color: var(--top-fg); font-size: 13px; }
.top button.link { color: var(--top-fg); }
.langs a { padding: 2px 6px; border-radius: 5px; color: inherit; opacity: .6; }
.langs a.on { opacity: 1; background: var(--accent); color: var(--on-accent); }
.top .langs a { color: #fff; }

main { max-width: 1200px; margin: 20px auto; padding: 0 16px; }
main.wide { max-width: 1400px; }
main.center { display: flex; justify-content: center; align-items: center; min-height: 90vh; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.alert { border-color: var(--bad-line); background: var(--bad-soft); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.login { width: 340px; display: flex; flex-direction: column; gap: 12px; }

/* forms */
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 140px; }
.inline-form label { flex-direction: row; align-items: center; gap: 8px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters input:not([type=date]) { flex: 1; min-width: 200px; }
.filters input[type=date], .filters select { width: auto; }
.filters .push { margin-left: auto; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-top: 6px; }
.hint { background: var(--surface-2); border: 1px dashed var(--line); padding: 10px; border-radius: 8px; }
.sync-row { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { padding: 14px 26px; font-size: 18px; font-weight: 600; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--brand-d); cursor: pointer; padding: 4px 0; font: inherit; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--info-bg); color: var(--info); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.err { background: var(--bad-bg); color: var(--bad); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
td input, td select { min-width: 110px; }
tr.clickable { cursor: pointer; } tr.clickable:hover { background: var(--surface-2); }
.empty { text-align: center; color: var(--muted); padding: 24px; }
table.kv th { text-transform: none; font-size: 14px; color: var(--muted); width: 45%; font-weight: 500; letter-spacing: 0; }

/* badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.st-new { background: var(--info-bg); color: var(--info); }
.st-no_answer, .st-callback { background: var(--warn-bg); color: var(--warn); }
.st-done { background: var(--ok-bg); color: var(--ok); }
.st-refused, .st-wrong_number, .st-unreachable { background: var(--surface-3); color: var(--text-2); }
.pr-open { background: var(--bad-bg); color: var(--bad); }
.pr-in_progress { background: var(--warn-bg); color: var(--warn); }
.pr-resolved { background: var(--ok-bg); color: var(--ok); }
.score { display: inline-block; min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 6px; font-weight: 700; background: var(--surface-3); }
.score.s1, .score.s2 { background: var(--bad-bg); color: var(--bad); }
.score.s3 { background: var(--warn-bg); color: var(--warn); }
.score.s4, .score.s5 { background: var(--ok-bg); color: var(--ok); }

/* stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; color: var(--text); }
a.stat:hover { text-decoration: none; border-color: var(--bad); }
.stat b { font-size: 28px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); } .stat.bad b { color: var(--bad); }
.queue-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.queue-head .stats-row { flex: 1; margin-bottom: 12px; }

.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tabs a { padding: 6px 14px; border-radius: 8px; color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.tabs a.on { background: var(--brand-d); color: #fff; }

/* client info */
.client-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.client-head h2 { margin: 0; font-size: 22px; }
.phone { display: block; font-size: 22px; font-weight: 700; margin: 8px 0 12px; color: var(--text); }
dl.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
dl.info dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
dl.info dd { margin: 0; }
.history { padding-left: 16px; margin: 4px 0; font-size: 13px; }
.prev-problems { background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: 8px; padding: 6px 10px; margin-top: 12px; }
.prev-problems h3 { margin: 4px 0; color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.problem-item { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* call screen */
.call-strip { display: grid; grid-template-columns: minmax(230px, auto) 1fr auto; gap: 14px 24px; align-items: center; padding: 14px 18px; }
.strip-client { display: flex; flex-direction: column; gap: 2px; }
.back-form { margin: 0 0 2px; }
.strip-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.strip-name h1 { font-size: 22px; margin: 0; }
.strip-phone { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: .01em; white-space: nowrap; }
.strip-phone:hover { color: var(--brand-d); text-decoration: none; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 8px 18px; margin: 0; padding: 0 22px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.fact dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fact dd { margin: 0; font-weight: 600; font-size: 14px; }
.fact.wide { grid-column: 1 / -1; }
.fact.wide dd { font-size: 16px; }
.strip-out { display: flex; flex-direction: column; gap: 6px; min-width: 250px; }
.out-title { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.out-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.out-btns form { margin: 0; }
.btn.out { width: 100%; justify-content: flex-start; font-size: 14px; padding: 8px 10px; }
.o-no_answer { border-color: var(--warn-line); background: var(--warn-soft); }
.o-no_answer:hover { background: var(--warn-bg); }
.o-callback { border-color: var(--info-line); background: var(--info-soft); }
.o-callback:hover, .o-callback.on { background: var(--info-soft); }
.o-grey { color: var(--text-2); }
.cb-panel { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; border: 1px solid var(--info-line); border-radius: 8px; background: var(--info-soft); }
.strip-history { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; }
.hist-item { background: var(--surface-3); padding: 3px 8px; border-radius: 6px; color: var(--text-2); }
.hist-item.bad { background: var(--bad-soft); color: var(--bad); }

.call-main { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.call-main > .card { margin: 0; }
.script-panel { padding: 18px 22px; }
.script-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; align-items: center; }
.stepper li { flex: 1; display: flex; align-items: center; }
.stepper li:last-child { flex: none; }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--line); margin: 0 2px; }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1; color: var(--muted); cursor: pointer; flex: none; padding: 0; }
.dot.is-say { border-style: dashed; }
.dot.done { background: var(--ok); border-color: var(--ok); color: #fff; border-style: solid; }
.dot.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.dot.cur { border-color: var(--brand); color: var(--brand); background: var(--surface); border-style: solid; box-shadow: 0 0 0 4px var(--brand-ring); }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 3px 10px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.chip.on { background: var(--text); color: var(--card); border-color: var(--text); }
.script-lang { display: flex; gap: 4px; }

.step { display: none; flex-direction: column; gap: 14px; }
.step.active { display: flex; }
.step-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.step-num { color: var(--brand); }
.say-tag, .ask-tag { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px; letter-spacing: .03em; }
.say-tag { background: var(--surface-3); color: var(--text-2); }
.ask-tag { background: var(--info-bg); color: var(--info); }
.say { background: var(--surface-2); border-left: 4px solid var(--brand); padding: 14px 18px; border-radius: 8px; }
.say p { margin: 0; font-size: 20px; line-height: 1.45; font-weight: 500; white-space: pre-line; }
.say.say-only { border-left-color: var(--border-hover); }
.script-panel[data-lang=ru] .l-uz, .script-panel[data-lang=uz] .l-ru { display: none; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.opt { flex-direction: row; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 500; background: var(--surface); }
.opt:hover { border-color: var(--border-hover); }
.opt input { display: none; }
.opt.sel { border-color: var(--ok); background: var(--ok-bg); }
.opt.opt-problem { border-color: var(--bad-line); }
.opt.opt-problem.sel { border-color: var(--bad); background: var(--bad-bg); }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.num { flex-direction: row; cursor: pointer; }
.num input { display: none; }
.num span { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border: 2px solid var(--line); border-radius: 12px; font-size: 24px; font-weight: 700; background: var(--surface); }
.scale.nps .num span, .scale.rating10 .num span { width: 50px; height: 50px; font-size: 19px; }
.num.bad span { border-color: var(--bad-line); }
.num:hover span { border-color: var(--border-hover); }
.num.sel span { background: var(--ok); color: #fff; border-color: var(--ok); }
.num.bad.sel span { background: var(--bad); border-color: var(--bad); }
.comment-box { display: flex; flex-direction: column; gap: 4px; }
.comment-box .problem-hint { display: none; color: var(--bad); font-weight: 600; }
.comment-box.problem .problem-hint { display: block; }
.comment-box.need textarea { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.add-comment { align-self: flex-start; }
.comment-box:not([hidden]) + .add-comment { display: none; }
.req-msg { color: var(--bad); font-weight: 600; }
.nav-btns { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-btns .btn { min-width: 130px; padding: 11px 18px; font-size: 16px; }
.kbd-hint { margin-left: auto; }

.summary-panel { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 10px; }
.summary-panel h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.summary { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.summary li { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.summary li:last-child { border-bottom: 0; }
.summary li:hover { background: var(--surface-2); }
.summary li span { color: var(--muted); font-size: 12px; }
.summary li b { font-weight: 600; color: var(--border-hover); }
.summary li.filled b { color: var(--text); }
.summary li.cur { box-shadow: inset 3px 0 0 var(--brand); }
.summary li.problem { background: var(--bad-bg); }
.summary li.problem b { color: var(--bad); }
.finish-btns { display: flex; flex-direction: column; gap: 6px; }
.big-finish { width: 100%; padding: 12px; font-size: 16px; font-weight: 600; }
.home-finish { width: 100%; padding: 11px; font-size: 15px; font-weight: 600; border: 2px solid var(--border-strong); }
.home-finish:hover { border-color: var(--border-hover); background: var(--surface-2); }

@media (max-width: 1100px) {
  .call-strip { grid-template-columns: 1fr auto; }
  .facts { grid-column: 1 / -1; grid-row: 2; border: 0; padding: 10px 0 0; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .call-main { grid-template-columns: 1fr 300px; }
}
@media (max-width: 800px) {
  .call-strip { grid-template-columns: 1fr; }
  .call-main { grid-template-columns: 1fr; }
  .summary-panel { position: static; }
  .dot { width: 22px; height: 22px; font-size: 10px; }
  .kbd-hint { display: none; }
  .say p { font-size: 18px; }
  .num span { width: 50px; height: 50px; }
}

/* operator home */
.hero { display: grid; grid-template-columns: 1fr auto minmax(340px, 420px); gap: 28px; align-items: center; padding: 24px 28px; background: linear-gradient(135deg, var(--card) 60%, var(--brand-tint)); }
.hello { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.plan { font-size: 30px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.plan b { color: var(--brand); font-size: 40px; }
.ring { position: relative; width: 128px; height: 128px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label b { font-size: 26px; }
.ring-label span { font-size: 12px; color: var(--muted); }
.hero-actions { display: flex; flex-direction: column; gap: 10px; }
.call-btn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; color: #fff; text-decoration: none; transition: transform .1s, box-shadow .1s; }
.call-btn:hover { text-decoration: none; transform: translateY(-1px); }
.call-new { background: var(--brand); box-shadow: 0 8px 20px rgba(var(--brand-rgb), .35); }
.call-new:hover { background: var(--brand-d); box-shadow: 0 10px 24px rgba(var(--brand-rgb), .45); }
.call-old { background: var(--surface); color: var(--orange); border: 2px solid var(--warn-line); padding: 12px 16px; }
.call-old:hover { background: var(--orange-soft); }
.cb-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); }
.cb-svg { width: 24px; height: 24px; }
.call-old .cb-icon { background: var(--orange-soft); }
.cb-text { display: flex; flex-direction: column; }
.cb-text b { font-size: 18px; }
.call-old .cb-text b { font-size: 16px; }
.cb-text small { opacity: .85; font-size: 12px; }
.cb-count { min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; background: rgba(255, 255, 255, .22); }
.call-old .cb-count { background: var(--orange-soft); }
.call-btn.disabled { opacity: .45; pointer-events: none; box-shadow: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 30px; line-height: 1.15; }
.kpi.ok b { color: var(--ok); }
.kpi.warn b { color: var(--warn); }
.kpi.eff b { color: #1d4ed8; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.meter { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.meter span { display: block; height: 100%; background: #3b82f6; border-radius: 99px; }
.delta { font-weight: 700; margin-left: 4px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }

.funnel-card h2 { margin-bottom: 10px; }
.funnel { display: grid; grid-template-columns: 4fr 5fr; gap: 18px; }
.fgroup.closed .fstages { grid-template-columns: repeat(5, 1fr); }
.fgroup-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.fstages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fstage { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 2px solid transparent; background: var(--surface-2); color: var(--text); position: relative; }
.fstage:hover { text-decoration: none; border-color: var(--border-strong); }
.fstage b { font-size: 24px; line-height: 1.1; }
.fstage span { font-size: 12px; color: var(--muted); line-height: 1.25; }
.fstage.on { border-color: var(--text); background: var(--card); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.fs-today b { color: var(--brand); }
.fs-no_answer b, .fs-callback b { color: var(--warn); }
.fs-done b { color: var(--ok); }
.fs-unreachable b, .fs-wrong_number b, .fs-refused b { color: #6b7280; }
.fgroup:not(.closed) .fstage:not(:last-child)::after { content: "›"; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); color: var(--border-hover); font-size: 18px; z-index: 1; }

.tries { display: inline-flex; gap: 3px; }
.tries i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); }
.tries i.used { background: var(--warn); border-color: var(--warn); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr auto; }
  .hero-actions { grid-column: 1 / -1; }
  .funnel { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .ring { display: none; }
  .plan { font-size: 24px; }
  .plan b { font-size: 32px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .fstages { grid-template-columns: 1fr 1fr; }
  .fgroup:not(.closed) .fstage::after { display: none; }
}

/* problems page */
.problem-row { display: grid; grid-template-columns: 1fr 340px; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.problem-row.st-open { border-left: 4px solid var(--bad); padding-left: 12px; }
.problem-row.st-in_progress { border-left: 4px solid var(--warn); padding-left: 12px; }
.problem-row.st-resolved { border-left: 4px solid var(--ok); padding-left: 12px; opacity: .85; }
.pr-main { display: flex; flex-direction: column; gap: 4px; }
.pr-form { display: flex; flex-direction: column; gap: 6px; }

/* dashboard */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.qcard { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.qcard.inactive { opacity: .6; }
.qcard h3 { margin: 0 0 4px; font-size: 15px; }
.bars { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.barrow { display: grid; grid-template-columns: minmax(40px, 40%) 1fr 34px; gap: 8px; align-items: center; font-size: 13px; }
.bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt { height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bt span { display: block; height: 100%; background: #3b82f6; border-radius: 4px; }
.bn { text-align: right; font-weight: 600; }
.quote { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* script editor */
.script-list { padding-left: 22px; margin: 0; }
.script-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.script-list li.inactive { opacity: .5; }
.script-list li { display: list-item; }
.script-list li > .sl-main, .script-list li > .sl-btns { display: inline-flex; }
.script-list li { position: relative; }
.sl-main { flex-direction: column; gap: 3px; max-width: calc(100% - 230px); }
.sl-btns { position: absolute; right: 0; top: 10px; gap: 4px; }
.sl-btns form { display: inline; }

@media (max-width: 900px) {
  .grid2, .problem-row { grid-template-columns: 1fr; }
  .top { height: auto; padding: 8px 12px; }
  .sl-main { max-width: 100%; }
  .sl-btns { position: static; margin-top: 6px; }
}
@media (max-width: 640px) {
  .queue-head { flex-direction: column; align-items: stretch; }
  .queue-head .btn.big { width: 100%; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 22px; }
  .top .who { display: none; }
}

/* notifications */
.bell { position: relative; display: inline-flex; color: var(--top-fg); padding: 4px; }
.bell svg { width: 20px; height: 20px; }
.bell.has { color: #fff; }
.bell:hover { color: #fff; text-decoration: none; }
.bell-count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.notif-banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 12px; border-radius: var(--radius); background: var(--info-soft); border: 1px solid var(--info-line); }
.notif-banner.err { background: var(--bad-bg); border-color: var(--bad-line); }
.nb-icon { font-size: 22px; }
.nb-text { flex: 1; display: flex; flex-direction: column; }
.nb-text small { color: var(--muted); }
.nb-actions { display: flex; gap: 6px; }
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.notif-list li.unread { background: var(--surface-2); }
.notif-list li:not(.unread) b { font-weight: 500; }

/* finish validation */
.finish-error { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.finish-error ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.finish-error li { cursor: pointer; padding: 3px 0; text-decoration: underline; }
.dot.missing { border-color: var(--bad); border-style: solid; color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }

/* result screen after "couldn't talk" */
.result-card { max-width: 560px; margin: 30px auto; text-align: center; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; background: var(--warn-bg); margin-bottom: 4px; }
.out-callback .result-icon { background: var(--info-soft); }
.out-wrong_number .result-icon, .out-refused .result-icon, .result-card.closed .result-icon { background: var(--surface-3); }
.result-saved { color: var(--ok); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.result-card h1 { font-size: 26px; margin: 0; }
.result-outcome { margin-top: 10px; font-size: 20px; font-weight: 700; padding: 6px 16px; border-radius: 999px; background: var(--warn-bg); color: var(--orange); }
.out-callback .result-outcome { background: var(--info-soft); color: var(--info); }
.out-wrong_number .result-outcome, .out-refused .result-outcome { background: var(--surface-3); color: var(--text-2); }
.result-details { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.result-details .tries { margin-left: 8px; vertical-align: middle; }
.closed-note { color: var(--bad); font-weight: 600; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-bottom: 8px; }
.big-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 18px 12px; border-radius: 14px; font-size: 18px; font-weight: 700; text-decoration: none; }
.big-action:hover { text-decoration: none; }
.big-action small { font-size: 12px; font-weight: 500; opacity: .85; }
.big-action.next { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(var(--brand-rgb), .35); }
.big-action.next:hover { background: var(--brand-d); }
.big-action.home { background: var(--surface); color: var(--text); border: 2px solid var(--border-strong); }
.big-action.home:hover { border-color: var(--border-hover); }
/* attention pulse: only a ring around the button moves, the button and its text stay still (no blur) */
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .55); animation: kz-ring 1.8s ease-out infinite; }
.big-action.home.pulse::after { box-shadow: 0 0 0 0 rgba(17, 24, 39, .35); animation-name: kz-ring-dark; }
.pulse.delay::after { animation-delay: .9s; }
@keyframes kz-ring { 0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .55); } 80%, 100% { box-shadow: 0 0 0 14px rgba(var(--brand-rgb), 0); } }
@keyframes kz-ring-dark { 0% { box-shadow: 0 0 0 0 rgba(17, 24, 39, .35); } 80%, 100% { box-shadow: 0 0 0 14px rgba(17, 24, 39, 0); } }
.pulse:hover::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }
@media (max-width: 640px) { .result-actions { grid-template-columns: 1fr; } }

.interrupt-btn { width: 100%; padding: 10px; font-size: 14px; color: var(--orange); border: 1px dashed var(--warn-line); background: var(--warn-soft); }
.interrupt-btn:hover { background: var(--warn-bg); }
.st-interrupted { background: var(--orange-soft); color: var(--orange); }
.fs-interrupted b { color: #c2410c; }
.out-interrupted .result-icon { background: var(--orange-soft); }
.out-interrupted .result-outcome { background: var(--orange-soft); color: var(--orange); }

/* projects */
.proj-switch { display: inline-flex; background: var(--top-bg2); border-radius: 999px; padding: 3px; gap: 2px; }
.proj-switch a { color: #cbd5e1; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.proj-switch a:hover { color: #fff; text-decoration: none; }
.proj-switch a.on { background: var(--brand); color: #fff; }
.proj-badge { background: var(--brand); color: #fff; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.page-title { font-size: 20px; margin: 0 0 12px; }
@media (max-width: 640px) { .fgroup.closed .fstages { grid-template-columns: 1fr 1fr; } }

/* CareCall wordmark */
.brand b { color: var(--accent); font-weight: 800; }
.login-brand b { color: var(--brand); font-weight: 800; }
.login-brand { letter-spacing: -.01em; }

/* brand logos */
.proj-logo { height: 30px; width: auto; display: block; }
.proj-switch a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; }
.proj-switch a img { height: 24px; width: auto; display: block; opacity: .55; transition: opacity .15s; }
.proj-switch a:hover img, .proj-switch a.on img { opacity: 1; }
.proj-switch a.on { background: #374151; box-shadow: inset 0 -3px 0 var(--brand); }
.login-sub { margin: 0; }
.login-logos { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 14px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 6px; }
.login-logos img { height: 44px; width: auto; }
.login-logos-sep { width: 1px; height: 36px; background: var(--line); }
.login-brand, .login-sub { text-align: center; }
.proj-switch a.on { background: #FFFFFF; box-shadow: 0 0 0 2px var(--brand); }
.proj-switch a.on:not(:has(img)) { color: var(--text); }

/* ---------- night theme: explicit choice, or the system setting when nothing is chosen ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117; --card: #161b22; --text: #e6edf3; --muted: #8b949e; --line: #2a313c;
  --surface: #1c2230; --surface-2: #1a2029; --surface-3: #252d3a; --border-strong: #3a4454; --border-hover: #5b6678;
  --text-2: #c9d1d9;
  --brand-d: #ff6f66; --brand-ring: #4a1c1a; --brand-tint: #26171a;
  --ok: #3fb950; --ok-bg: #12301c; --warn: #e3b341; --warn-bg: #3a2d0d; --bad: #ff6b61; --bad-bg: #3d1618;
  --info: #a5b4fc; --info-bg: #1d2550;
  --bad-soft: #2a1517; --bad-line: #7f2a2a; --warn-soft: #2b230f; --warn-line: #7a5a12;
  --orange-soft: #3a2412; --orange: #f0a36b; --info-soft: #172338; --info-line: #2f4f86;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0d1117; --card: #161b22; --text: #e6edf3; --muted: #8b949e; --line: #2a313c;
  --surface: #1c2230; --surface-2: #1a2029; --surface-3: #252d3a; --border-strong: #3a4454; --border-hover: #5b6678;
  --text-2: #c9d1d9;
  --brand-d: #ff6f66; --brand-ring: #4a1c1a; --brand-tint: #26171a;
  --ok: #3fb950; --ok-bg: #12301c; --warn: #e3b341; --warn-bg: #3a2d0d; --bad: #ff6b61; --bad-bg: #3d1618;
  --info: #a5b4fc; --info-bg: #1d2550;
  --bad-soft: #2a1517; --bad-line: #7f2a2a; --warn-soft: #2b230f; --warn-line: #7a5a12;
  --orange-soft: #3a2412; --orange: #f0a36b; --info-soft: #172338; --info-line: #2f4f86;
  }
}
.theme-dark-only { display: none; }
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only { display: inline; }
}
:root[data-theme="dark"] .card, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .stat { box-shadow: none; }
.theme-toggle { background: none; border: 0; color: var(--top-fg); cursor: pointer; font-size: 17px; line-height: 1; padding: 4px; }
.theme-toggle:hover { color: #fff; }
.login-theme { position: fixed; top: 14px; right: 16px; }
.login-theme .theme-toggle { color: var(--muted); font-size: 20px; }

/* day / night switch */
.theme-switch { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 60px; height: 30px;
  padding: 0 7px; border-radius: 999px; border: 1px solid #374151; background: #1f2937; cursor: pointer; flex: none;
  transition: background .25s, border-color .25s, box-shadow .15s; }
.theme-switch:hover { box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.theme-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ts-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.ts-icon { position: relative; width: 16px; height: 16px; z-index: 1; transition: color .25s, opacity .25s; }
.ts-sun { color: #f59e0b; }
.ts-moon { color: #9ca3af; opacity: .7; }
.theme-switch[aria-checked="true"] .ts-knob { transform: translateX(30px); }
.theme-switch[aria-checked="true"] .ts-sun { color: #9ca3af; opacity: .7; }
.theme-switch[aria-checked="true"] .ts-moon { color: #6366f1; opacity: 1; }
.theme-switch[aria-checked="true"] { background: #312e81; border-color: #4338ca; }
.login-theme .theme-switch { background: var(--surface-3); border-color: var(--line); }
.login-theme .theme-switch[aria-checked="true"] { background: #312e81; border-color: #4338ca; }
@media (prefers-reduced-motion: reduce) { .ts-knob, .ts-icon, .theme-switch { transition: none; } }

/* telegram review status */
.tg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; }
.tg-sent b { color: var(--ok); }
.tg-pending b { color: var(--info); }
.tg-no_telegram b { color: var(--muted); }
.tg-failed b { color: var(--bad); }
.tg-text { white-space: pre-wrap; font: inherit; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; margin: 6px 0 0; }
.review-img { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 12px; }
.review-img img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.tg-limits { padding: 12px 0; border-top: 1px solid var(--line); margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

/* telegram box on the operator home */
.tg-box { display: flex; flex-direction: column; gap: 8px; }
.tgb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tgb-head h2 { margin: 0; }
.tgb-count b { font-size: 22px; }
.tgb-meter { height: 8px; }
.tg-box .tgb-meter span { background: #229ED9; }
.tg-box.is-done .tgb-meter span { background: var(--warn); }
.tgb-stats { display: flex; gap: 18px; color: var(--muted); }
.tgb-stats b { color: var(--text); }
.tgb-state { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.tgb-state.warn { background: var(--warn-bg); color: var(--warn); }
.tgb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tgb-chip { padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 13px; }
.tgb-chip:hover { text-decoration: none; background: var(--info-soft); }

/* telegram review-link card (v2) */
.tgx { --tgx: #229ED9; display: flex; flex-direction: column; gap: 14px; border-left: 4px solid var(--tgx); }
.tgx-low { --tgx: #f59e0b; }
.tgx-pause { --tgx: #f59e0b; }
.tgx-done { --tgx: #9ca3af; }
.tgx-head { display: flex; align-items: center; gap: 12px; }
.tgx-logo { width: 40px; height: 40px; border-radius: 50%; background: #229ED9; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.tgx-logo svg { width: 22px; height: 22px; margin-left: -2px; }
.tgx-title { flex: 1; min-width: 0; }
.tgx-title h2 { margin: 0; font-size: 17px; }
.tgx-badge { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--ok-bg); color: var(--ok); }
.tgx-low .tgx-badge, .tgx-pause .tgx-badge { background: var(--warn-bg); color: var(--warn); }
.tgx-done .tgx-badge { background: var(--surface-3); color: var(--text-2); }
.tgx-body { display: grid; grid-template-columns: 130px 1fr; gap: 20px; align-items: center; }
.tgx-ring { position: relative; width: 130px; height: 130px; }
.tgx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tgx-ring circle { fill: none; stroke-width: 11; }
.tgx-ring-bg { stroke: var(--surface-3); }
.tgx-ring-fg { stroke: var(--tgx); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.tgx-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tgx-ring-label b { font-size: 30px; line-height: 1; }
.tgx-ring-label b small { font-size: 15px; color: var(--muted); font-weight: 600; }
.tgx-ring-label span { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tgx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tgx-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tgx-tile b { font-size: 26px; line-height: 1.1; }
.tgx-tile span:last-child { font-size: 12px; color: var(--muted); }
.tgx-ico { font-size: 14px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.tgx-tile.ok .tgx-ico { background: var(--ok-bg); color: var(--ok); font-weight: 800; }
.tgx-tile.ok b { color: var(--ok); }
.tgx-tile.wait .tgx-ico { background: var(--info-soft); }
.tgx-tile.wait b { color: #229ED9; }
.tgx-tile.none .tgx-ico { background: var(--surface-3); }
.tgx-note { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.tgx-note.warn { background: var(--warn-bg); color: var(--warn); }
.tgx-queue { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .tgx-body { grid-template-columns: 1fr; justify-items: center; }
  .tgx-tiles { width: 100%; }
  .tgx-head { flex-wrap: wrap; }
}

/* whole script visible: every step is shown, the active one is expanded */
.script-panel .step { display: flex; padding: 10px 14px; margin: 0 -14px; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s; gap: 8px; }
.script-panel .step + .step { margin-top: 4px; }
.script-panel .step:not(.active):hover { background: var(--surface-2); }
.script-panel .step.active { cursor: default; border-color: var(--brand); background: var(--card); gap: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .06); margin-top: 8px; margin-bottom: 8px; }
.step:not(.active) .options, .step:not(.active) .scale, .step:not(.active) textarea,
.step:not(.active) .check, .step:not(.active) .comment-box, .step:not(.active) .add-comment,
.step:not(.active) .req-msg, .step:not(.active) .step-nav { display: none !important; }
.step:not(.active) .say { background: none; border-left-width: 3px; padding: 2px 0 2px 12px; }
.step:not(.active) .say p { font-size: 15px; font-weight: 400; color: var(--text-2); }
.step.done:not(.active) .say p { color: var(--muted); }
.step.done:not(.active) .step-num::before { content: "✓ "; color: var(--ok); }
.step.bad:not(.active) .step-num::before { content: "⚠ "; color: var(--bad); }
.step-answer { display: none; font-weight: 700; font-size: 14px; padding-left: 15px; }
.step:not(.active) .step-answer:not(:empty) { display: block; color: var(--ok); }
.step.bad:not(.active) .step-answer { color: var(--bad); }
.next-tag { display: none; margin-left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; letter-spacing: .03em; }
.step.next-rec .next-tag { display: inline-block; }
.step.next-rec { border-color: var(--brand-ring); border-style: dashed; }
.step-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.step-nav .kbd-hint { margin-right: auto; }
.step-nav .btn { min-width: 130px; padding: 10px 18px; font-size: 15px; }
.script-end { text-align: center; padding: 14px 0 4px; }
.skip-tag { display: none; margin-left: 8px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.step.skipped:not(.active) .skip-tag { display: inline-block; }
.step.skipped:not(.active) { border-color: var(--warn-line); border-style: dashed; }

/* call screen v3: outline on the left, one step on the right */
.call-main { grid-template-columns: 320px 1fr; }
.call-main .summary-panel { order: 0; }
.call-main .script-panel { order: 1; }
.script-panel.single .step { display: none !important; }
.script-panel.single .step.active { display: flex !important; border: 0; box-shadow: none; margin: 0; padding: 0; background: none; cursor: default; }
.script-panel.single .script-head { justify-content: flex-end; }
.script-panel.single .say p { font-size: 22px; }
.step-nav .step-prev { min-width: 0; }
.outline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.outline li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.outline li:hover { background: var(--surface-2); }
.o-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  border: 2px solid var(--line); color: var(--muted); background: var(--card); }
.o-say .o-num { border-style: dashed; }
.o-body { display: flex; flex-direction: column; min-width: 0; }
.o-label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.o-ans { font-size: 13px; font-weight: 600; color: var(--ok); overflow-wrap: anywhere; }
.outline li.done .o-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.outline li.bad .o-num { background: var(--bad); border-color: var(--bad); color: #fff; }
.outline li.bad .o-ans { color: var(--bad); }
.outline li.cur { background: var(--brand-tint); border-color: var(--brand); }
.outline li.cur .o-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.outline li.cur .o-label { color: var(--text); }
.outline li.next-rec { border-style: dashed; border-color: var(--brand-ring); }
.outline li.skipped { border-style: dashed; border-color: var(--warn-line); }
.outline li.skipped .o-num { border-color: var(--warn); color: var(--warn); }
.outline li.skipped .o-label::after { content: " · не спрошен"; color: var(--warn); font-weight: 600; font-size: 12px; }
:root[lang="uz"] .outline li.skipped .o-label::after, html[lang="uz"] .outline li.skipped .o-label::after { content: " · so'ralmadi"; }
.outline li.missing { border-color: var(--bad); border-style: solid; }
@media (max-width: 900px) {
  .call-main { grid-template-columns: 1fr; }
  .call-main .summary-panel { order: 2; }
}

/* users & permissions */
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.user-card[open] { box-shadow: 0 4px 18px rgba(0, 0, 0, .06); }
.user-card.inactive { opacity: .6; }
.user-card > summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.user-card > summary::-webkit-details-marker { display: none; }
.uc-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.user-card.new .uc-avatar { background: var(--brand); color: #fff; }
.uc-main { flex: 1; min-width: 0; }
.uc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.uc-admin { background: #111827; color: #fff; }
.uc-rop { background: var(--info-bg); color: var(--info); }
.uc-operator { background: var(--ok-bg); color: var(--ok); }
.perm-form { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); }
.perm-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; padding-top: 12px; }
.perm-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-radio { flex-direction: row; cursor: pointer; }
.chip-radio input { display: none; }
.chip-radio span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; background: var(--surface); }
.chip-radio input:checked + span { background: var(--text); color: var(--card); border-color: var(--text); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.perm-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.perm-box legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px; }
.perm-box .check { font-size: 14px; align-items: flex-start; }
.perm-box .check input { margin-top: 3px; }
.perm-box .check.disabled { opacity: .45; }
.perm-logo { height: 18px; width: auto; margin-right: 4px; vertical-align: middle; }
.perm-form.is-admin .perm-grid { opacity: .45; pointer-events: none; }

/* add client */
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.new-client { max-width: 860px; margin: 0 auto; }
.nc-brands { display: flex; gap: 6px; }
