/* V Shape · OPT 7 UNIFIED DESK — layout 1:1 mockup */
#ih-panel-vshape-reversal {
  --ih-vs-z: 1.92;
}

body.ih-hub-full #ih-panel-vshape-reversal {
  --ih-vs-z: 2.08;
}

.ih-vs.ih-vs--opt7 {
  --ih-vs-bg: #05070a;
  --ih-vs-cyan: #4A9BB1;
  --ih-vs-cyan-hot: #5eb8d0;
  --ih-vs-green: #67E6C9;
  --ih-vs-red: #E77A7A;
  --ih-vs-amber: #E8B44A;
  --ih-vs-cream: #e8eef2;
  --ih-vs-dim: #7a8894;
  --ih-vs-mute: #5a6874;
  --ih-vs-line: rgba(255, 255, 255, 0.07);
  --ih-vs-border: rgba(74, 155, 177, 0.28);
  --ih-vs-panel: #0a0c10;
  background: var(--ih-vs-bg);
  color: var(--ih-vs-cream);
  display: flex;
  flex-direction: column;
  font-family: var(--font-bloomberg, monospace);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.ih-vs.ih-vs--opt7 *,
.ih-vs.ih-vs--opt7 *::before,
.ih-vs.ih-vs--opt7 *::after { box-sizing: border-box; }

/* ── Header ── */
.ih-vs--opt7 .ih-vs__toolbar {
  align-items: center;
  border-bottom: 1px solid var(--ih-vs-line);
  display: grid;
  flex-shrink: 0;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.2fr);
  padding: 10px 14px 8px;
}

.ih-vs--opt7 .ih-vs__brand { min-width: 0; }

