/* ═══════════════════════════════════════════════════════════════
   INTEL HUB — GLOBAL CORTEX TERMINAL
   Herda paleta do sistema (cyan / dark) — sem override gold
   ═══════════════════════════════════════════════════════════════ */

#view-caleco.ih-view:not(.active) {
  content-visibility: hidden;
  contain-intrinsic-size: auto 720px;
  pointer-events: none;
}

#view-caleco.ih-view {
  --ih-bg: #05070a;
  --ih-card: #080b0f;
  --ih-border: rgba(255, 255, 255, 0.06);
  --ih-accent: #00a8cc;
  --ih-accent-bright: #33bdd6;
  --ih-accent-dim: rgba(0, 168, 204, 0.45);
  --ih-text: var(--ink-cream, #ebe5d8);
  --ih-text-dim: #6a7884;
  --ih-zoom: 1;
  --ih-tv-z: 2.142; /* 1.947 × 1.10 — Bloomberg TV +10% */
  --ih-tv-btn-r: 5px;
  --ih-news-page1-chrome: calc(340px * var(--ih-tv-z));
  --ih-tv-news-chrome: calc(340px * var(--ih-tv-z));
  --ih-tv-aspect-chrome: calc(380px * var(--ih-tv-z));
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

/* Relógios de sessão — removidos do Intel Hub (mantidos no header global) */
#view-caleco .cal-clocks-row {
  display: none !important;
}

/* Faixa horizontal de sessões — substituída pelo card no mapa */
#view-caleco .cal-sess-row {
  display: none !important;
}

/* Intel Hub (sistema novo) — preenche 100% da área */
body.ih-hub-full #center {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-self: stretch;
}

