/* ═══════════════════════════════════════════════════════════════
   IMPERIUM INK CREAM — texto primário global (GCT)
   Tokens únicos; evolução futura Refinitiv/Bloomberg não altera paleta.
   Não altera cores semânticas (verde / vermelho / âmbar / ciano).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink-cream: #ebe5d8;
  --ink-cream-soft: rgba(235, 229, 216, 0.92);
  --ink-shadow: 0 0 1px rgba(255, 248, 238, 0.42), 0 1px 2px rgba(0, 0, 0, 0.28);

  --text: var(--ink-cream);
  --inst-text: var(--ink-cream);
  --ih-text: var(--ink-cream);
  --cx-text: var(--ink-cream);
  --cal-text: var(--ink-cream);
  --oms-risk-usd-ink: var(--ink-cream);
}

body {
  color: var(--text);
}

body.view-geral-active,
body.student-view-active,
body.ih-hub-full {
  --inst-text: var(--ink-cream);
}

#view-caleco,
#view-caleco.ih-view {
  --cal-text: var(--ink-cream);
  --ih-text: var(--ink-cream);
}

body.view-geral-active #view-report .imp-des-lazy {
  --imp-text-value: var(--ink-cream);
  --imp-text-table-cl: var(--ink-cream);
  --imp-val-neutral: var(--ink-cream);
  --imp-pl-neutral: var(--ink-cream);
}

/* Bloomberg range stats + crosshair */
.bbg-range-stats,
.bbg-rs-tree,
.bbg-rs-label,
.bbg-rs-val {
  color: var(--ink-cream);
  text-shadow: var(--ink-shadow);
}

#chart-crosshair-time,
.mtg-crosshair-time,
.ih-vs-detail__lw-host .mtg-crosshair-time,
.ih-fred-modal-lw-host .mtg-crosshair-time {
  color: var(--ink-cream);
}

/* Chart HUD / TF */
#chart-tf-display[data-tone="ok"] .chart-tf-val,
#chart-tf-display[data-tone="pending"] .chart-tf-val,
#chart-tf-display .chart-tf-lbl {
  color: var(--ink-cream);
}

#chart-gline-tooltip .cgt-val,
#chart-gline-tooltip .cgt-val--gain {
  color: var(--ink-cream);
}

/* OMS RISK $ — alinhado ao token global */
#oms-display-risco-agg,
body.view-geral-active #oms-display-risco-agg,
body.view-geral-active .oms-cockpit-page .oms-stats-grid #oms-display-risco-agg {
  color: var(--oms-risk-usd-ink);
  text-shadow: var(--ink-shadow);
}

/* V Shape cards */
.ih-vs-card__val,
.ih-vs-card__row,
.ih-vs-card--idle .ih-vs-card__val {
  color: var(--ink-cream);
}

/* Monitor desk HUD */
.desk-tf-hud,
.desk-tf-hud[data-tone="ok"] {
  color: var(--ink-cream);
}

/* Chat / monitor — rótulos neutros (semântica verde/vermelho intacta) */
.ch-mon-val.white,
.ch-mon-pos-lbl {
  color: var(--ink-cream);
}

/* Intel Hub — cotações / COT */
.ih-cot-axis-lbl,
.ih-cot-bar-lbl,
.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,
.ih-cot-foot {
  color: var(--ink-cream);
}

/* Trailing stop — tag neutra */
.ts-score-tag--ts1 {
  color: var(--ink-cream);
}

/* Candle preset ativo */
.candle-preset-item.is-active {
  color: var(--ink-cream);
}

/* ── Search modals · 80% visual da viewport (compensa html zoom 1.1) ── */
.ih-fred-modal.tf-search-snapshot:not(.ih-hidden):not(.tf-search-risk--minimized):not(.tf-search-mentor--minimized) > .ih-fred-modal-panel,
#tf-search-help-modal.tf-search-help--viewport-80 .tf-search-help-panel,
#tf-search-risk-modal.tf-search-risk--viewport-80:not(.tf-search-risk--minimized) .tf-search-risk-panel,
#tf-search-mentor-modal.tf-search-mentor--viewport-80:not(.tf-search-mentor--minimized) .tf-search-mentor-panel {
  box-sizing: border-box !important;
  height: calc(88vh / var(--ui-fs-boost, 1)) !important;
  left: 50% !important;
  max-height: none !important;
  max-width: none !important;
  position: fixed !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: calc(80vw / var(--ui-fs-boost, 1)) !important;
}
