/* ── News Journey Visual Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700;800&display=swap');

.news-journey-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--jc-bg, rgba(8, 8, 22, .95));
  min-height: 0;
  width: 100%;
}

.nj-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  gap: 0;
  scroll-behavior: smooth;
  padding: 24px 0 90px 0;
  min-height: 0;
  align-items: stretch;
  touch-action: pan-x;
}

.nj-track::-webkit-scrollbar {
  display: none;
}

.nj-story {
  flex: 0 0 90%;
  max-width: 560px;
  scroll-snap-align: center;
  margin: 0 12px;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--jc-card-bg, rgba(255, 255, 255, .035));
  border: 1.5px solid var(--jc-card-border, rgba(255, 255, 255, .08));
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 18px;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .4s, box-shadow .4s;
  opacity: .4;
  transform: scale(.92);
  align-self: stretch;
  max-height: 100%;
}

.nj-story.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 50px var(--jc-glow, rgba(124, 58, 237, .15)), 0 12px 40px rgba(0, 0, 0, .25);
  border-color: rgba(124, 58, 237, .35);
}

.nj-story::-webkit-scrollbar {
  display: none;
}

.nj-story>* {
  flex-shrink: 0;
}

.nj-story::after {
  content: '';
  display: block;
  min-height: 14px;
  flex-shrink: 0;
}

/* ── Card gradients based on market themes ── */
.nj-story--hero {
  background: linear-gradient(160deg, rgba(124, 58, 237, .15), rgba(6, 182, 212, .06) 60%, var(--jc-card-bg));
}

.nj-story--th {
  background: linear-gradient(160deg, rgba(59, 130, 246, .12), rgba(239, 68, 68, .04) 60%, var(--jc-card-bg));
}

.nj-story--us {
  background: linear-gradient(160deg, rgba(6, 182, 212, .12), rgba(16, 185, 129, .04) 60%, var(--jc-card-bg));
}

.nj-story--cn {
  background: linear-gradient(160deg, rgba(239, 68, 68, .12), rgba(245, 158, 11, .04) 60%, var(--jc-card-bg));
}

.nj-story--ct {
  background: linear-gradient(160deg, rgba(245, 158, 11, .12), rgba(124, 58, 237, .04) 60%, var(--jc-card-bg));
}

.nj-story--actionable {
  background: linear-gradient(160deg, rgba(16, 185, 129, .12), rgba(124, 58, 237, .06) 60%, var(--jc-card-bg));
}

/* Light mode overrides */
:root[data-mockup-theme-resolved="light"] .nj-story {
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  background-color: #fff;
}

:root[data-mockup-theme-resolved="light"] .nj-story.active {
  box-shadow: 0 4px 24px rgba(15, 23, 42, .1), 0 0 0 1.5px rgba(99, 102, 241, .25);
  border-color: rgba(99, 102, 241, .3);
}