body.ih-hub-full #view-caleco.ih-view.active {
  --ih-zoom: 1.1;
  display: flex !important;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  box-sizing: border-box;
  font-size: calc(12px * var(--ih-zoom));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-macro-scroll-pages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-macro-page {
  min-height: 100%;
  scroll-snap-align: start;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page {
  min-height: auto;
  scroll-snap-align: none;
}

/* Desk sub-tabs (V Shape, Quotes, etc.): no outer black overscroll.
   Scroll stays inside the active panel; Macro Map / News keep page scroll. */
body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-scroll-pages {
  overflow: hidden;
  scroll-snap-type: none;
  overscroll-behavior: none;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--hub {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--hub .ih-body {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--hub .ih-panels {
  min-height: 0;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--hub .ih-panel.active {
  min-height: 0;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--hub .ih-sidebar {
  min-height: 0;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar):not(.ih-news-layout) .ih-macro-page--news-chans {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-clocks-row,
body.ih-hub-full #view-caleco.ih-view.active .cal-sess-row,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-stats-row--dock {
  flex-shrink: 0;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-stat {
  padding: calc(10px * var(--ih-sess-z)) calc(12px * var(--ih-sess-z));
  min-height: calc(52px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-stat-l {
  font-size: calc(9px * var(--ih-sess-z));
  margin-bottom: calc(5px * var(--ih-sess-z));
  letter-spacing: 0.14em;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-stat-v {
  font-size: calc(17px * var(--ih-sess-z));
  line-height: 1.2;
}

/* Sessões + stats — mais altura e tipografia legível */
body.ih-hub-full #view-caleco.ih-view.active {
  --ih-sess-z: 1.48;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-sess-panel {
  padding: calc(12px * var(--ih-sess-z)) calc(16px * var(--ih-sess-z));
  min-height: calc(78px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .cal-sess-hdr {
  font-size: calc(10px * var(--ih-sess-z));
  margin-bottom: calc(9px * var(--ih-sess-z));
  letter-spacing: 2px;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-sess-tags {
  gap: calc(6px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .cal-sym-tag {
  font-size: calc(12px * var(--ih-sess-z));
  padding: calc(5px * var(--ih-sess-z)) calc(10px * var(--ih-sess-z));
  letter-spacing: 0.45px;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-stat {
  padding: calc(14px * var(--ih-sess-z)) calc(18px * var(--ih-sess-z));
  min-height: calc(64px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .cal-stat-l {
  font-size: calc(10px * var(--ih-sess-z));
  margin-bottom: calc(7px * var(--ih-sess-z));
  letter-spacing: 1.8px;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-stat-v {
  font-size: calc(20px * var(--ih-sess-z));
  line-height: 1.2;
}

#view-caleco.ih-view.active .cal-map-displays .cal-ms-block--snapshot,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-ms-block--snapshot,
#view-caleco.ih-view.active .cal-map-displays .cal-map-foot.cal-map-foot-card,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-map-foot.cal-map-foot-card {
  --cal-foot-z: var(--cal-card-z, var(--cal-ms-z, 1.25));
  width: 100%;
  max-width: none;
}

#view-caleco.ih-view.active .cal-map-displays,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays {
  --cal-ms-z: 1.38;
  --cal-ms-h-z: 0.82;
  --cal-card-z: 1.38;
  --cal-ms-fs-z: 1.1;
}

#view-caleco.ih-view.active .cal-map-displays .cal-ms-block__signals,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-ms-block__signals,
#view-caleco.ih-view.active .cal-map-displays .cal-map-foot-card__signals,
body.ih-hub-full #view-caleco.ih-view.active .cal-map-displays .cal-map-foot-card__signals {
  flex: 0 0 auto;
  flex-basis: auto;
  min-height: calc(34px * var(--cal-card-z, 1.38));
  max-height: none;
  overflow: visible;
}

body.ih-hub-full #view-caleco.ih-view.active #cal-map-host > .cal-market-status {
  display: none !important;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-subtabs {
  flex-shrink: 0;
  min-height: calc(48px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-subtabs-scroll {
  gap: calc(3px * var(--ih-sess-z));
  padding: 0 calc(8px * var(--ih-sess-z)) 0 calc(10px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-subtab {
  font-size: calc(14.5px * var(--ih-sess-z));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: calc(10px * var(--ih-sess-z)) calc(9px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-module-bar {
  padding: calc(10px * var(--ih-sess-z)) calc(14px * var(--ih-sess-z));
  min-height: calc(38px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-module-title {
  font-size: calc(11px * var(--ih-sess-z));
  letter-spacing: 2px;
}

body.ih-hub-full #view-caleco.ih-view.active .cal-map-layers {
  gap: calc(6px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .cal-map-layer {
  font-size: calc(11px * var(--ih-sess-z));
  min-height: calc(32px * var(--ih-sess-z));
  padding: calc(7px * var(--ih-sess-z)) calc(14px * var(--ih-sess-z));
}

body.ih-hub-full #view-caleco.ih-view.active .ih-body {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-central {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-sidebar {
  min-height: 0;
  align-self: stretch;
  --ih-side-z: 1.32;
  width: calc(560px * var(--ih-tv-z, 1.35));
  min-width: calc(480px * var(--ih-tv-z, 1.35));
  max-width: calc(620px * var(--ih-tv-z, 1.35));
}

/* Sidebar — Macro TV + Live Feed maiores */
#view-caleco.ih-view.active .ih-sidebar .ih-module-bar {
  padding: calc(9px * var(--ih-side-z, 1.28)) calc(14px * var(--ih-side-z, 1.28));
  min-height: calc(36px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-module-title {
  font-size: calc(10px * var(--ih-side-z, 1.28));
  letter-spacing: 2px;
}

#view-caleco.ih-view.active .ih-tv-status {
  font-size: calc(11px * var(--ih-side-z, 1.28));
  line-height: 1.55;
  padding: calc(14px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-tv-chans {
  gap: calc(6px * var(--ih-side-z, 1.28));
  padding: calc(8px * var(--ih-side-z, 1.28)) calc(10px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-tv-btn {
  font-size: calc(10px * var(--ih-side-z, 1.28));
  padding: calc(7px * var(--ih-side-z, 1.28)) calc(8px * var(--ih-side-z, 1.28));
  letter-spacing: 0.55px;
}

#view-caleco.ih-view.active .ih-tv-mute {
  font-size: calc(13px * var(--ih-side-z, 1.28));
  padding: calc(4px * var(--ih-side-z, 1.28)) calc(8px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-item {
  padding: calc(12px * var(--ih-side-z, 1.28)) calc(16px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-meta {
  gap: calc(8px * var(--ih-side-z, 1.28));
  margin-bottom: calc(6px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-tag {
  font-size: calc(11px * var(--ih-side-z, 1.28));
  padding: calc(4px * var(--ih-side-z, 1.28)) calc(9px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-time {
  font-size: calc(11px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-txt {
  font-size: calc(15px * var(--ih-side-z, 1.28));
  line-height: 1.65;
}

#view-caleco.ih-view.active .ih-module-feed {
  flex: 1.1 1 0;
  min-height: 140px;
}

#view-caleco.ih-view.active .ih-tv-block {
  flex: 0 0 auto;
  min-height: 0;
}

#view-caleco.ih-view.active #ih-mod-tv.ih-tv-block {
  border-radius: 6px;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-panels {
  flex: 1 1 0;
  min-height: 0;
}

/* Calendário econômico — só no Macro Map */
body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .cal-toolbar {
  flex-shrink: 0;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(480px * var(--ih-tv-z, 1.35)), calc(560px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto var(--ih-macro-row1-h) auto;
  flex: 0 0 auto;
  align-items: stretch;
  min-height: 0;
  height: auto;
  max-height: none;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-central {
  display: contents;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-subtabs {
  grid-column: 1 / -1;
  grid-row: 1;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-panels {
  grid-column: 1;
  grid-row: 2;
  flex: 0 0 var(--ih-macro-row1-h);
  min-height: var(--ih-macro-row1-h);
  height: var(--ih-macro-row1-h);
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-macro-calendar {
  grid-column: 1 / -1;
  grid-row: 3;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-sidebar {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  max-height: var(--ih-macro-row1-h);
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar #ih-panel-macro-map.active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-calendar .cal-table-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: calc(var(--cal-row-h, 56px) * var(--cal-visible-rows, 50) + var(--cal-head-h, 58px));
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map #cal-map-host {
  flex: 1 1 calc(53.8% + 46.2% * (1 - var(--cal-ms-h-z, 1)));
  min-height: calc(180px * var(--cal-ms-z, 1.25));
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  align-self: stretch;
  position: relative;
  inset: auto;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map .ih-map-stage:has(.cal-map-displays[data-cal-map-dock="overlay"]) #cal-map-host {
  flex: 1 1 auto;
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-height: calc(180px * var(--cal-ms-z, 1.25));
  max-height: none;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map > .cal-map-displays {
  flex: 0 0 auto;
  min-height: calc(220px * var(--cal-ms-z, 1.25) * var(--cal-ms-h-z, 1));
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-module-map .ih-map-stage {
  flex: 1 1 0;
  min-height: calc(200px * var(--cal-ms-z, 1.25));
  height: auto;
  max-height: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

/* Trading Plan / Trailing Stop — corpo ocupa todo o espaço restante */
body.ih-hub-full #view-caleco.ih-trading-plan-layout .ih-body,
body.ih-hub-full #view-caleco.ih-trailing-stop-layout .ih-body {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

body.ih-hub-full #view-caleco.ih-trailing-stop-layout .ih-body,
body.ih-hub-full #view-caleco.ih-trading-plan-layout .ih-body {
  border-bottom: none;
}

body.ih-hub-full #ih-panel-trailing-stop.active,
body.ih-hub-full #ih-panel-trading-plan.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.ih-hub-full #ih-panel-trailing-stop.active #view-trailing-stop,
body.ih-hub-full #ih-panel-trading-plan.active #view-trading-plan {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
}

body.ih-hub-full #ih-panel-cotacoes.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.ih-hub-full #ih-panel-cotacoes.active .ih-cotacoes {
  flex: 1 1 0;
  min-height: 0;
}

body.ih-hub-full #ih-panel-macro-cards.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.ih-hub-full #ih-panel-macro-cards.active .ih-mc {
  flex: 1 1 0;
  min-height: 0;
}

body.ih-hub-full #ih-panel-trailing-stop.active .ts-zoom-root {
  flex: 1 1 0;
  min-height: 0;
}

#view-caleco.ih-view.active {
  overflow-x: hidden;
  overflow-y: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active {
  overflow: hidden;
}

#view-caleco.ih-view::-webkit-scrollbar { width: 6px; }
#view-caleco.ih-view::-webkit-scrollbar-track { background: var(--bg0); }
#view-caleco.ih-view::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
#view-caleco.ih-view::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* Scroll invisível — Intel Hub (News Terminal, etc.) */
#view-caleco.ih-news-layout .ih-macro-scroll-pages,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-macro-scroll-pages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-scroll-pages {
  scroll-snap-type: y mandatory;
}

#view-caleco.ih-news-layout .ih-macro-scroll-pages::-webkit-scrollbar,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-macro-scroll-pages::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

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

/* ── Body: central + sidebar ── */
.ih-body {
  display: flex;
  flex: 0 0 auto;
  min-height: calc(480px * var(--ih-tv-z, 1.35));
  height: clamp(calc(480px * var(--ih-tv-z, 1.35)), 52vh, calc(620px * var(--ih-tv-z, 1.35)));
  border-bottom: 1px solid var(--ih-border);
}

.ih-central {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ih-bg);
}

.ih-sidebar {
  --ih-side-z: 1.28;
  width: calc(520px * var(--ih-tv-z, 1.35));
  min-width: calc(440px * var(--ih-tv-z, 1.35));
  max-width: calc(580px * var(--ih-tv-z, 1.35));
  flex-shrink: 0;
  border-left: 1px solid var(--ih-border);
  display: flex;
  flex-direction: column;
  background: var(--ih-card);
  min-height: 0;
  box-sizing: border-box;
  overflow-x: clip;
  overflow-y: hidden;
}

.ih-tv-bar {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ih-side-z, 1));
  padding: calc(8px * var(--ih-side-z, 1)) calc(12px * var(--ih-side-z, 1));
}

.ih-tv-title {
  font-size: calc(10px * var(--ih-side-z, 1));
}

.ih-tv-brand-head {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: calc(6px * var(--ih-side-z, 1));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ih-tv-brand-live {
  flex-shrink: 0;
  color: var(--ih-accent, var(--cyan, #4A8FA0));
  font-family: var(--font-bloomberg, var(--mono));
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ih-tv-brand-sep {
  flex-shrink: 0;
  opacity: 0.45;
  color: var(--ih-text-dim, var(--text-dim));
}

.ih-tv-brand-channel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ih-text, var(--text, #D8CEC0));
  font-family: var(--font-bloomberg, var(--mono));
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ih-tv-brand-foot {
  flex-shrink: 0;
  padding: calc(4px * var(--ih-side-z, 1)) calc(10px * var(--ih-side-z, 1)) calc(6px * var(--ih-side-z, 1));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.ih-tv-brand-credit {
  display: block;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: calc(8px * var(--ih-side-z, 1));
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.ih-module-feed {
  flex: 1;
  min-height: 0;
}

/* ── Sub-abas ── */
.ih-subtabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--ih-card);
  border-bottom: 1px solid var(--ih-border);
  flex-shrink: 0;
  overflow: hidden;
  min-width: 0;
}

.ih-subtabs-scroll {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 6px 0 8px;
  scrollbar-width: thin;
}

.ih-subtabs-scroll::-webkit-scrollbar { height: 4px; }
.ih-subtabs-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.ih-subtab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ih-text-dim);
  cursor: pointer;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 9px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.ih-subtab:hover {
  color: var(--ih-text);
}

.ih-subtab.active {
  border-bottom-color: var(--ih-accent);
  color: var(--ih-accent);
}

/* Macro Map · sem underline cyan neon no cabeçalho das sub-abas */
.ih-subtab[data-ih-tab="macro-map"].active {
  border-bottom-color: rgba(154, 166, 174, 0.55);
  box-shadow: none;
  color: #c8d0d4;
  filter: none;
  text-shadow: none;
}

/* Intel Hub — sub-abas em linha completa; sidebar (TV/feed) abaixo das tabs */
#view-caleco.ih-view.active .ih-macro-page--hub .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(440px * var(--ih-tv-z, 1.35)), calc(580px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
}

#view-caleco.ih-view.active .ih-macro-page--hub .ih-central {
  display: contents;
}

#view-caleco.ih-view.active .ih-macro-page--hub .ih-subtabs {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 3;
  position: relative;
}

#view-caleco.ih-view.active .ih-macro-page--hub .ih-panels {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  min-width: 0;
}

#view-caleco.ih-view.active .ih-macro-page--hub .ih-sidebar {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-macro-page--hub .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(480px * var(--ih-tv-z, 1.35)), calc(560px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto minmax(0, 1fr);
}

body.ih-hub-full #view-caleco.ih-view.active .ih-macro-page--hub .ih-central {
  display: contents;
}

.ih-popout-toggle {
  align-self: center;
  flex: 0 0 auto;
  appearance: none;
  background: var(--bg2, #0a0e14);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-tv-btn-r, 5px);
  color: var(--ih-text-dim);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.45px;
  padding: 6px 10px;
  margin: 0 10px 0 4px;
  text-transform: uppercase;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
}

.ih-popout-toggle:hover {
  color: var(--ih-text);
  border-color: var(--ih-accent-dim);
}

.ih-popout-toggle.active {
  background: rgba(0, 168, 204, 0.12);
  border-color: rgba(0, 168, 204, 0.45);
  color: var(--ih-accent-bright);
}

body.ih-hub-full #view-caleco.ih-view.active .ih-popout-toggle {
  font-size: calc(9px * var(--ih-sess-z, 1));
  padding: calc(6px * var(--ih-sess-z, 1)) calc(10px * var(--ih-sess-z, 1));
  margin: 0 calc(10px * var(--ih-sess-z, 1)) 0 calc(4px * var(--ih-sess-z, 1));
}

/* Rebater TV / Live Feed — sub-abas em largura total */
.ih-sidebar-toggle {
  align-self: center;
  flex: 0 0 auto;
  appearance: none;
  background: var(--bg2, #0a0e14);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-tv-btn-r, 5px);
  color: var(--ih-text-dim);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.45px;
  padding: 6px 10px;
  margin: 0 4px 0 4px;
  text-transform: uppercase;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
}

.ih-sidebar-toggle:hover {
  color: var(--ih-text);
  border-color: #3A3A3A;
  background: #1A1A1A;
}

/* mostrar TV · ciano steel institucional (sem âmbar / neon) */
.ih-sidebar-toggle.active {
  background: #141414;
  border-color: #2E2E2E;
  box-shadow: none;
  color: #4A8FA0;
}

.ih-sidebar-toggle.active:hover {
  background: #1A1A1A;
  border-color: #3A4548;
  color: #6AADB8;
}

body.ih-hub-full #view-caleco.ih-view.active .ih-sidebar-toggle {
  font-size: calc(9px * var(--ih-sess-z, 1));
  padding: calc(6px * var(--ih-sess-z, 1)) calc(10px * var(--ih-sess-z, 1));
  margin: 0 calc(4px * var(--ih-sess-z, 1));
}

#view-caleco.ih-sidebar-collapsed .ih-macro-page--hub .ih-body,
#view-caleco.ih-view.active.ih-sidebar-collapsed .ih-macro-page--hub .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-sidebar-collapsed .ih-macro-page--hub .ih-body,
#view-caleco.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-body,
#view-caleco.ih-news-layout.ih-sidebar-collapsed .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-sidebar-collapsed .ih-body,
#view-caleco.ih-news-layout.ih-tv-news-expanded.ih-sidebar-collapsed .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded.ih-sidebar-collapsed .ih-body {
  grid-template-columns: minmax(0, 1fr) !important;
}

#view-caleco.ih-sidebar-collapsed .ih-macro-page--hub .ih-panels,
#view-caleco.ih-view.active.ih-sidebar-collapsed .ih-macro-page--hub .ih-panels,
body.ih-hub-full #view-caleco.ih-view.active.ih-sidebar-collapsed .ih-macro-page--hub .ih-panels,
#view-caleco.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-panels,
body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-panels,
#view-caleco.ih-news-layout.ih-sidebar-collapsed .ih-panels,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-sidebar-collapsed .ih-panels {
  grid-column: 1 / -1 !important;
}

#view-caleco.ih-sidebar-collapsed .ih-sidebar,
#view-caleco.ih-view.active.ih-sidebar-collapsed .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-sidebar-collapsed .ih-sidebar,
#view-caleco.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar.ih-sidebar-collapsed .ih-macro-page--hub .ih-sidebar,
#view-caleco.ih-news-layout.ih-sidebar-collapsed .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-sidebar-collapsed .ih-sidebar,
#view-caleco.ih-news-layout.ih-tv-news-expanded.ih-sidebar-collapsed .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded.ih-sidebar-collapsed .ih-sidebar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.ih-panels {
  flex: 1;
  min-height: 0;
  position: relative;
}

.ih-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ih-panel.active { display: flex; }
.ih-panel:not(.active) { display: none; }

/* ── Módulo (mapa, feed, etc.) ── */
.ih-module {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}

.ih-module-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ih-border);
  background: var(--ih-card);
  flex-shrink: 0;
}

.ih-module-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--ih-accent);
  text-transform: uppercase;
  flex: 1;
}

.ih-popout {
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-tv-btn-r, 5px);
  color: var(--ih-text-dim);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 4px 7px;
  transition: color 0.12s, border-color 0.12s;
}

.ih-popout:hover {
  border-color: var(--ih-accent-dim);
  color: var(--ih-accent);
}

.ih-module-map {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ih-map-stage {
  flex: 1;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--bg3, #0a1018);
  overflow: hidden;
  position: relative;
}

.ih-tv-news-slot {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  background: #000;
  overflow: hidden;
}

.ih-tv-news-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ih-border);
  background: var(--ih-card);
}

.ih-tv-news-bar-title {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--ih-accent);
  text-transform: uppercase;
}

.ih-tv-collapse-news {
  flex-shrink: 0;
}

.ih-module-news {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ih-news-body {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* News Terminal — TV central + Live Feed na sidebar, 2 páginas de scroll */
#view-caleco.ih-news-layout {
  --ih-news-page1-chrome: calc(340px * var(--ih-tv-z, 1.35));
  --ih-news-feed-inset: calc(36px + 33px);
}

#view-caleco.ih-news-layout.ih-tv-news-expanded {
  --ih-news-side-min: calc(280px * var(--ih-tv-z, 1.35));
  --ih-news-side-max: calc(340px * var(--ih-tv-z, 1.35));
  --ih-news-feed-inset: 0px;
}

#view-caleco.ih-news-layout .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(440px * var(--ih-tv-z, 1.35)), calc(580px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
  height: auto;
  max-height: none;
  min-height: max(480px, calc(100dvh - var(--ih-news-page1-chrome)));
  overflow: hidden;
}

#view-caleco.ih-news-layout .ih-panels {
  grid-column: 1;
  grid-row: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  position: relative;
}

#view-caleco.ih-news-layout .ih-sidebar {
  grid-column: 2;
  grid-row: 2;
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

#view-caleco.ih-news-layout .ih-central {
  display: contents;
}

#view-caleco.ih-news-layout .ih-subtabs {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 2;
}

#view-caleco.ih-news-layout .ih-macro-page--hub {
  width: 100%;
  align-items: stretch;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-page--hub {
  min-height: 100%;
  height: 100%;
  flex: 1 1 auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-body {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(var(--ih-news-side-min), var(--ih-news-side-max));
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar #ih-mod-tv {
  display: none !important;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar {
  width: auto;
  min-width: 0;
  max-width: var(--ih-news-side-max);
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar .ih-module-feed {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  max-height: 100%;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar .ih-module-feed .ih-module-bar {
  padding: calc(6px * var(--ih-side-z, 1.28)) calc(10px * var(--ih-side-z, 1.28));
  min-height: calc(30px * var(--ih-side-z, 1.28));
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar .ih-module-feed .ih-module-title {
  font-size: calc(9px * var(--ih-side-z, 1.28));
  letter-spacing: 1.6px;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar .ih-feed-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#ih-panel-news.active {
  position: relative;
  inset: auto;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#ih-panel-news.active .ih-module-news {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout {
  --ih-news-page1-chrome: calc(440px * var(--ih-tv-z, 1.35));
  --ih-tv-news-chrome: calc(440px * var(--ih-tv-z, 1.35));
  --ih-tv-aspect-chrome: calc(480px * var(--ih-tv-z, 1.35));
  --ih-news-feed-inset: calc((38px + 34px) * var(--ih-sess-z, 1.35));
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(480px * var(--ih-tv-z, 1.35)), calc(560px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
  width: 100%;
  align-self: stretch;
  min-height: max(520px, calc(100dvh - var(--ih-news-page1-chrome)));
  height: auto;
  max-height: none;
  overflow: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-body {
  min-height: 0;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-central {
  display: contents;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-subtabs {
  grid-column: 1 / -1;
  grid-row: 1;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-panels {
  grid-column: 1;
  grid-row: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-sidebar {
  grid-column: 2;
  grid-row: 2;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout .ih-macro-page--hub {
  min-height: auto;
  flex-shrink: 0;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-macro-scroll-pages {
  overflow: hidden;
  flex: 1 1 0;
  min-height: 0;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-macro-page--hub {
  min-height: 100%;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-body {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  grid-template-columns: minmax(0, 1fr) minmax(var(--ih-news-side-min), var(--ih-news-side-max));
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-sidebar {
  width: auto;
  min-width: 0;
  max-width: var(--ih-news-side-max);
  --ih-side-z: 1.12;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-news-layout.ih-tv-news-expanded .ih-panels {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#view-caleco.ih-view.active.ih-news-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-tv-news-expanded .ih-tv-news-slot {
  display: grid !important;
}

#view-caleco.ih-news-layout .ih-news-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-tv-news-slot {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  --ih-tv-news-bar-h: 36px;
  align-items: stretch;
  justify-items: center;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  container-type: size;
  container-name: ih-tv-news-slot;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-tv-news-slot .ih-tv-news-bar {
  display: none !important;
}

/* LIVE FEED · BLOOMBERG TV — acima do vídeo no News Terminal (expanded + tela cheia) */
#view-caleco.ih-news-layout.ih-tv-news-expanded #ih-panel-news .ih-tv-news-slot > .ih-tv-bar,
#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-tv-news-slot .ih-tv-bar {
  grid-row: 1;
  display: flex !important;
  flex-shrink: 0;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 12px;
  min-height: var(--ih-tv-news-bar-h, 36px);
  border-bottom: 1px solid var(--ih-border, rgba(0, 168, 204, 0.22));
  background: var(--ih-card, #0a1018);
  z-index: 2;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-tv-news-slot .ih-tv-aspect {
  grid-row: 2;
  flex: none;
  width: min(100cqw, calc((100cqh - var(--ih-tv-news-bar-h, 36px)) * 16 / 9));
  height: min(calc(100cqh - var(--ih-tv-news-bar-h, 36px)), calc(100cqw * 9 / 16));
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: unset;
  align-self: center;
  justify-self: center;
  padding-top: 0;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-tv-news-slot .ih-tv-aspect .ih-tv-video {
  inset: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded #ih-panel-news.active {
  position: absolute;
  inset: 0;
  height: 100%;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-panels {
  min-height: 0;
  height: 100%;
}

/* Só o título do painel News — não o .ih-tv-bar (LIVE FEED) movido para o slot */
#view-caleco.ih-news-layout.ih-tv-news-expanded #ih-panel-news > .ih-module-news > .ih-module-bar {
  display: none;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded #ih-panel-news.active .ih-module-news,
#view-caleco.ih-news-layout.ih-tv-news-expanded #ih-panel-news.active .ih-news-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-sidebar .ih-tv-sidebar-ph {
  display: none;
}

/* Página 2 — canais Bloomberg / Yahoo (scroll invisível) */
.ih-macro-page--news-chans {
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 20px 24px;
  background: #000;
  border-top: 1px solid var(--ih-border);
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-page--news-chans:not(.ih-hidden):not([hidden]) {
  display: flex;
  min-height: min(100dvh, 320px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-page--news-chans .ih-tv-chans {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  gap: 8px;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-page--news-chans .ih-tv-btn {
  font-size: 11px;
  padding: 12px 16px;
  min-height: 44px;
}

#view-caleco.ih-news-layout.ih-tv-news-expanded .ih-macro-page--news-chans .ih-tv-brand-foot {
  margin-top: 12px;
  padding: 8px 12px;
  text-align: center;
}

.ih-tv-sidebar-ph {
  display: none;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  line-height: 1.5;
  color: var(--ih-text-dim);
  background: rgba(0, 168, 204, 0.06);
  border-bottom: 1px solid var(--ih-border);
  text-align: center;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.ih-tv-sidebar-ph:hover {
  color: var(--ih-accent);
  background: rgba(0, 168, 204, 0.12);
}

/* Alt+Q — Macro TV tela cheia (Intel Hub · News Terminal) */
body.ih-tv-map-full #clocks-row,
body.ih-tv-map-full #gov-bar,
body.ih-tv-map-full #left,
body.ih-tv-map-full #right,
body.ih-tv-map-full #bottombar {
  display: none !important;
}

body.ih-tv-map-full #tabnav {
  height: 26px;
  min-height: 26px;
}

body.ih-tv-map-full #app {
  top: 26px;
  bottom: 0;
  grid-template-columns: minmax(0, 1fr);
}

body.ih-tv-map-full #view-caleco.ih-view.active {
  bottom: 0;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  inset: 0;
  left: 0;
  min-height: 0;
  overflow: hidden;
  right: 0;
  top: 0;
  z-index: 30;
}

body.ih-tv-map-full #view-caleco .cal-clocks-row,
body.ih-tv-map-full #view-caleco .cal-sess-row,
body.ih-tv-map-full #view-caleco .cal-stats-row,
body.ih-tv-map-full #view-caleco .ih-subtabs,
body.ih-tv-map-full #view-caleco .ih-sidebar,
body.ih-tv-map-full #view-caleco .ih-macro-page--calendar,
body.ih-tv-map-full #view-caleco .ih-module-map > .ih-module-bar,
body.ih-tv-map-full #view-caleco .ih-tv-news-bar,
body.ih-tv-map-full #view-caleco .ih-tv-sidebar-ph,
body.ih-tv-map-full #view-caleco .ih-news-terminal {
  display: none !important;
}

body.ih-tv-map-full #view-caleco .ih-macro-scroll-pages,
body.ih-tv-map-full #view-caleco .ih-macro-page--hub,
body.ih-tv-map-full #view-caleco .ih-body,
body.ih-tv-map-full #view-caleco .ih-central,
body.ih-tv-map-full #view-caleco .ih-panels,
body.ih-tv-map-full #view-caleco #ih-panel-news,
body.ih-tv-map-full #view-caleco .ih-module-news,
body.ih-tv-map-full #view-caleco .ih-news-body,
body.ih-tv-map-full #view-caleco .ih-tv-news-slot {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

body.ih-tv-map-full #view-caleco .ih-tv-news-slot {
  max-height: none;
  min-height: 0;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
}

body.ih-tv-map-full #view-caleco .ih-tv-news-slot > .ih-tv-bar {
  display: flex !important;
  flex-shrink: 0;
  grid-row: 1;
  width: 100%;
  min-height: var(--ih-tv-news-bar-h, 36px);
  z-index: 2;
}

body.ih-tv-map-full #view-caleco .ih-tv-news-slot .ih-tv-aspect {
  grid-row: 2;
  aspect-ratio: auto;
  flex: 1 1 auto;
  height: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding-top: 0;
  width: 100%;
}

body.ih-tv-map-full #view-caleco .ih-tv-news-slot .ih-tv-video {
  height: 100%;
  max-height: 100%;
}

body.ih-tv-map-full #view-caleco .ih-macro-page--news-chans:not(.ih-hidden):not([hidden]) {
  display: flex !important;
  flex: 0 0 auto;
  min-height: auto;
  scroll-snap-align: none;
  border-top: 1px solid var(--ih-border);
}

body.ih-tv-map-full #view-caleco .ih-macro-page--news-chans .ih-tv-chans {
  flex-shrink: 0;
  width: 100%;
}

.ih-module-map #cal-map-host {
  flex: 0 0 auto;
  position: relative;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  align-self: center;
  background: #050505;
  box-sizing: border-box;
}

.ih-module-map #cal-map {
  display: block;
}

/* ── Mini-player TV 16:9 ── */
.ih-tv-block {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--ih-border);
  background: #000;
  overflow: hidden;
}

/* Sidebar Macro TV — 16:9 pela largura da coluna */
#view-caleco.ih-view.active #ih-mod-tv .ih-tv-aspect {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  min-height: 0;
  max-width: 100%;
  min-width: 0;
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-bar {
  padding: calc(8px * var(--ih-side-z, 1.28) * var(--ih-tv-z, 1.35))
    calc(12px * var(--ih-side-z, 1.28) * var(--ih-tv-z, 1.35));
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-title,
#view-caleco.ih-view.active #ih-mod-tv .ih-tv-brand-live,
#view-caleco.ih-view.active #ih-mod-tv .ih-tv-brand-channel {
  font-size: calc(10px * var(--ih-side-z, 1.28) * var(--ih-tv-z, 1.35));
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-chans {
  padding: calc(6px * var(--ih-tv-z, 1.35)) calc(8px * var(--ih-tv-z, 1.35));
  gap: calc(4px * var(--ih-tv-z, 1.35));
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-btn {
  font-size: calc(9px * var(--ih-tv-z, 1.35));
  padding: calc(5px * var(--ih-tv-z, 1.35)) calc(6px * var(--ih-tv-z, 1.35));
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-brand-foot {
  padding: calc(4px * var(--ih-tv-z, 1.35)) calc(10px * var(--ih-tv-z, 1.35))
    calc(6px * var(--ih-tv-z, 1.35));
}

#view-caleco.ih-view.active #ih-mod-tv .ih-tv-brand-credit {
  font-size: calc(8px * var(--ih-side-z, 1.28) * var(--ih-tv-z, 1.35));
}

.ih-tv-aspect {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  padding-top: 0;
  background: #000;
  overflow: hidden;
  box-sizing: border-box;
}

.ih-tv-aspect iframe,
.ih-tv-aspect .ih-tv-yt {
  border: 0;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  max-width: 100%;
  pointer-events: none;
  background: #000;
}

/* Desk Brief na Macro TV — corta chrome YouTube (logo / título / share) */
body.ch-brief-on .ih-tv-aspect .ih-tv-yt:not([hidden]) {
  height: 115%;
  left: 50%;
  max-width: none;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.42);
  transform-origin: center center;
  width: 115%;
}

body.ch-brief-on .ih-tv-aspect::before,
body.ch-brief-on .ih-tv-aspect::after {
  content: '';
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 4;
}

body.ch-brief-on .ih-tv-aspect::before {
  background: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  height: 16%;
  top: 0;
}

body.ch-brief-on .ih-tv-aspect::after {
  background: linear-gradient(0deg, #000 0%, #000 50%, transparent 100%);
  bottom: 0;
  height: 14%;
}

.ih-tv-yt[hidden] {
  display: none !important;
}

.ih-tv-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: transparent;
  pointer-events: none;
}

.ih-tv-status {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.4px;
  color: var(--ih-accent);
  background: rgba(0, 0, 0, 0.82);
  pointer-events: none;
}

.ih-tv-status.ih-tv-status-err {
  color: var(--amber);
}

/* Bloqueia cliques no player (logo YouTube / abrir navegador) */
.ih-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

.ih-tv-chans {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  background: var(--ih-bg);
}

.ih-tv-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--ih-border);
  border-radius: 2px;
  color: var(--ih-text-dim);
  cursor: pointer;
  flex: 1;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 6px;
  text-transform: uppercase;
  transition: all 0.12s;
}

.ih-tv-btn:hover {
  border-color: var(--ih-accent-dim);
  color: var(--ih-text);
}

.ih-tv-btn.active {
  background: rgba(74, 143, 160, 0.08);
  border-color: var(--ih-accent);
  color: var(--ih-accent);
}

.ih-feed-scroll {
  flex: 1;
  min-height: 120px;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ih-feed-scroll::-webkit-scrollbar { width: 5px; }
.ih-feed-scroll::-webkit-scrollbar-track { background: var(--bg0); }
.ih-feed-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.ih-feed-scroll::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ── Placeholders (Central Banks, COT) ── */
.ih-placeholder {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.ih-placeholder-icon {
  color: var(--ih-accent);
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.ih-placeholder h3 {
  color: var(--ih-accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.ih-placeholder p {
  color: var(--ih-text-dim);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  max-width: 420px;
}

.ih-slot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: 24px;
  max-width: 720px;
  width: 100%;
}

.ih-slot-card {
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  padding: 12px;
  text-align: left;
}

.ih-slot-lbl {
  color: var(--ih-accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.ih-slot-val {
  color: var(--ih-text);
  font-size: 18px;
  font-weight: 700;
}

.ih-slot-val.pending {
  color: var(--ih-text-dim);
  font-size: 12px;
  font-weight: 500;
}

/* ── News Terminal (central full) ── */
.ih-news-terminal {
  flex: 0 0 auto;
  min-height: 200px;
  padding: 8px 0;
}

.ih-news-terminal .cal-feed-item {
  border-bottom-color: #0D1520;
  padding: 12px 18px;
}

.ih-news-terminal .cal-feed-txt {
  font-size: 15px;
}

body.ih-hub-full #ih-panel-news {
  --ih-news-z: 1.4;
}

body.ih-hub-full #ih-panel-news .ih-module-bar {
  padding: calc(11px * var(--ih-news-z)) calc(16px * var(--ih-news-z));
  min-height: calc(40px * var(--ih-news-z));
}

body.ih-hub-full #ih-panel-news .ih-module-title {
  font-size: calc(11px * var(--ih-news-z));
  letter-spacing: 2px;
}

body.ih-hub-full #ih-panel-news .ih-news-terminal {
  padding: calc(10px * var(--ih-news-z)) 0;
}

body.ih-hub-full #ih-panel-news .ih-news-terminal .cal-feed-item {
  padding: calc(14px * var(--ih-news-z)) calc(22px * var(--ih-news-z));
}

body.ih-hub-full #ih-panel-news .ih-news-terminal .cal-feed-meta {
  gap: calc(10px * var(--ih-news-z));
  margin-bottom: calc(8px * var(--ih-news-z));
}

body.ih-hub-full #ih-panel-news .ih-news-terminal .cal-feed-tag {
  font-size: calc(11px * var(--ih-news-z));
  padding: calc(4px * var(--ih-news-z)) calc(10px * var(--ih-news-z));
  letter-spacing: 1px;
}

body.ih-hub-full #ih-panel-news .ih-news-terminal .cal-feed-time {
  font-size: calc(11px * var(--ih-news-z));
  letter-spacing: 0.5px;
}

body.ih-hub-full #ih-panel-news .ih-news-terminal .cal-feed-txt {
  font-size: calc(16px * var(--ih-news-z));
  line-height: 1.65;
  letter-spacing: 0.25px;
}

/* ── Macro Map — mapa alinhado à sidebar (TV + Top News, 2× painel 16:9) ── */
#view-caleco.ih-show-calendar {
  --ih-macro-side-ref-w: calc(480px * var(--ih-tv-z, 1.35));
  --ih-macro-panel-h: calc(var(--ih-macro-side-ref-w) * 9 / 16);
  --ih-macro-tv-chrome: calc(62px * var(--ih-tv-z, 1.35));
  --ih-macro-feed-chrome: calc(40px * var(--ih-tv-z, 1.35));
  --ih-macro-map-chrome: 88px;
  --ih-map-displays-h: calc(var(--ih-macro-map-stage-base) * 0.42);
  --ih-macro-row1-base: calc(
    var(--ih-macro-tv-chrome) + var(--ih-macro-panel-h) +
    var(--ih-macro-feed-chrome) + var(--ih-macro-panel-h)
  );
  --ih-macro-map-stage-base: calc(var(--ih-macro-row1-base) - var(--ih-macro-map-chrome));
  --ih-macro-map-boost: calc((var(--ih-macro-map-stage-base) - var(--ih-map-displays-h)) * 0.14);
  --ih-macro-row1-h: calc(var(--ih-macro-row1-base) + var(--ih-macro-map-boost));
  --ih-macro-map-h: calc(var(--ih-macro-row1-h) - var(--ih-macro-map-chrome));
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar {
  --ih-macro-map-chrome: 124px;
}

#view-caleco.ih-show-calendar .ih-macro-scroll-pages {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub,
#view-caleco.ih-show-calendar .ih-macro-page--calendar {
  min-height: auto;
  flex-shrink: 0;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(440px * var(--ih-tv-z, 1.35)), calc(520px * var(--ih-tv-z, 1.35)));
  grid-template-rows: auto var(--ih-macro-row1-h) auto;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  border-bottom: 1px solid var(--ih-border);
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-central {
  display: contents;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-subtabs {
  grid-column: 1 / -1;
  grid-row: 1;
  flex-shrink: 0;
}

#view-caleco.ih-show-calendar .ih-module-map .ih-module-bar {
  flex-shrink: 0;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-panels {
  grid-column: 1;
  grid-row: 2;
  flex: 0 0 var(--ih-macro-row1-h);
  min-height: var(--ih-macro-row1-h);
  height: var(--ih-macro-row1-h);
  overflow: hidden;
  position: relative;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-macro-calendar {
  grid-column: 1 / -1;
  grid-row: 3;
  flex: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--cal-bg, #0a1018);
  border-top: 1px solid var(--ih-border);
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-sidebar {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  max-height: var(--ih-macro-row1-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#view-caleco.ih-show-calendar #ih-panel-macro-map.active {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-show-calendar .ih-macro-page--hub .ih-panel.active {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-show-calendar .ih-module-map {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#view-caleco.ih-show-calendar #ih-mod-tv .ih-tv-chans {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: none !important;
  visibility: hidden !important;
}

#view-caleco.ih-show-calendar .ih-sidebar .ih-tv-block {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-show-calendar .ih-sidebar #ih-mod-tv .ih-tv-aspect {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  max-height: none;
}


#view-caleco.ih-show-calendar .ih-sidebar #ih-mod-feed {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#view-caleco.ih-show-calendar .ih-sidebar #ih-cortex-mentor {
  display: none !important;
}

#view-caleco.ih-show-calendar .ih-sidebar #ih-mod-feed .ih-feed-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#view-caleco.ih-show-calendar .ih-sidebar #ih-mod-feed .ih-feed-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Cortex Mentor — system feed (Macro Map dock); legado: sob TV */
.ih-cortex-mentor {
  flex: 0 0 auto;
  padding: 6px 8px 4px;
}

#ih-panel-macro-map #ih-cortex-mentor {
  border-bottom: none;
  flex: 1 1 auto;
  min-height: 0;
}

.ih-cm-card {
  background: rgba(79, 195, 247, 0.04);
  border: 1px solid rgba(79, 195, 247, 0.22);
  border-radius: 4px;
  padding: 6px 8px;
}

.ih-cm-hdr {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ad-cyan, #4fc3f7);
  margin-bottom: 4px;
}

.ih-cm-line {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text2, #b0bec5);
}

.ih-cm-section--macro {
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(79, 195, 247, 0.1);
}

.ih-cm-section--tab {
  margin-top: 2px;
}

.ih-cm-intro {
  margin: 0 0 4px;
  font-size: 10px;
  line-height: 1.35;
  color: #90a4ae;
}

.ih-cm-kicker {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ad-cyan, #4fc3f7);
  margin-bottom: 2px;
}

.ih-cm-data-flow,
.ih-cm-confluence {
  margin: 0 0 4px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text2, #b0bec5);
}

.ih-cm-terms {
  margin: 2px 0 4px;
}

.ih-cm-term {
  margin: 0 0 3px;
  font-size: 10px;
  line-height: 1.3;
  color: #78909c;
}

.ih-cm-term-name {
  font-weight: 700;
  color: #c8883a;
}

.ih-cm-tab-tip {
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px dashed rgba(79, 195, 247, 0.12);
  font-size: 10px;
  line-height: 1.35;
  color: #78909c;
}

.ih-cm-tab-label {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c8883a;
  margin-right: 4px;
}

.ih-cm-foot {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.2;
  color: #546e7a;
  opacity: 0.85;
}

.ih-cm-empty {
  font-size: 10px;
  color: #546e7a;
  padding: 4px 2px;
}

#view-caleco.ih-view.active .ih-sidebar .ih-feed-scroll .cal-feed-edu {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
  color: #78909c;
  font-style: italic;
  padding-left: 2px;
}

#view-caleco.ih-show-calendar .ih-module-map {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#view-caleco.ih-show-calendar .ih-module-map > .cal-map-displays {
  flex: 0 0 auto;
  min-height: calc(220px * var(--cal-ms-z, 1.25) * var(--cal-ms-h-z, 1));
}

#view-caleco.ih-show-calendar .ih-module-map .ih-map-stage {
  flex: 1 1 0;
  min-height: calc(200px * var(--cal-ms-z, 1.25));
  height: auto;
  max-height: none;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#view-caleco.ih-show-calendar .ih-map-stage:has(.cal-map-displays[data-cal-map-dock="overlay"]) #cal-map-host,
#view-caleco.ih-show-calendar .ih-map-stage #cal-map-host {
  flex: 1 1 calc(53.8% + 46.2% * (1 - var(--cal-ms-h-z, 1)));
  min-height: calc(180px * var(--cal-ms-z, 1.25));
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  align-self: stretch;
  position: relative;
  inset: auto;
  border-bottom: none;
}

#view-caleco.ih-show-calendar .ih-map-stage .cal-map-displays {
  flex: 0 0 auto;
  min-height: calc(220px * var(--cal-ms-z, 1.25) * var(--cal-ms-h-z, 1));
  height: auto;
  max-height: none;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
}

#view-caleco.ih-show-calendar .ih-map-stage .cal-map-displays[data-cal-map-dock="overlay"] {
  flex: 0 0 auto;
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  min-height: calc(220px * var(--cal-ms-z, 1.25) * var(--cal-ms-h-z, 1));
  height: auto;
  max-height: none;
}

#view-caleco.ih-show-calendar .ih-macro-calendar .cal-toolbar {
  flex-shrink: 0;
}

#view-caleco.ih-show-calendar .ih-macro-calendar .cal-table-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  max-height: calc(var(--cal-row-h, 56px) * var(--cal-visible-rows, 50) + var(--cal-head-h, 58px));
  overflow-y: auto;
  overflow-x: hidden;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-scroll-pages {
  overflow-y: auto;
  scroll-snap-type: none;
}

body.ih-hub-full #view-caleco.ih-view.active.ih-show-calendar .ih-macro-page--hub .ih-panel.active {
  position: relative;
  inset: auto;
}

/* ── Calendar section visibility ── */
#view-caleco.ih-view:not(.ih-show-calendar) .ih-macro-calendar {
  display: none !important;
}

#view-caleco.ih-view:not(.ih-show-calendar) .ih-macro-page--calendar {
  display: none;
}

#view-caleco.ih-view:not(.ih-show-calendar) .cal-toolbar,
#view-caleco.ih-view:not(.ih-show-calendar) .cal-table-wrap {
  display: none;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar) .ih-macro-calendar {
  display: none !important;
}

body.ih-hub-full #view-caleco.ih-view.active:not(.ih-show-calendar) .ih-macro-page--calendar {
  display: none !important;
}

#view-caleco.ih-trailing-stop-layout .ih-body {
  flex: 1 1 auto;
  min-height: 420px;
  height: clamp(420px, calc(52vh - 120px), 680px);
  max-height: none;
}

#view-caleco.ih-trading-plan-layout .ih-body {
  flex: 1 1 0;
  height: auto;
  max-height: none;
  min-height: 0;
}

#view-caleco.ih-vshape-layout .ih-body {
  flex: 1 1 0;
  height: auto;
  max-height: none;
  min-height: 0;
}

/* Trading Plan / V Shape · TV sempre rebatida (reforço além de ih-sidebar-collapsed) */
#view-caleco.ih-trading-plan-layout .ih-sidebar,
#view-caleco.ih-vshape-layout .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-trading-plan-layout .ih-sidebar,
body.ih-hub-full #view-caleco.ih-view.active.ih-vshape-layout .ih-sidebar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#view-caleco.ih-trading-plan-layout .ih-macro-page--hub .ih-body,
#view-caleco.ih-vshape-layout .ih-macro-page--hub .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-trading-plan-layout .ih-macro-page--hub .ih-body,
body.ih-hub-full #view-caleco.ih-view.active.ih-vshape-layout .ih-macro-page--hub .ih-body {
  grid-template-columns: minmax(0, 1fr) !important;
}

#view-caleco.ih-trading-plan-layout .ih-macro-page--hub .ih-panels,
#view-caleco.ih-vshape-layout .ih-macro-page--hub .ih-panels,
body.ih-hub-full #view-caleco.ih-view.active.ih-trading-plan-layout .ih-macro-page--hub .ih-panels,
body.ih-hub-full #view-caleco.ih-view.active.ih-vshape-layout .ih-macro-page--hub .ih-panels {
  grid-column: 1 / -1 !important;
}

#ih-panel-trailing-stop {
  overflow: hidden;
}

#ih-panel-trailing-stop #view-trailing-stop {
  height: 100%;
}

#ih-panel-trading-plan {
  overflow: hidden;
}

#ih-panel-trading-plan #view-trading-plan {
  height: 100%;
}

/* ── Sub-abas em 2 páginas (scroll vertical) — Trading Plan · Alert System ── */
.ih-sub-scroll-pages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.ih-sub-page {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 100%;
  min-width: 0;
}

.ih-sub-page-hd {
  background: var(--bg1, #0D0D0D);
  border-bottom: 1px solid var(--border2, #2A2A2A);
  color: var(--text-dim, #7A6A5A);
  flex-shrink: 0;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 10px 18px;
  text-transform: uppercase;
}

#ih-panel-macro-trend.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#ih-panel-macro-trend .mtg-scroll-pages {
  flex: 1 1 0;
  min-height: 0;
}

body.ih-hub-full #ih-panel-macro-trend.active .mtg-scroll-pages {
  flex: 1 1 0;
  min-height: 0;
}

#view-trading-plan .tp-scroll-pages {
  flex: 1 1 auto;
  min-height: 0;
}

#view-trading-plan .tp-page--plan {
  background: var(--bg0, #070707);
  min-height: clamp(420px, 68vh, 820px);
}

#view-trading-plan .tp-page--plan .tp-cards {
  flex: 1 1 auto;
  min-height: 240px;
  overflow-y: auto;
}

/* Trading Plan · 2× macro card (padrão Central Banks) · −32% total (−20% sobre escala anterior) */
#ih-panel-trading-plan {
  --tp-card-scale: 0.8;
  --tp-card-z: calc(2 * var(--tp-card-scale));
  --tp-card-fs: calc(1.32 * var(--tp-card-scale));
  --tp-card-h: var(--tp-card-scale);
}

body.ih-hub-full #view-caleco.ih-trading-plan-layout .ih-body {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

body.ih-hub-full #view-caleco.ih-macro-trend-layout .ih-body {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

#view-caleco.ih-view .ih-macro-scroll-pages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#view-caleco.ih-view .ih-macro-calendar .cal-table-wrap {
  flex: 0 0 auto;
  min-height: 0;
  max-height: calc(var(--cal-row-h, 56px) * var(--cal-visible-rows, 50) + var(--cal-head-h, 58px));
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Pop-out window ── */
.ih-popout-root {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 10px;
  background: var(--bg1, #0D0D0D);
}

.ih-popout-root .ih-module {
  flex: 1;
  min-height: 0;
}

.ih-popout-root .ih-tv-aspect {
  flex: 1;
  padding-top: 0;
  min-height: 200px;
}

.ih-popout-root .ih-tv-aspect iframe {
  position: relative;
  height: 100%;
  min-height: 240px;
}

@media (min-width: 1600px) {
  .ih-sidebar {
    width: calc(540px * var(--ih-tv-z, 1.35));
    max-width: calc(620px * var(--ih-tv-z, 1.35));
  }
  body.ih-hub-full #view-caleco.ih-view.active .ih-sidebar {
    width: calc(580px * var(--ih-tv-z, 1.35));
    max-width: calc(640px * var(--ih-tv-z, 1.35));
  }
}

/* ── Dashboard Central Banks / COT ── */
.ih-dash {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ih-dash-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  scrollbar-width: thin;
}

.ih-dash-body::-webkit-scrollbar { width: 5px; }
.ih-dash-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.ih-dash-refresh {
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  border-radius: 2px;
  color: var(--ih-text-dim);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 4px 8px;
}

.ih-dash-refresh:hover {
  border-color: var(--ih-accent-dim);
  color: var(--ih-accent);
}

.ih-macro-banner {
  background: rgba(74, 143, 160, 0.08);
  border: 1px solid var(--ih-border);
  color: var(--ih-text-dim);
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.ih-macro-banner code {
  color: var(--ih-accent);
  font-family: var(--mono);
  font-size: 10px;
}

.ih-macro-loading {
  color: var(--ih-text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 24px;
  text-transform: uppercase;
}

.ih-macro-grid {
  display: grid;
  --ih-macro-z: 1.38;
  gap: calc(14px * var(--ih-macro-z));
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .ih-macro-grid { grid-template-columns: 1fr; }
}

/* Intel Hub — cards unificados (padrão Central Banks · Expandir ↗) */

#ih-panel-central-banks .ih-dash-body {
  padding: calc(16px * var(--ih-macro-z)) calc(18px * var(--ih-macro-z)) calc(20px * var(--ih-macro-z));
}

#ih-panel-central-banks .ih-macro-banner {
  font-size: calc(12px * var(--ih-macro-z));
  line-height: 1.55;
  margin-bottom: calc(14px * var(--ih-macro-z));
  padding: calc(12px * var(--ih-macro-z)) calc(14px * var(--ih-macro-z));
}

#ih-panel-central-banks .ih-macro-banner code {
  font-size: calc(11px * var(--ih-macro-z));
}

#ih-panel-central-banks .ih-macro-loading {
  font-size: calc(12px * var(--ih-macro-z));
  padding: calc(28px * var(--ih-macro-z));
}

