/* ---------- обзор: все боты ---------- */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ov-kpi {
  display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 3%, transparent), transparent 120px), var(--panel);
  border: 1px solid var(--border); border-radius: 16px;
  animation: ovIn .26s cubic-bezier(.2, .8, .3, 1) backwards;
}
.ov-kpi:nth-child(2) { animation-delay: 40ms; } .ov-kpi:nth-child(3) { animation-delay: 80ms; } .ov-kpi:nth-child(4) { animation-delay: 120ms; }
.ov-kpi-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.ov-kpi-ico svg { width: 18px; height: 18px; }
.ov-kpi-l { color: var(--text-faint); font-size: 12.5px; font-weight: 600; }
.ov-kpi-v { font: 600 24px/1.15 "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ov-kpi-n { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }

.ov-alert {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px;
  background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.ov-alert > svg { width: 20px; height: 20px; color: var(--warn); flex: none; }
.ov-alert > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ov-alert span { color: var(--text-dim); font-size: 13px; }
.ov-alert button { flex: none; }

.ov-table { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.ov-row {
  display: grid; align-items: center; gap: 10px; padding: 12px 16px;
  grid-template-columns: minmax(180px, 2fr) 110px repeat(6, minmax(70px, 1fr)) 20px;
  border-top: 1px solid var(--border);
}
.ov-row:not(.ov-head) { cursor: pointer; transition: background .12s; }
.ov-row:not(.ov-head):hover, .ov-row:not(.ov-head):focus-visible { background: var(--panel-2); outline: none; }
.ov-head { border-top: 0; padding-block: 10px; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-faint); }
.ov-num { text-align: right; font: 500 13px "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.ov-head .ov-num { font-family: inherit; font-size: 11px; font-weight: 700; }
.ov-bot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ov-ava { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.ov-ava svg { width: 18px; height: 18px; }
.ov-bot-t { display: grid; min-width: 0; }
.ov-bot-t b, .ov-bot-t a, .ov-bot-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-bot-t a { color: var(--accent); font-size: 12.5px; text-decoration: none; }
.ov-bot-t a:hover { text-decoration: underline; }
.ov-bot-t small { color: var(--text-faint); font-size: 12px; }
.ov-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ov-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ov-pill.on { color: var(--pos-text); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.ov-pill.warn { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.ov-pill.off { color: var(--text-faint); background: var(--panel-2); }
.ov-go { color: var(--text-faint); display: grid; place-items: center; }
.ov-go svg { width: 16px; height: 16px; }

.ov-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 20px;
  background: var(--panel); border: 1px dashed var(--border-2); border-radius: 16px; color: var(--text-dim); }
.ov-empty b { color: var(--text); font-size: 16px; }
.ov-empty-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ov-empty-ico svg { width: 24px; height: 24px; }
.ov-empty button { margin-top: 6px; }

.ov-skel { min-height: 76px; border-radius: 16px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%);
  background-size: 400% 100%; animation: ovShimmer 1.4s ease infinite; border: 1px solid var(--border); }
@keyframes ovShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes ovIn { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 1100px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* телефон и узкие экраны: строка бота превращается в карточку с подписями */
@media (max-width: 760px) {
  .ov-table { background: transparent; border: 0; border-radius: 0; display: grid; gap: 10px; overflow: visible; }
  .ov-head { display: none; }
  .ov-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; border: 1px solid var(--border);
    border-radius: 16px; background: var(--panel); position: relative; }
  .ov-row .ov-bot { grid-column: 1 / -1; padding-right: 24px; }
  .ov-row .ov-c { display: grid; gap: 2px; text-align: left; }
  .ov-row .ov-c > * { justify-self: start; }  /* метка статуса — по тексту, не на всю колонку */
  .ov-row .ov-c::before { content: attr(data-l); font: 600 11px "Manrope", system-ui, sans-serif; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: .04em; }
  .ov-go { position: absolute; top: 18px; right: 14px; }
}
/* ноутбук: колонка экрана уже таблицы (8 колонок не влезают, «Сумма» и «Конверсия» обрезались) — тоже карточки.
   #editor — контейнер «ed» (см. step-editor.css) */
@container ed (max-width: 860px) {
  .ov-table { background: transparent; border: 0; border-radius: 0; display: grid; gap: 10px; overflow: visible; }
  .ov-head { display: none; }
  .ov-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; border: 1px solid var(--border);
    border-radius: 16px; background: var(--panel); position: relative; }
  .ov-row .ov-bot { grid-column: 1 / -1; padding-right: 24px; }
  .ov-row .ov-c { display: grid; gap: 2px; text-align: left; }
  .ov-row .ov-c > * { justify-self: start; }  /* метка статуса — по тексту, не на всю колонку */
  .ov-row .ov-c::before { content: attr(data-l); font: 600 11px "Manrope", system-ui, sans-serif; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: .04em; }
  .ov-go { position: absolute; top: 18px; right: 14px; }
}
/* телефон: карточки остаются по две в ряд, иконка уходит наверх */
@media (max-width: 420px) {
  .ov-kpis { gap: 10px; }
  .ov-kpi { flex-direction: column; gap: 8px; padding: 12px; }
  .ov-kpi-ico { width: 30px; height: 30px; border-radius: 10px; }
  .ov-kpi-ico svg { width: 16px; height: 16px; }
  .ov-kpi-v { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ov-kpi, .ov-skel { animation: none; } }
