/* ─────────────────────────────────────────────────────────────────────────
   Veritess · кабінет «Overview» — ДЖЕРЕЛО всіх продукт-кадрів v9
   (brief.md §40–46). Один екран у коді; hero і секції — кропи цього ж рендера.
   Референс вигляду: strategy/data/gemini-ui/veritess-cabinet-overview.png
   (схвалено власником 2026-11-15); числа — з check.html: $12,000 · 300 · 20 · 16.

   Масштаб — справжній: текст 13px, мітки 11px, KPI 22px. Колір лише в статусах
   і кнопці; точні числа — IBM Plex Mono. Нейтралі холодні (L-0002), не чорний.
   Розкладка — container queries: ≥880 повна оболонка · 600–880 без сайдбара ·
   <600 телефон (KPI 2×2, панелі стовпчиком, таблиця 3 поля).
   ───────────────────────────────────────────────────────────────────────── */
.vx {
  --ink: #0E1424; --ink-2: #3D4556; --mute: #7D8597; --faint: #A9AFBC;
  --line: #E6E8ED; --line-2: #EFF1F4; --side: #FAFAFB; --hover: #F3F4F7;
  --brand: #2448D8; --brand-soft: #EEF2FE;
  --new: #0F7A55; --new-bg: #E7F6EF; --lost: #B4324A; --lost-bg: #FCEDF0; --up: #2448D8; --up-bg: #EEF2FE;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  container-type: inline-size; container-name: vx;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif; font-optical-sizing: auto;
  font-size: 13px; line-height: 18px; color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased; text-align: left; position: relative;
  font-feature-settings: "cv11", "ss01";
}
.vx *, .vx *::before, .vx *::after { box-sizing: border-box; }
.vx svg { display: block; }
.vx .num { font-family: var(--mono); font-feature-settings: normal; letter-spacing: -0.01em; }

/* ── оболонка ── */
.vx-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100%; }
.vx-side { background: var(--side); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.vx-ws { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; margin-bottom: 10px; }
.vx-ws img { width: 20px; height: 20px; border-radius: 5px; }
.vx-ws b { font-weight: 600; font-size: 13px; white-space: nowrap; }
.vx-ws small { color: var(--mute); font-size: 11px; }
.vx-ws .chev { margin-left: auto; width: 12px; height: 12px; color: var(--faint); }
.vx-grp { font-size: 11px; color: var(--mute); padding: 12px 8px 4px; font-weight: 500; }
.vx-it { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.vx-it svg { width: 16px; height: 16px; color: var(--mute); flex: none; }
.vx-it.on { background: #ECEEF2; color: var(--ink); }
.vx-it.on svg { color: var(--ink); }
.vx-it .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--mute); }
.vx-it .tag { margin-left: auto; font-size: 11px; color: var(--faint); }
.vx-it.soon { color: var(--mute); }
.vx-it.soon svg { color: var(--faint); }
.vx-side .spacer { flex: 1; min-height: 12px; }
.vx-it .live { width: 6px; height: 6px; border-radius: 50%; background: var(--new); margin-left: auto; box-shadow: 0 0 0 3px var(--new-bg); }

.vx-main { min-width: 0; display: flex; flex-direction: column; }
.vx-top { height: 48px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.vx-crumb { color: var(--mute); white-space: nowrap; }
.vx-crumb b { color: var(--ink); font-weight: 500; }
.vx-search { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 30px; width: 280px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--faint); background: #fff; }
.vx-search svg { width: 14px; height: 14px; }
.vx-search kbd { margin-left: auto; font: 500 11px/16px var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--side); }
.vx-stripe { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); white-space: nowrap; }
.vx-stripe i { width: 6px; height: 6px; border-radius: 50%; background: var(--new); }
.vx-stripe .num { color: var(--mute); font-size: 11px; }
.vx-av { width: 28px; height: 28px; border-radius: 50%; background: #E4E7EE; color: var(--ink-2); font: 600 11px/28px "Inter", sans-serif; text-align: center; flex: none; }

.vx-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.vx-head { display: flex; align-items: flex-end; gap: 16px; }
.vx-head h3 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.015em; }
.vx-head p { margin: 2px 0 0; color: var(--mute); }
.vx-ctrl { margin-left: auto; display: flex; gap: 8px; }
.vx-sel { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); font-weight: 500; white-space: nowrap; background: #fff; }
.vx-sel svg { width: 12px; height: 12px; color: var(--faint); }
.vx-seg { display: flex; height: 30px; padding: 2px; border-radius: 7px; background: var(--hover); }
.vx-seg span { padding: 0 10px; line-height: 26px; border-radius: 5px; color: var(--mute); font-weight: 500; white-space: nowrap; }
.vx-seg span.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(14, 20, 36, .06); }