.ih-macro-grid .ih-macro-card {
  gap: calc(10px * var(--ih-macro-z));
  min-height: calc(210px * var(--ih-macro-z));
  padding: calc(16px * var(--ih-macro-z)) calc(16px * var(--ih-macro-z)) calc(13px * var(--ih-macro-z));
}

.ih-macro-grid .ih-macro-card-hdr {
  gap: calc(10px * var(--ih-macro-z));
}

.ih-macro-grid .ih-macro-card-title {
  font-size: calc(11px * var(--ih-macro-z));
  letter-spacing: 1.6px;
}

.ih-macro-grid .ih-macro-card-sub {
  font-size: calc(11px * var(--ih-macro-z));
  margin-top: calc(5px * var(--ih-macro-z));
}

.ih-macro-grid .ih-macro-trend {
  font-size: calc(11px * var(--ih-macro-z));
}

.ih-macro-grid .ih-macro-val {
  font-size: calc(28px * var(--ih-macro-z));
  line-height: 1.15;
}

.ih-macro-grid .ih-macro-foot {
  font-size: calc(10px * var(--ih-macro-z));
  letter-spacing: 0.55px;
}

.ih-macro-grid .ih-macro-hint {
  font-size: calc(10px * var(--ih-macro-z));
}

.ih-macro-grid .ih-spark {
  display: block;
  margin-top: calc(4px * var(--ih-macro-z));
  width: 100%;
}