:root[data-mockup-theme-resolved="light"] .nj-story--hero {
  background: linear-gradient(160deg, rgba(99, 102, 241, .08), rgba(6, 182, 212, .04) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-story--th {
  background: linear-gradient(160deg, rgba(59, 130, 246, .08), rgba(239, 68, 68, .02) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-story--us {
  background: linear-gradient(160deg, rgba(6, 182, 212, .08), rgba(16, 185, 129, .02) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-story--cn {
  background: linear-gradient(160deg, rgba(239, 68, 68, .08), rgba(245, 158, 11, .02) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-story--ct {
  background: linear-gradient(160deg, rgba(245, 158, 11, .08), rgba(124, 58, 237, .02) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-story--actionable {
  background: linear-gradient(160deg, rgba(16, 185, 129, .08), rgba(124, 58, 237, .04) 60%, #fff);
}

:root[data-mockup-theme-resolved="light"] .nj-gs-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ── UI Elements inside Card ── */
.nj-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--jc-text-secondary, #cbd5e1);
}

:root[data-mockup-theme-resolved="light"] .nj-badge {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

.nj-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.nj-headline {
  font-family: 'Kanit', 'Sarabun', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--jc-text, #e2e8f0);
  line-height: 1.35;
  margin-top: 4px;
}

.nj-subheadline {
  font-family: 'Kanit', 'Sarabun', sans-serif;
  font-size: 1.25rem;
  color: var(--jc-text-secondary, #cbd5e1);
  line-height: 1.5;
  margin-top: -6px;
}

.nj-overview {
  font-family: 'Sarabun', 'Nunito Sans', sans-serif;
  font-size: 1rem;
  color: var(--jc-text-secondary, #cbd5e1);
  line-height: 1.6;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

:root[data-mockup-theme-resolved="light"] .nj-overview {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

/* ── Hero Card Bullet Points ── */
.nj-hero-bullets {
  margin: 12px 0 6px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.nj-hero-bullet-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--jc-text-secondary, #cbd5e1);
}

.nj-hero-bullet-item span.bullet-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.nj-hero-bullet-item strong {
  color: var(--jc-text, #f8fafc);
  font-weight: 700;
}

.nj-hero-bullet-item span.bullet-sent {
  font-weight: 700;
  margin-right: 4px;
}

.nj-hero-bullet-item span.bullet-sent.pos {
  color: var(--green, #10b981);
}

.nj-hero-bullet-item span.bullet-sent.neg {
  color: var(--red, #ef4444);
}

.nj-hero-bullet-item span.bullet-sent.neu {
  color: var(--jc-text-muted, #94a3b8);
}

.nj-narrative {
  font-family: 'Sarabun', 'Nunito Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--jc-text-secondary, #cbd5e1);
}

.nj-sentiment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  margin-left: 8px;
  vertical-align: middle;
}

.nj-sentiment.bullish {
  background: rgba(16, 185, 129, 0.15);
  color: var(--jc-green, #34d399);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.nj-sentiment.bearish {
  background: rgba(239, 68, 68, 0.15);
  color: var(--jc-red, #f87171);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.nj-sentiment.neutral {
  background: rgba(245, 158, 11, 0.15);
  color: var(--jc-yellow, #fbbf24);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ── Highlights Bullet List ── */
.nj-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.nj-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-family: 'Sarabun', 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--jc-text-secondary, #cbd5e1);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.nj-highlight-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
}

.nj-highlight-item:active {
  transform: scale(0.99);
}

.nj-highlight-item:hover .nj-hl-arrow {
  transform: translateX(3px);
  opacity: 0.9 !important;
}

:root[data-mockup-theme-resolved="light"] .nj-highlight-item {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

:root[data-mockup-theme-resolved="light"] .nj-highlight-item:hover {
  background: #f1f5f9;
  border-color: rgba(99, 102, 241, 0.4);
}

.nj-highlight-item i {
  color: var(--jc-purple, #a78bfa);
  margin-top: 4px;
  font-size: 0.75rem;
}

/* ── Highlights Popover (nested mini popover) ── */
.nj-highlight-item {
  position: relative;
}

.nj-hl-popover {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(20, 16, 36, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
  padding: 10px 12px;
  animation: njFadeIn 0.2s ease-out;
  text-align: left;
}

.nj-hl-popover.show {
  display: block;
}

.nj-hl-popover-text {
  margin: 0;
  font-family: 'Sarabun', sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--jc-text-secondary, #cbd5e1);
}

/* Light Theme overrides */
:root[data-mockup-theme-resolved="light"] .nj-hl-popover {
  background: #f8fafc;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

:root[data-mockup-theme-resolved="light"] .nj-hl-popover-text {
  color: #334155;
}

/* ── Highlight Source link ── */
.nj-hl-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--purple-light, #a78bfa);
  text-decoration: none;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  width: 100%;
  transition: color 0.2s;
  box-sizing: border-box;
}

.nj-hl-source-link:hover {
  color: #c084fc;
  text-decoration: underline;
}

:root[data-mockup-theme-resolved="light"] .nj-hl-source-link {
  color: var(--purple, #7c3aed);
  border-top-color: rgba(0, 0, 0, 0.08);
}
:root[data-mockup-theme-resolved="light"] .nj-hl-source-link:hover {
  color: #6d28d9;
}

/* ── Actionable section chips ── */
.nj-watchlist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.nj-watchlist-chip {
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  font-family: 'Sarabun', 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--jc-green, #34d399);
  cursor: pointer;
  transition: all 0.2s;
}

.nj-watchlist-chip:hover {
  background: rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

.nj-risks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nj-risk-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Sarabun', 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--jc-text-muted, #94a3b8);
}

.nj-risk-tag i {
  color: var(--jc-orange, #fb923c);
}

/* ── Immersive Layout Styles for News Page ── */
body.news-journey-active .sidebar,
body.news-journey-active .main-content {
  display: none !important;
}

body.news-journey-active .news-journey-hero {
  display: flex !important;
}

/* History Selector dropdown UI in topnav */
.nj-history-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  color: var(--text, #e2e8f0);
  font-size: 0.75rem;
  font-family: inherit;
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  max-width: 250px;
}

.nj-history-select:hover {
  border-color: rgba(124, 58, 237, 0.5);
}

.nj-history-select option {
  background: #0b0b16;
  color: #fff;
}

.nj-history-container {
  display: none !important;
}

body.news-journey-active .nj-history-container {
  display: flex !important;
}

/* ── AI Max Dynamic Loading Screen Styles ── */
.nj-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: auto;
  padding: 24px;
  max-width: 400px;
  text-align: center;
}

.nj-loader-brain {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nj-loader-circle {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: njSpin 0.8s linear infinite;
  box-sizing: border-box;
}

.nj-loader-circle:nth-child(1) {
  width: 100%;
  height: 100%;
  border-top-color: var(--purple-light, #a78bfa);
}

.nj-loader-circle:nth-child(2),
.nj-loader-circle:nth-child(3),
.nj-loader-core {
  display: none;
}

@keyframes njSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes njPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.nj-loader-progress-wrap {
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.nj-loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--purple-light) 0%, var(--cyan) 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.nj-loader-pct {
  font-family: 'Kanit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan);
  margin-top: -2px;
}

.nj-loader-title {
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fff 30%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nj-loader-status {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.8rem;
  color: var(--text2, #94a3b8);
  min-height: auto;
  line-height: 1.4;
  transition: opacity 0.2s;
  max-width: 320px;
  padding: 0 8px;
}

/* Light theme overrides for loader */
:root[data-mockup-theme-resolved="light"] .nj-loader-title {
  background: linear-gradient(135deg, #0f172a 30%, var(--purple, #7c3aed) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-mockup-theme-resolved="light"] .nj-loader-status {
  color: var(--jc-text-secondary, #475569);
}

:root[data-mockup-theme-resolved="light"] .nj-loader-progress-wrap {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.02);
}

/* ── Global Sentiment Grid (Card 1) ── */
.nj-global-sentiment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

@media (max-width: 600px) {
  .nj-global-sentiment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nj-gs-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nj-gs-box .gs-lbl {
  font-size: 0.7rem;
  color: var(--text3, #475569);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nj-gs-box .gs-val {
  font-size: 0.85rem;
  font-weight: 800;
}

.nj-gs-box .gs-val.positive {
  color: var(--green);
}

.nj-gs-box .gs-val.neutral {
  color: var(--yellow);
}

.nj-gs-box .gs-val.negative {
  color: var(--red);
}

/* ── Sentiment Slider Gauge (Cards 2-5) ── */
.nj-sentiment-meter-wrap {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 6px;
}

.nj-sentiment-meter-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3, #475569);
  margin-bottom: 8px;
}

.nj-sentiment-meter-track {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: visible;
  margin: 10px 0;
}

.nj-sentiment-meter-bar {
  position: absolute;
  inset: 0;
  border-radius: 99px;
}

.nj-sentiment-meter-pointer {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 3px solid var(--purple);
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.6);
  transition: left 0.5s ease;
}

.nj-sentiment-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text3, #475569);
  font-weight: 700;
}

/* ── Trending Movers List (Cards 2-5) ── */
.nj-movers-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nj-movers-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3, #475569);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nj-movers-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nj-mover-item {
  background: rgba(255, 255, 255, 0.018);
  border: 1.5px dashed rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 0;
}

.nj-mover-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nj-mover-item .mover-sym-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.nj-mover-item .mover-symbol {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nj-mover-item .mover-name {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text3, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nj-mover-item .mover-val-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.nj-mover-item .mover-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text2, #94a3b8);
}

.nj-mover-item .mover-chg {
  font-size: 0.7rem;
  font-weight: 800;
}

.nj-mover-item .mover-chg.up {
  color: var(--green);
}

.nj-mover-item .mover-chg.down {
  color: var(--red);
}

/* Light Theme overrides for Trending Movers section and cards */
:root[data-mockup-theme-resolved="light"] .nj-movers-section {
  background: rgba(0, 0, 0, 0.015);
  border-color: rgba(0, 0, 0, 0.06);
}

:root[data-mockup-theme-resolved="light"] .nj-movers-title {
  color: #475569;
}

:root[data-mockup-theme-resolved="light"] .nj-mover-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

:root[data-mockup-theme-resolved="light"] .nj-mover-item:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

:root[data-mockup-theme-resolved="light"] .nj-mover-item .mover-symbol {
  color: #0f172a;
}

:root[data-mockup-theme-resolved="light"] .nj-mover-item .mover-price {
  color: #475569;
}

:root[data-mockup-theme-resolved="light"] .nj-mover-item .mover-name {
  color: #64748b;
}

/* Light Theme overrides for Injected TradingView chart blocks */
:root[data-mockup-theme-resolved="light"] .jc-tv-chart-block {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

:root[data-mockup-theme-resolved="light"] .jc-tv-chart-block:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08) !important;
}

:root[data-mockup-theme-resolved="light"] .jc-tv-chart-header {
  border-bottom-color: #e2e8f0 !important;
  background: #f8fafc !important;
}

:root[data-mockup-theme-resolved="light"] .jc-tv-chart-sym-name {
  color: #0f172a !important;
}

:root[data-mockup-theme-resolved="light"] .jc-tv-chart-sym-price {
  color: #475569 !important;
}

/* ── Asset Allocation (Card 6) ── */
.nj-allocation-bar-wrap {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nj-allocation-bar {
  display: flex;
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.allocation-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  padding: 0 4px;
}

.allocation-segment.th {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.allocation-segment.us {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.allocation-segment.cn {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.allocation-segment.crypto {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.allocation-segment.cash {
  background: linear-gradient(135deg, #475569, #334155);
}

.nj-allocation-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.nj-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text3, #475569);
  font-weight: 700;
}

.nj-legend-color {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.nj-legend-color.th {
  background: #3b82f6;
}

.nj-legend-color.us {
  background: #06b6d4;
}

.nj-legend-color.cn {
  background: #ef4444;
}

.nj-legend-color.crypto {
  background: #f59e0b;
}

.nj-legend-color.cash {
  background: #475569;
}

/* ── Tactical Asset Allocation Popover ── */
.nj-alloc-info-btn:hover {
  color: #c084fc !important;
}

.nj-alloc-popover {
  display: none;
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  z-index: 100;
  padding: 12px;
  animation: njFadeIn 0.2s ease-out;
  text-align: left;
}

.nj-alloc-popover.show {
  display: block;
}

@keyframes njFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nj-alloc-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  margin-bottom: 8px;
  font-family: 'Kanit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple-light, #a78bfa);
}

.nj-alloc-popover-close {
  background: none;
  border: none;
  color: var(--text3, #94a3b8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.nj-alloc-popover-close:hover {
  color: #fff;
}

.nj-alloc-popover-body {
  font-family: 'Sarabun', sans-serif;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #cbd5e1;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nj-alloc-section {
  margin-bottom: 8px;
}

.nj-alloc-section strong {
  color: #f8fafc;
}

.nj-alloc-section ul {
  margin: 4px 0;
  padding-left: 14px;
}

.nj-alloc-section li {
  margin-bottom: 2px;
}

.nj-alloc-section p {
  margin: 3px 0;
}

.nj-alloc-current-calc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 8px;
}

.nj-alloc-current-calc strong {
  color: var(--cyan, #06b6d4);
  display: block;
  margin-bottom: 4px;
}

.nj-calc-sent-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.nj-calc-sent-val.pos {
  color: #4ade80;
  font-weight: bold;
}

.nj-calc-sent-val.neg {
  color: #f87171;
  font-weight: bold;
}

.nj-calc-sent-val.neu {
  color: #94a3b8;
}
