/* ── TV-режим HolyAgent (макет agent-runs-review-20261030, 30.10.2026) ────
   Поверх всего окна: кадр 16:9 1360×765 без панелей, масштаб под экран через
   zoom (во весь экран — под телевизор). Крупный шрифт: цифры 44–56 px,
   текст 18–22 px. Персонаж — колонкой справа на всех видах. */
.tv-root {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #08080b;
  color: #fff;
  display: grid;
  place-items: center;
  --tv-border: #26262c;
  --tv-surface: #121216;
  --tv-text2: #a1a1aa;
  --tv-text3: #71717a;
}
.tv-frame {
  width: 1360px;
  height: 765px;
  display: flex;
  flex-direction: column;
  font-size: 18px;
  font-family: var(--font-sans);
  background: #08080b;
}
.tv-top {
  height: 74px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px 0 28px;
  border-bottom: 1px solid var(--tv-border);
}
.tv-top > * { flex: none; }
.tv-top .tv-t { flex: 0 1 auto; }
.tv-top .tv-spacer { flex: 1 1 auto; }
.tv-lg { display: flex; gap: 12px; align-items: center; font-size: 24px; font-weight: 700; }
.tv-lg-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: grid;
  place-items: center;
  color: #fff;
}
.tv-t { font-size: 22px; color: var(--tv-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tv-t b { color: #fff; }
.tv-tabs { display: flex; gap: 8px; }
.tv-tabs button {
  white-space: nowrap;
  font: inherit;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--tv-border);
  background: transparent;
  color: var(--tv-text2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tv-tabs button.on { color: #fff; border-color: #6d4fd6; background: #1d1636; }
.tv-tabs button.on i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--holy-glow); animation: tv-bar 15s linear forwards; }
.tv-tabs-pause button.on i { animation: none; width: 0; }
@keyframes tv-bar { from { width: 0; } to { width: 100%; } }
.tv-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font: inherit;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--tv-border);
  background: var(--tv-surface);
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
}
.tv-btn-sq { width: 40px; height: 40px; padding: 0; justify-content: center; }
.tv-live { display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.14em; color: #4ade80; }
.tv-live i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; animation: tv-pulse 1.6s infinite; }
@keyframes tv-pulse { 50% { opacity: 0.35; } }
.tv-clock { font-family: var(--font-mono); font-size: 26px; font-weight: 700; }
.tv-right { display: flex; gap: 8px; align-items: center; padding-left: 16px; margin-left: 4px; border-left: 1px solid var(--tv-border); height: 44px; }

.tv-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.tv-main { min-width: 0; min-height: 0; display: flex; }
.tv-body { flex: 1; min-height: 0; min-width: 0; display: grid; padding: 22px 16px 22px 28px; gap: 16px; }
.tv-body-post { grid-template-rows: auto auto minmax(0, 1fr); }
.tv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tv-k {
  border: 1px solid var(--tv-border);
  border-radius: 18px;
  background: var(--tv-surface);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.tv-k span { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.16em; color: var(--tv-text3); }
.tv-k b { font-size: 52px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-k small { font-size: 16px; color: var(--tv-text2); min-height: 1.2em; }
.tv-ok { color: #4ade80; } .tv-warn { color: #facc15; } .tv-bad { color: #f87171; }
.tv-now {
  border: 1px solid #4c3a99;
  border-radius: 18px;
  background: rgba(29, 22, 54, 0.5);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tv-now span { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.16em; color: #c4b5fd; }
.tv-now b { font-size: 30px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-now em { font-style: normal; font-size: 18px; color: var(--tv-text2); }
.tv-pb { height: 8px; border-radius: 4px; background: #26262c; overflow: hidden; margin-top: 6px; }
.tv-pb i { display: block; height: 100%; background: var(--btn-purple-fill); }
.tv-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-height: 0; }
.tv-list {
  border: 1px solid var(--tv-border);
  border-radius: 18px;
  background: var(--tv-surface);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.tv-h { font-size: 17px; font-weight: 600; color: var(--tv-text2); display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.tv-r { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 18px; min-width: 0; }
.tv-r > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-mu { font-family: var(--font-mono); font-size: 15px; color: var(--tv-text3); white-space: nowrap; }
.tv-dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; display: inline-block; }
.tv-dot-ok { background: #22c55e; } .tv-dot-work { background: #eab308; animation: tv-pulse 1.4s infinite; } .tv-dot-bad { background: #ef4444; } .tv-dot-warn { background: #f97316; }
.tv-empty { font-size: 17px; color: var(--tv-text3); padding: 6px 0; }
.tv-body-talks { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.tv-body-talks-live { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.tv-list-wide .tv-r { font-size: 20px; }
.tv-body-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; }
.tv-card { border: 1px solid var(--tv-border); border-radius: 18px; background: var(--tv-surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tv-card-current { border-color: #3d6585; }
.tv-card-busy { border-color: rgba(234, 179, 8, 0.5); }
.tv-card-h { display: flex; gap: 14px; align-items: center; min-width: 0; }
.tv-card-glyph { width: 52px; height: 52px; border-radius: 14px; background: #1d1d23; display: grid; place-items: center; color: #d4d4d8; flex: none; }
.tv-card-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.tv-card-name b { font-size: 22px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card-name small { font-size: 15px; color: var(--tv-text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card-st { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; color: #4ade80; white-space: nowrap; flex: none; }
.tv-card-st i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.tv-card-st-off { color: var(--tv-text3); } .tv-card-st-off i { background: #475569; }
.tv-card-st-busy { color: #facc15; } .tv-card-st-busy i { background: #eab308; }
.tv-card-group { font-family: var(--font-mono); font-size: 14px; color: var(--tv-text3); }

/* Персонаж справа: кто на посту и что делает сейчас. */
.tv-agent {
  margin: 22px 28px 22px 0;
  position: relative;
  border: 1px solid #2f4b63;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(260px 300px at 50% 35%, #1d3a5a 0%, #0d1520 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
}
.tv-agent-stage { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); filter: drop-shadow(0 0 26px rgba(56, 189, 248, 0.3)); }
.tv-agent-info { position: relative; padding: 40px 16px 14px; background: linear-gradient(180deg, transparent, rgba(8, 8, 11, 0.95) 40%); display: flex; flex-direction: column; gap: 4px; }
.tv-agent-info .tv-live { font-size: 13px; }
.tv-agent-info b { font-size: 22px; }
.tv-agent-info small { font-size: 14px; color: var(--tv-text2); }
.tv-now-mini { margin-top: 6px; border: 1px solid #4c3a99; border-radius: 12px; background: rgba(29, 22, 54, 0.85); padding: 8px 10px; font-size: 16px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tv-now-mini span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: #c4b5fd; font-weight: 700; }
.tv-now-mini em { font-style: normal; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tv-text2); font-weight: 500; }

/* «Посты» с машинами контура (01.11.2026): больше шести карточек — три колонки, чуть плотнее. */
.tv-body-posts.tv-body-posts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tv-body-posts-3 .tv-card { padding: 14px 16px; gap: 8px; }
.tv-body-posts-3 .tv-card-glyph { width: 44px; height: 44px; }
.tv-body-posts-3 .tv-card-name b { font-size: 20px; line-height: 26px; }

/* Строки обращений в TV (макет agent-runs-review): канал цветом состояния,
   флаг, кто и о чём; счётчик справа в заголовке списка. */
.tv-h-n { margin-left: auto; font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--tv-text3); }
.tv-rq { grid-template-columns: 22px minmax(0, 1fr) auto; }
.tv-rq-t { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-rq-t b { font-weight: 600; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.tv-rq-t .lang-flag { flex: none; }
.tv-rq-ch { display: grid; place-items: center; color: var(--tv-text2); }
.tv-rq-run { color: #facc15; }
.tv-rq-queue { color: var(--tv-text2); }
.tv-rq-ask { color: #c4b5fd; }
.tv-rq-done { color: #4ade80; }
.tv-rq-bad { color: #fb923c; }
.tv-in {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.5fr) minmax(0, 1fr) 80px 200px;
  gap: 18px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 19px;
  min-width: 0;
}
.tv-in-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tv-in-name { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-in-ch { color: var(--tv-text3); font-size: 16px; }
.tv-in-what { font-size: 16px; color: var(--tv-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-in-proj { display: flex; flex-direction: column; gap: 2px; font-size: 16px; color: var(--tv-text2); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-in-proj small { font-family: var(--font-mono); font-size: 14px; color: var(--tv-text3); }
.tv-pill {
  justify-self: end;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 16px;
  border: 1px solid var(--tv-border);
  color: var(--tv-text2);
  white-space: nowrap;
}
.tv-pill-run { color: #facc15; border-color: rgba(234, 179, 8, 0.4); }
.tv-pill-ask { color: #c4b5fd; border-color: #4c3a99; }
.tv-pill-done { color: #4ade80; border-color: #1f5f3a; }
.tv-pill-bad { color: #f87171; border-color: rgba(239, 68, 68, 0.45); }
.tv-card-now { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-card-now span { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; color: #c4b5fd; }
.tv-card-now em { font-style: normal; color: var(--tv-text3); font-size: 15px; }