.ih-macro-grid .ih-spark svg {
  display: block;
  height: calc(54px * var(--ih-macro-z));
  width: 100%;
}

#ih-panel-central-banks .ih-module-bar {
  min-height: calc(40px * var(--ih-macro-z));
  padding: calc(10px * var(--ih-macro-z)) calc(14px * var(--ih-macro-z));
}

#ih-panel-central-banks .ih-module-title {
  font-size: calc(11px * var(--ih-macro-z));
}

#ih-panel-central-banks .ih-dash-refresh {
  font-size: calc(14px * var(--ih-macro-z));
  padding: calc(5px * var(--ih-macro-z)) calc(9px * var(--ih-macro-z));
}

.ih-macro-card {
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  padding: 14px 14px 10px;
}

.ih-macro-card--loading {
  opacity: 0.55;
}

.ih-cotacoes__cards,
.ih-mc__macro-grid,
.ih-rr-grid,
.ih-ca-grid,
.ih-md-sector-grid,
.ih-gm-region__grid {
  display: grid;
  gap: calc(14px * var(--ih-macro-z, 1.38));
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ih-macro-card-click {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ih-macro-card-click:hover,
.ih-macro-card-click:focus {
  background: #0c1218;
  border-color: rgba(74, 143, 160, 0.45);
  outline: none;
}

.ih-macro-hint {
  color: var(--ih-accent-dim);
  font-size: 9px;
  opacity: 0.85;
}

.ih-macro-card-hdr {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ih-macro-card-title {
  color: var(--ih-accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ih-macro-card-sub {
  color: var(--ih-text-dim);
  font-size: 10px;
  margin-top: 3px;
}

.ih-macro-trend {
  color: var(--ih-text-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ih-macro-trend.up { color: var(--green); }
.ih-macro-trend.down { color: var(--red); }

.ih-macro-val {
  color: var(--text);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.ih-macro-foot {
  color: var(--ih-text-dim);
  display: flex;
  font-family: var(--mono);
  font-size: 9px;
  justify-content: space-between;
  letter-spacing: 0.5px;
  margin-top: auto;
  text-transform: uppercase;
}

.ih-spark { display: block; margin-top: 2px; width: 100%; }

/* Trading Plan · cards no padrão Central Banks (compacto + expandir) */
#ih-panel-trading-plan .tp-cards {
  gap: calc(14px * var(--ih-macro-z, 1.38));
  grid-template-columns: repeat(auto-fill, minmax(calc(560px * var(--tp-card-scale, 1)), 1fr));
  padding: calc(14px * var(--tp-card-z) * var(--tp-card-h)) calc(18px * var(--tp-card-z)) calc(18px * var(--tp-card-z) * var(--tp-card-h));
}

#ih-panel-trading-plan .tp-card--macro {
  cursor: pointer;
  gap: calc(8px * var(--tp-card-z) * var(--tp-card-h));
  min-height: 0;
  padding: calc(14px * var(--tp-card-z) * var(--tp-card-h)) calc(14px * var(--tp-card-z));
  transition: border-color 0.15s, background 0.15s;
}

#ih-panel-trading-plan .tp-card--macro:hover,
#ih-panel-trading-plan .tp-card--macro.tp-card--open {
  background: #0c1218;
  border-color: rgba(74, 143, 160, 0.45);
}

#ih-panel-trading-plan .tp-card--macro.tp-card--open {
  cursor: default;
  min-height: auto;
}

#ih-panel-trading-plan .tp-card--macro .ih-macro-card-title {
  color: var(--ih-accent-bright, var(--ih-accent));
  font-size: calc(10px * var(--tp-card-z) * var(--tp-card-fs));
  letter-spacing: 1.5px;
}

#ih-panel-trading-plan .tp-card--macro .ih-macro-card-sub,
#ih-panel-trading-plan .tp-card--macro .tp-card-sub {
  color: var(--ih-text-dim);
  font-size: calc(10px * var(--tp-card-z) * var(--tp-card-fs));
  line-height: 1.35;
  margin-top: calc(3px * var(--tp-card-z));
}

#ih-panel-trading-plan .tp-card--macro .ih-macro-trend {
  font-size: calc(9px * var(--tp-card-z) * var(--tp-card-fs));
  letter-spacing: 0.5px;
}

#ih-panel-trading-plan .tp-card--macro .ih-macro-trend.down { color: var(--red); }
#ih-panel-trading-plan .tp-card--macro .ih-macro-trend.up { color: var(--green); }
#ih-panel-trading-plan .tp-card--macro .ih-macro-trend.flat { color: var(--ih-text-dim); }

#ih-panel-trading-plan .tp-card--macro .tp-card-hero {
  font-size: calc(26px * var(--tp-card-z) * var(--tp-card-fs));
  line-height: 1.1;
}