/* ── KPI-смуга (одна панель, поділена лініями) ── */
.vx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; }
.vx-kpi { padding: 12px 16px 13px; border-left: 1px solid var(--line); min-width: 0; }
.vx-kpi:first-child { border-left: 0; }
.vx-kpi .k { color: var(--mute); font-size: 12px; white-space: nowrap; }
.vx-kpi .v { font: 500 22px/28px var(--mono); letter-spacing: -0.03em; margin-top: 4px; white-space: nowrap; }
.vx-kpi .v small { font-size: 14px; color: var(--mute); letter-spacing: 0; }
.vx-kpi .s { color: var(--mute); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-kpi .bar { height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 8px; overflow: hidden; }
.vx-kpi .bar i { display: block; height: 100%; width: 81%; background: var(--ink); border-radius: 2px; }

/* ── дві панелі ── */
.vx-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 16px; position: relative; }
.vx-panel { border: 1px solid var(--line); border-radius: 10px; min-width: 0; background: #fff; position: relative; display: flex; flex-direction: column; }
.vx-ph { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line-2); }
.vx-ph b { font-weight: 600; white-space: nowrap; }
.vx-ph .m { color: var(--mute); white-space: nowrap; }
.vx-legend { margin-left: auto; display: flex; gap: 12px; color: var(--mute); font-size: 12px; white-space: nowrap; }
.vx-legend span { display: flex; align-items: center; gap: 6px; }
.vx-legend i { width: 14px; height: 2px; border-radius: 1px; background: var(--ink); }
.vx-legend i.b { background: var(--brand); }
.vx-legend i.g { background: #B9BFCB; }
.vx-chart { flex: 1; min-height: 300px; position: relative; }
.vx-p-chart:only-child .vx-chart { min-height: 380px; }
.vx-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vx-chart text { font-family: var(--mono); font-size: 11px; fill: var(--mute); }

.vx-tabs { margin-left: auto; display: flex; gap: 2px; }
.vx-tabs span { padding: 0 8px; height: 26px; line-height: 26px; border-radius: 6px; color: var(--mute); font-weight: 500; white-space: nowrap; }
.vx-tabs span .num { font-size: 11px; margin-left: 3px; color: var(--faint); }
.vx-tabs span.on { background: var(--hover); color: var(--ink); }
.vx-tabs span.hot { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.vx-th, .vx-tr { display: grid; grid-template-columns: minmax(0, 1fr) 92px 76px; align-items: center; padding: 0 16px; column-gap: 12px; }
.vx-th { height: 30px; color: var(--mute); font-size: 11px; border-bottom: 1px solid var(--line-2); }
.vx-th span:last-child, .vx-tr .amt { text-align: right; }
.vx-tr { height: 44px; border-bottom: 1px solid var(--line-2); }
.vx-tr:last-of-type { border-bottom: 0; }
.vx-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vx-ini { width: 24px; height: 24px; border-radius: 6px; background: #EEF0F4; color: var(--ink-2); font: 600 10px/24px "Inter", sans-serif; text-align: center; flex: none; }
.vx-who div { min-width: 0; }
.vx-who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-who small { display: block; color: var(--mute); font: 11px/14px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; justify-self: start; }
.vx-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.vx-pill.new { color: var(--new); background: var(--new-bg); }
.vx-pill.lost { color: var(--lost); background: var(--lost-bg); }
.vx-pill.up { color: var(--up); background: var(--up-bg); }
.vx-tr .amt { font: 12.5px/18px var(--mono); white-space: nowrap; }
.vx-tr .amt.neg { color: var(--mute); }
.vx-tfoot { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: var(--mute); font-size: 12px; border-top: 1px solid var(--line-2); }
.vx-tfoot .num { font-size: 11px; }

/* ── поповер «The one lever» — третій шар (над панелями) ── */
.vx-pop {
  position: absolute; z-index: 5; width: 320px; top: 42px; right: -12px;
  background: #fff; border: 1px solid #DCDFE6; border-radius: 12px;
  box-shadow: 0 1px 1px rgba(30, 40, 70, .04), 0 4px 8px rgba(30, 40, 70, .05), 0 12px 24px rgba(30, 40, 70, .07), 0 24px 48px rgba(30, 40, 70, .08);
}
.vx-pop::before { /* «носик» до вкладки Cancelled */
  content: ""; position: absolute; top: -6px; left: var(--nose, 50%); width: 10px; height: 10px; background: #fff;
  border-left: 1px solid #DCDFE6; border-top: 1px solid #DCDFE6; transform: rotate(45deg);
}
.vx-pop-h { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line-2); color: var(--mute); }
.vx-pop-h img { width: 16px; height: 16px; border-radius: 4px; }
.vx-pop-h b { color: var(--ink); font-weight: 600; }
.vx-pop-h kbd { margin-left: auto; font: 500 10px/16px var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.vx-pop-b { padding: 12px 14px 14px; }
.vx-pop-b h4 { margin: 0; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--brand); }
.vx-pop-b p { margin: 6px 0 0; color: var(--ink-2); line-height: 19px; }
.vx-pop-b .gain { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--mute); }
.vx-pop-b .gain .num { color: var(--ink); font-size: 15px; font-weight: 500; }
.vx-pop-a { display: flex; gap: 8px; margin-top: 12px; position: relative; }
.vx-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; font-weight: 500; white-space: nowrap; }
.vx-btn.main { background: var(--brand); color: #fff; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.vx-btn.ghost { border: 1px solid var(--line); color: var(--ink-2); }
.vx-cursor { position: absolute; left: 92px; top: 16px; width: 18px; height: 22px; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

/* поява поповера — одна «новинна» анімація на сторінку, 260 мс */
@media (prefers-reduced-motion: no-preference) {
  .vx-pop.anim { animation: vxPop .26s cubic-bezier(.2, .8, .2, 1) .5s both; }
  @keyframes vxPop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
}

/* ── фокус кропу: притемнити все, крім підсвіченого ── */
.vx[data-focus="lost"] .vx-tr:not(.is-lost) { opacity: .45; }
.vx[data-focus="lost"] .vx-tr.is-lost .vx-who b { color: var(--ink); }

/* кроп «ролі»: сайдбар видно завжди, фокус — на двох групах-ролях */
.vx.vx-roles .vx-shell { grid-template-columns: 216px minmax(0, 1fr); height: 100%; }
.vx.vx-roles .vx-shell > .vx-side { display: flex; }
.vx.vx-roles .vx-grp { color: var(--ink); font-weight: 600; font-size: 12px; }
.vx.vx-roles .vx-it.on { background: transparent; color: var(--ink-2); }
.vx.vx-roles .vx-it.on svg { color: var(--mute); }
.vx.vx-roles .vx-crumb .ws, .vx.vx-roles .vx-av, .vx.vx-roles .vx-stripe .num { display: none; }
@container vx (max-width: 480px) {
  .vx.vx-roles .vx-shell { grid-template-columns: minmax(0, 1fr); }
  .vx.vx-roles .vx-main { display: none; }
  .vx.vx-roles .vx-side { border-right: 0; }
}
/* ── кроп «натяк» (сайдбар + абстрактна робоча зона) ── */
.vx-ghost { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.vx-ghost i { display: block; border-radius: 6px; background: var(--line-2); }

/* ═════ container queries ═════ */
@container vx (max-width: 1040px) {
  .vx-search { width: 30px; padding: 0; justify-content: center; }
  .vx-search span, .vx-search kbd { display: none; }
  .vx-legend { display: none; }
  .vx-tabs span:nth-child(4) { display: none; }
}
@container vx (max-width: 880px) {
  .vx-shell { grid-template-columns: minmax(0, 1fr); }
  .vx-shell > .vx-side { display: none; }
  .vx-search { display: none; }
  .vx-stripe { margin-left: auto; }
}
@container vx (max-width: 760px) {
  .vx-row { grid-template-columns: minmax(0, 1fr); }
}
@container vx (max-width: 600px) {
  .vx-top { padding: 0 14px; height: 44px; }
  .vx-crumb span.ws { display: none; }
  .vx-stripe .num { display: none; }
  .vx-av { display: none; }
  .vx-body { padding: 14px 14px 16px; gap: 12px; }
  .vx-head { align-items: center; }
  .vx-head h3 { font-size: 17px; line-height: 22px; }
  .vx-head p { font-size: 12px; }
  .vx-ctrl .vx-seg { display: none; }
  .vx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-kpi { padding: 10px 12px 11px; }
  .vx-kpi:nth-child(3) { border-left: 0; }
  .vx-kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .vx-kpi .v { font-size: 19px; line-height: 24px; }
  .vx-kpi .s { white-space: normal; }
  .vx-legend { display: none; }
  .vx-chart { height: 220px; }
  .vx-tabs span:nth-child(1), .vx-tabs span:nth-child(4) { display: none; }
  .vx-th, .vx-tr { grid-template-columns: minmax(0, 1fr) 82px 70px; padding: 0 12px; column-gap: 8px; }
  .vx-pop { width: auto; left: 10px; right: 10px; }
  .vx .vx-cursor { display: none; }
}