.ih-vs--opt7 .ih-vs__title {
  color: var(--ih-vs-cream);
  font-size: calc(15px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ih-vs--opt7 .ih-vs__title em {
  color: var(--ih-vs-dim);
  font-style: normal;
  font-weight: 600;
}

.ih-vs--opt7 .ih-vs__meta {
  color: var(--ih-vs-mute);
  font-size: calc(11px * var(--ih-vs-z));
  margin-top: 3px;
}

.ih-vs--opt7 .ih-vs__clock {
  color: var(--ih-vs-cyan-hot);
  font-size: calc(18px * var(--ih-vs-z));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}

.ih-vs--opt7 .ih-vs__toolbar-right {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.ih-vs--opt7 .ih-vs__tags {
  color: var(--ih-vs-mute);
  font-size: calc(11px * var(--ih-vs-z));
  letter-spacing: 0.08em;
}

.ih-vs--opt7 .ih-vs__live {
  align-items: center;
  color: var(--ih-vs-green);
  display: inline-flex;
  font-size: calc(11px * var(--ih-vs-z));
  gap: 6px;
  letter-spacing: 0.1em;
}

.ih-vs--opt7 .ih-vs__live i {
  background: var(--ih-vs-green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(116, 222, 198, 0.7);
  display: inline-block;
  height: 6px;
  width: 6px;
}

.ih-vs--opt7 .ih-vs__local-tabs { display: flex; gap: 4px; }

.ih-vs--opt7 .ih-vs__local-tab {
  background: transparent;
  border: 1px solid var(--ih-vs-line);
  color: var(--ih-vs-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: calc(11px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  text-transform: uppercase;
}

.ih-vs--opt7 .ih-vs__local-tab.is-active {
  border-color: rgba(116, 222, 198, 0.55);
  color: var(--ih-vs-green);
}

.ih-vs--opt7 .ih-vs__refresh {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ih-vs-line);
  color: var(--ih-vs-cyan);
  cursor: pointer;
  font-size: 15px;
  padding: 6px 10px;
}

.ih-vs--opt7 .ih-vs__err {
  color: var(--ih-vs-amber);
  font-size: calc(12px * var(--ih-vs-z));
  margin-bottom: 8px;
}

.ih-vs--opt7 .ih-vs__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ih-vs--opt7 .ih-vs__body.ih-hidden { display: none !important; }

.ih-vs--opt7 .ih-vs__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 16px;
  scrollbar-width: thin;
}

.ih-vs--opt7 .ih-vs__foot {
  border-top: 1px solid var(--ih-vs-border);
  color: var(--ih-vs-mute);
  flex-shrink: 0;
  font-size: calc(10px * var(--ih-vs-z));
  letter-spacing: 0.08em;
  padding: 6px 14px;
  text-transform: uppercase;
}

.ih-vs--opt7 .ih-vs__ops {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ih-vs--opt7 .ih-vs__ops.ih-hidden { display: none !important; }

.ih-vs--opt7 .ih-vs-zone__hd {
  color: var(--ih-vs-cyan);
  font-size: calc(11px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.ih-vs--opt7 .ih-vs-ud {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* ── Desk GM-style · ASSET LEDGER left · FOCUS/CHART right ── */
.ih-vs--opt7 .ih-vs-cd {
  display: grid;
  flex: 1 1 auto;
  gap: 14px;
  grid-template-columns: minmax(300px, 0.36fr) minmax(0, 0.64fr);
  min-height: min(62vh, 720px);
  overflow: hidden;
}

.ih-vs--opt7 .ih-vs-cd > .ih-vs-c,
.ih-vs--opt7 .ih-vs-cd > .ih-vs-d {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* ── A · Hero ── */
.ih-vs--opt7 .ih-vs-a {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ih-vs--opt7 .ih-vs-a__frame {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--ih-vs-border);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.7fr) minmax(150px, 0.55fr);
  min-height: 280px; /* compacto · desk ledger|chart ganha viewport */
}

.ih-vs--opt7 .ih-vs-a__rail {
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--ih-vs-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
}

.ih-vs--opt7 .ih-vs-a__status {
  color: var(--ih-vs-cream);
  font-size: calc(22px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ih-vs--opt7 .ih-vs-a__session {
  color: var(--ih-vs-mute);
  font-size: calc(10px * var(--ih-vs-z));
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ih-vs--opt7 .ih-vs-a__jump {
  background: transparent;
  border: 1px solid rgba(116, 222, 198, 0.35);
  color: var(--ih-vs-cyan-hot);
  cursor: pointer;
  font-family: inherit;
  font-size: calc(11px * var(--ih-vs-z));
  padding: 6px 8px;
  text-align: left;
}

.ih-vs--opt7 .ih-vs-a__jump:disabled {
  border-color: var(--ih-vs-line);
  color: var(--ih-vs-mute);
  cursor: default;
  opacity: 0.7;
}

.ih-vs--opt7 .ih-vs-a__counters {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
}

.ih-vs--opt7 .ih-vs-a__counters span {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--ih-vs-line);
  display: flex;
  flex-direction: column;
  padding: 7px 8px;
}

.ih-vs--opt7 .ih-vs-a__counters i {
  color: var(--ih-vs-mute);
  font-size: calc(9px * var(--ih-vs-z));
  font-style: normal;
  letter-spacing: 0.08em;
}

.ih-vs--opt7 .ih-vs-a__counters b {
  font-size: calc(16px * var(--ih-vs-z));
  font-variant-numeric: tabular-nums;
}

.ih-vs--opt7 .ih-vs-a__counters .c-play b { color: var(--ih-vs-cyan-hot); }
.ih-vs--opt7 .ih-vs-a__counters .c-rev b { color: var(--ih-vs-green); }
.ih-vs--opt7 .ih-vs-a__counters .c-conf b { color: var(--ih-vs-amber); }
.ih-vs--opt7 .ih-vs-a__counters .c-fail b { color: var(--ih-vs-red); }
.ih-vs--opt7 .ih-vs-a__counters .c-neu b { color: var(--ih-vs-dim); }

.ih-vs--opt7 .ih-vs-a__chart-wrap {
  display: flex;
  flex-direction: column;
  min-height: 350px; /* +15% vs 304 */
  min-width: 0;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
}

/* Scanner vivo · leitura institucional (fio + véu; sem neon/glow) */
.ih-vs--opt7 .ih-vs-a__chart-wrap::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 16%;
  max-width: 120px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(74, 155, 177, 0.018) 42%,
    rgba(232, 238, 242, 0.07) 58%,
    rgba(94, 184, 208, 0.045) 72%,
    transparent 100%
  );
  border-right: 1px solid rgba(94, 184, 208, 0.22);
  transform: translate3d(-160%, 0, 0);
  animation: ih-vs-hero-scan 7.2s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
  will-change: transform, opacity;
}

@keyframes ih-vs-hero-scan {
  0%,
  8% {
    transform: translate3d(-160%, 0, 0);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  72% {
    transform: translate3d(620%, 0, 0);
    opacity: 1;
  }
  80%,
  100% {
    transform: translate3d(620%, 0, 0);
    opacity: 0;
  }
}

/* Micro “respiração” no canto live — só opacidade, sem glow */
.ih-vs--opt7 .ih-vs-a__chart-wrap::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(94, 184, 208, 0.55);
  box-shadow: none;
  pointer-events: none;
  z-index: 4;
  animation: ih-vs-hero-live 2.8s ease-in-out infinite;
}

@keyframes ih-vs-hero-live {
  0%,
  100% { opacity: 0.28; }
  50% { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .ih-vs--opt7 .ih-vs-a__chart-wrap::after,
  .ih-vs--opt7 .ih-vs-a__chart-wrap::before {
    animation: none;
    display: none;
  }
}

/* Pausa quando a aba V Shape não está ativa / página em background */
#ih-panel-vshape-reversal.ih-hidden .ih-vs-a__chart-wrap::after,
#ih-panel-vshape-reversal[aria-hidden="true"] .ih-vs-a__chart-wrap::after,
#ih-panel-vshape-reversal.ih-hidden .ih-vs-a__chart-wrap::before,
#ih-panel-vshape-reversal[aria-hidden="true"] .ih-vs-a__chart-wrap::before {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: no-preference) {
  .ih-vs--opt7 .ih-vs-a__chart-wrap.is-scan-paused::after,
  .ih-vs--opt7 .ih-vs-a__chart-wrap.is-scan-paused::before {
    animation-play-state: paused;
  }
}

.ih-vs--opt7 .ih-vs-a__chart {
  flex: 1 1 auto;
  min-height: 317px; /* +15% vs 276 */
  width: 100%;
  position: relative;
  z-index: 1;
}

.ih-vs--opt7 .ih-vs-a__legend {
  border-left: 1px solid var(--ih-vs-line);
  max-height: 444px; /* +15% vs 386 */
  overflow: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
}

.ih-vs--opt7 .ih-vs-a__leg-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 8px 1fr auto;
  padding: 5px 0;
}

.ih-vs--opt7 .ih-vs-a__leg-row i {
  border-radius: 50%;
  display: block;
  height: 7px;
  width: 7px;
}

.ih-vs--opt7 .ih-vs-a__leg-row b {
  color: var(--ih-vs-cream);
  font-size: calc(11px * var(--ih-vs-z));
  font-weight: 600;
}

.ih-vs--opt7 .ih-vs-a__leg-row em {
  font-size: calc(11px * var(--ih-vs-z));
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.ih-vs--opt7 .ih-vs-chg--up { color: var(--ih-vs-green); }
.ih-vs--opt7 .ih-vs-chg--dn { color: var(--ih-vs-red); }
.ih-vs--opt7 .ih-vs-chg--flat { color: var(--ih-vs-dim); }

/* ── B · Phases ── */
.ih-vs--opt7 .ih-vs-b {
  border: 1px solid var(--ih-vs-line);
  padding: 8px 10px 10px;
}

.ih-vs--opt7 .ih-vs-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ih-vs--opt7 .ih-vs-phase {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ih-vs-line);
  border-radius: 0;
  color: var(--ih-vs-dim);
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  padding: 5px 11px;
}

.ih-vs--opt7 .ih-vs-phase b {
  font-size: calc(12px * var(--ih-vs-z));
  font-weight: 700;
}

.ih-vs--opt7 .ih-vs-phase span {
  font-size: calc(9px * var(--ih-vs-z));
  letter-spacing: 0.06em;
}

.ih-vs--opt7 .ih-vs-phase.is-active {
  border-color: var(--ih-vs-cyan);
  box-shadow: inset 0 0 0 1px rgba(74, 155, 177, 0.35);
  color: var(--ih-vs-cream);
}

.ih-vs--opt7 .ih-vs-phase--reversal b,
.ih-vs--opt7 .ih-vs-phase--confirm b,
.ih-vs--opt7 .ih-vs-phase--test b,
.ih-vs--opt7 .ih-vs-phase--build b,
.ih-vs--opt7 .ih-vs-phase--break b,
.ih-vs--opt7 .ih-vs-phase--early b,
.ih-vs--opt7 .ih-vs-phase--fail b,
.ih-vs--opt7 .ih-vs-phase--neutral b,
.ih-vs--opt7 .ih-vs-phase--all b {
  color: #ffffff;
}

/* ── C · Ledger (rail esquerda · estilo Global Markets) ── */
.ih-vs--opt7 .ih-vs-c {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--ih-vs-line);
  padding: 8px 10px 10px;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-c .ih-vs-grid,
.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.ih-vs--opt7 .ih-vs-tbl-wrap {
  max-height: 1040px;
  overflow: auto;
  scrollbar-width: thin;
}

.ih-vs--opt7 .ih-vs-tbl {
  border-collapse: collapse;
  font-size: calc(11.5px * var(--ih-vs-z));
  min-width: 980px;
  width: 100%;
}

/* Ledger · menu de ativos — tipografia um pouco menor (só coluna C) */
.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl {
  font-size: calc(9.5px * var(--ih-vs-z));
  min-width: 720px;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl th {
  font-size: calc(8.5px * var(--ih-vs-z));
  padding: 6px 5px;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl td {
  padding: 8px 5px;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl td.name {
  font-size: calc(10px * var(--ih-vs-z));
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl td.num {
  font-size: calc(10.5px * var(--ih-vs-z));
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-tbl td.mute {
  font-size: calc(9px * var(--ih-vs-z));
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-badge {
  font-size: calc(9px * var(--ih-vs-z));
  letter-spacing: 0.06em;
  min-width: 6.4em;
  padding: 3px 7px;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-star {
  font-size: 0.75em;
}

.ih-vs--opt7 .ih-vs-tbl th {
  background: #070a0e;
  border-bottom: 1px solid var(--ih-vs-border);
  color: var(--ih-vs-mute);
  font-size: calc(10px * var(--ih-vs-z));
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 6px;
  position: sticky;
  text-align: left;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

.ih-vs--opt7 .ih-vs-tbl th.num,
.ih-vs--opt7 .ih-vs-tbl td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ih-vs--opt7 .ih-vs-tbl td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 12px 6px;
  white-space: nowrap;
}

.ih-vs--opt7 .ih-vs-tbl td.name {
  color: var(--ih-vs-cyan-hot);
  font-size: calc(12px * var(--ih-vs-z));
  font-weight: 700;
}

.ih-vs--opt7 .ih-vs-star {
  color: var(--ih-vs-amber);
  font-size: 0.85em;
  margin-right: 4px;
  opacity: 0.85;
}

.ih-vs--opt7 .ih-vs-tbl td.mute { color: var(--ih-vs-dim); }
.ih-vs--opt7 .ih-vs-tbl td.spark { min-width: 88px; min-height: 36px; }
.ih-vs--opt7 .ih-vs-tbl td.ih-vs-hl { font-size: 0.95em; }
.ih-vs--opt7 .ih-vs-tbl td.ih-vs-note {
  font-size: calc(11px * var(--ih-vs-z));
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ih-vs--opt7 .ih-vs-tbl tbody tr { cursor: pointer; }
.ih-vs--opt7 .ih-vs-tbl tbody tr:hover { background: rgba(74, 155, 177, 0.06); }
.ih-vs--opt7 .ih-vs-tbl tbody tr.is-active {
  background: rgba(74, 155, 177, 0.14);
  box-shadow: inset 2px 0 0 var(--ih-vs-cyan);
}

/* STATE / PHASE — padrão READY (branco institucional), sem status amarelo */
.ih-vs--opt7 .ih-vs-badge,
.ih-vs--opt7 .ih-vs-badge--reversal,
.ih-vs--opt7 .ih-vs-badge--confirm,
.ih-vs--opt7 .ih-vs-badge--test,
.ih-vs--opt7 .ih-vs-badge--build,
.ih-vs--opt7 .ih-vs-badge--break,
.ih-vs--opt7 .ih-vs-badge--early,
.ih-vs--opt7 .ih-vs-badge--fail,
.ih-vs--opt7 .ih-vs-badge--neutral {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  display: inline-block;
  font-size: calc(11px * var(--ih-vs-z));
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  min-width: 7.5em;
  padding: 5px 10px;
  text-align: center;
  text-transform: uppercase;
}

.ih-vs--opt7 .ih-vs-risk--low { color: var(--ih-vs-green); }
.ih-vs--opt7 .ih-vs-risk--med { color: var(--ih-vs-amber); }
.ih-vs--opt7 .ih-vs-risk--high { color: var(--ih-vs-red); }

.ih-vs--opt7 .ih-vs-row__expand {
  background: transparent;
  border: 1px solid var(--ih-vs-line);
  color: var(--ih-vs-cyan);
  cursor: pointer;
  padding: 2px 7px;
}

/* ── D · Focus — chart preenche o container (+15% vs h4x) ── */
.ih-vs--opt7 .ih-vs-d {
  border: 1px solid var(--ih-vs-border);
  display: flex;
  flex-direction: column;
  min-height: 862px;
  max-height: min(94vh, 1126px);
  opacity: 0.58;
  padding: 8px 10px 10px;
  transition: opacity 0.15s ease;
}

/* No desk GM · monitor direito sempre legível (como INDEX MONITOR) */
.ih-vs--opt7 .ih-vs-cd > .ih-vs-d {
  background: rgba(255, 255, 255, 0.015);
  max-height: none;
  min-height: 0;
  opacity: 1;
}

.ih-vs--opt7.ih-vs--focus .ih-vs-d { opacity: 1; }

.ih-vs--opt7 .ih-vs-cd .ih-vs-d__body {
  flex: 1 1 auto;
  min-height: 0;
}

.ih-vs--opt7 .ih-vs-cd .ih-vs-detail__chart {
  /* 3.5× base −12% */
  flex: 0 0 auto;
  height: 801px;
  max-height: 924px;
  min-height: 678px;
}

.ih-vs--opt7 .ih-vs-d__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  align-items: stretch;
}

.ih-vs--opt7 .ih-vs-d__chart-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: none;
  height: auto;
  overflow: auto;
  max-width: 100%;
}

/* legado — side removido do HTML; evita layout residual se reaparecer */
.ih-vs--opt7 .ih-vs-d__side {
  display: none;
}

.ih-vs--opt7 .ih-vs-detail__hdr {
  align-items: center;
  border: 1px solid var(--ih-vs-line);
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.ih-vs--opt7 .ih-vs-detail__title {
  color: var(--ih-vs-green);
  font-size: calc(16px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.ih-vs--opt7 .ih-vs-detail__sub {
  color: var(--ih-vs-mute);
  font-size: calc(11px * var(--ih-vs-z));
  margin-top: 3px;
  line-height: 1.2;
}

.ih-vs--opt7 .ih-vs-detail__actions { display: flex; gap: 6px; }

.ih-vs--opt7 .ih-vs-detail__expand,
.ih-vs--opt7 .ih-vs-detail__close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ih-vs-line);
  color: var(--ih-vs-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  line-height: 1;
}

.ih-vs--opt7 .ih-vs-detail__metrics {
  /* Colado sob o container do gráfico */
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--ih-vs-line);
  border-top: 0;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 5px 6px 6px;
  scrollbar-width: thin;
}

.ih-vs--opt7 .ih-vs-detail__chart + .ih-vs-detail__metrics {
  margin-top: 0;
}

.ih-vs--opt7 .ih-vs-insp-metrics,
.ih-vs--opt7 .ih-vs-insp-metrics--stack {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}

.ih-vs--opt7 .ih-vs-insp-metrics span,
.ih-vs--opt7 .ih-vs-insp-metrics--stack span {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--ih-vs-line);
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  padding: 4px 6px;
}

.ih-vs--opt7 .ih-vs-insp-metrics i {
  color: var(--ih-vs-mute);
  font-size: calc(7.5px * var(--ih-vs-z));
  font-style: normal;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.ih-vs--opt7 .ih-vs-insp-metrics b {
  font-size: calc(10px * var(--ih-vs-z));
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge dentro da métrica: sem min-width que estoura a célula */
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--reversal,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--confirm,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--test,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--build,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--break,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--early,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--fail,
.ih-vs--opt7 .ih-vs-insp-metrics .ih-vs-badge--neutral {
  display: inline-block;
  font-size: calc(8.5px * var(--ih-vs-z));
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 2px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ih-vs--opt7 .ih-vs-d__tabs {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 5px;
  margin-bottom: 6px;
}

.ih-vs--opt7 .ih-vs-d__tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ih-vs-mute);
  cursor: default;
  font-family: inherit;
  font-size: calc(11px * var(--ih-vs-z));
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 9px;
  line-height: 1.2;
}

.ih-vs--opt7 .ih-vs-d__tabs button.is-active {
  border-color: rgba(74, 155, 177, 0.45);
  color: var(--ih-vs-cyan-hot);
}

.ih-vs--opt7 .ih-vs-d__tabs button:disabled {
  opacity: 0.45;
}

.ih-vs--opt7 .ih-vs-detail__chart {
  background: #05070a;
  border: 1px solid var(--ih-vs-line);
  border-bottom: 0; /* métricas coladas sob o chart */
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  /* 3.5× base −12% */
  height: 801px;
  min-height: 678px;
  max-height: 924px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.ih-vs--opt7 .ih-vs-detail__chart .ih-vs-detail__lw-host,
.ih-vs--opt7 #ih-vs-detail-lw-host {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 616px !important;
  max-height: 100%;
  width: 100%;
}

.ih-vs--opt7 .ih-vs-detail__foot {
  color: var(--ih-vs-mute);
  flex-shrink: 0;
  font-size: calc(10px * var(--ih-vs-z));
  padding: 6px 2px 0;
  line-height: 1.2;
}

.ih-vs--opt7 .ih-vs-empty {
  color: var(--ih-vs-dim);
  font-size: calc(12px * var(--ih-vs-z));
  padding: 16px 8px;
}

/* Kill legacy side-desk layout when OPT7 is active */
.ih-vs--opt7.ih-vs--detail-open .ih-vs__scroll {
  overflow: auto !important;
}

body.ih-vs-modal-open { overflow: hidden; }
#ih-vs-fullscreen-modal.ih-fred-modal { z-index: 5200; }

@media (max-width: 1200px) {
  .ih-vs--opt7 .ih-vs__toolbar {
    grid-template-columns: 1fr;
  }
  .ih-vs--opt7 .ih-vs__clock { text-align: left; }
  .ih-vs--opt7 .ih-vs__toolbar-right { justify-content: flex-start; flex-wrap: wrap; }
  .ih-vs--opt7 .ih-vs-a__frame {
    grid-template-columns: 1fr;
  }
  .ih-vs--opt7 .ih-vs-a__legend {
    border-left: 0;
    border-top: 1px solid var(--ih-vs-line);
    max-height: 222px; /* +15% vs 193 */
  }
  .ih-vs--opt7 .ih-vs-d__body {
    flex-direction: column;
  }
  .ih-vs--opt7 .ih-vs-d__chart-col {
    max-width: 100%;
  }
  .ih-vs--opt7 .ih-vs-cd {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .ih-vs--opt7 .ih-vs-cd > .ih-vs-c {
    max-height: 42vh;
  }
  .ih-vs--opt7 .ih-vs-cd > .ih-vs-d {
    min-height: 0;
  }
}