#ih-panel-trading-plan .tp-card--macro .tp-card-hero.green { color: var(--green); }
#ih-panel-trading-plan .tp-card--macro .tp-card-hero.red { color: var(--red); }

#ih-panel-trading-plan .tp-card--macro .tp-card-hero-suffix {
  color: var(--ih-text-dim);
  font-size: calc(14px * var(--tp-card-z) * var(--tp-card-fs));
  font-weight: 600;
  margin-left: calc(4px * var(--tp-card-z));
}

#ih-panel-trading-plan .tp-card--macro .tp-card-spark,
#ih-panel-trading-plan .tp-card--macro .tp-card-spark svg,
#ih-panel-trading-plan .tp-card--macro .ih-spark {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}

#ih-panel-trading-plan .tp-card--macro .tp-card-preview-foot {
  margin-top: auto;
}

#ih-panel-trading-plan .tp-card--macro .ih-macro-foot {
  font-size: calc(9px * var(--tp-card-z) * var(--tp-card-fs));
}

#ih-panel-trading-plan .tp-card-detail {
  border-top: 1px solid var(--ih-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: calc(10px * var(--tp-card-z) * var(--tp-card-h));
  padding-top: calc(10px * var(--tp-card-z) * var(--tp-card-h));
}

#ih-panel-trading-plan .tp-card-detail[hidden] {
  display: none !important;
}

