/* «Контроль качества» (15.09.2026, владелец: «ОКК из таблиц — в Lina»). Отдельный файл — чтобы не толкаться в app.css с соседними правками.
   ⚠️ Наблюдатель (ОКК) на этой вкладке правит: кнопки носят класс .okk-edit, а не те id/классы, что прячет body.ro. */
.okk-bar{align-items:center}
.okk-seg button{padding:8px 14px}
.okk-net{cursor:pointer;user-select:none;margin-left:auto}
.okk-net input{width:13px;height:13px;min-height:0;margin:0;accent-color:var(--accent)}
.okk-flt{gap:8px}
.okk-flt select.w,.okk-flt input[type=date]{width:auto;min-height:36px}
.okk-flt input#okk_q{width:200px}
.okk-quick .chip{cursor:pointer}
.okk-dates{display:inline-flex;align-items:center;gap:6px}
.okk-kpi{gap:8px}
.okk-tile{min-width:130px;padding:10px 12px}
.okk-tile .v{font-size:22px;font-weight:800;line-height:1.1}
.okk-tile small{display:block;margin-top:2px}
.okk-mgrs{margin-bottom:10px}
.okk-mgrs summary{cursor:pointer;font-weight:700;list-style:none;display:inline-flex;gap:6px;align-items:center;padding:4px 0}
.okk-mgrs summary::before{content:"›";display:inline-block;transition:transform .15s;color:var(--faint)}
.okk-mgrs[open] summary::before{transform:rotate(90deg)}
.okk-mtbl tr[data-m]{cursor:pointer}.okk-mtbl tr[data-m]:hover td{background:#FBFAF8}
.okk-top{margin:0 0 10px;color:var(--muted)}
.okk-tbl tr[data-id]{cursor:pointer}.okk-tbl tr[data-id]:hover td{background:#FBFAF8}
.okk-tbl tr.has-err td:first-child{box-shadow:inset 3px 0 0 var(--bad)}
.okk-cm{max-width:360px;color:var(--muted);font-size:12.5px}
.okk-kind{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:700;background:var(--soft);color:var(--muted)}
.okk-kind.k-call{background:var(--conf);color:#3A44B8}.okk-kind.k-chat{background:var(--wait);color:#155F4C}.okk-kind.k-lost{background:var(--no);color:#9E2B2B}.okk-kind.k-obzvon{background:var(--came);color:#7A5A12}
.okk-score{display:inline-block;padding:2px 8px;border-radius:999px;font-weight:800;font-size:12.5px;background:var(--soft);color:var(--muted);white-space:nowrap}
.okk-score small{font-weight:600;font-size:11px}
.okk-score.good{background:var(--accent-soft);color:#1F5F4E}.okk-score.mid{background:#FCF1DA;color:#8A5A00}.okk-score.bad{background:var(--no);color:#9E2B2B}
.okk-cnt{font-weight:700;color:var(--muted)}
.tbl .okk-tbl,.tbl .okk-obt,.tbl .okk-ctbl,.tbl .okk-mtbl{min-width:0;width:100%}
.okk-fail{margin-bottom:10px}
.okk-intro{padding:8px 10px;background:var(--soft);border-radius:10px;margin-bottom:8px;line-height:1.4}

/* карточка проверки (панель справа; на телефоне — окно) */
.okk-body{flex:1;overflow:auto;padding:14px 18px;display:flex;flex-direction:column;gap:12px}.okk-body>*{flex:none}
.modal-card .okk-body{padding:0;overflow:visible}
.modal-card .ph{padding:0 0 10px;margin-bottom:10px}
.okk-foot{display:flex;gap:8px;align-items:center;padding:12px 18px;border-top:1px solid var(--line);background:#FBFAF8}
.modal-card .okk-foot{padding:12px 0 0;background:transparent;margin-top:10px}
.okk-head{display:flex;flex-direction:column;gap:4px}
.okk-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.okk-links .btn.small{min-height:30px;padding:4px 10px}
.okk-links .call-aud{height:32px;max-width:100%}
.okk-sec{display:flex;flex-direction:column;gap:6px}
.okk-cr{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:8px;align-items:center;padding:3px 0;border-bottom:1px dashed var(--line)}
.okk-verdict{padding:10px 12px;background:var(--soft);border-radius:12px}
.okk-verdict .okk-rate{padding:0 0 4px}
.okk-hint{cursor:help}
.okk-cr:last-of-type{border-bottom:0}
.okk-cr-t{font-weight:600;line-height:1.3}.okk-cr-t .small{font-weight:400;margin-top:1px}
.okk-cr-v{display:flex;align-items:center;gap:6px;justify-content:flex-end}
.okk-cr-v input[type=number]{width:64px;min-height:30px;padding:4px 6px;text-align:center}
.okk-chk{display:inline-flex;align-items:center;gap:6px;cursor:pointer;color:var(--muted);font-weight:600;font-size:12.5px;white-space:nowrap}
.okk-chk input{width:16px;height:16px;min-height:0;margin:0;accent-color:var(--accent)}
.okk-rate{padding-top:6px;font-weight:600}.okk-rate b{font-size:16px}
.okk-col{align-items:flex-start}.okk-col label{padding-top:8px}
.okk-det summary{cursor:pointer;font-weight:700;padding:6px 0}
.okk-tr{white-space:pre-wrap;word-break:break-word;font-size:12.5px;line-height:1.45;padding:8px 10px;background:var(--soft);border-radius:10px;max-height:320px;overflow:auto}
.okk-msgs{display:flex;flex-direction:column;gap:6px;padding:8px;background:#F7F5F1;border-radius:10px;max-height:380px;overflow:auto}
.okk-msgs .bub.auto{opacity:.7;border-style:dashed}
.okk-kv{display:flex;flex-direction:column;gap:4px;font-size:13px}.okk-kv>div>.muted{display:inline-block;min-width:96px}

/* обзвон, критерии, отчёт ОП */
.okk-obt tr.called td{color:var(--muted)}.okk-obt tr.called{cursor:pointer}.okk-obt a[data-open]{margin-left:4px}.okk-obt tr[data-i]:not(.called){cursor:pointer}.okk-obt tr[data-i]:not(.called):hover td{background:#FBFAF8}
.okk-ctbl td{vertical-align:top}.okk-ctbl tr.off td{opacity:.55}.okk-ctbl tr.off td input,.okk-ctbl tr.off td textarea{opacity:1}
.okk-ctbl input,.okk-ctbl textarea{min-height:34px;padding:6px 8px}
.okk-ctbl textarea{resize:vertical;overflow:hidden;line-height:1.35;min-width:320px;width:100%}
.okk-ctbl td:nth-child(2){min-width:230px}.okk-ctbl td:nth-child(2) input{width:100%}.okk-ctbl td:nth-child(3){width:45%}
.okk-ctbl .okk-num{width:80px;text-align:right}
.okk-key{font-family:ui-monospace,Menlo,monospace;font-size:12px}
.okk-daily .row label{flex-basis:290px}
.okk-more{display:none}
@media (max-width:1000px){.okk-cm{max-width:220px}}
@media (max-width:700px){
  .okk-more{display:inline-block}
  .okk-flt:not(.open) .okk-dates,.okk-flt:not(.open) select.w,.okk-flt:not(.open) input#okk_q{display:none}
  .okk-flt input#okk_q,.okk-flt select.w{width:100%}.okk-dates{width:100%}.okk-dates input{flex:1}
  .okk-net{margin-left:0}
  .okk-kpi{gap:6px}.okk-kpi .card{min-width:calc(33.3% - 4px);flex:1;padding:8px 8px}.okk-tile .v{font-size:18px}.okk-tile small{font-size:10.5px}
  .okk-cr{grid-template-columns:1fr}.okk-cr-v{justify-content:flex-start}
  .okk-daily .row label{flex-basis:100%}
  .okk-tbl td[data-l="Комментарий"]{max-width:none}
}

/* плашка ОКК в беседе, апелляции, «Мои проверки» (16.09.2026) */
.ch-okk{margin:6px 0 0;padding:6px 10px;border-radius:10px;font-size:12.5px;cursor:pointer;background:var(--accent-soft);color:#1F5F4E;line-height:1.35}
.ch-okk.bad{background:var(--no);color:#9E2B2B}.ch-okk:hover{filter:brightness(.97)}
.okk-aps .okk-ap{padding:8px 10px;border:1px dashed var(--line);border-radius:10px;margin-bottom:6px}
.okk-ap.open{border-color:var(--bad)}.okk-ap-t{margin:4px 0;white-space:pre-wrap}.okk-ap-a{font-size:12.5px;margin-top:4px}
.okk-ap-acts{display:flex;gap:6px;align-items:center;margin-top:6px;flex-wrap:wrap}.okk-ap-acts input{flex:1;min-width:160px}
.okk-ap-new textarea{width:100%}
.okk-seg .cnt{display:inline-block;min-width:18px;padding:0 5px;border-radius:9px;background:var(--bad);color:#fff;font-size:11px;line-height:18px;margin-left:4px;font-style:normal}

/* «Почему теряем» (16.09.2026): ошибки, которые чаще всего кончаются отказом гостя */
.okk-cost-tbl tr[data-kind],.okk-cost-tbl tr[data-err]{cursor:pointer}
.okk-cost-tbl tr[data-kind]:hover td,.okk-cost-tbl tr[data-err]:hover td{background:#FBFAF8}
.okk-cost-tbl tr.okk-dim td{color:var(--faint)}
.okk-cost-tbl tr.has-err td:first-child{box-shadow:inset 3px 0 0 var(--bad)}
.okk-cost-tbl td.r{white-space:nowrap}
.okk-diff{font-weight:800}
.okk-diff.bad{color:var(--bad)}
.okk-diff.good{color:#1F5F4E}
.okk-tile .v.bad{color:var(--bad)}
@media (max-width:700px){.okk-cost-tbl td:first-child{font-weight:700}}

/* «Позвонить» в «Обзвоне» и «Тайные гости» (16.09.2026, erp/okk_dial.py, erp/okk_mystery.py) */
.okk-ob-st{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}.okk-ob-st:empty{display:none}
.okk-ob-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.okk-dialed{line-height:1.3}
.okk-bignum{font-size:30px;font-weight:800;letter-spacing:.5px;margin:6px 0 10px;user-select:all;font-variant-numeric:tabular-nums}
.mg-kpi{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}.mg-kpi .mg-tile{min-width:0;display:flex;flex-direction:column;gap:2px}
.mg-tile .v small{display:inline;font-size:13px;font-weight:600}
.mg-tile.mg-late{border-color:var(--bad);box-shadow:inset 3px 0 0 var(--bad)}
.mg-tile small.bad,.okk-mgt small.bad{color:var(--bad)}.okk-mgt small.mid{color:#8A5A00;font-weight:700}
.mg-tile a[data-target]{margin-top:4px}
.okk-mgt tr[data-i]{cursor:pointer}.okk-mgt tr[data-i]:hover td{background:#FBFAF8}.okk-mgt tr.off td{opacity:.6}
.tbl .okk-mgt{min-width:0;width:100%}
.okk-flt input[type=month]{width:auto;min-height:36px}
@media (max-width:700px){
  .mg-kpi{grid-template-columns:1fr 1fr}
  .okk-bignum{font-size:26px}
  .okk-ob-acts .btn{min-height:38px}
}