#ih-panel-trading-plan .tp-card-detail .tp-card-info {
  font-size: calc(11px * var(--tp-card-z) * var(--tp-card-fs));
  padding: calc(8px * var(--tp-card-z) * var(--tp-card-h)) 0;
}

#ih-panel-trading-plan .tp-card-detail .tp-card-metrics {
  border-bottom: 1px solid var(--ih-border);
}

#ih-panel-trading-plan .tp-card-detail .tp-card-metric {
  padding: calc(10px * var(--tp-card-z) * var(--tp-card-h)) calc(10px * var(--tp-card-z));
}

#ih-panel-trading-plan .tp-card-detail .tp-card-metric-lbl {
  font-size: calc(10px * var(--tp-card-z) * var(--tp-card-fs));
}

#ih-panel-trading-plan .tp-card-detail .tp-card-metric-val {
  font-size: calc(15px * var(--tp-card-z) * var(--tp-card-fs));
}

#ih-panel-trading-plan .tp-card-detail .tp-card-exec-mode {
  font-size: calc(10px * var(--tp-card-z) * var(--tp-card-fs));
  padding: calc(10px * var(--tp-card-z) * var(--tp-card-h)) 0;
}

#ih-panel-trading-plan .tp-card-detail .tp-card-notes {
  min-height: calc(96px * var(--tp-card-z) * var(--tp-card-h));
  padding: calc(10px * var(--tp-card-z) * var(--tp-card-h)) 0;
}

#ih-panel-trading-plan .tp-card-detail .tp-card-notes-lbl {
  font-size: calc(9px * var(--tp-card-z) * var(--tp-card-fs));
}

#ih-panel-trading-plan .tp-card-detail .tp-card-notes-txt {
  font-size: calc(11px * var(--tp-card-z) * var(--tp-card-fs));
  min-height: calc(72px * var(--tp-card-z) * var(--tp-card-h));
}

#ih-panel-trading-plan .tp-card-detail .tp-card-footer {
  font-size: calc(10px * var(--tp-card-z) * var(--tp-card-fs));
  padding: calc(8px * var(--tp-card-z) * var(--tp-card-h)) 0 0;
}

#ih-panel-trading-plan .tp-card-detail .tp-card-btn-exec,
#ih-panel-trading-plan .tp-card-detail .tp-card-btn-cancel {
  font-size: calc(11px * var(--tp-card-z) * var(--tp-card-fs));
  padding: calc(7px * var(--tp-card-z) * var(--tp-card-h)) calc(14px * var(--tp-card-z));
}

#ih-panel-trading-plan .tp-card-ready {
  border-color: rgba(0, 168, 204, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 168, 204, 0.2);
}

/* Spark charts · cards Intel Hub — gradiente sutil GCT (linha cyan/amber + glow) */
.ih-spark--card {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.ih-spark-bg {
  display: none;
}

.ih-spark-area {
  opacity: 1;
}

.ih-spark-line {
  stroke: rgba(0, 168, 204, 0.88);
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ih-spark--cyan .ih-spark-line,
.ih-spark--card.ih-spark--flat .ih-spark-line {
  stroke: rgba(0, 168, 204, 0.88);
}

.ih-spark--amber .ih-spark-line {
  stroke: rgba(200, 136, 58, 0.82);
}

.ih-spark--up .ih-spark-line,
.ih-spark--down .ih-spark-line {
  /* Tendência fica nos textos/bordas do card — linha permanece sutil */
  stroke: rgba(0, 168, 204, 0.88);
}

.ih-spark--amber.ih-spark--up .ih-spark-line,
.ih-spark--amber.ih-spark--down .ih-spark-line {
  stroke: rgba(200, 136, 58, 0.82);
}

.ih-spark--mini .ih-spark-line {
  stroke-width: 1;
}

.ih-mc-spark-wrap .ih-spark--card,
.ih-gm-card__spark .ih-spark--card,
.ih-cq-card__chart .ih-spark--card,
.ih-rr-card__spark .ih-spark--card,
.ih-ca-card__spark .ih-spark--card,
.ih-md-sector__spark .ih-spark--card,
#ih-panel-central-banks .ih-spark--card {
  height: auto;
}

.ih-mc-spark-wrap svg,
.ih-gm-card__spark svg,
.ih-cq-card__chart svg,
.ih-rr-card__spark svg,
.ih-ca-card__spark svg,
.ih-md-sector__spark svg {
  width: 100%;
  display: block;
}

/* ── COT Report ── */
.ih-cot-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 920px;
  font-family: var(--font-bloomberg, var(--mono));
}

.ih-cot-block {
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  padding: 16px 18px;
}

.ih-cot-block-hdr {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ih-cot-market {
  color: var(--ih-accent);
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.ih-cot-flag {
  background: rgba(184, 132, 58, 0.12);
  border: 1px solid rgba(184, 132, 58, 0.35);
  color: var(--amber);
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  text-transform: uppercase;
}

.ih-cot-bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 96px 1fr 128px;
  margin-bottom: 12px;
}

.ih-cot-bar-bidirect {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 32px 1fr 32px;
}

.ih-cot-axis-lbl {
  color: #ffffff;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.ih-cot-axis-short { text-align: right; }
.ih-cot-axis-long { text-align: left; }

.ih-cot-bar-track {
  background: var(--bg0);
  border: 1px solid var(--ih-border);
  height: 16px;
  overflow: visible;
  position: relative;
}

.ih-cot-zero-line {
  background: rgba(0, 168, 204, 0.55);
  bottom: -1px;
  box-shadow: 0 0 6px rgba(0, 168, 204, 0.25);
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: -1px;
  transform: translateX(-50%);
  width: 1px;
  z-index: 2;
}

.ih-cot-bar-fill {
  bottom: 2px;
  height: auto;
  min-width: 1px;
  position: absolute;
  top: 2px;
  transition: width 0.45s ease, left 0.45s ease, right 0.45s ease;
}

.ih-cot-bar-fill.spec-long { background: linear-gradient(90deg, rgba(116, 222, 198, 0.35), #67E6C9); }
.ih-cot-bar-fill.spec-short { background: linear-gradient(270deg, rgba(224, 134, 134, 0.35), #E77A7A); }
.ih-cot-bar-fill.comm-long { background: linear-gradient(90deg, rgba(116, 222, 198, 0.35), #67E6C9); }
.ih-cot-bar-fill.comm-short { background: linear-gradient(270deg, rgba(224, 134, 134, 0.35), #E77A7A); }

.ih-cot-bar-val {
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ih-cot-bar-val.spec-long { color: #67E6C9; }
.ih-cot-bar-val.spec-short { color: #E77A7A; }
.ih-cot-bar-val.comm-long { color: #67E6C9; }
.ih-cot-bar-val.comm-short { color: #E77A7A; }

.ih-cot-bar-row.spec-long .ih-cot-bar-lbl,
.ih-cot-bar-row.spec-short .ih-cot-bar-lbl,
.ih-cot-bar-row.comm-long .ih-cot-bar-lbl,
.ih-cot-bar-row.comm-short .ih-cot-bar-lbl {
  color: #ffffff;
}

.ih-cot-foot {
  color: #ffffff;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 8px;
  text-transform: uppercase;
}

/* COT Report — caixas e tipografia maiores */
#ih-panel-cot {
  --ih-cot-z: 1.38;
}

#ih-panel-cot .ih-dash-body {
  padding: calc(16px * var(--ih-cot-z)) calc(18px * var(--ih-cot-z)) calc(20px * var(--ih-cot-z));
}

#ih-panel-cot .ih-macro-banner {
  font-size: calc(12px * var(--ih-cot-z));
  line-height: 1.55;
  margin-bottom: calc(14px * var(--ih-cot-z));
  padding: calc(12px * var(--ih-cot-z)) calc(14px * var(--ih-cot-z));
}

#ih-panel-cot .ih-macro-loading {
  font-size: calc(12px * var(--ih-cot-z));
  padding: calc(28px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-stack {
  gap: calc(16px * var(--ih-cot-z));
  max-width: 980px;
}

#ih-panel-cot .ih-cot-block {
  min-height: calc(148px * var(--ih-cot-z));
  padding: calc(18px * var(--ih-cot-z)) calc(20px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-block-hdr {
  gap: calc(12px * var(--ih-cot-z));
  margin-bottom: calc(16px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-market {
  font-size: calc(15px * var(--ih-cot-z));
  letter-spacing: 1.6px;
}

#ih-panel-cot .ih-cot-flag {
  font-size: calc(11px * var(--ih-cot-z));
  padding: calc(5px * var(--ih-cot-z)) calc(11px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-bar-row {
  gap: calc(12px * var(--ih-cot-z));
  grid-template-columns: calc(112px * var(--ih-cot-z)) 1fr calc(150px * var(--ih-cot-z));
  margin-bottom: calc(14px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-bar-bidirect {
  gap: calc(8px * var(--ih-cot-z));
  grid-template-columns: calc(38px * var(--ih-cot-z)) 1fr calc(38px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-axis-lbl {
  font-size: calc(11px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-bar-lbl {
  font-size: calc(12px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-bar-track {
  height: calc(20px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-bar-val {
  font-size: calc(14px * var(--ih-cot-z));
}

#ih-panel-cot .ih-cot-foot {
  font-size: calc(11px * var(--ih-cot-z));
  margin-top: calc(10px * var(--ih-cot-z));
}

#ih-panel-cot .ih-module-bar {
  min-height: calc(40px * var(--ih-cot-z));
  padding: calc(10px * var(--ih-cot-z)) calc(14px * var(--ih-cot-z));
}

#ih-panel-cot .ih-module-title {
  font-size: calc(11px * var(--ih-cot-z));
}

#ih-panel-cot .ih-dash-refresh {
  font-size: calc(14px * var(--ih-cot-z));
  padding: calc(5px * var(--ih-cot-z)) calc(9px * var(--ih-cot-z));
}

/* ── TV mute ── */
.ih-tv-mute {
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-tv-btn-r, 5px);
  color: var(--ih-text-dim);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 3px 7px;
}

.ih-tv-mute:hover,
.ih-tv-mute.unmuted {
  border-color: var(--ih-accent-dim);
  color: var(--ih-accent);
}

.ih-tv-expand-map {
  appearance: none;
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-tv-btn-r, 5px);
  color: var(--ih-text-dim);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 3px 7px;
}

.ih-tv-expand-map:hover,
.ih-tv-expand-map.active {
  border-color: var(--ih-accent-dim);
  color: var(--ih-accent);
  background: rgba(0, 168, 204, 0.08);
}

#view-caleco.ih-view.active .ih-tv-expand-map {
  font-size: calc(13px * var(--ih-side-z, 1.28));
  padding: calc(4px * var(--ih-side-z, 1.28)) calc(8px * var(--ih-side-z, 1.28));
}

/* ── FRED modal (gráfico expandido) ── */
body.ih-fred-modal-open {
  overflow: hidden;
}

.ih-fred-modal {
  inset: 0;
  position: fixed;
  z-index: 300;
}

.ih-fred-modal--fullscreen .ih-fred-modal-backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.ih-fred-modal--fullscreen .ih-fred-modal-panel {
  --ih-fred-modal-z: 1;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  inset: 0;
  left: 0;
  max-height: none;
  max-width: none;
  position: fixed;
  top: 0;
  transform: none;
  width: 100%;
}

.ih-fred-modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  inset: 0;
  position: absolute;
}

.ih-fred-modal-panel {
  --ih-fred-modal-z: 1.5;
  background: var(--bg2);
  border: 1px solid var(--ih-border);
  box-shadow: 0 calc(16px * var(--ih-fred-modal-z)) calc(48px * var(--ih-fred-modal-z)) rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  height: calc(88vh / var(--ui-fs-boost, 1));
  left: 50%;
  max-height: none;
  max-width: calc(80vw / var(--ui-fs-boost, 1));
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(80vw / var(--ui-fs-boost, 1));
}

.ih-fred-modal-hdr {
  align-items: flex-start;
  border-bottom: 1px solid var(--ih-border);
  display: flex;
  gap: calc(12px * var(--ih-fred-modal-z, 1.5));
  justify-content: space-between;
  padding: calc(14px * var(--ih-fred-modal-z, 1.5)) calc(16px * var(--ih-fred-modal-z, 1.5))
    calc(12px * var(--ih-fred-modal-z, 1.5));
}

.ih-fred-modal-hdr .ih-macro-card-title {
  color: var(--ih-accent-bright, #33bdd6);
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', Consolas, monospace);
  font-size: calc(13px * var(--ih-fred-modal-z, 1.5));
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.25;
}

.ih-fred-modal-hdr .ih-macro-card-sub {
  color: var(--ih-text-dim);
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', Consolas, monospace);
  font-size: calc(11px * var(--ih-fred-modal-z, 1.5));
  letter-spacing: 0.08em;
  margin-top: calc(5px * var(--ih-fred-modal-z, 1.5));
}

.ih-fred-modal-close {
  appearance: none;
  background: var(--bg0);
  border: 1px solid var(--ih-border);
  border-radius: 2px;
  color: var(--ih-text-dim);
  cursor: pointer;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: calc(14px * var(--ih-fred-modal-z, 1.5));
  line-height: 1;
  padding: calc(4px * var(--ih-fred-modal-z, 1.5)) calc(9px * var(--ih-fred-modal-z, 1.5));
}

.ih-fred-modal-close:hover {
  border-color: var(--ih-accent-dim);
  color: var(--ih-accent);
}

.ih-fred-modal-chart {
  flex: 1 1 auto;
  min-height: 0;
  padding: calc(8px * var(--ih-fred-modal-z, 1.5)) calc(12px * var(--ih-fred-modal-z, 1.5))
    calc(4px * var(--ih-fred-modal-z, 1.5));
}

.ih-fred-modal--fullscreen .ih-fred-modal-chart {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 8px 12px 4px;
}

.ih-fred-modal-lw-host {
  flex: 1 1 auto;
  min-height: 200px;
  width: 100%;
}

.ih-fred-modal--fullscreen .ih-fred-modal-panel .ih-macro-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.ih-fred-modal-hint {
  color: var(--ih-text-faint, var(--text-faint));
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-left: auto;
  text-transform: none;
}

.ih-fred-modal-panel .ih-macro-foot {
  border-top: 1px solid var(--ih-border);
  color: var(--ih-text-dim);
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', Consolas, monospace);
  font-size: calc(11px * var(--ih-fred-modal-z, 1.5));
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: calc(10px * var(--ih-fred-modal-z, 1.5)) calc(16px * var(--ih-fred-modal-z, 1.5))
    calc(12px * var(--ih-fred-modal-z, 1.5));
  text-transform: uppercase;
}

.ih-fred-chart-svg {
  display: block;
  width: 100%;
}

.ih-fred-grid {
  stroke: rgba(42, 42, 42, 0.9);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.ih-fred-line {
  filter: drop-shadow(0 0 calc(4px * var(--ih-fred-modal-z, 1.5)) rgba(74, 143, 160, 0.35));
}

.ih-fred-modal-chart .ih-fred-axis-y {
  fill: #9aabb8;
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', Consolas, monospace);
  font-size: calc(9px * var(--ih-fred-modal-z, 1.5));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ih-fred-axis-y {
  fill: var(--ih-text-dim);
  font-family: var(--mono);
  font-size: 9px;
}

.ih-fred-modal-chart .ih-fred-axis-x {
  fill: #7a8a96;
  font-family: var(--font-bloomberg, 'Bloomberg Prop Unicode N', Consolas, monospace);
  font-size: calc(8px * var(--ih-fred-modal-z, 1.5));
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.ih-fred-axis-x {
  fill: var(--text-faint);
  font-family: var(--mono);
  font-size: 8px;
}

.ih-fred-chart-empty {
  color: var(--ih-text-dim);
  font-family: var(--font-bloomberg, var(--mono));
  font-size: calc(11px * var(--ih-fred-modal-z, 1.5));
  padding: calc(48px * var(--ih-fred-modal-z, 1.5)) calc(24px * var(--ih-fred-modal-z, 1.5));
  text-align: center;
}

.ih-cot-bar-lbl {
  color: #ffffff;
  font-family: var(--font-bloomberg, var(--mono));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Bloomberg TV — preenche o frame sem letterbox; pan leve à esquerda evita corte na direita */
#view-caleco {
  --ih-tv-pan-x: 6px;
}

#view-caleco .ih-tv-aspect,
#view-caleco .ih-tv-news-slot .ih-tv-aspect,
.ih-popout-root .ih-tv-aspect {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

#view-caleco .ih-tv-aspect .ih-tv-video,
#view-caleco .ih-tv-news-slot .ih-tv-video,
#view-caleco .ih-tv-news-slot .ih-tv-aspect .ih-tv-video,
.ih-popout-root .ih-tv-aspect .ih-tv-video {
  inset: auto;
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--ih-tv-pan-x, 6px));
  width: calc(100% + (var(--ih-tv-pan-x, 6px) * 2));
  max-width: none;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: transparent;
}
