/* =========================================================================
   QuantMaster — Global design tokens (tv-* namespace)
   These are the canonical tokens; legacy tokens below remain for compat.
   ========================================================================= */

:root {
  /* Colors */
  --tv-bg-0: #000000;
  --tv-bg-1: #131722;
  --tv-bg-2: #1e222d;
  --tv-bg-3: #2a2e39;
  --tv-border: #2a2e39;
  --tv-accent: #2962ff;
  --tv-accent-hover: #1e88e5;
  --tv-up: #089981;
  --tv-down: #f23645;
  --tv-text: #d1d4dc;
  --tv-text-muted: #787b86;
  --tv-text-dim: #5d6168;
  /* Spacing */
  --tv-space-1: 4px;
  --tv-space-2: 8px;
  --tv-space-3: 12px;
  --tv-space-4: 16px;
  --tv-space-6: 24px;
  /* Radius */
  --tv-radius-sm: 4px;
  --tv-radius-md: 6px;
  --tv-radius-lg: 8px;
  /* Shadows */
  --tv-shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --tv-shadow-md: 0 6px 24px rgba(0,0,0,0.45);
  --tv-shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
  /* Transitions */
  --tv-transition: 150ms ease;
  /* Z-index scale */
  --tv-z-overlay: 5;
  --tv-z-dropdown: 100;
  --tv-z-popover: 500;
  --tv-z-modal: 9999;
  --tv-z-toast: 99999;
}

/* Light theme overrides (toggle html.light-theme) */
html.light-theme {
  --tv-bg-0: #ffffff;
  --tv-bg-1: #f8f9fd;
  --tv-bg-2: #eef0f3;
  --tv-bg-3: #e0e3eb;
  --tv-border: #d1d4dc;
  --tv-text: #131722;
  --tv-text-muted: #50535e;
  --tv-text-dim: #787b86;
  --tv-shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --tv-shadow-md: 0 6px 24px rgba(0,0,0,0.12);
  --tv-shadow-lg: 0 12px 48px rgba(0,0,0,0.18);
}

/* =========================================================================
   TradingView clone — design tokens from Figma file 2QhXqtb66hdeKvlZAZE4fS
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Global scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--tv-bg-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3e4a; }

/* Accessibility — focus rings */
*:focus-visible { outline: 2px solid var(--tv-accent); outline-offset: 2px; }
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) { outline: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  /* Greys */
  --grey-6:   #000000;  /* bg-main — full black (matches live TradingView) */
  --grey-7:   #121212;
  --grey-11:  #1c1c1c;
  --grey-12:  #1f1f1f;  /* Mine Shaft (Figma color/grey/12) — settings modal bg */
  --grey-18:  #2e2e2e;  /* Mine Shaft - active tab bg */
  --grey-24:  #3d3d3d;  /* input bg / slider track */
  --grey-29:  #4a4a4a;  /* Tundora - subtle borders */
  --grey-34:  #575757;  /* Scorpion - button outlines */
  --grey-46:  #767676;  /* slider/secondary */
  --grey-55:  #8c8c8c;  /* muted text / section titles */
  --grey-86:  #dbdbdb;  /* Alto - body text */
  --grey-95:  #f2f2f2;  /* Concrete - Publicar bg / slider fill */

  /* Accent */
  --azure-10: #131722;  /* chart bg */
  --azure-58: #2962ff;  /* Dodger Blue */
  --red-58:   #f23645;  /* Pomegranate */
  --green-32: #22ab94;  /* live TradingView positive green (was #089981) */
  --orange:   #f7a600;
  --purple:   #9c27b0;

  /* Fonts */
  --font-ui:    'Trebuchet MS', Trebuchet, 'Lucida Sans', Arial, sans-serif;
  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;

  --chart-toolbar-h: 39px;
  --top-h:           38px;
  --leftbar-w:       52px;
  --rightbar-w:      45px;
}

html, body {
  width: 100%;
  min-height: 100%;
  /* Allow vertical scrolling on content pages (community, markets, news...).
   * The chart page caps its grid at 100vh + overflow:hidden internally so the
   * body's scroll never engages there. */
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--grey-6);
  color: var(--grey-86);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* On chart pages, body must NOT scroll — the .chart-page grid already fills
 * the viewport and any extra scroll would expose blank space below. */
body:has(.chart-page) { overflow: hidden; height: 100vh; }

#app { width: 100%; height: 100%; }

button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
input { background: none; border: none; color: inherit; font: inherit; outline: none; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img { display: block; }

/* =========================================================================
   CHART PAGE LAYOUT
   ========================================================================= */
.chart-page {
  display: grid;
  grid-template-columns: var(--leftbar-w) 1fr var(--rightbar-w);
  grid-template-rows:    var(--top-h)     1fr var(--chart-toolbar-h);
  grid-template-areas:
    "h-btn  topbar  topright"
    "left   center  right"
    "left   bottom  right";
  width: 100vw; height: 100vh;
  background: var(--grey-6);
  overflow: hidden;
}

/* ---- H BUTTON (top-left) ---- */
.h-btn { grid-area: h-btn; display: flex; align-items: center; justify-content: center; position: relative; }
.h-btn-inner {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--grey-18);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.h-btn-logo {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #7b2ff7 0%, #2962ff 100%);
  color: #fff; font-family: var(--font-inter); font-size: 19.6px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; letter-spacing: -1px;
}
.h-btn-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red-58); border-radius: 9px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ---- TOP TOOLBAR ---- */
.topbar { grid-area: topbar; display: flex; align-items: stretch; height: var(--top-h); overflow: hidden; }
.topbar-scroll { display: flex; align-items: stretch; flex: 1 1 0; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.topbar-scroll::-webkit-scrollbar { display: none; }
.tb-group { display: flex; align-items: center; height: 100%; padding: 0; }
.tb-sep { display: flex; align-items: center; padding: 0 4px; height: 100%; }
.tb-sep > div { width: 1px; height: 22px; background: var(--grey-29); }
.tb-btn { display: inline-flex; align-items: center; height: 100%; padding: 0 5px; gap: 4px; color: var(--grey-86); border-radius: 0; }
.tb-btn:hover { background: rgba(255,255,255,.06); }
.tb-btn .icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.tb-btn .icon img, .tb-btn .icon svg { width: 18px; height: 18px; opacity: .92; }
.tb-btn .lbl { font-size: 13px; padding: 0 4px; white-space: nowrap; }
.tb-btn-text { padding: 0 10px; }
.tb-btn-dropdown { padding: 0 4px; display: inline-flex; align-items: center; height: 100%; }
.tb-btn-dropdown .icon { width: 14px; height: 14px; }
.tb-btn-dropdown .icon img { width: 8px; height: 8px; opacity: .7; }
/* Inline dropdown chevron right after a label (e.g. "Indicadores ▾"). */
.tb-btn-chev {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--grey-86); opacity: .7;
  margin-left: 2px; line-height: 1;
}

/* Symbol pill */
.tb-symbol-wrap { display: flex; align-items: center; padding: 0 4px; height: 28px; align-self: center; width: 150px; }
.tb-symbol {
  position: relative; flex: 1; cursor: pointer;
  display: flex; align-items: center; gap: 6px; height: 28px;
  background: var(--grey-24); border-radius: 14px;
  padding-left: 10px; padding-right: 30px;
}
.tb-symbol-chev {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--grey-86); line-height: 1;
  width: 8px; height: 8px;
}

/* Composite chart-styles icon (4 candle bars).
   Rendered at Figma native size 28×28 so the inner candle pieces (each only
   a small fraction of the frame per insets) reach their intended visual size.
   Children may be <div> (background-image) or <img>; both styled the same. */
.cs-icon {
  position: relative; display: inline-block; width: 28px; height: 28px;
}
.cs-icon > * {
  position: absolute; max-width: none; opacity: .92;
}
.tb-btn .icon .cs-icon { width: 28px; height: 28px; }

/* Generic composite icon (multiple layered SVG pieces from Figma).
   Pieces use percentage insets from the 28×28 Figma frame. We render at the
   native 28×28 size so each inner glyph (e.g. the "f" of "fx", the bell body,
   the gear teeth) appears at its intended Figma proportion.
   Children are <div>s with background-image (NOT <img>) because replaced
   elements collapse to intrinsic SVG size and ignore the 4-inset box. */
.composite-icon {
  position: relative; display: inline-block; width: 28px; height: 28px;
}
.composite-icon > * {
  position: absolute; max-width: none; opacity: .92;
}
.tb-btn .icon .composite-icon { width: 28px; height: 28px; }
/* Override the global .tb-btn .icon img rule so composite child <img> elements
   (if any) don't get forced to 18×18. */
.tb-btn .icon .composite-icon img,
.tb-btn .icon .cs-icon img { width: auto; height: auto; }
.tb-symbol-text {
  font-family: var(--font-ui); font-weight: 700; font-size: 14px;
  color: var(--grey-86); line-height: 18px;
}
.tb-symbol-add {
  position: absolute; right: 0; top: 0;
  width: 28px; height: 28px; padding: 2px;
  display: flex; align-items: center; justify-content: center;
}
.tb-symbol-add > div {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grey-6);
  display: flex; align-items: center; justify-content: center;
}
.tb-symbol-add svg { width: 18px; height: 18px; }

/* Timeframe button */
.tb-tf { padding: 0 10px; font-size: 14px; color: var(--grey-86); display: flex; align-items: center; height: 100%; }

/* Trade pill */
.tb-trade-pill {
  height: 28px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--grey-29); border-radius: 14px;
  font-size: 14px; color: var(--grey-86); align-self: center;
}

/* Publish pill */
.tb-publish-pill {
  height: 28px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-95); border-radius: 16px;
  font-size: 14px; color: #000; align-self: center;
}

.tb-fill { flex: 1 1 0; min-width: 0; }
.tb-right { display: flex; align-items: center; padding-right: 4px; }

/* The H button row spans into topbar area visually — but layout is fine */
.h-btn,
.topright { background: var(--grey-6); }
.topbar { background: var(--grey-6); }

/* ---- LEFT DRAWING TOOLBAR ---- */
.leftbar {
  grid-area: left;
  background: var(--grey-6);
  display: flex; flex-direction: column; align-items: center;
  border-right: 1px solid var(--grey-18);
  padding-top: 4px;
  overflow: hidden;
}
.lb-group { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 6px 0; }
.lb-divider { width: 36px; height: 1px; background: var(--grey-29); margin: 0; }
.lb-btn {
  width: 52px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  position: relative; color: var(--grey-86);
}
.lb-btn:hover { background: var(--grey-18); }
.lb-btn { transition: background 100ms ease, color 100ms ease; }
.lb-btn.tool-active {
  background: rgba(41, 98, 255, 0.22);
  color: var(--azure-58);
  box-shadow: inset 2px 0 0 var(--azure-58);
}
.lb-btn.tool-active img,
.lb-btn.tool-active svg { filter: drop-shadow(0 0 1px var(--azure-58)); opacity: 1; }
.lb-btn img, .lb-btn svg { width: 22px; height: 22px; object-fit: contain; opacity: .92; }
/* Sprite-rendered SVGs (class .ic) inherit currentColor for fill */
.ic { display: block; fill: currentColor; }
.lb-btn.has-dropdown::after {
  content: ''; position: absolute; right: 2px; top: 50%;
  width: 4px; height: 7px;
  background: currentColor; opacity: .5;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

/* ---- CENTER CHART AREA ---- */
.center { grid-area: center; position: relative; background: #000; overflow: hidden; }
.nvda-chart { position: absolute; inset: 0; }

/* Legend overlay (top-left of chart) */
.legend {
  position: absolute; top: 4px; left: 8px;
  font-family: var(--font-ui); font-size: 13px;
  color: var(--grey-86); pointer-events: none;
  z-index: 5;
}
.legend-line { display: flex; align-items: center; gap: 4px; line-height: 24px; }
.legend-logo {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #76b900, #4a8000); /* NVIDIA green */
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 11px;
  margin-right: 4px;
}
.legend-title { font-weight: 700; color: var(--grey-86); font-size: 14px; }
.legend-sep { color: var(--grey-55); padding: 0 2px; }
.legend-tf { color: var(--grey-86); }
.legend-exch { color: var(--grey-86); }
.legend-buttons { display: inline-flex; gap: 0; margin-left: 4px; }
.legend-btn { width: 28px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--grey-55); }
.legend-btn:hover { color: var(--grey-86); }

.ohlc { margin-top: 4px; display: flex; gap: 16px; font-size: 13px; }
.ohlc-pair { display: inline-flex; gap: 4px; }
.ohlc-key { color: var(--grey-55); }
.ohlc-val { color: var(--grey-86); }
.ohlc-val.up { color: var(--green-32); }
.ohlc-val.dn { color: var(--red-58); }
.ohlc-pct { display: inline-flex; gap: 4px; }

/* Indicator rows under OHLC (EMA, MA, Vol with values) */
.ind-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 20px;
  color: var(--grey-86);
}
.ind-name { font-size: 12px; }
.ind-name.ema { color: var(--orange); }
.ind-name.ma  { color: var(--purple); }
.ind-name.vol { color: var(--red-58); }
.ind-refresh {
  display: inline-flex; width: 14px; height: 14px;
  align-items: center; justify-content: center;
  color: var(--grey-55); font-size: 10px;
}
.ind-val { color: var(--grey-86); font-size: 13px; margin-left: auto; padding-left: 8px; }

.legend-collapse {
  margin-top: 4px;
  width: 24px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-18); border-radius: 2px;
  color: var(--grey-86); font-size: 10px; line-height: 1;
  pointer-events: auto;
}

/* Buy / Sell pills (inside legend, between title row and indicator rows) */
.price-pills {
  display: inline-flex; align-items: stretch; gap: 0;
  margin: 6px 0 4px 0;
  font-family: var(--font-ui);
  pointer-events: auto;
}
.pill-sell, .pill-buy {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 60px; padding: 2px 8px; height: 38px;
  border-radius: 2px;
}
.pill-sell { background: rgba(242, 54, 69, .15); border: 1px solid var(--red-58); }
.pill-buy  { background: rgba(8, 153, 129, .15); border: 1px solid var(--green-32); }
.pill-price { font-size: 12px; font-weight: 700; color: var(--grey-86); line-height: 1.2; }
.pill-sell .pill-price { color: var(--red-58); }
.pill-buy  .pill-price { color: var(--green-32); }
.pill-label { font-size: 9px; letter-spacing: .5px; font-weight: 700; color: var(--grey-86); margin-top: 1px; }
.pill-sell .pill-label { color: var(--red-58); }
.pill-buy  .pill-label { color: var(--green-32); }
.pill-spread {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 38px;
  background: var(--grey-18); color: var(--grey-86);
  font-size: 12px; font-weight: 700;
}

/* ---- RIGHT WIDGET BAR ---- */
/* Layout:
 *   - First 4 icons grouped at top (watchlist, alerts, data tree, chats)
 *   - Divider + remaining icons grouped at bottom
 *   - Whole bar fits viewport without scroll (overflow:hidden + flex distribution)
 *   - Inline `style="top:XXpx"` from buildRightBar() is neutralised with !important
 */
.rightbar {
  grid-area: right;
  background: var(--grey-6);
  border-left: 1px solid var(--grey-18);
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start;
  position: relative; overflow: hidden;
  padding: 2px 0;
}
.rb-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-55);
  /* Override hardcoded absolute coordinates from inline styles */
  position: relative !important;
  top: auto !important; left: auto !important;
  transform: none !important;
  flex: 0 0 auto;
}
/* Push icons 5..N to the bottom: large auto-margin on icon #5 separates the
 * "always-visible top group" from the "bottom group". */
.rightbar .rb-icon:nth-of-type(5) { margin-top: auto; }
.rb-icon:hover { color: var(--grey-86); background: var(--grey-18); }
.rb-icon img, .rb-icon svg { width: 24px; height: 24px; object-fit: contain; opacity: .9; }
.rb-divider {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  height: 1px; background: var(--grey-29);
  width: 33px;
  flex: 0 0 1px;
  margin: 4px 0;
}

/* ---- BOTTOM CHART TOOLBAR ---- */
.bottombar {
  grid-area: bottom;
  background: var(--grey-6);
  border-top: 1px solid var(--grey-18);
  display: flex; align-items: center; height: var(--chart-toolbar-h);
  padding: 0;
}
.bb-ranges { display: flex; align-items: center; height: 100%; padding-left: 8px; }
.bb-range { display: inline-flex; align-items: center; height: 100%; padding: 0 6px; font-size: 14px; color: var(--grey-86); }
.bb-range.active { color: var(--azure-58); }
.bb-range:hover { color: #fff; }
.bb-sep { display: inline-flex; align-items: center; padding: 0 4px; height: 100%; }
.bb-sep > div { width: 1px; height: 22px; background: var(--grey-29); }
.bb-calendar { display: inline-flex; align-items: center; padding: 0 5px; height: 100%; }
.bb-calendar img, .bb-calendar svg { width: 18px; height: 18px; opacity: .85; }
.bb-fill { flex: 1 1 0; }
.bb-right { display: flex; align-items: center; height: 100%; padding-right: 4px; }
.bb-time { padding: 0 6px; font-size: 14px; color: var(--grey-86); }
.bb-adj { padding: 0 6px; font-size: 14px; color: var(--grey-86); }
.bb-adj:hover { color: #fff; }

/* ---- LEGEND extras: status badge, drag handle, swatches ---- */
.legend { pointer-events: none; }
.legend > * { pointer-events: auto; }
.legend-badge { display: inline-flex; align-items: center; margin-left: 4px; }
.legend-drag {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px;
  color: var(--grey-55); cursor: grab; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  user-select: none;
}
.legend-drag:active { cursor: grabbing; color: var(--grey-86); }

.ind-list { margin-top: 4px; }
.ind-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 20px; color: var(--grey-86);
  padding: 1px 2px; border-radius: 2px; cursor: grab;
  width: 280px; max-width: 280px;
}
.ind-row.dragging { opacity: .4; }
.ind-row.ind-hidden .ind-name,
.ind-row.ind-hidden .ind-val { opacity: .35; text-decoration: line-through; }
.ind-grip { color: var(--grey-55); font-size: 10px; cursor: grab; user-select: none; }
.ind-swatch {
  width: 10px; height: 10px; border-radius: 2px; cursor: pointer;
  flex: 0 0 10px; display: inline-block;
}

/* ---- Crosshair tooltip ---- */
.cross-tip {
  position: absolute; z-index: 6;
  min-width: 130px; padding: 6px 8px;
  background: rgba(30, 34, 48, .95);
  border: 1px solid var(--grey-29);
  border-radius: 3px;
  font-size: 11px; color: var(--grey-86);
  font-family: var(--font-ui); pointer-events: none;
  line-height: 1.5;
}
.ct-date { color: var(--grey-55); font-size: 10px; margin-bottom: 2px; }
.ct-row { display: flex; justify-content: space-between; gap: 12px; }
.ct-row span { color: var(--grey-55); }
.ct-row b { color: var(--grey-86); font-weight: 600; }
.ct-row.up b { color: var(--green-32); }
.ct-row.dn b { color: var(--red-58); }

/* ---- Pane resize handle ---- */
.pane-resize {
  position: absolute; left: 0; right: 54px;
  height: 6px; cursor: ns-resize; z-index: 4;
  background: transparent;
}
.pane-resize::before {
  content: ''; position: absolute; left: 0; right: 0; top: 2px;
  height: 1px; background: transparent;
}
.pane-resize:hover::before { background: var(--azure-58); }

/* ---- Shift-zoom rectangle ---- */
.zoom-rect {
  position: absolute; pointer-events: none; z-index: 7;
  border: 1px solid var(--azure-58);
  background: rgba(41, 98, 255, .12);
}

/* ---- Replay panel ---- */
.replay-panel {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; z-index: 8;
  background: var(--grey-18); border: 1px solid var(--grey-29);
  border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.rp-btn {
  width: 28px; height: 24px; color: var(--grey-86);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px; font-size: 12px;
}
.rp-btn:hover { background: var(--grey-24); }
.rp-play { background: var(--azure-58); color: #fff; }
.rp-play:hover { background: #1d4fd6; }
.rp-sep { width: 1px; height: 18px; background: var(--grey-29); }
.rp-label { font-size: 11px; color: var(--grey-55); }
.rp-speed {
  background: var(--grey-24); color: var(--grey-86);
  border: 1px solid var(--grey-29); border-radius: 2px;
  padding: 2px 4px; font-size: 11px;
}
.rp-close { width: 22px; height: 22px; color: var(--grey-55); }
.rp-close:hover { color: var(--grey-86); }

/* REPLAY badge (visible while bar-replay mode active) */
.replay-badge {
  position: absolute;
  left: 12px;
  bottom: 56px;
  z-index: 7;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: #ff9800;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  pointer-events: none;
  user-select: none;
}

/* ---- Context menu ---- */
.ctx-menu {
  position: absolute; z-index: 10;
  min-width: 200px; padding: 4px 0;
  background: var(--grey-18); border: 1px solid var(--grey-29);
  border-radius: 3px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
  font-size: 13px;
}
.ctx-item { padding: 6px 14px; color: var(--grey-86); cursor: pointer; }
.ctx-item:hover { background: var(--azure-58); color: #fff; }
.ctx-sep { height: 1px; background: var(--grey-29); margin: 4px 0; }

/* ---- Modal ---- */
.modal-back {
  position: absolute; inset: 0; z-index: 19;
  background: rgba(0,0,0,.45);
}
.modal {
  position: absolute; z-index: 20;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 420px; max-height: 70vh;
  background: var(--grey-11); border: 1px solid var(--grey-29);
  border-radius: 4px; box-shadow: 0 12px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--grey-29);
}
.modal-title { font-size: 14px; font-weight: 700; color: var(--grey-86); }
.modal-x { width: 24px; height: 24px; color: var(--grey-55); font-size: 14px; }
.modal-x:hover { color: var(--grey-86); }
.modal-body { padding: 12px 14px; overflow-y: auto; }

.mform { display: flex; flex-direction: column; gap: 10px; }
.mform label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--grey-86); }
.mform input[type=color] { width: 40px; height: 24px; background: transparent; border: 1px solid var(--grey-29); }
.mform .mcheck { justify-content: flex-start; gap: 8px; }

.ind-modal-list { margin-top: 8px; max-height: 360px; overflow-y: auto; }
.ind-modal-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; border-bottom: 1px solid var(--grey-18);
  font-size: 13px;
}
.ind-modal-item:hover { background: var(--grey-18); }
.ind-add {
  padding: 3px 10px; background: var(--azure-58); color: #fff;
  border-radius: 2px; font-size: 12px;
}

/* ---- Symbol search / Compare popups ---- */
.sym-pop {
  position: absolute; z-index: 15;
  width: 320px; padding: 8px;
  background: var(--grey-11); border: 1px solid var(--grey-29);
  border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.cmp-head { font-size: 13px; color: var(--grey-55); margin-bottom: 6px; }
.sym-input {
  width: 100%; padding: 6px 8px;
  background: var(--grey-24); border: 1px solid var(--grey-29);
  border-radius: 2px; color: var(--grey-86); font-size: 13px;
}
.sym-input:focus { border-color: var(--azure-58); }
.sym-list { margin-top: 6px; max-height: 280px; overflow-y: auto; }
.sym-item {
  display: grid; grid-template-columns: 60px 1fr 60px;
  gap: 8px; padding: 6px 4px; cursor: pointer;
  font-size: 12px; border-radius: 2px;
}
.sym-item:hover { background: var(--grey-18); }
.si-sym { color: var(--grey-86); font-weight: 700; }
.si-name { color: var(--grey-86); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-ex { color: var(--grey-55); font-size: 11px; text-align: right; }

/* ---- Trade dropdown ---- */
.trade-pop {
  position: absolute; z-index: 15;
  min-width: 220px; padding: 4px 0;
  background: var(--grey-11); border: 1px solid var(--grey-29);
  border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.trade-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 13px; color: var(--grey-86); cursor: pointer;
}
.trade-item:hover { background: var(--grey-18); }
.ti-dot { width: 8px; height: 8px; border-radius: 50%; }
.ti-dot.buy { background: var(--green-32); }
.ti-dot.sell { background: var(--red-58); }

/* ---- Trade pill chevron ---- */
.tb-trade-wrap { align-self: center; }
.tb-trade-pill {
  display: inline-flex; align-items: center; gap: 4px;
}
.tb-trade-chev { font-size: 9px; color: var(--grey-55); }

/* =========================================================================
   LEFT TOOLBAR DROPDOWN PANEL (drawing-tool menus)
   ========================================================================= */
.tool-menu {
  position: absolute;
  z-index: 100;
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.55), 0 4px 8px rgba(0,0,0,.4);
  padding: 8px 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-family: var(--font-ui);
}
.tool-menu::-webkit-scrollbar { width: 6px; }
.tool-menu::-webkit-scrollbar-thumb { background: var(--grey-29); border-radius: 3px; }
.tool-menu-inner { display: flex; flex-direction: column; }
.tm-section-title {
  padding: 10px 14px 6px;
  font-size: 10px; font-weight: 700;
  color: var(--grey-55);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tm-section-title:not(:first-child) {
  border-top: 1px solid #2e2e2e;
  margin-top: 4px;
}
.tm-item {
  display: flex; align-items: center;
  padding: 8px 12px; gap: 10px;
  cursor: pointer; color: var(--grey-86);
  font-size: 13px; line-height: 18px;
}
.tm-item:hover { background: var(--azure-58); color: #fff; }
.tm-item:hover .tm-icon { color: #fff; }
.tm-item:hover .tm-hotkey { color: rgba(255,255,255,.75); }
.tm-item:hover .tm-star.on { color: #fff; }
.tm-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; color: var(--grey-86); flex-shrink: 0;
}
.tm-icon svg { width: 22px; height: 22px; }
.tm-label { flex: 1; }
.tm-hotkey {
  font-size: 12px; color: var(--grey-55);
  padding-left: 8px; white-space: nowrap;
}
.tm-star {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: 12px;
  flex-shrink: 0;
}
.tm-item:hover .tm-star { color: rgba(255,255,255,.4); }
.tm-star.on { color: var(--azure-58); }
.tm-item:hover .tm-star:hover { color: #fff; }
.tm-star:hover { color: var(--grey-86) !important; }
.tm-star.on:hover { color: #ffd400 !important; }
.tb-trade-pill:hover { background: var(--grey-18); }

/* ---- Active states ---- */
.lb-btn.lb-active { background: rgba(41, 98, 255, .15); color: var(--azure-58); }
.lb-btn.lb-active img { filter: drop-shadow(0 0 1px var(--azure-58)); }

.topright { background: var(--grey-6); border-left: 1px solid var(--grey-18); }

/* =========================================================================
   POP MENUS (chart-type, timeframe)
   ========================================================================= */
.tv-popmenu {
  position: absolute; z-index: 20;
  min-width: 180px; padding: 4px 0;
  background: var(--grey-11); border: 1px solid var(--grey-29);
  border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  font-size: 13px;
}
.tv-popitem {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; cursor: pointer; color: var(--grey-86);
}
.tv-popitem:hover { background: var(--grey-18); }
.tv-popitem.active { background: rgba(41,98,255,.15); color: var(--azure-58); }
.tv-popicon { width: 18px; display: inline-flex; align-items: center; justify-content: center; }
.tv-poplabel { flex: 1; }

/* ---- Additions for full timeframe / chart-type / magnet / search palette ---- */
.tm-item.active { background: #2962ff; color: #fff; }
.tm-item.active .tm-icon { color: #fff; }
.tm-item.active .tm-hotkey { color: rgba(255,255,255,.85); }

.tm-section-title.collapsible {
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
.tm-section-title .tm-chev {
  font-size: 10px; color: var(--grey-55);
  transition: transform .15s ease;
  margin-left: 6px;
}
.tm-section-title.collapsed .tm-chev { transform: rotate(-90deg); }

.tm-divider {
  height: 1px; background: #2e2e2e; margin: 6px 0;
}

.tm-toggle {
  width: 32px; height: 18px; flex-shrink: 0;
  background: var(--grey-29); border-radius: 9px;
  position: relative; transition: background .15s ease;
  cursor: pointer;
}
.tm-toggle::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.tm-toggle.on { background: var(--azure-58); }
.tm-toggle.on::after { transform: translateX(14px); }

.tm-custom-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer;
  color: var(--azure-58); font-size: 13px;
  border-bottom: 1px solid #2e2e2e;
}
.tm-custom-btn:hover { background: var(--grey-18); }

/* ---- Search palette (lightning bolt) ---- */
.sp-palette {
  position: absolute; z-index: 60;
  width: 460px;
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  font-family: var(--font-ui);
  color: var(--grey-86);
}
.sp-palette-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #2e2e2e;
}
.sp-palette-title { font-size: 13px; font-weight: 600; color: #fff; }
.sp-palette-close {
  background: transparent; border: none; color: var(--grey-55);
  font-size: 18px; cursor: pointer; padding: 0 4px;
}
.sp-palette-close:hover { color: #fff; }
.sp-palette-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #2e2e2e;
}
.sp-palette-search svg { color: var(--grey-55); flex-shrink: 0; }
.sp-palette-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px; font-family: var(--font-ui);
}
.sp-palette-body { max-height: 380px; overflow-y: auto; padding: 6px 0; }
.sp-palette-body::-webkit-scrollbar { width: 6px; }
.sp-palette-body::-webkit-scrollbar-thumb { background: var(--grey-29); border-radius: 3px; }
.sp-palette-section {
  padding: 8px 14px 4px;
  font-size: 10px; font-weight: 700; color: var(--grey-55);
  text-transform: uppercase; letter-spacing: .5px;
}
.sp-palette-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; cursor: pointer;
  font-size: 13px; color: var(--grey-86);
}
.sp-palette-item:hover { background: var(--azure-58); color: #fff; }
.sp-palette-item:hover .sp-palette-item-icon { color: #fff; }
.sp-palette-item-icon {
  width: 18px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55); flex-shrink: 0;
}
.sp-palette-empty {
  padding: 16px 14px; font-size: 12px; color: var(--grey-55); text-align: center;
}

/* =========================================================================
   SIDE PANELS (watchlist, alerts, generic stub)
   ========================================================================= */
.side-panel {
  position: absolute; top: 0; right: 0;
  width: 280px; height: 100%;
  background: var(--grey-11);
  border-left: 1px solid var(--grey-29);
  display: flex; flex-direction: column;
  z-index: 12;
  box-shadow: -4px 0 12px rgba(0,0,0,.4);
}
.sp-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--grey-29);
}
.sp-title { flex: 1; font-weight: 700; font-size: 13px; color: var(--grey-86); }
.sp-add, .sp-x {
  width: 24px; height: 24px; border-radius: 3px;
  color: var(--grey-55); font-size: 14px;
}
.sp-add:hover, .sp-x:hover { background: var(--grey-18); color: var(--grey-86); }
.sp-addbar { padding: 6px 10px; border-bottom: 1px solid var(--grey-18); }
.sp-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.wl-row {
  display: grid; grid-template-columns: 22px 60px 1fr 60px 16px;
  gap: 6px; align-items: center;
  padding: 6px 10px; cursor: pointer;
  font-size: 12px; border-bottom: 1px solid var(--grey-18);
}
.wl-row:hover { background: var(--grey-18); }
.wl-logo {
  width: 20px; height: 20px; border-radius: 3px;
  background: var(--azure-58); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}
.wl-sym { font-weight: 700; color: var(--grey-86); }
.wl-price { color: var(--grey-86); text-align: right; }
.wl-chg { text-align: right; font-weight: 600; }
.wl-chg.up { color: var(--green-32); }
.wl-chg.dn { color: var(--red-58); }
.wl-x { color: var(--grey-55); text-align: center; cursor: pointer; opacity: 0; }
.wl-row:hover .wl-x { opacity: 1; }
.wl-x:hover { color: var(--red-58); }

/* =========================================================================
   INDICATORS MODAL v2
   ========================================================================= */
.ind-cat {
  font-size: 11px; text-transform: uppercase;
  color: var(--grey-55); padding: 8px 8px 4px;
  letter-spacing: .5px;
}
.ind-modal-item {
  display: grid; grid-template-columns: 12px 1fr 80px 32px;
  gap: 8px; align-items: center;
}
.ind-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--azure-58); }
.ind-modal-name { color: var(--grey-86); }
.ind-modal-cat { color: var(--grey-55); font-size: 11px; text-align: right; }
.ind-modal-item .ind-add {
  padding: 2px 0; width: 28px; height: 22px; text-align: center;
  font-size: 14px; line-height: 1;
}

/* =========================================================================
   DYNAMIC INDICATOR ROWS — extend existing ind-row
   ========================================================================= */
.ind-row .ind-x {
  color: var(--grey-55); cursor: pointer; padding: 0 4px;
  opacity: 0; font-size: 11px;
}
.ind-row:hover .ind-x { opacity: 1; }
.ind-row .ind-x:hover { color: var(--red-58); }

/* Data source badge inside legend */
.data-badge {
  display: inline-block;
  font-size: 10px; color: var(--grey-55);
  padding: 2px 6px; border-radius: 8px;
  border: 1px solid var(--grey-29); background: var(--grey-11);
  margin-top: 4px;
}
.data-badge.live { color: var(--green-32); border-color: var(--green-32); }

/* Alerts modal rows */
.alert-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid var(--grey-18);
  font-size: 12px; color: var(--grey-86);
}
.alert-del {
  padding: 2px 8px; background: transparent; color: var(--red-58);
  border: 1px solid var(--grey-29); border-radius: 2px; font-size: 11px;
}
.alert-del:hover { background: rgba(242,54,69,.1); }

/* =========================================================================
   BACKTESTER UI — strategy cards, config modal, results modal
   ========================================================================= */
.bt-strat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; padding: 10px;
}
.bt-strat-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1px solid var(--grey-18); border-radius: 4px;
  background: var(--grey-7); transition: border-color .15s, background .15s;
}
.bt-strat-card:hover { border-color: var(--grey-29); background: var(--grey-11); }
.bt-strat-card-name { font-size: 13px; font-weight: 600; color: var(--grey-86); }
.bt-strat-card-desc { font-size: 11px; color: var(--grey-55); line-height: 1.4; flex: 1; }
.bt-strat-card-foot { display: flex; justify-content: flex-end; }
.bt-strat-run {
  padding: 4px 12px; background: var(--azure-58); color: #fff; border: none;
  border-radius: 2px; font-size: 11px; cursor: pointer;
}
.bt-strat-run:hover { filter: brightness(1.1); }

/* Backtest modal shell */
.bt-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 9000;
}
.bt-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 560px; max-width: 95vw; max-height: 90vh;
  background: var(--grey-6); border: 1px solid var(--grey-18); border-radius: 4px;
  z-index: 9001; color: var(--grey-86);
  display: flex; flex-direction: column;
  font-family: var(--font-ui);
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.bt-modal-sm { width: 720px; }
.bt-modal-lg { width: 880px; height: 86vh; }
.bt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--grey-18);
}
.bt-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.bt-title { font-size: 14px; font-weight: 600; color: var(--grey-86); }
.bt-sub { font-size: 11px; color: var(--grey-55); }
.bt-x {
  background: transparent; border: none; color: var(--grey-86);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
}
.bt-x:hover { color: #fff; }
.bt-body {
  padding: 14px; overflow: auto;
}
.bt-body-scroll { flex: 1; overflow: auto; }
.bt-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 14px; border-top: 1px solid var(--grey-18);
}
.bt-btn {
  padding: 6px 14px; border-radius: 2px; font-size: 12px;
  border: 1px solid var(--grey-29); background: transparent;
  color: var(--grey-86); cursor: pointer;
}
.bt-btn-ghost:hover { background: var(--grey-18); }
.bt-btn-primary {
  background: var(--azure-58); border-color: var(--azure-58); color: #fff;
}
.bt-btn-primary:hover { filter: brightness(1.1); }

/* Config form */
.bt-form { display: flex; flex-direction: column; gap: 14px; }
.bt-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
}
.bt-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.bt-field > span:first-child { color: var(--grey-55); }
.bt-field input[type="number"], .bt-field select {
  background: var(--grey-24); color: var(--grey-86);
  border: 1px solid var(--grey-29); border-radius: 2px;
  padding: 5px 7px; font-size: 12px; font-family: var(--font-ui);
}
.bt-field input[type="number"]:focus, .bt-field select:focus {
  outline: none; border-color: var(--azure-58);
}
.bt-row { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.bt-row > select, .bt-row > input { flex: 1; min-width: 60px; }
.bt-check { display: flex; align-items: center; gap: 6px; color: var(--grey-86); font-size: 12px; cursor: pointer; }
.bt-err { color: var(--red-58); font-size: 10px; min-height: 12px; }

/* Results: deflated sharpe card */
.bt-ds-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 4px; margin-bottom: 14px;
  border: 1px solid var(--grey-29);
}
.bt-ds-l { display: flex; flex-direction: column; gap: 2px; }
.bt-ds-label { font-size: 11px; color: var(--grey-55); text-transform: uppercase; letter-spacing: .04em; }
.bt-ds-tag { font-size: 13px; font-weight: 600; }
.bt-ds-v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bt-ds-good { background: rgba(8,153,129,.10); border-color: var(--green-32); }
.bt-ds-good .bt-ds-v, .bt-ds-good .bt-ds-tag { color: var(--green-32); }
.bt-ds-warn { background: rgba(247,166,0,.10); border-color: var(--orange); }
.bt-ds-warn .bt-ds-v, .bt-ds-warn .bt-ds-tag { color: var(--orange); }
.bt-ds-bad { background: rgba(242,54,69,.10); border-color: var(--red-58); }
.bt-ds-bad .bt-ds-v, .bt-ds-bad .bt-ds-tag { color: var(--red-58); }
.bt-ds-na .bt-ds-v, .bt-ds-na .bt-ds-tag { color: var(--grey-55); }

/* Metrics grid */
.bt-metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.bt-met {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; background: var(--grey-7);
  border: 1px solid var(--grey-18); border-radius: 4px;
}
.bt-met-l { font-size: 10px; color: var(--grey-55); text-transform: uppercase; letter-spacing: .04em; }
.bt-met-v { font-size: 15px; font-weight: 600; color: var(--grey-86); font-variant-numeric: tabular-nums; }
.bt-pos { color: var(--green-32) !important; }
.bt-neg { color: var(--red-58) !important; }

/* Charts */
.bt-chart-section { margin-bottom: 14px; }
.bt-chart-title { font-size: 11px; color: var(--grey-55); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.bt-chart-host { width: 100%; background: var(--grey-6); border: 1px solid var(--grey-18); border-radius: 4px; }

/* Trades */
.bt-trades-section { margin-top: 6px; }
.bt-collapse-toggle {
  width: 100%; text-align: left; padding: 8px 12px;
  background: var(--grey-11); border: 1px solid var(--grey-18); color: var(--grey-86);
  font-size: 12px; cursor: pointer; border-radius: 4px;
}
.bt-collapse-toggle:hover { background: var(--grey-18); }
.bt-trades-wrap { margin-top: 8px; }
.bt-trades-scroll { max-height: 320px; overflow: auto; border: 1px solid var(--grey-18); border-radius: 4px; }
.bt-trades-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.bt-trades-table th, .bt-trades-table td {
  padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--grey-18);
}
.bt-trades-table th {
  position: sticky; top: 0; background: var(--grey-11);
  color: var(--grey-55); font-weight: 500; text-transform: uppercase; font-size: 10px; letter-spacing: .03em;
}
.bt-trades-table tbody tr:hover { background: var(--grey-11); }
.bt-trades-more { padding: 6px 12px; font-size: 10px; color: var(--grey-55); }
.bt-empty { padding: 24px; text-align: center; color: var(--grey-55); font-size: 12px; }

/* =========================================================================
   REPLAY PANEL — TradingView "Reproducir trading" centered bottom bar
   ========================================================================= */
.replay-panel {
  position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
  z-index: 30;
  display: flex; align-items: center; gap: 6px;
  background: var(--grey-6);
  border: 1px solid var(--grey-29);
  border-radius: 22px;
  padding: 6px 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  font-family: var(--font-ui);
}
.rp-select-bar {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--grey-86); font-size: 13px;
  border: 0; cursor: pointer;
}
.rp-select-bar:hover { background: var(--grey-18); }
.rp-scissor { font-size: 14px; color: var(--grey-55); }
.rp-select-label { font-weight: 500; }
.rp-chev { font-size: 9px; color: var(--grey-55); margin-left: 2px; }
.rp-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--grey-86);
  border: 0; border-radius: 50%; cursor: pointer;
  font-size: 13px; line-height: 1;
}
.rp-btn:hover { background: var(--grey-18); }
.rp-play { background: var(--grey-18); }
.rp-speed-btn { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; }
.rp-tf-pill {
  padding: 4px 10px; font-size: 13px; color: var(--grey-86);
}
.rp-close {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--grey-86);
  border: 0; border-radius: 50%; cursor: pointer;
  font-size: 12px; margin-left: 2px;
}
.rp-close:hover { background: var(--grey-18); }

/* Replay "Seleccionar barra" dropdown */
.rp-start-menu {
  position: absolute; z-index: 35;
  background: #1c1c1c;
  border: 1px solid var(--grey-29);
  border-radius: 4px;
  padding: 6px 0;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  font-family: var(--font-ui);
}
.rp-start-title {
  padding: 10px 14px 6px;
  font-size: 10px; font-weight: 700; color: var(--grey-55);
  letter-spacing: .5px; text-transform: uppercase;
}
.rp-start-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-size: 13px; color: var(--grey-86);
  cursor: pointer;
}
.rp-start-item:hover { background: var(--azure-58); color: #fff; }
.rp-start-item.is-active { background: var(--grey-18); }
.rp-start-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-86); font-size: 12px;
}

/* =========================================================================
   SYMBOL SEARCH MODAL — TradingView "Búsqueda de símbolos"
   ========================================================================= */
.symsearch-back {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.6);
}
.symsearch-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 9999;
  width: min(1000px, calc(100vw - 80px));
  height: min(720px, calc(100vh - 80px));
  background: #000000;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0,0,0,.75);
  font-family: var(--font-ui);
}
.ssm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px;
}
.ssm-title {
  font-size: 20px; font-weight: 700; color: #ffffff; letter-spacing: -0.2px;
}
.ssm-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #b8b8b8; font-size: 15px; line-height: 1; cursor: pointer;
}
.ssm-close:hover { background: #1c1c1c; color: #fff; }
.ssm-search {
  display: flex; align-items: center; gap: 12px;
  margin: 6px 24px 2px; padding: 0 14px; height: 48px;
  background: #1c1c1c; border: 1px solid #2a2a2a; border-radius: 8px;
}
.ssm-search:focus-within { border-color: #4a4a4a; }
.ssm-search-icon {
  font-size: 18px; color: #b8b8b8;
  width: 20px; text-align: center;
}
.ssm-search-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: #ffffff; font-size: 17px; line-height: 26px;
  padding: 2px 0;
}
.ssm-search-input::selection { background: #2962ff; color: #fff; }
.ssm-search-clear, .ssm-kbd {
  width: 30px; height: 30px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #8c8c8c; font-size: 14px; cursor: pointer;
}
.ssm-search-clear:hover, .ssm-kbd:hover { background: #2a2a2a; color: #fff; }
.ssm-tabs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 24px 10px;
}
.ssm-tab {
  padding: 7px 15px; border-radius: 16px;
  background: transparent; color: #dbdbdb;
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: 0;
  transition: background .12s, color .12s;
}
.ssm-tab:hover { background: #1c1c1c; color: #fff; }
.ssm-tab.is-active {
  background: #f2f2f2; color: #000; font-weight: 600;
}
.ssm-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 8px;
}
.ssm-list::-webkit-scrollbar { width: 8px; }
.ssm-list::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
.ssm-row {
  display: grid;
  grid-template-columns: 36px 104px 1fr auto auto 28px;
  align-items: center; gap: 14px;
  padding: 0 14px; height: 56px;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; color: #dbdbdb;
  cursor: pointer;
}
.ssm-row:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); }
.ssm-row.is-active {
  background: transparent;
  border-color: #ffffff;
}
.ssm-logo {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.ssm-sym {
  font-weight: 700;
  color: #f2f2f2;
  font-size: 15px; letter-spacing: 0.2px;
}
.ssm-desc {
  color: #dbdbdb; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ssm-type {
  color: #8c8c8c; font-size: 13px;
}
.ssm-exch {
  color: #dbdbdb; font-size: 13px;
  font-weight: 600; min-width: 56px; text-align: right;
}
.ssm-exch-badge {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 800;
}
.ssm-empty {
  padding: 60px 24px; text-align: center;
  color: #8c8c8c; font-size: 13px;
}
.ssm-foot {
  padding: 14px 22px;
  border-top: 1px solid #1a1a1a;
  text-align: center; color: #8c8c8c; font-size: 12px;
}

/* =========================================================================
   MARKET OVERVIEW PAGE
   ========================================================================= */
.mo-page {
  width: 100vw; height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  background: #000;          /* TradingView home body is pure black */
  color: var(--grey-86);
  font-family: var(--font-ui);
  position: relative;
}

/* ── Header (legacy home header — markup removed; the live header is the
 *    Polaris one styled in sections/header.js. The `.mo-header` box rule was
 *    dropped from here because it collided with that shared class and forced a
 *    64px height onto the global fixed header.) ─────────────── */
.mo-header-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
}
.mo-brand { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mo-brand-logo { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.mo-brand-name { color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.2px; }

.mo-search {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 18px;
  background: transparent; border: 1px solid var(--grey-29); border-radius: 18px;
  color: var(--grey-55); font-size: 14px; min-width: 320px;
  cursor: text;
}
.mo-search-icon { font-size: 16px; }

.mo-nav { display: flex; align-items: center; gap: 6px; margin-left: 12px; }
.mo-nav-link {
  padding: 8px 14px;
  color: var(--grey-86); font-size: 14px; border-radius: 4px;
}
.mo-nav-link:hover { background: var(--grey-18); color: #fff; }

.mo-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mo-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,#7b2ff7,#2962ff);
  color: #fff; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.mo-avatar-dot {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; background: var(--red-58); border-radius: 50%;
}
.mo-cta {
  height: 36px; padding: 0 18px;
  background: linear-gradient(90deg,#2962ff,#7b2ff7);
  color: #fff; font-weight: 600; font-size: 14px;
  border-radius: 18px;
}

/* ── Body / sidebar layout ────────────────────────────── */
.mo-body { display: flex; }
.mo-main { flex: 1 1 0; min-width: 0; }

.mo-rightbar {
  width: var(--rightbar-w);
  flex: 0 0 var(--rightbar-w);
  background: var(--grey-6);
  border-left: 1px solid var(--grey-18);
  display: flex; flex-direction: column; align-items: center;
  padding-top: 8px; gap: 4px;
  position: sticky; top: 64px;
  height: calc(100vh - 64px);
}
.mo-rb-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55); font-size: 16px; border-radius: 4px;
  cursor: pointer;
}
.mo-rb-icon:hover { background: var(--grey-18); color: var(--grey-86); }

/* ── Sections ─────────────────────────────────────────── */
.mo-section {
  width: 100%;
  padding: 40px 24px 24px;
}
.mo-h2 {
  font-family: var(--font-ui); font-weight: 700; font-size: 32px;
  color: var(--grey-86); margin-bottom: 24px;
  display: flex; align-items: baseline; gap: 12px;
}
.mo-h2 a { color: inherit; cursor: pointer; }
.mo-h2 a:hover { color: #fff; }
.mo-h3 {
  font-family: var(--font-ui); font-weight: 700; font-size: 20px;
  color: var(--grey-86); margin: 28px 0 16px;
}
.mo-h3 a { color: inherit; cursor: pointer; }
.mo-h3 a:hover { color: #fff; }
.mo-arrow { color: var(--grey-55); font-weight: 400; }
.mo-hint { color: var(--grey-55); font-size: 13px; }

.mo-link {
  display: inline-block; margin-top: 12px;
  color: var(--azure-58); font-size: 13px;
  cursor: pointer;
}
.mo-link:hover { text-decoration: underline; }

.mo-subsection { margin-top: 32px; }

/* ── Pills / Logos ────────────────────────────────────── */
.mo-pill {
  display: inline-flex; align-items: center;
  padding: 0 6px; height: 18px; font-size: 11px;
  background: var(--grey-18); color: var(--grey-86); border-radius: 4px;
  font-weight: 700;
}
.mo-pill-blue { background: rgba(41,98,255,.15); color: #5b8def; }
.mo-pill-grey { background: var(--grey-18); color: var(--grey-55); }

.mo-logo {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-inter); font-weight: 700; color: #fff;
  flex: 0 0 auto;
}

/* ── Dashboard grid (Section 1) ───────────────────────── */
.mo-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "main main side"
    "mini1 mini2 mini3";
  gap: 24px;
}
.mo-card {
  background: var(--grey-7);
  border: 1px solid var(--grey-18);
  border-radius: 8px;
  padding: 16px;
}
.mo-main-card { grid-area: main; padding: 17px; }
.mo-side-card { grid-area: side; padding: 17px; }
.mo-dashboard > .mo-mini-card:nth-of-type(3) { grid-area: mini1; }
.mo-dashboard > .mo-mini-card:nth-of-type(4) { grid-area: mini2; }
.mo-dashboard > .mo-mini-card:nth-of-type(5) { grid-area: mini3; }

/* main IBEX card */
.mo-main-head { display: flex; align-items: flex-start; gap: 12px; height: 64px; }
.mo-main-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mo-main-title-row { display: flex; align-items: center; gap: 8px; height: 28px; }
.mo-main-title { font-size: 18px; font-weight: 700; color: #fff; }
.mo-star { color: var(--grey-55); font-size: 18px; }
.mo-main-price-row { display: flex; align-items: baseline; gap: 8px; }
.mo-main-price { font-size: 30px; font-weight: 700; color: #fff; line-height: 36px; }
.mo-main-unit { display: inline-flex; flex-direction: column; line-height: 1; font-size: 10px; color: var(--grey-55); }
.mo-main-chg { font-size: 16px; font-weight: 600; }
.mo-main-chg.up, .up { color: var(--green-32); }
.mo-main-chg.dn, .dn { color: var(--red-58); }
.mo-main-chart { height: 440px; margin-top: 16px; position: relative; }

/* side index list */
.mo-side-title { font-size: 16px; font-weight: 700; color: var(--grey-86); margin-bottom: 12px; }
.mo-side-list { display: flex; flex-direction: column; }
.mo-idx-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-18);
  cursor: pointer;
}
.mo-idx-row:last-child { border-bottom: none; }
.mo-idx-row:hover { background: rgba(255,255,255,0.02); }
.mo-idx-row .mo-logo { grid-row: 1 / span 2; }
.mo-idx-name { grid-column: 2; grid-row: 1; color: #fff; font-size: 14px; font-weight: 600; }
.mo-idx-sub { grid-column: 2; grid-row: 2; color: var(--grey-55); font-size: 12px; }
.mo-idx-vals { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
.mo-idx-price { color: #fff; font-size: 14px; font-weight: 600; }
.mo-idx-chg { font-size: 12px; }

/* mini widget cards */
.mo-mini-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mo-mini-title { color: var(--grey-86); font-size: 14px; flex: 1; }
.mo-mini-price-row { display: flex; align-items: baseline; gap: 6px; }
.mo-mini-price { color: #fff; font-size: 22px; font-weight: 700; }
.mo-mini-unit { color: var(--grey-55); font-size: 12px; }
.mo-mini-chg { font-size: 14px; font-weight: 600; margin: 4px 0 8px; }
.mo-mini-chart { height: 80px; position: relative; margin: 0 -16px 12px; }

.mo-stack-bar {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden;
  margin: 8px 0;
}
.mo-stack-bar > span { display: block; height: 100%; }
.mo-stack-legend { display: flex; gap: 12px; font-size: 11px; color: var(--grey-55); margin-bottom: 8px; }
.mo-stack-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* generic ticker row */
.mo-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-18);
  cursor: pointer;
}
.mo-row:last-child { border-bottom: none; }
.mo-row:hover { background: rgba(255,255,255,0.02); }
.mo-row-main { display: flex; flex-direction: column; min-width: 0; }
.mo-row-name { color: #fff; font-size: 13px; font-weight: 600; }
.mo-row-sub { color: var(--grey-55); font-size: 12px; }
.mo-row-vals { text-align: right; }
.mo-row-price { color: #fff; font-size: 13px; }
.mo-row-chg { font-size: 12px; font-weight: 600; }

/* Ideas grid */
.mo-ideas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.mo-idea-card {
  background: var(--grey-7);
  border: 1px solid var(--grey-18);
  border-radius: 8px; overflow: hidden;
  cursor: pointer;
}
.mo-idea-card:hover { border-color: var(--grey-29); }
.mo-idea-chart { height: 180px; background: #0d1418; position: relative; }
.mo-idea-body { padding: 12px 14px 14px; }
.mo-idea-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mo-mini-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700;
}
.mo-idea-ticker { color: #fff; font-weight: 700; font-size: 13px; }
.mo-idea-exch { color: var(--grey-55); font-size: 12px; }
.mo-idea-title { color: var(--grey-86); font-size: 14px; line-height: 1.35; margin-bottom: 8px; }
.mo-idea-author { color: var(--grey-55); font-size: 12px; }

/* ── Section 2 / 3 / 4: stat row + 2-col list ─────────── */
.mo-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mo-stat-card {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 12px 14px; cursor: pointer;
}
.mo-stat-card:hover { border-color: var(--grey-29); }
.mo-stat-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--grey-86); margin-bottom: 8px; }
.mo-stat-price { color: #fff; font-size: 18px; font-weight: 700; }
.mo-stat-chg { font-size: 13px; font-weight: 600; margin-top: 2px; }

.mo-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.mo-list {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 0 14px;
}
.mo-list-row {
  display: grid; grid-template-columns: 28px 1fr auto auto;
  column-gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--grey-18);
  cursor: pointer;
}
.mo-list-row:last-child { border-bottom: none; }
.mo-list-row:hover { background: rgba(255,255,255,0.02); }
.mo-list-info { min-width: 0; }
.mo-list-name { color: #fff; font-size: 13px; font-weight: 700; }
.mo-list-sub  { color: var(--grey-55); font-size: 12px; }
.mo-list-price { color: #fff; font-size: 13px; }
.mo-chg-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; color: #fff;
}
.mo-chg-pill.up { background: var(--green-32); }
.mo-chg-pill.dn { background: var(--red-58); }

.mo-active-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mo-active-card {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 14px; display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.mo-active-info { flex: 1; color: #fff; font-size: 13px; font-weight: 700; }
.mo-active-vol { color: var(--grey-55); font-size: 12px; }

/* ── News grid ────────────────────────────────────────── */
.mo-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; margin-top: 8px; }
.mo-news-item {
  border-top: 1px solid var(--grey-18);
  padding: 12px 0;
}
.mo-news-tag {
  font-size: 12px; color: var(--grey-55); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.mo-news-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg,#f7a600,#f23645);
}
.mo-news-body { color: var(--grey-86); font-size: 13px; line-height: 1.4; }

/* ── Section 5: Forex bars ────────────────────────────── */
.mo-fx-table {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 8px 14px;
}
.mo-fx-row {
  display: grid; grid-template-columns: 140px 1fr 80px;
  align-items: center; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--grey-18);
  cursor: pointer;
}
.mo-fx-row:last-of-type { border-bottom: none; }
.mo-fx-pair { color: #fff; font-size: 13px; font-weight: 600; }
.mo-fx-bar { position: relative; height: 20px; background: transparent; }
.mo-fx-bar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--grey-29); }
.mo-fx-bar-fill { position: absolute; top: 4px; bottom: 4px; border-radius: 2px; }
.mo-fx-val { font-size: 13px; font-weight: 600; text-align: right; }
.mo-fx-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 4px; font-size: 12px; color: var(--grey-55); }

/* ── Section 6: Economy map / calendar ────────────────── */
.mo-map-card {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 24px; height: 540px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.mo-map-placeholder {
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 40%, #b86f2a 4%, transparent 12%),
    radial-gradient(circle at 50% 30%, #a05a1f 6%, transparent 14%),
    radial-gradient(circle at 70% 50%, #c98548 5%, transparent 13%),
    radial-gradient(ellipse at 50% 80%, #6b3e1c 8%, transparent 30%),
    #1a1a1a;
  border-radius: 6px;
  position: relative;
}
.mo-map-grad {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 280px; height: 14px;
  background: linear-gradient(90deg,#3d2410,#a05a1f,#f7a600);
  border-radius: 2px;
}
.mo-map-legend {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 280px; display: flex; justify-content: space-between;
  color: var(--grey-86); font-size: 11px;
}

.mo-cal-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mo-cal-card {
  background: var(--grey-7); border: 1px solid var(--grey-18); border-radius: 8px;
  padding: 14px;
}
.mo-cal-when { font-size: 11px; color: var(--grey-55); display: flex; justify-content: space-between; }
.mo-cal-imp { color: var(--grey-29); letter-spacing: 1px; }
.mo-cal-name { color: #fff; font-size: 14px; font-weight: 600; margin: 8px 0 12px; }
.mo-cal-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--grey-55); border-top: 1px solid var(--grey-18); padding-top: 8px; }

/* ── Section 7: Brokers ───────────────────────────────── */
.mo-lead { color: var(--grey-86); font-size: 14px; margin-bottom: 24px; max-width: 540px; }
.mo-brokers-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mo-broker-card {
  border-radius: 12px; padding: 24px;
  display: grid; grid-template-columns: 80px 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px; align-items: center;
  border: 1px solid var(--grey-18);
}
.mo-broker-logo {
  grid-row: 1 / span 2;
  width: 64px; height: 64px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 28px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.mo-broker-logo-stack {
  grid-row: 1 / span 2;
  position: relative; width: 80px; height: 72px;
}
.mo-bls {
  position: absolute; width: 56px; height: 56px;
  border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center;
  font-family: var(--font-inter); font-weight: 700; font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
.mo-bls-3 { left: 16px; top: 14px; transform: rotate(8deg); opacity: .55; }
.mo-bls-2 { left: 8px; top: 7px;  transform: rotate(4deg); opacity: .8;  }
.mo-bls-1 { left: 0;   top: 0;    z-index: 2; }
.mo-broker-info { grid-column: 2; }
.mo-broker-name { color: #fff; font-size: 18px; font-weight: 700; }
.mo-broker-tag { color: var(--grey-55); font-size: 13px; margin-top: 2px; }
.mo-broker-rating { grid-column: 2; color: var(--grey-86); font-size: 13px; }
.mo-verified { color: var(--azure-58); }
.mo-broker-btn {
  grid-column: 3; grid-row: 2;
  height: 36px; padding: 0 16px;
  background: var(--grey-18); color: var(--grey-86);
  border-radius: 18px; font-size: 13px;
}
.mo-broker-btn:hover { background: var(--grey-29); }

/* ── Look First strip ─────────────────────────────────── */
.mo-look-first {
  width: 100%; margin-top: 40px;
  height: 99px;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px dashed var(--grey-29);
}
.mo-look-first span {
  font-family: var(--font-inter); font-weight: 700;
  font-size: 56px; letter-spacing: 12px;
  color: rgba(255,255,255,0.07);
}

/* ── Sticky tab bar (bottom) ──────────────────────────── */
.mo-sticky-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 60;
  background: rgba(15,15,15,.92);
  border: 1px solid var(--grey-18); border-radius: 28px;
  padding: 6px;
  backdrop-filter: blur(8px);
}
.mo-sticky-tabs { display: flex; align-items: center; gap: 4px; }
.mo-sticky-tab {
  padding: 0 14px; height: 32px;
  display: inline-flex; align-items: center;
  font-size: 13px; color: var(--grey-86); border-radius: 16px;
  cursor: pointer;
}
.mo-sticky-tab:hover { color: #fff; }
.mo-sticky-tab.active { background: #fff; color: #000; }

/* ── Footer ───────────────────────────────────────────── */
.mo-footer {
  background: var(--grey-6);
  border-top: 1px solid var(--grey-18);
  padding: 48px 0 32px;
  margin-top: 48px;
}
.mo-footer-inner {
  width: 100%;
  padding: 0 24px;
  display: grid; grid-template-columns: 280px 1fr; gap: 48px;
}
.mo-foot-brand { display: flex; flex-direction: column; gap: 12px; }
.mo-foot-logo { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; font-size: 16px; }
.mo-foot-tag { color: var(--grey-55); font-size: 13px; }
.mo-foot-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.mo-foot-social a {
  width: 28px; height: 28px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-86); font-size: 13px; background: var(--grey-11);
}
.mo-foot-lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 1px solid var(--grey-29); border-radius: 6px;
  color: var(--grey-86); font-size: 13px; align-self: flex-start;
}
.mo-foot-small { color: var(--grey-55); font-size: 11px; line-height: 1.4; margin-top: 4px; }
.mo-foot-a { color: var(--azure-58); }

.mo-foot-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px;
  align-items: start;
}
.mo-foot-col { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.mo-foot-title { font-size: 11px; font-weight: 700; color: var(--grey-86); margin-bottom: 6px; letter-spacing: 0.5px; }
.mo-foot-link { color: var(--grey-55); font-size: 13px; line-height: 1.6; cursor: pointer; }
.mo-foot-link:hover { color: var(--grey-86); }

/* =========================================================================
   INDICATORS MODAL  (Figma node 5:31470 — div.dialog-qyCw0PaN, 840×638.4)
   Tokens: grey/12 #1f1f1f bg · grey/24 #3d3d3d active · grey/29 #4a4a4a borders
           grey/55 #8c8c8c muted · grey/86 #dbdbdb body · Trebuchet MS
   ========================================================================= */
.ind-modal-back {
  position: absolute; inset: 0; z-index: 49;
  background: rgba(0,0,0,.5);
}
.ind-modal {
  position: absolute; z-index: 50;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 840px; height: 638px;
  background: #1f1f1f;                           /* color/grey/12 */
  border-radius: 12px;
  box-shadow: 0 2px 2px rgba(0,0,0,.4), 0 14px 48px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  color: var(--grey-86);
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* Header — px 20, py 17, title 20/28 Trebuchet Bold */
.ind-m-head {
  padding: 17px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.ind-m-title {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--grey-86);
  line-height: 28px;
}
.ind-m-x {
  width: 34px; height: 34px; padding: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-86); background: transparent; border: 0;
  border-radius: 6px; cursor: pointer;
}
.ind-m-x:hover { background: var(--grey-18); }

/* Search bar — bordered pill, rounded 8, height ~38px, margin 0 20 */
.ind-m-search-wrap {
  margin: 0 20px;
  display: flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 6px;
  border: 1px solid var(--grey-29);              /* color/grey/29 */
  border-radius: 8px;
  flex-shrink: 0;
}
.ind-m-search-wrap:focus-within { border-color: var(--azure-58); }
.ind-m-search-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55);
  flex-shrink: 0;
}
.ind-m-search-wrap input {
  flex: 1; min-width: 0;
  height: 100%;
  background: transparent; border: 0; outline: 0;
  color: var(--grey-86);
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 16px;
}
.ind-m-search-wrap input::placeholder { color: var(--grey-55); }

/* Content row — sidebar + main */
.ind-m-content {
  flex: 1; display: flex; min-height: 0;
  margin-top: 8px;
}

/* Sidebar — 230px (pl 20, pr 10, pt 8, pb 16) */
.ind-m-side {
  width: 230px; padding: 8px 10px 16px 20px;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ind-m-side-sec { display: flex; flex-direction: column; }
.ind-m-side-title {
  padding: 7px 12px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 11px; font-weight: 400; line-height: 16px;
  color: var(--grey-55);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ind-m-side-item {
  height: 40px; padding: 0 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px; font-weight: 400;
  color: var(--grey-86);
  border-radius: 8px;
  cursor: pointer;
}
.ind-m-side-item:hover { background: var(--grey-18); }
.ind-m-side-item.is-active {
  background: var(--grey-24);                    /* color/grey/24 */
  font-weight: 700;
}
.ind-m-side-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-86); flex-shrink: 0;
}
.ind-m-side-label { line-height: 18px; white-space: nowrap; }

/* Main column */
.ind-m-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}

/* Top tabs row — pills h28 rounded-14 px-12 */
.ind-m-tabs {
  padding: 16px 32px 8px 40px;
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.ind-m-tab {
  height: 28px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-18);                    /* color/grey/18 #2e2e2e */
  border: 1px solid var(--grey-18); cursor: pointer;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px; font-weight: 400;
  color: var(--grey-86);
  border-radius: 14px;
  white-space: nowrap;
}
.ind-m-tab:hover { background: var(--grey-24); border-color: var(--grey-24); }
.ind-m-tab.is-active {
  background: #f2f2f2;                           /* color/grey/95 */
  border-color: #f2f2f2;
  color: var(--grey-6);                          /* #000000 */
}

/* Column header "NOMBRE DEL SCRIPT" — 11px uppercase */
.ind-m-list-head {
  height: 32px; padding: 8px 40px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 11px; line-height: 16px; font-weight: 400;
  color: var(--grey-55);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Rows list — Figma 5:27442 / 5:22002 (Component 21) */
.ind-m-list {
  flex: 1; padding: 0 32px 16px 10px;
  overflow-y: auto;
}
.ind-m-row {
  height: 32px; padding: 0 8px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px; color: var(--grey-86);
  border-radius: 8px;
  cursor: pointer;
}
.ind-m-row:hover { background: var(--grey-18); }
.ind-m-name {
  flex: 0 0 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--grey-86);
}
/* Badges Figma: New (#ff9800), Updated (#5a9cf8) */
.ind-m-badge {
  flex: 0 0 auto;
  height: 18px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 10px; line-height: 1; font-weight: 700;
  border-radius: 4px;
}
.ind-m-badge.is-new     { color: #ff9800; border: 1px solid #ff9800; }
.ind-m-badge.is-updated { color: #5a9cf8; border: 1px solid #5a9cf8; }
/* Pin (visible on hover o si está anclado) */
.ind-m-pin {
  margin-left: auto;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--grey-55);
  cursor: pointer;
  visibility: hidden;
}
.ind-m-row:hover .ind-m-pin { visibility: visible; }
.ind-m-pin:hover { background: var(--grey-24); color: var(--grey-86); }
.ind-m-pin.is-on { visibility: visible; color: var(--grey-86); }

.ind-m-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--grey-55); font-size: 13px;
}

/* Scrollbar polish */
.ind-m-side::-webkit-scrollbar,
.ind-m-list::-webkit-scrollbar { width: 8px; }
.ind-m-side::-webkit-scrollbar-thumb,
.ind-m-list::-webkit-scrollbar-thumb { background: var(--grey-24); border-radius: 4px; }
.ind-m-side::-webkit-scrollbar-track,
.ind-m-list::-webkit-scrollbar-track { background: transparent; }

/* =========================================================================
   ALERT MODAL   (Figma node 5:35094 — 480 × 475)
   ========================================================================= */
.al-modal-back {
  position: absolute; inset: 0; z-index: 59;
  background: rgba(0,0,0,.5);
}
.al-modal {
  position: absolute; z-index: 60;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 480px; height: 475px;
  background: #1f1f1f;                /* grey/12 */
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 14px 48px rgba(0,0,0,.7);
  display: flex; flex-direction: column;
  color: var(--grey-86);
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* Header — pb 17.8 / pt 17 / px 20, 36-high title row */
.al-m-head {
  flex-shrink: 0;
  padding: 17px 20px 17.8px;
  border-bottom: 0.8px solid var(--grey-29);
  display: flex; align-items: flex-start; gap: 6px;
  height: 70.8px;
  box-sizing: border-box;
  position: relative;
}
.al-m-title {
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 700;
  font-size: 20px; line-height: 28px;
  color: var(--grey-86);
  white-space: nowrap;
  margin-top: 4px;
}
.al-m-symbol-pill {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 8px;
  margin-left: 6px;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  gap: 8px;
}
.al-m-symbol-pill:hover { background: var(--grey-18); }
.al-m-sym-icon {
  width: 18px; height: 18px; border-radius: 9px;
  background: #f25022;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.al-m-sym-icon img { width: 14px; height: 14px; display: block; }
.al-m-sym-name {
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 700; font-size: 16px; line-height: 24px;
  color: var(--grey-86);
}
.al-m-sym-chev { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .8; }
.al-m-sym-chev img { width: 18px; height: 18px; display: block; }

.al-m-head-actions {
  position: absolute; top: 19px; right: 20px;
  display: flex; gap: 10px;
}
.al-m-icon-btn {
  width: 34px; height: 34px; min-width: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid transparent;
  background: transparent; cursor: pointer;
  padding: 0; color: var(--grey-55);
}
.al-m-icon-btn:hover { background: var(--grey-18); color: var(--grey-86); }
.al-m-icon-btn img { width: 18px; height: 18px; display: block; }

/* Content — px 20 / py 16, items column */
.al-m-content {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column;
}

/* Generic field — 130.55 label / 304.64 controls */
.al-m-field {
  display: flex; align-items: flex-start;
  width: 100%;
}
.al-m-field-inline { padding: 0; }
.al-m-legend {
  width: 130.55px;
  flex-shrink: 0;
  padding: 6px 10px 6px 0;
  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 400;
  font-size: 14px; line-height: 18px;
  color: var(--grey-55);
}
.al-m-field-condition .al-m-legend { padding: 8px 10px 92px 0; }
.al-m-controls {
  flex: 1; min-width: 0;
  width: 304.64px;
  display: flex; flex-direction: column;
  gap: 7.6px;
  padding: 1px 0;
}
.al-m-field-inline .al-m-controls {
  padding: 6px 0;
  flex-direction: row; align-items: center;
}

/* Row inside controls (Condición) */
.al-m-row {
  display: flex; align-items: stretch;
  width: 100%;
  gap: 7.6px;
}
.al-m-row-split { gap: 7.6px; }

/* Generic select pill (Precio, Cruce, Valor) */
.al-m-select {
  display: flex; align-items: center;
  flex: 1; min-width: 0;
  height: 34.4px;
  padding: 1px;
  border: 1px solid #575757;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.al-m-select:hover { border-color: var(--grey-55); }
.al-m-select-fixed { flex: 0 0 auto; min-width: 110px; }
.al-m-select-label {
  flex: 1; min-width: 0;
  padding: 0 6px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px;
  color: var(--grey-86);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.al-m-select-chev {
  width: 20px; height: 28.4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--grey-55);
}
.al-m-select-chev img { width: 18px; height: 18px; display: block; opacity: .85; }

/* Number input + steppers (Valor) */
.al-m-numwrap {
  display: flex; align-items: center;
  flex: 1; min-width: 0;
  height: 34.4px;
  padding: 1px;
  border: 1px solid #575757;
  border-radius: 6px;
  background: transparent;
}
.al-m-numwrap:focus-within { border-color: var(--azure-58); }
.al-m-num {
  flex: 1; min-width: 0;
  height: 28.4px; padding: 0 2px 0 5px;
  background: transparent; border: 0; outline: 0;
  color: var(--grey-86);
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 28.4px;
}
.al-m-num-steppers {
  display: flex; flex-direction: column;
  width: 22px; height: 28.4px;
  flex-shrink: 0;
}
.al-m-step {
  flex: 1; min-height: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0;
  border-radius: 4px; cursor: pointer;
  color: var(--grey-55);
}
.al-m-step:hover { background: var(--grey-18); color: var(--grey-86); }
.al-m-step img { width: 12px; height: 12px; display: block; }

/* Add condition row */
.al-m-addrow {
  align-self: flex-end;
  width: 304.64px;
  display: flex; align-items: center;
  padding: 16px 0;
}
.al-m-addcond {
  display: inline-flex; align-items: center; gap: 0;
  height: 18px;
  background: transparent; border: 0; padding: 0;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px;
  color: var(--azure-66, #5b9cf6);
  cursor: pointer;
}
.al-m-addcond-plus {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  padding-right: 4px;
}
.al-m-addcond-plus img { width: 18px; height: 18px; display: block; }
.al-m-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 12px;
  color: var(--grey-55);
}
.al-m-hint img { width: 18px; height: 18px; display: block; opacity: .8; }

/* Spacer divider between sections */
.al-m-spacer {
  height: 1px; width: 100%;
  background: var(--grey-18);
  margin: 0 0 16px 0;
}

/* Inline single-value buttons (Activación, Vencimiento, Mensaje, Notificaciones) */
.al-m-inlineval {
  display: inline-flex; align-items: center;
  width: auto; max-width: 100%;
  height: 18px;
  padding: 0;
  background: transparent; border: 0;
  cursor: pointer;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px;
  color: var(--grey-86);
  text-align: left;
  border-radius: 4px;
}
.al-m-inlineval > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 280px;
}
.al-m-inlineval:hover { color: #fff; }
.al-m-inlineval-chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding-left: 2px;
  color: var(--grey-55);
}
.al-m-inlineval-chev img { width: 18px; height: 18px; display: block; opacity: .85; }

.al-m-hidden-input {
  display: none;
  height: 24px;
  padding: 0 6px;
  background: var(--grey-18);
  border: 1px solid var(--azure-58);
  border-radius: 4px;
  color: var(--grey-86);
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px;
  outline: 0;
  min-width: 240px;
}
input[type="datetime-local"].al-m-hidden-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
  display: block;
}

/* Popovers */
.al-m-popover {
  position: absolute;
  background: #2a2a2a;
  border: 1px solid var(--grey-29);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  padding: 4px 0;
  z-index: 5;
  max-height: 260px; overflow-y: auto;
}
.al-m-popover-opt {
  padding: 6px 12px;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px; line-height: 18px;
  color: var(--grey-86);
  cursor: pointer;
  white-space: nowrap;
}
.al-m-popover-opt:hover { background: var(--grey-18); color: #fff; }
.al-m-popover-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 14px; color: var(--grey-86);
  cursor: pointer;
}
.al-m-popover-item:hover { background: var(--grey-18); }
.al-m-popover-item input[type=checkbox] {
  accent-color: var(--azure-58);
  width: 14px; height: 14px;
}

/* Footer — pb 16 / pt 16.8 / px 20 */
.al-m-footer {
  flex-shrink: 0;
  padding: 16.8px 20px 16px;
  border-top: 0.8px solid var(--grey-29);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px;
}
.al-m-btn {
  height: 34px;
  min-width: 90px;
  padding: 0 11.8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 16px; line-height: 24px;
}
.al-m-btn-secondary {
  background: transparent;
  color: #fff;
  border-color: var(--grey-29);
}
.al-m-btn-secondary:hover { background: var(--grey-18); }
.al-m-btn-primary {
  background: #fff;
  color: var(--grey-6);
  border-color: #fff;
  font-weight: 400;
}
.al-m-btn-primary:hover { background: #f0f3fa; border-color: #f0f3fa; }

/* Scrollbar for content */
.al-m-content::-webkit-scrollbar { width: 8px; }
.al-m-content::-webkit-scrollbar-thumb { background: var(--grey-29); border-radius: 4px; }
.al-m-content::-webkit-scrollbar-track { background: transparent; }

/* =========================================================================
   SETTINGS MODAL — pixel-tuned to Figma 2QhXqtb66hdeKvlZAZE4fS
   Frame: 610×663, 7 tabs sidebar (226w) + content (384w) + 56px footer
   ========================================================================= */
/* =========================================================================
   SETTINGS MODAL — pixel-tuned to Figma 2QhXqtb66hdeKvlZAZE4fS
   Frames 5:50480 / 5:54615 / 5:58324 / 5:61894 (varying h: 463–860)
   ========================================================================= */
.cs-modal-back {
  position: absolute; inset: 0; z-index: 59;
  background: rgba(0,0,0,.55);
}
.cs-modal {
  position: absolute; z-index: 60;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 610px;
  max-height: 88vh;
  background: var(--grey-12);                /* #1f1f1f */
  border-radius: 6px;
  box-shadow: 0 2px 2px rgba(0,0,0,.4), 0 14px 48px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
  color: var(--grey-86);
  font-family: var(--font-ui);
  font-size: 14px;
}
/* Header — 68px, no border (Figma has no separator) */
.cs-head {
  padding: 17px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cs-title {
  font-family: var(--font-ui);
  font-size: 20px; font-weight: 700;
  color: var(--grey-86); line-height: 28px;
}
.cs-x {
  width: 34px; height: 34px; padding: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55); background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.cs-x:hover { color: var(--grey-86); background: var(--grey-18); }

/* Body: sidebar 226 + content */
.cs-body { flex: 1; display: flex; min-height: 0; }
.cs-side {
  width: 226px; flex-shrink: 0;
  padding: 8px 0 8px 20px;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
/* Pill tabs — Figma: 40px h, 8px radius, 12px left padding, full width of sidebar minus padding */
.cs-tab {
  display: flex; align-items: center; gap: 4px;
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  margin-right: 8px;
  color: var(--grey-86);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  background: transparent;
  white-space: nowrap;
}
.cs-tab:hover { background: rgba(255,255,255,.04); }
.cs-tab.is-active {
  background: var(--grey-18);                /* #2e2e2e */
  color: #fff;
  font-weight: 700;
}
.cs-tab-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--grey-86);
}
.cs-tab.is-active .cs-tab-icon { color: #fff; }
.cs-tab-icon svg { width: 18px; height: 18px; display: block; }
.cs-tab-label { line-height: 18px; }

/* Content */
.cs-content {
  flex: 1; min-width: 0;
  padding: 16px 20px;
  overflow-y: auto;
  max-width: 550px;
}
.cs-content::-webkit-scrollbar { width: 8px; }
.cs-content::-webkit-scrollbar-thumb { background: var(--grey-29); border-radius: 4px; }
.cs-content::-webkit-scrollbar-track { background: transparent; }

.cs-sec-title {
  font-family: var(--font-ui);
  font-size: 11px; color: var(--grey-55);
  text-transform: uppercase;
  letter-spacing: .04em;
  height: 32px;
  display: flex; align-items: center;
  margin: 0;
}
.cs-sec-title + .cs-sec-title { margin-top: 0; }

/* Checkbox row — Figma 18×18, 3px radius, white bg when unchecked, blue when checked */
.cs-chk {
  display: flex; align-items: center; gap: 8px;
  min-height: 50px;
  padding: 8px 0;
  font-size: 14px; color: var(--grey-86); cursor: pointer;
  line-height: 1.3;
  font-family: var(--font-ui);
}
.cs-chk input { position: absolute; opacity: 0; pointer-events: none; }
.cs-chkbox {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1px solid var(--grey-95);
  border-radius: 3px;
  background: var(--grey-95);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.cs-chkbox::after {
  content: ''; width: 10px; height: 5px;
  border-left: 1.6px solid #000000;
  border-bottom: 1.6px solid #000000;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.cs-chk input:checked + .cs-chkbox::after { opacity: 1; }
/* Unchecked variant: hollow white bg with no tick */
.cs-chk input:not(:checked) + .cs-chkbox {
  background: transparent;
  border-color: var(--grey-34);
}
.cs-chk-l { flex: 1; }
.cs-hint {
  width: 18px; height: 18px; border-radius: 50%;
  background: transparent; color: var(--grey-55);
  border: 1.2px solid var(--grey-55);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  cursor: help; flex-shrink: 0;
  margin-left: 8px;
}
.cs-hint:hover { color: var(--grey-86); border-color: var(--grey-86); }

/* Label + control row */
.cs-row {
  display: grid;
  grid-template-columns: 166.52px 1fr;
  align-items: center;
  min-height: 50px;
  padding: 8px 0;
  gap: 12px;
}
.cs-row-l { color: var(--grey-86); font-size: 14px; }
.cs-row-c { display: flex; align-items: center; gap: 8px; }
.cs-unit { color: var(--grey-55); font-size: 12px; }

/* Color swatch — Figma: 34×34 outer with 1px #575757 border, 6px radius, 4px padding, 24×24 inner color, 3px inner radius */
.cs-swatch-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--grey-34);
  border-radius: 6px;
  padding: 4px; background: transparent;
  cursor: pointer;
}
.cs-swatch {
  width: 24px; height: 24px; padding: 0; border: 0;
  background: transparent; cursor: pointer;
  border-radius: 3px; overflow: hidden;
}
.cs-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.cs-swatch::-webkit-color-swatch { border: 0; border-radius: 3px; }

/* Select */
.cs-select {
  height: 36px; padding: 0 12px;
  background: transparent; color: var(--grey-86);
  border: 1px solid var(--grey-34); border-radius: 6px;
  font-size: 14px; font-family: var(--font-ui);
  cursor: pointer; min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23dbdbdb' stroke-width='1.4'><path d='M3 4.5 L6 7.5 L9 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.cs-select:focus { outline: 1px solid var(--azure-58); }
.cs-select option { background: var(--grey-12); color: var(--grey-86); }

/* Number input */
.cs-num {
  width: 80px; height: 36px; padding: 0 10px;
  background: transparent; color: var(--grey-86);
  border: 1px solid var(--grey-34); border-radius: 6px;
  font-size: 14px; font-family: var(--font-ui);
}
.cs-num:focus { outline: 1px solid var(--azure-58); }

/* Velas grid (checkbox left, 2 swatches right) */
.cs-grid {
  display: grid;
  grid-template-columns: 166.52px 1fr;
  row-gap: 0; column-gap: 12px;
  align-items: center;
}
.cs-cell { min-height: 50px; display: flex; align-items: center; padding: 8px 0; }
.cs-swatches { gap: 8px; }
.cs-swatches .cs-swatch-wrap { margin-right: 4px; }

/* Checkbox row with right-side control (e.g. select / slider) */
.cs-chk-row {
  display: flex; align-items: center; gap: 12px;
}
.cs-chk-row .cs-chk { flex: 0 0 auto; min-width: 166.52px; }
.cs-chk-row-c { display: flex; align-items: center; gap: 8px; flex: 1; }
.cs-chk-indent { padding-left: 28px; }

/* Slider (Volumen de alertas etc.) — Figma: 6px h track, 5px radius, fill #f2f2f2 */
.cs-slider {
  position: relative;
  width: 136px; height: 6px;
  background: var(--grey-24);
  border-radius: 5px;
  cursor: pointer;
}
.cs-slider-fill {
  position: absolute; left: 0; top: 0;
  height: 100%;
  background: var(--grey-95);
  border-radius: 5px;
}
.cs-slider input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}

/* Footer — 0.8px top border #4a4a4a, padding 16/16.8/20 */
.cs-foot {
  padding: 16.8px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 0.8px solid var(--grey-29);
  flex-shrink: 0;
  gap: 12px;
}
.cs-foot-r { display: flex; gap: 12px; }
.cs-btn {
  height: 34px; padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-ui);
  cursor: pointer;
  border: 1px solid var(--grey-34);
  background: transparent; color: var(--grey-86);
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.cs-btn-ghost { color: #fff; border-color: #fff; }
.cs-btn-ghost:hover { background: rgba(255,255,255,.06); }
/* Plantilla button — outline #575757, with chevron */
.cs-btn-tpl {
  height: 34.4px; padding: 0 6px 0 12px;
  font-size: 14px; color: var(--grey-86);
  border-color: var(--grey-34);
}
.cs-btn-tpl::after {
  content: '';
  width: 20px; height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23dbdbdb' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3 4.5 L6 7.5 L9 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.cs-btn-primary {
  background: #fff; color: var(--grey-6); border-color: #fff;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  padding: 0 11.8px;
}
.cs-btn-primary:hover { background: #e6e6e6; border-color: #e6e6e6; }

/* Legend visibility toggles driven by settings */
.legend.hide-logo .legend-logo,
.legend.hide-title .legend-title,
.legend.hide-ohlc .legend-ohlc,
.legend.hide-change-bar .legend-chg-bar,
.legend.hide-volume .legend-vol,
.legend.hide-change-day .legend-chg-day,
.legend.hide-ind-titles .legend-ind .ind-title,
.legend.hide-ind-values .legend-ind .ind-values,
.legend.hide-ind-inputs .legend-ind .ind-inputs { display: none !important; }
.legend.has-bg { background: rgba(15,15,15,.85); padding: 6px 10px; border-radius: 4px; }

/* ========================================================================
   COMPARE MODAL  (Figma 5:66126 — 840×565)
   ======================================================================== */
.cmp-modal-back {
  position: absolute; inset: 0; z-index: 49;
  background: rgba(0, 0, 0, .5);
}
.cmp-modal {
  position: absolute; z-index: 50;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 840px; height: 565px;
  background: #1f1f1f;                            /* grey/12 */
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column;
  color: var(--grey-86);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', 'Segoe UI', Roboto, sans-serif;
}

/* Header — 68 high, 20px h-padding */
.cmp-m-head {
  height: 68px; padding: 17px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cmp-m-title {
  font-size: 20px; font-weight: 700;
  color: var(--grey-86);
  line-height: 28px;
}
.cmp-m-x {
  width: 34px; height: 34px; padding: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55); background: transparent; border: 0;
  border-radius: 4px; cursor: pointer;
}
.cmp-m-x:hover { color: var(--grey-86); background: var(--grey-18); }

/* Input row — 8px bottom padding, 20px h-padding */
.cmp-m-input-wrap {
  padding: 0 20px 8px;
  flex-shrink: 0;
}
.cmp-m-input {
  height: 40px;
  border: 1px solid #636363;                      /* grey/39 */
  border-radius: 8px;
  padding: 0 6px 0 0;
  display: flex; align-items: center;
  background: transparent;
}
.cmp-m-input:focus-within { border-color: var(--azure-58); }
.cmp-m-search-icon {
  width: 28px; height: 28px; margin: 0 0 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--grey-55);
  flex-shrink: 0;
}
.cmp-m-input input {
  flex: 1; min-width: 0; height: 28px;
  background: transparent; border: 0; outline: 0;
  color: var(--grey-86); font-size: 14px;
  padding: 0 8px;
}
.cmp-m-input input::placeholder { color: #575757; }    /* grey/34 */
/* Add button — Figma does not show this; hidden but kept for a11y / Enter submit parity.
   Press Enter inside the input to submit the typed symbol. */
.cmp-m-add { display: none; }

/* Scrollable list area */
.cmp-m-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
}
.cmp-m-section-head {
  padding: 16px 20px 8px;
  font-size: 11px; font-weight: 400;
  color: #8c8c8c;                                 /* grey/55 */
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Active comparing chips */
.cmp-m-active.is-empty { display: none; }
.cmp-m-chips {
  padding: 0 20px 4px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cmp-m-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 4px 0 10px;
  background: var(--grey-18);
  border-radius: 14px;
  font-size: 13px; color: var(--grey-86);
}
.cmp-m-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.cmp-m-chip-label { line-height: 1; font-weight: 600; }
.cmp-m-chip-x {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 50%;
  color: var(--grey-55); cursor: pointer;
}
.cmp-m-chip-x:hover { color: var(--grey-86); background: var(--grey-29); }

/* Symbol rows */
.cmp-m-list { padding: 0 0 8px; }
.cmp-m-row {
  height: 52px;
  display: flex; align-items: center;
  padding: 0 20px;
  border-bottom: 0.8px solid #3d3d3d;             /* grey/24 */
  cursor: pointer;
  background: transparent;
}
.cmp-m-row:hover { background: var(--grey-18); }
.cmp-m-row-logo {
  width: 24px; height: 24px; margin-right: 12px;
  border-radius: 12px;
  background: var(--grey-18);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.cmp-m-row-logo span {
  font-size: 11px; font-weight: 700;
  color: #fff;
  line-height: 16px;
}
/* Per-type tint so the logo isn't uniform grey-on-grey */
.cmp-m-row[data-type="forex"]  .cmp-m-row-logo { background: #2962ff; }
.cmp-m-row[data-type="index"]  .cmp-m-row-logo { background: #f7525f; }
.cmp-m-row[data-type="stock"]  .cmp-m-row-logo { background: #089981; }
.cmp-m-row[data-type="crypto"] .cmp-m-row-logo { background: #f0b90b; }
.cmp-m-row-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.cmp-m-row-sym {
  font-size: 16px; color: var(--grey-86);
  line-height: 24px;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmp-m-row-desc {
  font-size: 12px; color: #8c8c8c;
  line-height: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmp-m-row-exch {
  font-size: 14px; color: var(--grey-86);
  line-height: 21px;
  margin-left: 16px;
  white-space: nowrap;
  min-width: 64px; text-align: right;
}
.cmp-m-row-type {
  font-size: 12px; color: #8c8c8c;
  line-height: 17px;
  margin-left: 12px; padding-right: 0;
  min-width: 76px; text-align: right;
  white-space: nowrap;
  text-transform: lowercase;
}

/* ---- Drawings: Trendlines ---- */
.nvda-chart.drawing-mode,
.nvda-chart.drawing-mode * {
  cursor: crosshair !important;
}
#drawOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.trendline-handle {
  position: absolute;
  width: 10px; height: 10px;
  background: #2962ff;
  border: 2px solid #ffffff;
  border-radius: 2px;
  pointer-events: auto;
  cursor: move;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.trendline-context-menu {
  position: absolute; z-index: 100;
  background: #1c1c1c; border: 1px solid #2e2e2e;
  border-radius: 4px; padding: 4px 0;
  min-width: 140px; font-size: 13px; color: #dbdbdb;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.trendline-context-menu div {
  padding: 6px 12px; cursor: pointer;
}
.trendline-context-menu div:hover { background: #2962ff; color: #fff; }

/* =========================================================================
   INDICATOR SETTINGS — ⚙ icon + modal (live editable params)
   ========================================================================= */
.ind-row .ind-cog {
  color: var(--grey-55); cursor: pointer; padding: 0 4px;
  opacity: 0; font-size: 12px; user-select: none;
}
.ind-row:hover .ind-cog { opacity: 1; }
.ind-row .ind-cog:hover { color: var(--azure-58, #2962ff); }

.indset-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.indset-modal {
  width: 420px; max-width: 92vw; max-height: 80vh;
  background: #1c1c1c; color: #dbdbdb;
  border: 1px solid #2e2e2e; border-radius: 6px;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}
.indset-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #2e2e2e;
}
.indset-title { font-size: 13px; font-weight: 600; }
.indset-close {
  cursor: pointer; font-size: 18px; line-height: 1;
  color: var(--grey-55); padding: 0 4px;
}
.indset-close:hover { color: #fff; }
.indset-body {
  padding: 12px 14px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.indset-row {
  display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px;
}
.indset-lbl { font-size: 12px; color: var(--grey-86, #c4c4c4); }
.indset-ctrl { display: flex; align-items: center; gap: 8px; }
.indset-num {
  width: 64px; background: #131313; color: #dbdbdb;
  border: 1px solid #2e2e2e; border-radius: 3px; padding: 3px 6px;
  font-size: 12px;
}
.indset-rng { flex: 1; accent-color: #2962ff; }
.indset-sel {
  flex: 1; background: #131313; color: #dbdbdb;
  border: 1px solid #2e2e2e; border-radius: 3px; padding: 3px 6px;
  font-size: 12px;
}
.indset-color {
  width: 40px; height: 24px; border: 1px solid #2e2e2e;
  border-radius: 3px; background: #131313; cursor: pointer; padding: 0;
}
.indset-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 14px; border-top: 1px solid #2e2e2e;
}
.indset-btn {
  font-size: 12px; padding: 6px 14px; border-radius: 3px;
  cursor: pointer; border: 1px solid transparent;
  font-family: inherit;
}
.indset-btn-ghost {
  background: transparent; color: #dbdbdb; border-color: #2e2e2e;
}
.indset-btn-ghost:hover { background: #232323; }
.indset-btn-azure {
  background: var(--azure-58, #2962ff); color: #fff;
}
.indset-btn-azure:hover { background: #1e4fd6; }

/* =========================================================================
   SYMBOL SEARCH PALETTE (NEW BLOCK — added by symbol-search agent)
   Classes: sp-symsearch / sp-ss-head / sp-ss-title / sp-ss-close /
            sp-ss-search / sp-ss-chips / sp-chip / sp-chip-on /
            sp-body-list / sp-section / sp-row / sp-row-active /
            sp-logo / sp-meta / sp-sym / sp-name / sp-right / sp-exch /
            sp-pill / sp-empty
   ========================================================================= */
.sp-symsearch {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-width: 92vw;
  max-height: 70vh;
  display: none;
  flex-direction: column;
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  color: #d1d4dc;
  z-index: 9000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  overflow: hidden;
}
.sp-ss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #2a2a2a;
}
.sp-ss-title {
  font-size: 14px;
  font-weight: 600;
  color: #e8e8e8;
}
.sp-ss-close {
  background: transparent;
  border: 0;
  color: #9a9a9a;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.sp-ss-close:hover { background: #2a2a2a; color: #fff; }
.sp-ss-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #2a2a2a;
  color: #787b86;
}
.sp-ss-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #e8e8e8;
  font-size: 14px;
  font-family: inherit;
}
.sp-ss-search input::placeholder { color: #555; }
.sp-ss-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
}
.sp-chip {
  background: #262626;
  color: #b2b5be;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.sp-chip:hover { background: #303030; color: #fff; }
.sp-chip-on {
  background: #2962ff;
  color: #fff;
  border-color: #2962ff;
}
.sp-chip-on:hover { background: #1e4fd6; }
.sp-body-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 4px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}
.sp-body-list::-webkit-scrollbar { width: 8px; }
.sp-body-list::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
.sp-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6a6d78;
  padding: 10px 14px 4px;
  text-transform: uppercase;
}
.sp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
}
.sp-row:hover, .sp-row-active {
  background: #262626;
}
.sp-logo {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
}
.sp-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.sp-sym {
  font-weight: 700;
  color: #e8e8e8;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-name {
  color: #9a9da6;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.sp-exch {
  font-size: 10px;
  color: #787b86;
  background: #2a2a2a;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .03em;
}
.sp-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.sp-empty {
  padding: 40px 14px;
  text-align: center;
  color: #6a6d78;
  font-size: 13px;
}

/* ============================================================
   Tier-1 API integrations — new chart UI elements
   ============================================================ */

/* Reset/Auto-scale button (bottom-right of chart area) */
.scale-btn {
  position: absolute;
  right: 64px;
  bottom: 44px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(28, 28, 28, .85);
  border: 1px solid #2e2e2e;
  color: #b2b5be;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background .12s, color .12s;
}
.scale-btn:hover { background: rgba(41, 98, 255, .25); color: #fff; }

/* Floating shift-zoom selection tooltip */
.zoom-tip {
  position: absolute; z-index: 7;
  min-width: 150px; padding: 6px 8px;
  background: rgba(28, 28, 28, .95);
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  color: #d1d4dc;
  font: 12px "Trebuchet MS", sans-serif;
  pointer-events: none;
  line-height: 1.45;
}
.zt-row { display: flex; justify-content: space-between; gap: 12px; }
.zt-row span { color: #787b86; }
.zt-row b { color: #d1d4dc; font-weight: 600; }

/* Price-scale context menu (mirrors .ctx-menu styling) */
.scale-ctx {
  position: absolute;
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  padding: 4px 0;
  z-index: 30;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  font: 12px "Trebuchet MS", sans-serif;
}
.scale-ctx .ctx-item {
  padding: 6px 14px;
  cursor: pointer;
  color: #d1d4dc;
  white-space: nowrap;
}
.scale-ctx .ctx-item:hover { background: #2a2e39; }
.scale-ctx .ctx-item.is-active::before {
  content: "✓ "; color: #2962ff; font-weight: bold;
}

/* Extended crosshair tooltip — multi-series rows */
.cross-tip .ct-sym {
  margin-bottom: 4px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-bottom: 3px;
}
.cross-tip .ct-sym b { color: #fff; margin-right: 4px; }
.cross-tip .ct-mini { color: #b2b5be; font-size: 10px; margin-right: 4px; }
.cross-tip .ct-up { color: #089981; font-size: 10px; }
.cross-tip .ct-dn { color: #f23645; font-size: 10px; }

/* Bottom-bar navigation arrows */
.bb-nav {
  display: inline-flex; align-items: center; justify-content: center;
  height: 100%; padding: 0 8px;
  background: transparent; border: 0;
  color: #b2b5be; font-size: 13px; cursor: pointer;
}
.bb-nav:hover { color: #fff; }

/* Pane minimize button in indicator legend rows */
.ind-row .pane-min {
  font-size: 11px;
  color: #787b86;
  cursor: pointer;
  padding: 0 4px;
  user-select: none;
}
.ind-row .pane-min:hover { color: #d1d4dc; }
.ind-row .pane-min.is-min { color: #2962ff; }

/* =========================================================================
   Global animations (reusable keyframes)
   ========================================================================= */
@keyframes tv-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tv-slide-up { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes tv-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes tv-spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Utility classes
   ========================================================================= */

/* Toast */
.tv-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tv-bg-2);
  color: var(--tv-text);
  padding: 10px 18px;
  border-radius: var(--tv-radius-md);
  border: 1px solid var(--tv-border);
  box-shadow: var(--tv-shadow-md);
  font-size: 13px;
  z-index: var(--tv-z-toast);
  animation: tv-fade-in 200ms ease, tv-slide-up 200ms ease;
  pointer-events: none;
  max-width: 90vw;
}
.tv-toast.tv-toast--success { border-color: var(--tv-up); }
.tv-toast.tv-toast--error { border-color: var(--tv-down); }
.tv-toast.tv-toast--leaving { animation: tv-fade-in 200ms ease reverse forwards; }

/* Skeleton placeholder */
.tv-skeleton {
  display: block;
  background: linear-gradient(90deg, var(--tv-bg-2) 0%, var(--tv-bg-3) 50%, var(--tv-bg-2) 100%);
  background-size: 200% 100%;
  animation: tv-shimmer 1.5s linear infinite;
  border-radius: var(--tv-radius-sm);
  min-height: 12px;
}

/* Spinner */
.tv-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--tv-bg-3);
  border-top-color: var(--tv-accent);
  border-radius: 50%;
  animation: tv-spin 700ms linear infinite;
  vertical-align: middle;
}
.tv-spinner--lg { width: 32px; height: 32px; border-width: 3px; }

/* Empty state */
.tv-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--tv-text-muted);
  gap: 12px;
  min-height: 220px;
}
.tv-empty-state__icon {
  font-size: 40px;
  opacity: 0.55;
  line-height: 1;
}
.tv-empty-state__title {
  color: var(--tv-text);
  font-size: 15px;
  font-weight: 600;
}
.tv-empty-state__desc {
  font-size: 13px;
  max-width: 360px;
  line-height: 1.5;
}

/* Thin dark scrollbar (opt-in for inner panels) */
.tv-scrollbar { scrollbar-width: thin; scrollbar-color: var(--tv-bg-3) transparent; }
.tv-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.tv-scrollbar::-webkit-scrollbar-track { background: transparent; }
.tv-scrollbar::-webkit-scrollbar-thumb { background: var(--tv-bg-3); border-radius: 3px; }
.tv-scrollbar::-webkit-scrollbar-thumb:hover { background: #3a3e4a; }

/* Focus ring helper for custom widgets */
.tv-focus-ring:focus-visible {
  outline: 2px solid var(--tv-accent);
  outline-offset: 2px;
  border-radius: var(--tv-radius-sm);
}

/* Router-level loading / error / 404 panels */
.tv-route-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--tv-bg-0);
  color: var(--tv-text);
  font-family: var(--font-inter, 'Inter', system-ui, sans-serif);
  gap: 14px;
  padding: 24px;
  text-align: center;
  animation: tv-fade-in 180ms ease;
}
.tv-route-state__title { font-size: 18px; font-weight: 600; }
.tv-route-state__desc { font-size: 13px; color: var(--tv-text-muted); max-width: 420px; line-height: 1.5; }
.tv-route-state__code { font-size: 56px; font-weight: 700; color: var(--tv-accent); line-height: 1; }
.tv-route-state__link {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 16px;
  background: var(--tv-accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--tv-radius-md);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--tv-transition);
}
.tv-route-state__link:hover { background: var(--tv-accent-hover); }
/* =============================================================================
 * design-system.css — Greeksdesk shared design system (Phase 0)
 *
 * One vocabulary of tokens + control components so every screen shares the same
 * visual hierarchy instead of each page hardcoding its own buttons/spacing.
 * Colors are TradingView's real Figma values (Cod Gray / Mine Shaft / Dodger
 * Blue / Pomegranate / Gossamer). Per-screen pixel tuning happens against live
 * tradingview.com captures; these are the proven baseline used across the app.
 *
 * Prefix: .ds-*   Usage: add these classes to markup; do not re-hardcode.
 * ========================================================================== */

:root {
  /* ---- Surfaces (dark, low → high elevation) ---- */
  --ds-bg:            #000000;   /* app background — full black (live TradingView) */
  --ds-surface-1:     #131722;   /* base panel */
  --ds-surface-2:     #1a1f2b;   /* raised card */
  --ds-surface-3:     #1f2430;   /* popover / modal */
  --ds-surface-hover: rgba(255, 255, 255, 0.06);
  --ds-surface-active:rgba(255, 255, 255, 0.10);

  /* ---- Text hierarchy ---- */
  --ds-text-1: #ffffff;   /* primary / headings */
  --ds-text-2: #d1d4dc;   /* body */
  --ds-text-3: #b2b5be;   /* secondary */
  --ds-text-4: #787b86;   /* muted / captions / section labels */
  --ds-text-disabled: #5c6070;

  /* ---- Borders ---- */
  --ds-border:       rgba(255, 255, 255, 0.08);
  --ds-border-soft:  rgba(255, 255, 255, 0.05);
  --ds-border-strong:rgba(255, 255, 255, 0.16);

  /* ---- Brand / semantic ---- */
  --ds-accent:        #2962ff;   /* Dodger Blue */
  --ds-accent-hover:  #1e53e0;
  --ds-accent-active: #1848c9;
  --ds-up:            #22ab94;   /* live TradingView positive green (rgb 34,171,148) */
  --ds-down:          #f23645;   /* Pomegranate (red) */
  --ds-warn:          #f7a600;

  /* ---- Card (TradingView home style: transparent over black, #4a4a4a border) ---- */
  --ds-card-border:   #4a4a4a;   /* rgb 74,74,74 — TV card outline */
  --ds-card-radius:   16px;      /* TV cards use 16px */

  /* ---- Typography scale (TradingView uses Trebuchet UI + Inter display) ---- */
  --ds-font-ui:      'Trebuchet MS', 'Trebuchet', 'Lucida Sans', Arial, sans-serif;
  --ds-font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --ds-fs-display: 34px;  --ds-lh-display: 40px;  /* hero titles */
  --ds-fs-h1: 28px;  --ds-lh-h1: 34px;
  --ds-fs-h2: 22px;  --ds-lh-h2: 28px;
  --ds-fs-h3: 18px;  --ds-lh-h3: 24px;
  --ds-fs-body: 14px;  --ds-lh-body: 20px;
  --ds-fs-sm: 13px;  --ds-lh-sm: 18px;
  --ds-fs-cap: 12px;  --ds-lh-cap: 16px;
  --ds-fs-micro: 10px;

  /* ---- Spacing scale (4px base) ---- */
  --ds-1: 4px;  --ds-2: 8px;  --ds-3: 12px;  --ds-4: 16px;
  --ds-5: 20px; --ds-6: 24px; --ds-7: 32px;  --ds-8: 40px; --ds-9: 56px;

  /* ---- Radius ---- */
  --ds-r-sm: 4px; --ds-r-md: 6px; --ds-r-lg: 10px; --ds-r-xl: 14px; --ds-r-pill: 999px;

  /* ---- Elevation ---- */
  --ds-shadow-1: 0 2px 8px rgba(0, 0, 0, 0.3);
  --ds-shadow-2: 0 8px 28px rgba(0, 0, 0, 0.45);
  --ds-shadow-3: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);

  /* ---- Control sizing (heights match TradingView chrome) ---- */
  --ds-ctl-sm: 28px; --ds-ctl-md: 32px; --ds-ctl-lg: 36px;

  --ds-focus: 0 0 0 2px rgba(41, 98, 255, 0.5);
  --ds-transition: 120ms ease;
}

/* ===========================================================================
 * TYPOGRAPHY helpers
 * ======================================================================== */
.ds-display { font-family: var(--ds-font-display); font-size: var(--ds-fs-display); line-height: var(--ds-lh-display); font-weight: 700; color: var(--ds-text-1); letter-spacing: -0.5px; }
.ds-h1 { font-family: var(--ds-font-display); font-size: var(--ds-fs-h1); line-height: var(--ds-lh-h1); font-weight: 700; color: var(--ds-text-1); letter-spacing: -0.3px; }
.ds-h2 { font-size: var(--ds-fs-h2); line-height: var(--ds-lh-h2); font-weight: 700; color: var(--ds-text-1); }
.ds-h3 { font-size: var(--ds-fs-h3); line-height: var(--ds-lh-h3); font-weight: 600; color: var(--ds-text-1); }
.ds-body { font-size: var(--ds-fs-body); line-height: var(--ds-lh-body); color: var(--ds-text-2); }
.ds-muted { color: var(--ds-text-4); }
.ds-section-label { font-size: var(--ds-fs-micro); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ds-text-4); }
.ds-num { font-variant-numeric: tabular-nums; }
.ds-up { color: var(--ds-up); }
.ds-down { color: var(--ds-down); }

/* ===========================================================================
 * BUTTONS — .ds-btn + variant. Default = medium height.
 * Variants: --primary (accent), --secondary (outline), --ghost (text),
 *           --success (green). Add --sm / --lg for size, --block for full width.
 * ======================================================================== */
.ds-btn {
  --_h: var(--ds-ctl-md);
  appearance: none;
  height: var(--_h);
  min-height: var(--_h);
  padding: 0 var(--ds-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-2);
  border: 1px solid transparent;
  border-radius: var(--ds-r-md);
  background: transparent;
  color: var(--ds-text-2);
  font-family: var(--ds-font-ui);
  font-size: var(--ds-fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background var(--ds-transition), border-color var(--ds-transition),
              color var(--ds-transition), filter var(--ds-transition), transform 80ms ease;
}
.ds-btn:focus-visible { outline: none; box-shadow: var(--ds-focus); }
.ds-btn:active { transform: translateY(0.5px); }
.ds-btn[disabled], .ds-btn.is-disabled { opacity: 0.45; pointer-events: none; }
.ds-btn--sm { --_h: var(--ds-ctl-sm); padding: 0 var(--ds-3); font-size: var(--ds-fs-cap); }
.ds-btn--lg { --_h: var(--ds-ctl-lg); padding: 0 var(--ds-5); font-size: var(--ds-fs-body); }
.ds-btn--block { width: 100%; }

.ds-btn--primary { background: var(--ds-accent); color: #fff; }
.ds-btn--primary:hover { background: var(--ds-accent-hover); }
.ds-btn--primary:active { background: var(--ds-accent-active); }

.ds-btn--secondary { border-color: var(--ds-border-strong); color: var(--ds-text-2); }
.ds-btn--secondary:hover { border-color: var(--ds-text-4); color: #fff; background: var(--ds-surface-hover); }

.ds-btn--ghost { color: var(--ds-text-2); }
.ds-btn--ghost:hover { background: var(--ds-surface-hover); color: #fff; }

.ds-btn--success { background: var(--ds-up); color: #fff; }
.ds-btn--success:hover { filter: brightness(1.08); }

/* Icon-only button (square, for toolbars/rails) */
.ds-icon-btn {
  appearance: none;
  width: var(--ds-ctl-md); height: var(--ds-ctl-md);
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--ds-r-md);
  background: transparent; color: var(--ds-text-3);
  cursor: pointer; transition: background var(--ds-transition), color var(--ds-transition);
}
.ds-icon-btn:hover { background: var(--ds-surface-hover); color: #fff; }
.ds-icon-btn.is-active { background: var(--ds-surface-active); color: var(--ds-accent); }
.ds-icon-btn svg { width: 18px; height: 18px; display: block; }

/* ===========================================================================
 * PILLS / CHIPS / TABS
 * ======================================================================== */
.ds-pill {
  appearance: none;
  height: var(--ds-ctl-sm);
  padding: 0 var(--ds-3);
  display: inline-flex; align-items: center; gap: var(--ds-1);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-r-pill);
  background: transparent;
  color: var(--ds-text-3);
  font-family: var(--ds-font-ui); font-size: var(--ds-fs-cap); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--ds-transition), color var(--ds-transition), border-color var(--ds-transition);
}
.ds-pill:hover { color: #fff; border-color: var(--ds-border-strong); }
.ds-pill.is-active { background: #f7f7f7; color: #000000; border-color: transparent; }

.ds-tabs { display: inline-flex; gap: var(--ds-1); }
.ds-tab {
  appearance: none; border: none; background: transparent;
  height: var(--ds-ctl-md); padding: 0 var(--ds-4);
  color: var(--ds-text-3); font-family: var(--ds-font-ui);
  font-size: var(--ds-fs-body); font-weight: 600; cursor: pointer;
  border-radius: var(--ds-r-md);
  transition: background var(--ds-transition), color var(--ds-transition);
}
.ds-tab:hover { color: #fff; background: var(--ds-surface-hover); }
.ds-tab.is-active { color: #fff; background: var(--ds-surface-active); }
.ds-tab--underline.is-active { background: transparent; box-shadow: inset 0 -2px 0 var(--ds-accent); border-radius: 0; }

/* ===========================================================================
 * CARDS / PANELS / INPUTS / DIVIDERS
 * ======================================================================== */
.ds-card {
  background: transparent;                       /* TV home cards are transparent */
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-card-radius);
  padding: var(--ds-4);
}
.ds-card--filled { background: var(--ds-surface-2); border-color: var(--ds-border); }
.ds-card--interactive { cursor: pointer; transition: border-color var(--ds-transition), background var(--ds-transition); }
.ds-card--interactive:hover { border-color: #6a6a6a; }

.ds-input {
  height: var(--ds-ctl-md);
  padding: 0 var(--ds-3);
  background: var(--ds-surface-1);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-r-md);
  color: var(--ds-text-2);
  font-family: var(--ds-font-ui); font-size: var(--ds-fs-sm);
  transition: border-color var(--ds-transition), box-shadow var(--ds-transition);
}
.ds-input::placeholder { color: var(--ds-text-4); }
.ds-input:focus { outline: none; border-color: var(--ds-accent); box-shadow: var(--ds-focus); }

.ds-divider { height: 1px; background: var(--ds-border); border: 0; margin: var(--ds-3) 0; }

/* Any bare clickable that opts into pointer affordance */
.ds-clickable { cursor: pointer; }
/* polaris-theme.css — dark "trading terminal" adaptation of Shopify Polaris.
 *
 * Polaris is light-first and its Popover/Tooltip overlays render in a portal at
 * <body>, so scoping token overrides to a wrapper class does not reach them.
 * Because Polaris is used ONLY inside our React islands in this app, overriding
 * the design tokens globally on :root is safe and is the cleanest way to get a
 * consistent dark theme across both in-tree components and portalled overlays.
 *
 * Palette mirrors the existing header/terminal chrome:
 *   surface      #161a24 / #1a1f2b     text        #d1d4dc
 *   border       rgba(255,255,255,.08) text-2nd     #787b86
 *   brand accent #2962ff
 */

/* Polaris' AppProvider tags <html> with p-theme-light, which sets
 * color-scheme:light — native scrollbars, date pickers and form controls then
 * render LIGHT inside our dark terminal. Force dark widgets everywhere. */
html, html.p-theme-light {
  color-scheme: dark;
}

:root {
  /* ---- Surfaces ---- */
  --p-color-bg: #000000;
  --p-color-bg-surface: #161a24;
  --p-color-bg-surface-hover: rgba(255, 255, 255, 0.06);
  --p-color-bg-surface-active: rgba(255, 255, 255, 0.10);
  --p-color-bg-surface-selected: rgba(41, 98, 255, 0.16);
  --p-color-bg-surface-secondary: #1a1f2b;
  --p-color-bg-surface-secondary-hover: rgba(255, 255, 255, 0.06);
  --p-color-bg-surface-secondary-active: rgba(255, 255, 255, 0.10);
  --p-color-bg-surface-tertiary: #20263200;
  --p-color-bg-surface-disabled: rgba(255, 255, 255, 0.02);

  --p-color-bg-fill: #161a24;
  --p-color-bg-fill-hover: rgba(255, 255, 255, 0.06);
  --p-color-bg-fill-active: rgba(255, 255, 255, 0.10);
  --p-color-bg-fill-secondary: #1a1f2b;
  --p-color-bg-fill-disabled: rgba(255, 255, 255, 0.04);

  /* ---- Brand / interactive ---- */
  --p-color-bg-fill-brand: #2962ff;
  --p-color-bg-fill-brand-hover: #1e53e0;
  --p-color-bg-fill-brand-active: #1848c9;
  --p-color-bg-fill-brand-selected: #1e53e0;
  --p-color-border-focus: #2962ff;

  /* ---- Text ---- */
  --p-color-text: #d1d4dc;
  --p-color-text-secondary: #b2b5be;
  --p-color-text-disabled: #5c6070;
  --p-color-text-brand: #4f83ff;
  --p-color-text-brand-hover: #6b97ff;
  --p-color-text-brand-on-bg-fill: #ffffff;
  --p-color-text-emphasis: #4f83ff;
  --p-color-text-inverse: #0f1116;

  /* ---- Icons ---- */
  --p-color-icon: #d1d4dc;
  --p-color-icon-secondary: #787b86;
  --p-color-icon-brand: #4f83ff;
  --p-color-icon-hover: #ffffff;

  /* ---- Borders ---- */
  --p-color-border: rgba(255, 255, 255, 0.08);
  --p-color-border-secondary: rgba(255, 255, 255, 0.06);
  --p-color-border-tertiary: rgba(255, 255, 255, 0.05);
  --p-color-border-hover: rgba(255, 255, 255, 0.14);
  --p-color-border-brand: #2962ff;

  /* ---- Overlays / shadows (darker, terminal-like) ---- */
  --p-color-bg-surface-brand: rgba(41, 98, 255, 0.12);
}

/* ==== Component-level fine tuning ==== */

/* Popover: rounded, glassy, deep shadow like the old custom panel. */
.Polaris-PositionedOverlay {
  /* Must outrank the fixed global header (z-index 9000 in main.js) and any
   * page-level fixed chrome so nav dropdowns never render underneath. */
  z-index: 9500 !important;
}
.Polaris-Popover {
  background: transparent;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}
.Polaris-Popover__Wrapper,
.Polaris-Popover__Content {
  background: #000;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}
/* Nav dropdowns must never scroll and must let their right-side sub-flyouts
 * escape the panel box. Polaris caps the popover pane height (inline style) and
 * wraps content in a Scrollable — override both so panels size to content and
 * overflow is visible. Scoped to popovers (Polaris is only used in the nav). */
.Polaris-Popover__Content,
.Polaris-Popover__Pane,
.Polaris-Popover .Polaris-Scrollable {
  max-height: none !important;
  overflow: visible !important;
}
.Polaris-Popover__Tip { display: none; }

/* ActionList spacing + hover to match terminal density. */
.Polaris-ActionList {
  padding: 4px;
}
.Polaris-ActionList__Section + .Polaris-ActionList__Section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  padding-top: 4px;
}
.Polaris-ActionList__Title {
  color: #787b86;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 10px;
  font-weight: 600;
  padding: 8px 12px 4px;
}
.Polaris-ActionList__Item {
  border-radius: 8px;
  min-height: 34px;
}
.Polaris-ActionList__Item:hover,
.Polaris-ActionList__Item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}
.Polaris-ActionList__Item .Polaris-Icon svg { color: #9aa0ad; }
.Polaris-ActionList__Item:hover .Polaris-Icon svg { color: #4f83ff; }

/* Custom scrollbars inside popovers. */
.Polaris-Popover__Content::-webkit-scrollbar,
.Polaris-Scrollable::-webkit-scrollbar { width: 6px; height: 6px; }
.Polaris-Popover__Content::-webkit-scrollbar-thumb,
.Polaris-Scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}
/* nav-menu.css — styling for the Polaris-based global nav island.
 * Polaris primitives (Popover, Box, Text, Badge, Icon) provide structure,
 * a11y and behaviour; these rules tune density + hover to the terminal look. */

.gnav-root {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

/* ---- Top-level nav buttons ---- */
.gnav-top {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;       /* TradingView nav = 16px / 500 */
  font-weight: 500;
  line-height: 24px;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.gnav-top:hover,
.gnav-item:hover > .gnav-top { color: #fff; background: rgba(255, 255, 255, 0.07); }
.gnav-item { position: relative; height: 100%; display: flex; align-items: center; }

/* ---- Top-level dropdown: pure-CSS hover panel, anchored below the button ---- */
.gnav-panel-wrap {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 11px;   /* transparent bridge from button (~y39) to below header (48) */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  z-index: 9500;
}
.gnav-item:hover > .gnav-panel-wrap,
.gnav-item:focus-within > .gnav-panel-wrap {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.gnav-panel {
  min-width: 288px;
  max-width: 340px;
  padding: 6px;
  color: #d1d4dc;
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
}
/* ---- Nested submenu: right-side flyout (never below, never scrolls) ---- */
.gnav-subwrap { position: relative; }
/* Filas de submenú sin icono (p. ej. lista de países): sin hueco de icono,
 * texto alineado a la izquierda como en la referencia. */
.gnav-subflyout .gnav-ico--blank { display: none; }
.gnav-subflyout .gnav-row-label { margin-left: 2px; }

/* Flyout de "Países": lista de países (columna) + preview de índices (columna).
 * Especificidad extra (.gnav-subwrap >) para ganar al `.gnav-subflyout {
 * max-width:300px }` base, que si no aplasta ambas columnas. */
.gnav-subwrap > .gnav-subflyout--countries {
  display: flex; gap: 8px; padding: 8px;
  width: auto; min-width: 0; max-width: none;
  background: #000; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.gnav-countrylist { display: flex; flex-direction: column; flex-shrink: 0; min-width: 190px; }
.gnav-idxmenu { display: flex; flex-direction: column; flex-shrink: 0; min-width: 230px; padding: 2px 8px 2px 2px; }
.gnav-country { font-size: 15px; padding: 9px 12px; border-radius: 8px; }
.gnav-country.is-active { background: rgba(255, 255, 255, 0.06); }
.gnav-cpreview {
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
  width: 272px; padding: 2px 2px 2px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  max-height: 460px; overflow-y: auto; scrollbar-width: none;
}
.gnav-cpreview::-webkit-scrollbar { display: none; }
.gnav-cpreview-card {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px;
  background: #000; border: 1px solid #2a2e39; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.gnav-cpreview-card:hover { background: #0c0c0c; border-color: #363a45; }
.gnav-cpreview-logo {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; aspect-ratio: 1/1;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 11px; letter-spacing: -0.3px;
}
.gnav-cpreview-body { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.gnav-cpreview-name { color: #f0f3fa; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gnav-cpreview-d { color: #ff9800; font-size: 9px; margin-left: 3px; vertical-align: super; }
.gnav-cpreview-vals { display: flex; align-items: baseline; gap: 5px; font-size: 13px; }
.gnav-cpreview-val { color: #dbdbdb; font-weight: 700; }
.gnav-cpreview-unit { color: #787b86; font-size: 10px; text-transform: uppercase; }
.gnav-cpreview-delta { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.gnav-cpreview-delta.is-up { color: #22ab94; }
.gnav-cpreview-delta.is-dn { color: #f23645; }
/* Tarjeta CTA final del preview (p. ej. "Analice todas las acciones"). */
.gnav-cpreview-cta { gap: 12px; }
.gnav-cpreview-cta-ico { background: #1e222d; color: #b2b5be; }
.gnav-cpreview-cta:hover .gnav-cpreview-cta-ico { color: #f0f3fa; }
.gnav-cpreview-cta-label { color: #f0f3fa; font-size: 13px; font-weight: 600; line-height: 1.3; }
.gnav-subflyout {
  position: absolute;
  top: -7px;            /* align with the parent panel padding */
  left: 100%;
  margin-left: 5px;
  min-width: 224px;
  max-width: 300px;
  padding: 6px;
  background: #000;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 130ms ease, transform 130ms ease, visibility 130ms ease;
  z-index: 5;
}
.gnav-subwrap:hover > .gnav-subflyout,
.gnav-subwrap:focus-within > .gnav-subflyout {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Hero card */
.gnav-hero {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  width: 100%;
  text-align: left;
  transition: background 120ms ease;
}
.gnav-hero:hover { background: rgba(41, 98, 255, 0.14); }
.gnav-hero:hover .gnav-hero-ico { color: #4f83ff; }
.gnav-hero-ico { width: 30px; height: 30px; color: #d1d4dc; flex-shrink: 0; transition: color 120ms ease; }
.gnav-hero-ico svg { width: 100%; height: 100%; display: block; }
.gnav-hero-text { display: flex; flex-direction: column; }
.gnav-hero-label { display: block; font-size: 14px; font-weight: 600; color: #fff; }
.gnav-hero-desc { display: block; font-size: 12px; color: #b2b5be; line-height: 1.35; margin-top: 2px; }

/* Section title */
.gnav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #787b86;
  font-weight: 600;
  padding: 10px 12px 4px;
}
.gnav-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 4px 6px; }

/* Item row */
.gnav-row {
  appearance: none;
  border: 0;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: #d1d4dc;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}
.gnav-row:hover, .gnav-row--open { background: rgba(255, 255, 255, 0.06); color: #fff; }
.gnav-row:hover .gnav-ico { color: #4f83ff; }
.gnav-ico { width: 20px; height: 20px; color: #9aa0ad; flex-shrink: 0; display: inline-flex; transition: color 120ms ease; }
.gnav-ico svg { width: 18px; height: 18px; display: block; margin: auto; }
.gnav-ico--blank { width: 20px; }
.gnav-row-label { flex: 1; }
.gnav-row-meta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  color: #4f83ff;
  background: rgba(41, 98, 255, 0.14);
  border-radius: 5px; padding: 2px 6px;
}
.gnav-row-arrow { color: #787b86; font-size: 15px; line-height: 1; }
.gnav-row:hover .gnav-row-arrow { color: #d1d4dc; }

/* Active row (e.g. "Principales brokers") — persistent subtle highlight */
.gnav-row--active { background: rgba(255, 255, 255, 0.08); color: #fff; }
.gnav-row--active .gnav-ico { color: #fff; }

/* ---- Platinum broker card (logo + name + star rating) ---- */
.gnav-broker {
  appearance: none;
  width: calc(100% - 8px);
  margin: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}
.gnav-broker:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); }
.gnav-broker-logo {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #1e1e1e;
}
.gnav-broker-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gnav-broker-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gnav-broker-name { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.2; }
.gnav-broker-rating { display: flex; align-items: center; gap: 6px; }
.gnav-broker-score { font-size: 13px; font-weight: 600; color: #d1d4dc; }

/* Star row */
.gnav-stars { display: inline-flex; align-items: center; gap: 1px; }
.gnav-star {
  width: 13px; height: 13px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.gnav-star--full  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5b301' d='M12 2l2.94 5.96 6.58.96-4.76 4.64 1.12 6.55L12 17.02l-5.88 3.09 1.12-6.55L2.48 8.92l6.58-.96z'/%3E%3C/svg%3E"); }
.gnav-star--empty { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234a4f5a' d='M12 2l2.94 5.96 6.58.96-4.76 4.64 1.12 6.55L12 17.02l-5.88 3.09 1.12-6.55L2.48 8.92l6.58-.96z'/%3E%3C/svg%3E"); }
.gnav-star--half  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='h'%3E%3Cstop offset='50%25' stop-color='%23f5b301'/%3E%3Cstop offset='50%25' stop-color='%234a4f5a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23h)' d='M12 2l2.94 5.96 6.58.96-4.76 4.64 1.12 6.55L12 17.02l-5.88 3.09 1.12-6.55L2.48 8.92l6.58-.96z'/%3E%3C/svg%3E"); }
/* Página /community — Figma 25:183747
   Prefijo .cm- para evitar colisiones con el resto del clon. */

.cm-root {
  --cm-black: #000000;
  --cm-bg: #000000;
  --cm-grey-29: #4a4a4a;
  --cm-grey-44: #707070;
  --cm-grey-55: #8c8c8c;
  --cm-grey-72: #b8b8b8;
  --cm-grey-86: #dbdbdb;
  --cm-grey-95: #f2f2f2;
  --cm-white: #ffffff;
  --cm-azure: #2962ff;
  --cm-cyan: #00bce6;
  --cm-magenta: #d500f9;
  --cm-glow: #7339fd;

  --cm-font-display: 'Inter', 'Trebuchet MS', system-ui, sans-serif;
  --cm-font-body:    'Roboto', 'Trebuchet MS', system-ui, sans-serif;

  background: var(--cm-black);
  color: var(--cm-white);
  font-family: var(--cm-font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.cm-root * { box-sizing: border-box; }

.cm-sec {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 200px 40px 0;
}

/* ---------- Tipografías comunes ---------- */
.cm-h2 {
  font-family: var(--cm-font-display);
  font-weight: 600;
  font-size: 100px;
  line-height: 100px;
  letter-spacing: -2px;
  color: var(--cm-white);
  margin: 0;
}
.cm-h2-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cm-h2 > span { display: block; }

/* ============================================================
   1. HERO
   ============================================================ */
.cm-hero {
  padding-top: 120px;
  text-align: center;
}
.cm-hero-title {
  font-family: var(--cm-font-display);
  font-weight: 600;
  font-size: 143px;
  line-height: 144px;
  letter-spacing: -2.88px;
  margin: 0 0 32px;
}
.cm-hero-line { display: block; }
.cm-hero-line-2 {
  background: linear-gradient(90deg, var(--cm-cyan) 0%, var(--cm-azure) 50%, var(--cm-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cm-hero-desc {
  font-size: 36px;
  line-height: 44px;
  color: var(--cm-grey-86);
  margin: 0 auto;
  max-width: 900px;
  font-weight: 400;
}
.cm-hero-media {
  position: relative;
  margin-top: 80px;
  height: 611px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  overflow: visible;
}
.cm-hero-stars {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 1.5px at 10% 30%, #fff 100%, transparent 0),
    radial-gradient(circle 1px   at 25% 70%, #fff 100%, transparent 0),
    radial-gradient(circle 2px   at 40% 20%, #00bce6 100%, transparent 0),
    radial-gradient(circle 1.5px at 60% 80%, #fff 100%, transparent 0),
    radial-gradient(circle 1px   at 75% 40%, #2962ff 100%, transparent 0),
    radial-gradient(circle 1.5px at 88% 60%, #fff 100%, transparent 0),
    radial-gradient(circle 1px   at 15% 50%, #d500f9 100%, transparent 0),
    radial-gradient(circle 1.5px at 50% 50%, #fff 100%, transparent 0),
    radial-gradient(ellipse 60% 40% at 50% 60%, rgba(115,57,253,0.18), transparent 70%);
  pointer-events: none;
  opacity: 0.7;
}
.cm-hero-panel {
  position: relative;
  background: #000;
  border: 1.6px solid var(--cm-cyan);
  overflow: hidden;
  align-self: end;
}
.cm-hero-panel-left {
  border-bottom: none;
  height: 546px;
  box-shadow: 0 3px 51px 0 #7339fd;
  border-right: 0;
  border-radius: 0 14px 0 0;
}
.cm-hero-panel-right {
  border-bottom: none;
  height: 513px;
  box-shadow: 0 3px 33px 0 #01bce6;
  border-left: 0;
  border-radius: 14px 0 0 0;
}
.cm-hero-mock {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0a0f1e, #050608);
  position: relative;
}
.cm-mock-toolbar {
  height: 36px;
  background: #0b0d11;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cm-mock-svg { display: block; width: 100%; height: calc(100% - 36px); }
.cm-hero-mock-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
.cm-hero-mock-feed { padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.cm-mock-post {
  display: flex; gap: 16px;
  background: rgba(255,255,255,0.04);
  padding: 16px;
  border-radius: 12px;
}
.cm-mock-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #2962ff, #00bce6);
  flex: none;
}
.cm-mock-avatar-2 { background: linear-gradient(135deg, #d500f9, #2962ff); }
.cm-mock-avatar-3 { background: linear-gradient(135deg, #ff9800, #d500f9); }
.cm-mock-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.cm-mock-line {
  height: 10px; background: rgba(255,255,255,0.15); border-radius: 4px;
}
.cm-mock-line-short { width: 60%; }

/* ============================================================
   2. UNLEASH
   ============================================================ */
.cm-unleash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 80px;
  max-width: 1480px;
}
.cm-card {
  background: var(--cm-black);
  border: 1px solid var(--cm-grey-29);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cm-card-thoughts { grid-column: 1 / -1; flex-direction: row; }
.cm-card-thoughts .cm-card-body { flex: 0 0 50%; }
.cm-card-thoughts .cm-card-media { flex: 1; }
.cm-card-body { padding: 56px; }
.cm-card-h3 {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 52px;
  line-height: 60px;
  color: var(--cm-white);
  margin: 0 0 16px;
}
.cm-card-icon {
  display: inline-flex;
  width: 28px; height: 28px;
  vertical-align: middle;
  margin-left: 8px;
  color: var(--cm-white);
}
.cm-card-icon svg { width: 100%; height: 100%; }
.cm-card-desc {
  font-size: 18px;
  line-height: 28px;
  color: var(--cm-grey-72);
  margin: 0 0 32px;
}
.cm-card-media {
  padding: 56px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-card-media-ideas {
  flex-direction: column;
  gap: 20px;
}
.cm-mini-post {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 16px;
  display: flex; gap: 12px;
}
.cm-mini-chart {
  width: 100%;
  height: 200px;
  background: #050608;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 12px;
}
.cm-mini-chart svg { width: 100%; height: 100%; }
.cm-mock-code {
  width: 100%;
  background: #050608;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 24px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  color: var(--cm-cyan);
  margin: 0;
  white-space: pre;
  overflow: hidden;
}
.cm-card-media-thoughts {
  flex-direction: column; align-items: flex-start; gap: 16px;
  padding-left: 0;
}
.cm-bubble {
  background: #1a1e21;
  color: var(--cm-grey-86);
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 16px;
  max-width: 80%;
}
.cm-bubble-1 { align-self: flex-start; }
.cm-bubble-2 { align-self: center;     background: linear-gradient(135deg, #2962ff, #00bce6); color: #fff; }
.cm-bubble-3 { align-self: flex-end;   }

/* Ilustraciones reales del Figma (25:180890 / 25:180909 / 25:180931).
 * aspect-ratio reserva la altura ANTES de que la imagen (lazy) cargue, de modo
 * que la sección no colapsa ni provoca layout-shift al hacer scroll. */
.cm-card-illustration {
  display: block;
  width: 100%;
  max-width: 550px;
  height: auto;
  aspect-ratio: 551 / 306;
  object-fit: contain;
}
.cm-card-illustration--thoughts {
  max-width: 567px;
  aspect-ratio: 568 / 300;
}

/* Secciones reemplazadas por render Figma 1:1 (universe/social/leap/pine/wizards/dollars/follow/keycta/promo) */
.cm-sec-img {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  display: block;
}
.cm-section-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.cm-sec-img.cm-promo .cm-section-img { max-width: 1360px; margin: 0 auto; }

/* Sub-illustration assets Figma (no texto, solo el dibujo) */
.cm-universe-galaxy {
  position: absolute;
  left: 50%;
  top: 200px;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1440px;
  height: auto;
  aspect-ratio: 1440 / 519;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}
.cm-social-chart {
  width: 100%;
  max-width: 620px;
  height: auto;
  aspect-ratio: 620 / 372;
  display: block;
  object-fit: contain;
}
.cm-leap-banner-img {
  display: block;
  width: 100%;
  max-width: 1360px;
  height: auto;
  aspect-ratio: 1361 / 437;
  margin: 0 auto;
}
.cm-pine-tree-img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  aspect-ratio: 1200 / 629;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.cm-follow-profile-img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  aspect-ratio: 1200 / 600;
  margin: 0 auto;
  border-radius: 12px;
}
/* (Los hearts/dollars se estilan en el bloque .cm-dollars más abajo — SVG
 * inline escalables, ver .cm-anim-icon / .cm-anim-icon-N.) */

/* ---------- Botón genérico ---------- */
.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cm-black);
  border: 1px solid var(--cm-grey-29);
  color: var(--cm-grey-86);
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  text-decoration: none;
  border-radius: 28px;
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.cm-btn:hover { background: #1a1a1a; border-color: var(--cm-grey-72); }
.cm-btn-big { font-size: 20px; padding: 24px 32px; border-radius: 40px; height: 80px; }
.cm-btn-primary {
  background: var(--cm-grey-95);
  color: var(--cm-bg);
  border-color: transparent;
}
.cm-btn-primary:hover { background: var(--cm-white); }

/* ============================================================
   3. UNIVERSE (16M)
   ============================================================ */
.cm-universe {
  text-align: center;
  overflow: visible;
}
.cm-universe-glow {
  position: absolute;
  left: 50%;
  top: 240px;
  transform: translateX(-50%);
  width: 1440px;
  height: 520px;
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(115,57,253,0.35), transparent 70%),
    radial-gradient(circle  20% 20% at 30% 40%, rgba(0,188,230,0.25), transparent 70%),
    radial-gradient(circle  20% 20% at 70% 60%, rgba(213,0,249,0.25), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.7;
  z-index: 0;
}
.cm-universe-h2, .cm-universe-count, .cm-universe-stats { position: relative; z-index: 1; }
.cm-universe-count {
  font-family: var(--cm-font-display);
  font-weight: 600;
  font-size: 144px;
  line-height: 144px;
  letter-spacing: -2.88px;
  text-align: center;
  margin-top: 80px;
  color: var(--cm-white);
}
.cm-universe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 120px;
  max-width: 1027px;
  margin: 80px auto 0;
  padding-top: 40px;
}
.cm-stat-item { text-align: center; }
.cm-stat-icon { width: 56px; height: 56px; margin: 0 auto 4px; }
.cm-stat-icon svg { width: 100%; height: 100%; }
.cm-stat-count {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  color: var(--cm-white);
}
.cm-stat-period {
  font-family: var(--cm-font-body);
  font-weight: 400;
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-55);
}

/* ============================================================
   4. SOCIAL FINANCE (slider)
   ============================================================ */
.cm-social {
  max-width: 1440px;
}
.cm-social-h2 { max-width: 1000px; margin: 0 auto; }
.cm-social-desc {
  text-align: center;
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  margin: 24px auto 0;
  max-width: 1000px;
}
.cm-social-card {
  display: grid;
  grid-template-columns: 540px 1fr;
  gap: 60px;
  margin-top: 80px;
  padding: 56px;
  background: #0a0a0a;
  border: 1px solid var(--cm-grey-29);
  border-radius: 24px;
  position: relative;
  min-height: 580px;
}
.cm-social-tabs { display: flex; flex-direction: column; gap: 32px; }
.cm-social-tab {
  border: none;
  background: transparent;
  text-align: left;
}
.cm-social-tab-title {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  color: var(--cm-grey-44);
  transition: color 0.2s;
}
.cm-social-tab-active .cm-social-tab-title { color: var(--cm-white); }
.cm-social-tab-sub {
  font-size: 18px;
  line-height: 28px;
  color: var(--cm-grey-72);
  margin: 16px 0 0;
  max-width: 540px;
}
.cm-social-media {
  background: #050608;
  border-radius: 16px;
  overflow: hidden;
  min-height: 400px;
}
.cm-social-media-inner { width: 100%; height: 100%; }
.cm-social-media-inner svg { display: block; width: 100%; height: 364px; }
.cm-social-controls {
  position: absolute;
  bottom: 32px;
  right: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-social-ctrl {
  width: 28px; height: 28px;
  border: 1px solid var(--cm-grey-29);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--cm-grey-86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cm-social-ctrl svg { width: 18px; height: 18px; }
.cm-social-counter {
  font-size: 14px;
  color: var(--cm-grey-72);
  font-weight: 700;
  min-width: 36px;
  text-align: center;
}
.cm-social-pause { margin-left: 16px; }

/* ============================================================
   5. THE LEAP
   ============================================================ */
.cm-leap { text-align: center; max-width: 1480px; }
.cm-leap-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  margin: 24px auto 0;
}
.cm-leap-btn-wrap { display: flex; justify-content: center; padding-top: 32px; }
.cm-leap-banner {
  margin-top: 48px;
  padding: 32px 0;
}
.cm-leap-banner svg { width: 100%; max-width: 1360px; height: auto; }
.cm-leap-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  text-align: left;
}
.cm-leap-feat {
  background: var(--cm-black);
  padding: 24px;
  border-top: 1px solid var(--cm-grey-29);
}
.cm-leap-feat-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.cm-leap-feat-icon svg { width: 100%; height: 100%; }
.cm-leap-feat-title {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--cm-grey-86);
  margin-bottom: 8px;
}
.cm-leap-feat-desc {
  font-size: 14px;
  color: var(--cm-grey-86);
  margin: 0;
}

/* ============================================================
   6. PINE
   ============================================================ */
.cm-pine { text-align: center; max-width: 1440px; }
.cm-pine-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  max-width: 1000px;
  margin: 24px auto 0;
}
.cm-pine-tree {
  position: relative;
  margin: 60px auto 0;
  width: 400px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-pine-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(34,197,94,0.18);
  width: 380px; height: 380px;
}
.cm-pine-orbit-2 { width: 300px; height: 300px; border-color: rgba(0,188,230,0.18); }
.cm-pine-orbit-3 { width: 220px; height: 220px; border-color: rgba(213,0,249,0.18); }
.cm-pine-svg { width: 280px; height: 280px; position: relative; z-index: 1; }
.cm-pine-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-top: 80px;
  text-align: left;
}
.cm-chev-card {
  background: var(--cm-black);
  padding: 24px 0;
}
.cm-chev-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.cm-chev-icon svg { width: 100%; height: 100%; }
.cm-chev-title {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: var(--cm-grey-86);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.cm-chev-title-link svg { width: 12px; height: 12px; }
.cm-chev-title > span { display: inline; margin-right: 4px; }
.cm-chev-title > span:last-of-type { margin-right: 0; }
.cm-chev-desc {
  font-size: 14px;
  color: var(--cm-grey-86);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   7. WIZARDS
   ============================================================ */
.cm-wizards { max-width: 1200px; text-align: center; }
.cm-wiz-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  max-width: 1000px;
  margin: 24px auto 0;
}
.cm-wiz-rows {
  position: relative;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.cm-wiz-row { overflow: hidden; }
.cm-wiz-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: cm-wiz-marquee 60s linear infinite;
}
.cm-wiz-row:nth-child(2) .cm-wiz-track { animation-direction: reverse; animation-duration: 75s; }
.cm-wiz-row:nth-child(3) .cm-wiz-track { animation-duration: 50s; }
@keyframes cm-wiz-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.cm-wiz {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #131313;
  border: 1px solid var(--cm-grey-29);
  border-radius: 100px;
  padding: 8px 16px 8px 8px;
  flex: none;
}
.cm-wiz-avatar {
  width: 81.6px; height: 81.6px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  flex: none;
}
.cm-wiz-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cm-wiz-text { text-align: left; min-width: 92px; display: flex; flex-direction: column; gap: 8px; }
.cm-wiz-name {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--cm-white);
  line-height: 28px;
  height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-wiz-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(34,171,103,0.2);
  width: fit-content;
}
.cm-wiz-wand { width: 20px; height: 20px; display: block; }
.cm-wiz-badge-text {
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  color: #22d755;
}
.cm-wiz {
  /* sobre-escribe el padding por defecto para coincidir con el Figma */
  padding: 24.8px 69.15px 24.8px 24.8px;
  background: linear-gradient(180deg, #0d0e10 0%, #060606 100%);
  border: 1px solid #22d755;
  gap: 16px;
}
.cm-wiz-empty .cm-wiz-name,
.cm-wiz-empty .cm-wiz-badge-text { visibility: hidden; }
.cm-wiz-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 2;
}
.cm-wiz-fade-left  { left: 0;  background: linear-gradient(90deg, var(--cm-black), transparent); }
.cm-wiz-fade-right { right: 0; background: linear-gradient(-90deg, var(--cm-black), transparent); }

/* ============================================================
   8. +$13M
   ============================================================ */
.cm-dollars {
  text-align: center;
  overflow: hidden;
  padding-bottom: 120px;
}
.cm-dollars-side {
  position: absolute;
  top: 50%;
  width: 320px;
  height: 600px;
  transform: translateY(-50%);
  pointer-events: none;
}
.cm-dollars-side-left  { left: 0; }
.cm-dollars-side-right { right: 0; }
.cm-anim-icon {
  position: absolute;
  width: 64px; height: 64px;
  animation: cm-float 5s ease-in-out infinite;
}
.cm-anim-icon svg { display: block; width: 100%; height: 100%; }
.cm-anim-icon-1 { top: 10%; left: 20%; animation-delay: 0s;   }
.cm-anim-icon-2 { top: 30%; left: 60%; animation-delay: 0.6s; width: 48px; height: 48px; }
.cm-anim-icon-3 { top: 50%; left: 10%; animation-delay: 1.2s; }
.cm-anim-icon-4 { top: 65%; left: 50%; animation-delay: 1.8s; width: 56px; height: 56px; }
.cm-anim-icon-5 { top: 80%; left: 25%; animation-delay: 2.4s; width: 40px; height: 40px; }
.cm-anim-icon-6 { top: 20%; left: 75%; animation-delay: 3.0s; width: 52px; height: 52px; }
@keyframes cm-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-20px); }
}
.cm-dollars-h2 { max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; }
.cm-dollars-price {
  font-family: var(--cm-font-display);
  font-weight: 600;
  font-size: 200px;
  line-height: 200px;
  letter-spacing: -4px;
  background: linear-gradient(180deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 40px 0 16px;
  position: relative; z-index: 1;
}
.cm-dollars-sub {
  font-size: 24px;
  line-height: 36px;
  color: var(--cm-grey-86);
  max-width: 800px;
  margin: 0 auto 40px;
  position: relative; z-index: 1;
}
.cm-dollars-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* ============================================================
   9. FOLLOW US
   ============================================================ */
.cm-follow { text-align: center; max-width: 1440px; }
.cm-follow-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  max-width: 900px;
  margin: 24px auto 0;
}
.cm-follow-btn-wrap { display: flex; justify-content: center; padding-top: 32px; }
.cm-follow-profile {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}
.cm-follow-card {
  width: 100%;
  max-width: 600px;
  background: #0a0a0a;
  border: 1px solid var(--cm-grey-29);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
}
.cm-follow-card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.cm-follow-card-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #2962ff, #00bce6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
}
.cm-follow-card-meta { flex: 1; }
.cm-follow-card-name {
  font-weight: 700; color: var(--cm-white); font-size: 16px;
}
.cm-follow-card-check { color: var(--cm-cyan); margin-left: 4px; }
.cm-follow-card-handle { color: var(--cm-grey-55); font-size: 14px; }
.cm-follow-card-btn {
  background: var(--cm-white);
  color: #000;
  border: none;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
}
.cm-follow-card-text {
  color: var(--cm-grey-86);
  font-size: 15px;
  line-height: 22px;
  margin: 0 0 16px;
}
.cm-follow-card-img {
  background: #050608;
  border-radius: 12px;
  padding: 24px;
}
.cm-follow-card-img svg { width: 100%; height: 160px; display: block; }

/* ============================================================
   10. WALL OF LOVE
   ============================================================ */
.cm-wall { text-align: center; max-width: 100%; }
.cm-wall-h2 { max-width: 1000px; margin: 0 auto; }
.cm-wall-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  margin: 24px auto 0;
}
.cm-wall-strip {
  margin-top: 60px;
  position: relative;
}
.cm-wall-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 40px;
  scrollbar-width: none;
}
.cm-wall-track::-webkit-scrollbar { display: none; }
.cm-wall-card {
  flex: none;
  width: 300px;
  text-decoration: none;
  color: inherit;
}
.cm-wall-img {
  width: 301.6px; height: 301.6px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cm-grey-29);
  background: #0a0a0a;
}
.cm-wall-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.cm-wall-card { width: 316px; padding: 8px; border-radius: 16px; }
.cm-wall-handle {
  font-size: 15.8px;
  line-height: 24px;
  color: var(--cm-grey-55);
  margin-top: 8px;
  text-align: left;
  padding-left: 4px;
}
.cm-wall-scroll {
  position: absolute;
  right: 24px;
  top: 130px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--cm-grey-29);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.cm-wall-scroll svg { width: 24px; height: 24px; }

/* ============================================================
   11. KEY CTA
   ============================================================ */
.cm-keycta {
  text-align: center;
  max-width: 1440px;
  padding-bottom: 80px;
  position: relative;
}
.cm-keycta-h2 { max-width: 1100px; margin: 0 auto; }
.cm-keycta-desc {
  font-size: 28px;
  line-height: 40px;
  color: var(--cm-grey-86);
  margin: 24px auto 0;
  max-width: 1000px;
}
.cm-keycta-btn-wrap { display: flex; justify-content: center; padding-top: 32px; }
.cm-keycta-btn {
  display: inline-block;
  padding: 24px 60px 24px 32px;
  background: var(--cm-grey-95);
  color: var(--cm-bg);
  text-decoration: none;
  font-family: var(--cm-font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 24px;
  border-radius: 18px;
  /* Skew effect (de Figma: -skew-x-23 sobre el ::after) */
  clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
  transition: background 0.2s;
}
.cm-keycta-btn:hover { background: var(--cm-white); }
.cm-keycta-astronaut {
  position: absolute;
  right: 80px;
  top: 60px;
  width: 220px;
  height: 220px;
  pointer-events: none;
}
.cm-keycta-astronaut svg { width: 100%; height: 100%; }

/* ============================================================
   12. PROMO LINKS FOOTER MINI
   ============================================================ */
.cm-promo {
  max-width: 1360px;
  padding: 120px 40px 40px;
  border-top: 1px solid var(--cm-grey-29);
  margin-top: 60px;
}
.cm-promo-disclaimer {
  font-size: 12px;
  color: var(--cm-grey-55);
  text-align: center;
  margin: 0 auto 32px;
  max-width: 900px;
}
.cm-promo-disclaimer a { color: var(--cm-grey-86); }
.cm-promo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  font-size: 14px;
}
.cm-promo-links strong {
  color: var(--cm-grey-86);
  font-weight: 700;
  width: 100%;
  text-align: center;
  margin-top: 16px;
}
.cm-promo-links a {
  color: var(--cm-grey-55);
  text-decoration: none;
}
.cm-promo-links a:hover { color: var(--cm-grey-86); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .cm-hero-title { font-size: 96px; line-height: 100px; }
  .cm-h2 { font-size: 72px; line-height: 80px; }
  .cm-universe-count { font-size: 96px; line-height: 100px; }
  .cm-dollars-price { font-size: 140px; line-height: 140px; }
  .cm-social-card { grid-template-columns: 1fr; }
  .cm-pine-cards { grid-template-columns: repeat(2, 1fr); }
  .cm-leap-features { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .cm-sec { padding: 120px 20px 0; }
  .cm-hero-title { font-size: 64px; line-height: 70px; }
  .cm-h2 { font-size: 48px; line-height: 52px; }
  .cm-hero-media { grid-template-columns: 1fr; height: auto; gap: 24px; }
  .cm-hero-panel { height: 380px; border-radius: 14px; border: 1.6px solid var(--cm-cyan); }
  .cm-unleash-grid, .cm-universe-stats, .cm-pine-cards { grid-template-columns: 1fr; gap: 24px; }
  .cm-card-thoughts { flex-direction: column; }
  .cm-universe-count { font-size: 64px; line-height: 64px; }
  .cm-dollars-price { font-size: 100px; line-height: 100px; }
  .cm-keycta-astronaut { display: none; }
}
/* /markets — Agent B1 y B2 escriben aquí. Para evitar colisión:
   - Agent B1 → prefijo .mkt- (markets top)
   - Agent B2 → prefijo .mkb- (markets bottom)
*/

/* =====================================================================
   Agent B2 — markets bottom (Forex, Bonos, Bonos corp., ETFs, Economía)
   ===================================================================== */
/* Margen simétrico de ~40px real. El rail global (45px, fijo a la derecha) se
 * reserva UNA sola vez: cancelamos el padding-right genérico de .mk-page y lo
 * aplicamos nosotros como padding-right en las secciones. 70px ≈ 45 (rail) + 40
 * (margen) − 15 (scrollbar), de modo que el contenido deja ~40px de hueco al
 * rail (igual que los 40px de la izquierda) y nunca queda por debajo del rail. */
body.has-global-rightbar .mk-page { padding-right: 0 !important; }
#mk-figma > .mkt-figma-root,
#mk-top > .mkt-page,
#mk-bottom > .mkb-root { padding-right: 70px; }

.mkb-root {
  font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif;
  color: #dbdbdb;
  background: #000000;
  padding: 0 40px 80px;
  font-size: 13px;
}

/* ---- Sub-navegación por secciones (píldora flotante al hacer scroll) ---- */
.mkt-subnav {
  position: fixed;
  left: 0; right: 45px;
  z-index: 8000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .18s ease, transform .18s ease;
}
.mkt-subnav.is-visible { opacity: 1; transform: none; }
.mkt-subnav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: calc(100% - 96px);
  max-width: 1180px;
  padding: 7px 12px;
  /* Glass estilo Apple: desenfoque fuerte + capa translúcida clara con brillo
   * superior (borde luminoso) y saturación alta sobre el contenido de detrás. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.02) 100%),
    rgba(22, 24, 34, 0.28);
  -webkit-backdrop-filter: blur(44px) saturate(200%) brightness(1.06);
  backdrop-filter: blur(44px) saturate(200%) brightness(1.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.6),
    0 2px 10px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 -12px 30px rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}
.mkt-subnav-pill::-webkit-scrollbar { display: none; }
.mkt-subnav.is-visible .mkt-subnav-pill { pointer-events: auto; }
.mkt-subnav-tab {
  flex: 0 1 auto;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: 'Trebuchet MS', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, box-shadow .14s ease;
}
.mkt-subnav-tab:hover { background: rgba(255, 255, 255, 0.10); }
.mkt-subnav-tab.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.mkb-root *, .mkb-root *::before, .mkb-root *::after { box-sizing: border-box; }
.mkb-root button { font-family: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.mkb-root a { color: #2962ff; text-decoration: none; }
.mkb-root svg { display: block; }

.mkb-section {
  padding: 24px 0 32px;
  border-top: 1px solid transparent;
}
.mkb-section + .mkb-section { margin-top: 8px; }

/* ---- Section headers ---- */
.mkb-secHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0 12px;
}
.mkb-secTitle {
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  color: #dbdbdb;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mkb-secChev { color: #5d5d5d; display: inline-flex; }
.mkb-secSub { font-size: 13px; color: #b8b8b8; }
.mkb-subTitle {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  color: #f0f3fa;
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- Quote cards row ---- */
.mkb-cardRow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 12px 0 16px;
}
.mkb-quoteCard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  background: transparent;
  min-height: 64px;
}
.mkb-quoteCard.is-sel {
  background: rgba(255,255,255,.06);
  border-color: #2a2e39;
}
.mkb-flag { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.mkb-qcBody { flex: 1; min-width: 0; }
.mkb-qcLabel { font-size: 13px; color: #dbdbdb; font-weight: 600; }
.mkb-qcPrice { font-size: 13px; color: #b8b8b8; margin-top: 2px; }
.mkb-qcUnit { color: #787b86; font-size: 11px; text-transform: uppercase; margin-right: 4px; }
.mkb-pos { color: #22ab94; font-weight: 500; font-variant-numeric: tabular-nums; }
.mkb-neg { color: #f23645; font-weight: 500; font-variant-numeric: tabular-nums; }
.mkb-cardNext {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2a2e39;
  color: #dbdbdb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ---- Letter icon ---- */
.mkb-licon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Big chart wrapper ---- */
.mkb-chartWrap {
  background: #000000;
  border-bottom: 1px solid #1e222d;
  margin-top: 8px;
  height: 320px;
}
.mkb-yieldChart { background: #000000; min-height: 360px; }
/* Contenedor del gráfico real de lightweight-charts en la mitad inferior. */
.mkb-lwc { width: 100%; height: 100%; position: relative; }
.mkb-chartCtl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 24px;
}
.mkb-tfRow { display: flex; gap: 4px; }
.mkb-tf {
  height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  color: #b8b8b8;
  font-size: 12px;
  font-weight: 600;
}
.mkb-tf:hover { background: #1e222d; color: #dbdbdb; }
.mkb-tf.is-on { background: #1e222d; color: #f0f3fa; }
.mkb-chartTools { display: flex; gap: 4px; }
.mkb-iconBtn {
  width: 28px; height: 28px;
  border-radius: 4px;
  color: #787b86;
  display: inline-flex; align-items: center; justify-content: center;
}
.mkb-iconBtn:hover { background: #1e222d; color: #dbdbdb; }
.mkb-iconBtn.is-on { background: #1e222d; color: #dbdbdb; }

/* ---- Two-column table grid ---- */
.mkb-twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}
.mkb-tableHead {
  display: grid;
  grid-template-columns: 28px 1fr 110px 90px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #2a2e39;
  font-size: 10px;
  color: #787b86;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.mkb-tableHead span:nth-child(1) { grid-column: 1 / span 2; }
.mkb-tableHead span:nth-child(2) { text-align: right; }
.mkb-tableHead span:nth-child(3) { text-align: right; }
.mkb-rowList { display: flex; flex-direction: column; }

.mkb-qRow, .mkb-bRow, .mkb-cRow, .mkb-eRow {
  display: grid;
  grid-template-columns: 28px 1fr 110px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #1e222d;
  font-size: 13px;
}
.mkb-bRow, .mkb-cRow {
  grid-template-columns: 28px 1fr 90px 90px 90px;
}
.mkb-eRow4 {
  grid-template-columns: 28px 1fr 90px 80px 110px;
}
.mkb-qRowName { min-width: 0; display: flex; align-items: center; gap: 8px; }
.mkb-qRowTitle {
  color: #dbdbdb;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mkb-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  background: #1e222d;
  color: #b8b8b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.mkb-qRowPrice, .mkb-cVal, .mkb-bYield { text-align: right; color: #dbdbdb; font-size: 13px; }
.mkb-qRowChg { text-align: right; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mkb-unit { color: #787b86; font-size: 10px; text-transform: uppercase; margin-left: 4px; }
.mkb-bYield { color: #f0f3fa; font-weight: 600; }

.mkb-viewAll {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #2962ff;
}
.mkb-viewAll span { display: inline-flex; }

/* ---- Bond yield chart box ---- */
.mkb-yieldBox {
  background: transparent;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  margin-top: 8px;
}
.mkb-yieldHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 8px;
}
.mkb-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #2a2e39;
  border-radius: 4px;
  color: #787b86;
  font-size: 12px;
  min-width: 200px;
}
.mkb-yieldLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 12px 0 0;
}
.mkb-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #b8b8b8;
}
.mkb-legend i {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ---- Corp card ---- */
.mkb-corpCard {
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 10px;
  background: transparent;
  min-height: 124px;
}
.mkb-corpCard.is-sel { background: rgba(255,255,255,.06); }
.mkb-ccBody { flex: 1; min-width: 0; font-size: 11px; }
.mkb-ccTitle { color: #f0f3fa; font-weight: 700; font-size: 12px; }
.mkb-ccDesc {
  color: #b8b8b8;
  margin: 4px 0 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mkb-ccMeta {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 11px;
}
.mkb-ccMeta span:first-child { color: #787b86; }
.mkb-ccMeta span:last-child { color: #dbdbdb; }

/* ---- Trend row (ETF community) ---- */
.mkb-trendRow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.mkb-trendCard {
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.mkb-tcBody { font-size: 11px; flex: 1; min-width: 0; }
.mkb-tcName {
  color: #dbdbdb;
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mkb-tcPrice { color: #b8b8b8; margin-top: 4px; }
.mkb-tcChg { font-weight: 700; margin-top: 2px; }

/* ---- Heatmap ---- */
.mkb-heatmap {
  border: 1px solid #1e222d;
  overflow: auto;
}
.mkb-heatmap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.mkb-heatmap th, .mkb-heatmap td {
  padding: 8px 10px;
  text-align: right;
  border: 1px solid #1e222d;
  white-space: nowrap;
}
.mkb-heatmap th {
  background: #000000;
  color: #b8b8b8;
  font-weight: 600;
  font-size: 11px;
}
.mkb-heatmap th:first-child, .mkb-heatmap td:first-child { text-align: left; }
.mkb-hmCountry {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbdbdb;
  font-weight: 600;
}
.mkb-hmCountry .mkb-flag { width: 18px; height: 18px; }
.mkb-hmCell { color: #dbdbdb; background: #1a1a1a; }
.mkb-hmRed    { background: #5d2218; color: #f0f3fa; }
.mkb-hmOrange { background: #6b3a0e; color: #f0f3fa; }
.mkb-hmTeal   { background: #0d4a44; color: #f0f3fa; }

/* ---- World inflation map (choropleth SVG interactivo) ---- */
.mkb-worldMap {
  background: #000;
  border: 1px solid #1e222d;
  padding: 16px;
}
.mkb-inflMap { position: relative; width: 100%; background: #000; }
.mkb-inflMap svg { width: 100%; height: auto; display: block; }
.mkb-inflMap svg path[data-iso] { fill: #17130d; stroke: #000; stroke-width: .4; transition: stroke .12s; }
.mkb-inflMap svg path.has-data { cursor: pointer; }
.mkb-inflMap svg path.has-data:hover { stroke: #f0f3fa; stroke-width: 1; }
.mkb-inflLoading { padding: 80px 0; text-align: center; color: #787b86; }
.mkb-inflTip {
  position: absolute; z-index: 5; display: none; pointer-events: none;
  background: #1c2030; border: 1px solid #363a45; border-radius: 6px;
  padding: 5px 9px; font-size: 12px; color: #f0f3fa; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.mkb-inflLegend {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  position: relative; max-width: 520px; margin: 14px auto 2px;
  font-size: 11px; color: #b8b8b8; padding-top: 16px;
}
.mkb-inflRamp { order: 3; flex: 1 1 100%; height: 10px; border-radius: 3px; }
.mkb-inflLegendLabel { position: absolute; top: 0; transform: translateX(-50%); }
.mkb-inflLegendLabel:first-child { left: 0; transform: none; }
.mkb-inflLegend7 { left: 28%; }
.mkb-inflLegend25 { left: auto; right: 0; transform: none; }
.mkb-worldLegend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: #b8b8b8;
}
.mkb-worldBar {
  flex: 1;
  height: 8px;
  background: linear-gradient(to right, #3a1f0a, #c46a1d, #ffce5c);
  border-radius: 2px;
}

/* ---- Event cards (calendar) ---- */
.mkb-eventRow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.mkb-eventCard {
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 10px;
}
.mkb-evBody { flex: 1; min-width: 0; }
.mkb-evTime {
  font-size: 12px;
  color: #ef5350;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mkb-evDot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ef5350;
}
.mkb-evName {
  color: #dbdbdb;
  font-weight: 600;
  font-size: 12px;
  margin: 6px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mkb-evMeta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: 11px;
  color: #dbdbdb;
}
.mkb-evMetaLabel { color: #787b86; font-size: 10px; }

/* Responsive small */
@media (max-width: 980px) {
  .mkb-twoCol { grid-template-columns: 1fr; }
  .mkb-cardRow, .mkb-eventRow, .mkb-trendRow { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   Agent B1 — markets top (Índices, Acciones ES/Mundiales, Cripto,
   Futuros, Forex). Prefijo .mkt-
   ===================================================================== */
.mkt-page {
  font-family: 'Trebuchet MS', Tahoma, sans-serif;
  background: #000000;
  color: #dbdbdb;
  padding: 0 40px 40px;
  box-sizing: border-box;
  width: 100%;
}
.mkt-page *, .mkt-page *::before, .mkt-page *::after { box-sizing: border-box; }

.mkt-page-title { padding: 32px 0 32px; }
.mkt-page-title h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.1;
  font-family: 'Trebuchet MS', Tahoma, sans-serif;
}
.mkt-page-title-btn {
  font: inherit; color: inherit; background: transparent; border: none; padding: 0;
  margin: 0; cursor: pointer; display: inline-flex; align-items: center;
  border-radius: 8px; transition: opacity .12s;
}
.mkt-page-title-btn:hover { opacity: .82; }
.mkt-page-title-chev { color: #8c8c8c; font-weight: 400; margin-left: 8px; transition: transform .15s; display: inline-block; }
.mkt-page-title-btn:hover .mkt-page-title-chev { transform: translateX(3px); color: #b8b8b8; }

.mkt-sections { display: flex; flex-direction: column; gap: 16px; }

.mkt-sec { display: flex; flex-direction: column; gap: 24px; padding-bottom: 16px; }
.mkt-sec-header { padding: 12px 0; }
.mkt-sec-title {
  color: #dbdbdb;
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mkt-sec-title:hover { color: #ddd; }
.mkt-chev { color: #8c8c8c; font-weight: 400; margin-left: 4px; }

.mkt-sub-block { display: flex; flex-direction: column; gap: 12px; }
.mkt-sub-header { padding: 4px 0 0; }
.mkt-sub-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mkt-chart-block {
  background: transparent;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.mkt-tcards-row {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.mkt-tcards-row--sparse .mkt-allfut-btn { margin-left: auto; }

.mkt-tcard {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 32px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}
.mkt-tcard--selected {
  background: #1e222d;
  border-color: #2a2e39;
}
.mkt-tcard-row { display: flex; align-items: center; gap: 10px; }
.mkt-tcard-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mkt-tcard-sym {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-tcard-sym sup { color: #ff9800; font-size: 9px; margin-left: 2px; }
.mkt-tcard-name {
  font-size: 11px;
  color: #8c8c8c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-tcard-spark { width: 60px; height: 20px; flex-shrink: 0; }
.mkt-spark { width: 100%; height: 100%; }
.mkt-tcard-vals {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
  font-size: 13px;
}
.mkt-tcard-val { color: #ffffff; font-weight: 700; }
.mkt-tcard-unit { color: #8c8c8c; font-size: 10px; text-transform: uppercase; }

.mkt-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.mkt-pct { font-size: 14px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mkt-up { color: #22ab94; }
.mkt-dn { color: #f23645; }

.mkt-chart-area {
  position: relative;
  height: 320px;
  border-top: 1px solid #2a2e39;
  display: flex;
}
.mkt-bigchart { flex: 1; height: 100%; display: block; }
/* Contenedor del gráfico real de lightweight-charts (ocupa todo el área). */
.mkt-lwc { flex: 1; min-width: 0; height: 100%; position: relative; }
.mkt-chart-axis {
  width: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 8px 8px 4px;
  font-size: 11px;
  color: #8c8c8c;
  flex-shrink: 0;
}
.mkt-axis-tick { line-height: 1; padding: 2px 4px; }
.mkt-axis-tick--hl {
  background: #2962ff;
  color: #fff;
  border-radius: 2px;
  font-weight: 700;
}

.mkt-chart-xaxis {
  display: flex;
  justify-content: space-between;
  padding: 6px 90px 6px 16px;
  font-size: 11px;
  color: #8c8c8c;
  border-top: 1px solid #2a2e39;
}

.mkt-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #2a2e39;
}
.mkt-ranges { display: flex; gap: 4px; }
.mkt-range {
  background: transparent;
  color: #8c8c8c;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.mkt-range:hover { background: #1e222d; color: #ddd; }
.mkt-range--on { background: #1e222d; color: #ffffff; }
.mkt-chart-actions { display: flex; gap: 4px; }
.mkt-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #8c8c8c;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mkt-icon-btn:hover { background: #1e222d; color: #ddd; }
.mkt-icon-btn--on { background: #1e222d; color: #ffffff; border-color: #2a2e39; }

.mkt-scrollbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e222d;
  border: 1px solid #2a2e39;
  color: #dbdbdb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mkt-scrollbtn:hover { background: #2a2e39; }

.mkt-wcards-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  overflow: hidden;
}
.mkt-wcard {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mkt-wcard-head { display: flex; align-items: center; gap: 10px; }
.mkt-wcard-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.mkt-wcard-meta { display: flex; flex-direction: column; min-width: 0; }
.mkt-wcard-sym { font-size: 13px; font-weight: 700; color: #ffffff; }
.mkt-wcard-sym sup { color: #ff9800; font-size: 9px; margin-left: 2px; }
.mkt-wcard-name {
  font-size: 11px;
  color: #8c8c8c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-wcard-vals { display: flex; flex-direction: column; gap: 4px; }
.mkt-wcard-val { font-size: 18px; font-weight: 700; color: #ffffff; }
.mkt-wcard-unit { font-size: 10px; color: #8c8c8c; margin-left: 4px; text-transform: uppercase; font-weight: 500; }

.mkt-trend-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  overflow: hidden;
}
.mkt-trend-cell {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mkt-trend-head { display: flex; align-items: center; gap: 8px; }
.mkt-trend-name {
  font-size: 12px;
  color: #dbdbdb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.mkt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.mkt-table-block { display: flex; flex-direction: column; gap: 12px; }

.mkt-list { display: flex; flex-direction: column; }
.mkt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid #2a2e39;
  gap: 12px;
}
.mkt-row:last-child { border-bottom: none; }
.mkt-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.mkt-row-meta { display: flex; flex-direction: column; min-width: 0; }
.mkt-row-sym {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-row-name { font-size: 11px; color: #8c8c8c; }
.mkt-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.mkt-row-val { color: #dbdbdb; font-size: 13px; font-weight: 600; }
.mkt-row-pct {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  min-width: 56px;
  font-variant-numeric: tabular-nums;
}
.mkt-row-pct.mkt-up { color: #22ab94; }
.mkt-row-pct.mkt-dn { color: #f23645; }

.mkt-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.mkt-2col .mkt-row { padding: 8px 4px; }

.mkt-more-link {
  color: #2962ff;
  font-size: 12px;
  text-decoration: none;
  margin-top: 4px;
  align-self: flex-start;
}
.mkt-more-link:hover { text-decoration: underline; }

.mkt-events-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  overflow: hidden;
}
.mkt-event-card {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mkt-event-head { display: flex; align-items: center; gap: 8px; }
.mkt-event-sym {
  font-size: 12px;
  color: #dbdbdb;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkt-event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8c8c8c;
}

.mkt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  gap: 12px;
  color: #4a4a4a;
}
.mkt-empty-text { font-size: 13px; color: #8c8c8c; }

.mkt-allfut-btn {
  background: #1a1a1a;
  border: 1px solid #2a2e39;
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
}
.mkt-allfut-btn:hover { background: #1e222d; }

@media (max-width: 980px) {
  .mkt-grid-2 { grid-template-columns: 1fr; }
}


/* --- Clicables (auditoría MERCADOS): cursor + hover en elementos con símbolo --- */
.mkt-page [data-symbol],
.mkb-root [data-symbol] { cursor: pointer; }
.mkt-tcard[data-symbol]:hover,
.mkt-wcard[data-symbol]:hover,
.mkt-trend-cell[data-symbol]:hover,
.mkb-quoteCard[data-symbol]:hover,
.mkb-trendCard[data-symbol]:hover { filter: brightness(1.15); }
.mkt-row[data-symbol]:hover,
.mkb-qRow[data-symbol]:hover,
.mkb-bRow[data-symbol]:hover,
.mkb-cRow[data-symbol]:hover,
.mkb-eRow[data-symbol]:hover { background: rgba(255,255,255,0.04); }
.mkt-figma-root .mkt-table tbody tr[data-symbol] { cursor: pointer; }
/* /markets/world/spain — Agent C. Prefijo .es- (España) para evitar colisiones. */

.es-root {
  font-family: "Trebuchet MS", -apple-system, BlinkMacSystemFont, Roboto, Ubuntu, sans-serif;
  color: #dbdbdb;
  background: #000000;
  padding: 0 40px 80px;
  font-size: 13px;
  line-height: 1.4;
}
/* Ancho completo con margen simétrico de ~40px: el rail global (45px) lo
 * reserva la regla genérica de #app > div; lo sustituimos por 70px a la
 * derecha (45 rail + 40 margen − 15 scrollbar) para no doblar la reserva. */
body.has-global-rightbar #app > .es-root { padding-right: 70px !important; }
.es-root *, .es-root *::before, .es-root *::after { box-sizing: border-box; }
.es-root button { font-family: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.es-root a { color: inherit; text-decoration: none; }
.es-root svg { display: block; }
.es-root table { border-collapse: separate; border-spacing: 0; width: 100%; }
.es-root h1, .es-root h2, .es-root h3, .es-root p { margin: 0; }

/* ====== Header ====== */
.es-pageHead { padding: 32px 0 40px; }
.es-crumbs { font-size: 13px; color: #8c8c8c; margin-bottom: 28px; }
.es-crumbs a { color: #8c8c8c; }
.es-crumbs span { padding: 0 6px; }
.es-crumbs .es-crumbCur { color: #b8b8b8; padding: 0; }
.es-titleWrap { display: flex; justify-content: center; }
.es-title {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: inherit;
  font-size: 44px; line-height: 1; font-weight: 700; color: #f0f3fa;
  background: transparent; border: none; padding: 8px 12px; margin: 0;
  border-radius: 14px; cursor: pointer; transition: background .12s;
}
.es-title:hover { background: rgba(255, 255, 255, 0.05); }
.es-titleFlag {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%;
  object-fit: cover; display: block;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.es-flagLg { font-size: 40px; line-height: 1; }
.es-titleArr { font-size: 24px; color: #8c8c8c; margin-left: 4px; }
.es-title:hover .es-titleArr { color: #dbdbdb; }

/* ====== Sections ====== */
.es-section { padding: 32px 0 32px; }
.es-section + .es-section { border-top: 1px solid #1f1f1f; }
.es-secHead { margin: 0 0 18px; }
.es-secTitle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 28px; line-height: 36px; font-weight: 600; color: #dbdbdb;
}
.es-secTitleMulti { line-height: 36px; }
.es-chev { color: #8c8c8c; font-weight: 400; font-size: 24px; }
.es-subHead { margin: 24px 0 12px; }
.es-subTitle { font-size: 18px; font-weight: 700; color: #b8b8b8; display: inline-flex; align-items: center; gap: 6px; }
.es-subTitle .es-chev { font-size: 18px; }

.es-link { display: inline-flex; align-items: center; gap: 4px; color: #2962ff; font-size: 13px; margin-top: 12px; font-weight: 500; }

/* ====== Delta / pill ====== */
.es-delta { font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.es-pos { color: #22ab94; }
.es-neg { color: #f23645; }
.es-flat { color: #8c8c8c; }
/* Cambio % → texto plano coloreado, sin caja (spec TradingView) */
.es-pill { padding: 0; border-radius: 0; font-weight: 500; font-size: 14px; min-width: 70px; text-align: right; background: none !important; font-variant-numeric: tabular-nums; }
.es-pillPos { color: #22ab94; }
.es-pillNeg { color: #f23645; }
.es-unit { color: #8c8c8c; font-size: 11px; text-transform: uppercase; font-weight: 400; letter-spacing: 0.4px; }
.es-D { color: #ff9800; font-size: 9px; font-weight: 700; margin-left: 1px; vertical-align: super; }

/* ====== Icons ====== */
.es-iconCircle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  background: #1f1f1f; color: #fff;
}
.es-flag { display: inline-block; font-size: 16px; vertical-align: middle; }
.es-flagBig { font-size: 20px; }
.es-flagSvg {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; border-radius: 50%; overflow: hidden;
  background: #2e2e2e; flex-shrink: 0;
}
.es-flagSvg svg { width: 100%; height: 100%; display: block; }
.es-title .es-flagSvg { margin-right: 6px; }
.es-fxSym .es-flagSvg { margin-right: 8px; }

/* ====== Sección 1: índices + chart ====== */
.es-idxWrap { position: relative; padding-top: 8px; }
.es-idxList { display: flex; gap: 8px; position: relative; }
.es-idxCard {
  flex: 1; padding: 12px 14px; min-width: 0;
  border: 1px solid #2a2e39; border-radius: 14px; background: #000000;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.es-idxCard:hover { background: #0c0c0c; border-color: #363a45; }
.es-idxCard.es-idxActive { background: #0e0e0e; border-color: #3a4050; }
.es-idxRow2 { padding-left: 0 !important; }
.es-idxRow1 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.es-idxIcon {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden; aspect-ratio: 1 / 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.es-idxName { color: #dbdbdb; font-size: 14px; font-weight: 400; }
.es-idxRow2 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding-left: 42px; }
.es-idxPrice { color: #dbdbdb; font-weight: 700; font-size: 14px; }

.es-arrowBtn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #2a2a2a; color: #dbdbdb;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.es-arrowOverlay { position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 2; }
.es-arrowRight { position: absolute; right: 0; top: 24px; }

.es-chart { position: relative; height: 280px; margin-top: 12px; }
.es-chartSvg { width: 100%; height: 100%; }
/* Contenedores de los gráficos reales de lightweight-charts. */
.es-lwc { width: 100%; height: 100%; position: relative; }
.es-lwc-bonds { height: 320px; }
.es-lwc-pib { height: 360px; }
.es-yAxis { position: absolute; right: 4px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; color: #8c8c8c; font-size: 11px; padding: 4px 0; }
.es-yHl { background: #f23645; color: #fff; padding: 1px 6px; border-radius: 2px; align-self: flex-end; }
.es-xAxis { display: flex; justify-content: space-between; padding: 8px 80px 0 0; color: #8c8c8c; font-size: 11px; }

.es-chartFoot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.es-rangeBtns { display: flex; gap: 4px; }
.es-rngBtn { padding: 6px 12px; border-radius: 4px; color: #8c8c8c; font-size: 13px; font-weight: 600; }
.es-rngBtn.es-rngActive { background: #2a2a2a; color: #f0f3fa; }
.es-chartIcons { display: flex; gap: 4px; }
.es-iconBtn { width: 30px; height: 30px; border-radius: 6px; color: #8c8c8c; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, color .12s; }
.es-iconBtn:hover { background: #1c2030; color: #dbdbdb; }
.es-iconBtn.es-iconActive { background: #1c2030; color: #f0f3fa; }
.es-iconBtn svg { width: 18px; height: 18px; display: block; }

/* ====== Sección 2: trending cards ====== */
.es-trendRow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 4px 0; }
.es-card { background: transparent; border: 1px solid #4a4a4a; border-radius: 16px; padding: 16px; }
.es-trendCard { min-height: 116px; }
.es-trendTop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.es-trendName { min-width: 0; flex: 1; }
.es-tk { color: #dbdbdb; font-size: 12px; font-weight: 700; display: inline-block; background: #2a2a2a; padding: 1px 6px; border-radius: 3px; }
.es-name { color: #8c8c8c; font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-trendBottom { display: flex; justify-content: space-between; align-items: baseline; }
.es-priceLine { color: #b8b8b8; font-size: 14px; font-weight: 600; }

/* ====== Sección 2: 2 columnas ranking ====== */
.es-twoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 8px; }
.es-rankCol { min-width: 0; }
.es-rankList { border-top: 1px solid #2a2a2a; }
.es-rankRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #1f1f1f;
}
.es-rankLeft { display: flex; align-items: center; gap: 10px; min-width: 0; }
.es-rankName { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.es-rankTitle { color: #b8b8b8; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.es-rankTk { display: inline-block; background: #2a2a2a; color: #dbdbdb; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 700; align-self: flex-start; }
.es-rankPrice { color: #b8b8b8; font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }

/* ====== Calendar cards ====== */
.es-calRow { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 4px 0; }
.es-calCard { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.es-calTop { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #8c8c8c; }
.es-calDate { font-weight: 600; }
.es-calBadge { color: #ff9800; }
.es-calMid { display: flex; align-items: center; gap: 10px; }
.es-calName { min-width: 0; }
.es-calFoot { display: flex; gap: 24px; }
.es-calFoot3 { gap: 16px; }
.es-calLbl { color: #8c8c8c; font-size: 11px; text-transform: capitalize; }
.es-calVal { color: #b8b8b8; font-size: 12px; font-weight: 600; }
.es-calChart { color: #2962ff; font-size: 12px; }

.es-emptyState {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 0; color: #4a4a4a; gap: 12px;
}
.es-emptyState p { color: #4a4a4a; font-size: 13px; }

/* ====== Sección 3-7: futures, etfs, bonds corp ====== */
.es-futList, .es-etfList { border-top: 1px solid #2a2a2a; }
.es-futRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center; gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid #1f1f1f;
}
.es-futLeft { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ====== Sección 4: Forex table ====== */
.es-forexTbl { font-size: 13px; border: 1px solid #4a4a4a; border-radius: 16px; overflow: hidden; }
.es-forexTbl th {
  text-align: center; padding: 12px 16px;
  font-weight: 400; color: #8c8c8c; font-size: 13px;
  background: transparent; border-bottom: 1px solid #2a2a2a;
}
.es-forexTbl th:first-child, .es-forexTbl td:first-child { text-align: left; padding-left: 20px; }
.es-forexTbl td { padding: 16px; text-align: center; border-bottom: 1px solid #1f1f1f; }
.es-forexTbl tr:last-child td { border-bottom: 0; }
.es-fxSym { color: #b8b8b8; font-size: 14px; font-weight: 600; }
.es-fxPrice { color: #b8b8b8; font-size: 14px; font-weight: 600; }
.es-fxCell { color: #f0f3fa; font-weight: 600; font-size: 13px; }
.es-fxPct { color: #b8b8b8; font-size: 10px; margin-left: 2px; font-weight: 400; }

/* ====== Sección 5: bonds chart + table ====== */
.es-bondsHeader { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.es-customBtn {
  padding: 8px 16px; border: 1px solid #2a2a2a; border-radius: 4px;
  color: #b8b8b8; font-size: 12px; font-weight: 600;
}
.es-bondsChartWrap { padding: 16px 0; }
.es-bondsSvg { width: 100%; height: 320px; }
.es-axisLbl { fill: #8c8c8c; font-size: 11px; font-family: inherit; }
.es-bondsLegend { display: flex; justify-content: center; gap: 24px; color: #8c8c8c; font-size: 12px; margin-bottom: 16px; }
.es-bondsLegend > span { display: inline-flex; align-items: center; gap: 6px; }
.es-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.es-bondsTbl { font-size: 13px; }
.es-bondsTbl th {
  text-align: right; padding: 14px 12px; font-weight: 400; color: #8c8c8c; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid #2a2a2a;
}
.es-bondsTbl th:first-child { text-align: left; padding-left: 0; }
.es-bondsTbl td { padding: 14px 12px; text-align: right; color: #b8b8b8; border-bottom: 1px solid #1f1f1f; }
.es-bondsTbl td:first-child { text-align: left; padding-left: 0; display: flex; gap: 12px; align-items: center; }
.es-bondsTbl tr:last-child td { border-bottom: 0; }
.es-tagSym { display: inline-block; background: #2a2a2a; color: #dbdbdb; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.es-bondTerm { color: #b8b8b8; }

/* ====== Sección 6: bonds corp ====== */
.es-twoColCorp { padding-top: 0; }
.es-corpHead { display: grid; grid-template-columns: 1fr 180px 140px; padding: 10px 0 10px 48px; border-bottom: 1px solid #2a2a2a; color: #8c8c8c; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.es-corpHead-r { text-align: right; }
.es-corpRow { position: relative; display: grid; grid-template-columns: 1fr 180px 140px; align-items: center; gap: 12px; padding: 14px 0 14px 48px; border-bottom: 1px solid #1f1f1f; }
.es-corpRow > .es-iconCircle { position: absolute; left: 0; top: 14px; }
.es-corpName { color: #b8b8b8; font-size: 13px; min-width: 0; }
.es-corpYield { text-align: right; color: #b8b8b8; font-weight: 600; }
.es-corpDate { text-align: right; color: #b8b8b8; }
.es-corpRow .es-rankTk { margin-top: 4px; }

/* ====== Sección 8: Economía ====== */
.es-pibTabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px 0 16px; }
/* Prefijo .es-root para ganar al reset `.es-root button { background:none;
 * border:0 }`, que si no deja las tabs sin fondo ni borde. */
.es-root .es-pibTab {
  text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 1px solid #2a2e39; background: #000000; color: #dbdbdb;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.es-root .es-pibTab:hover { background: #0c0c0c; border-color: #363a45; }
.es-root .es-pibTab.es-pibActive { background: #0e0e0e; border: 1px solid #3a4050; }
.es-pibTabName { color: #8c8c8c; font-size: 12px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-pibTab.es-pibActive .es-pibTabName { color: #dbdbdb; }
.es-pibTabVal { font-size: 15px; font-weight: 700; color: #f0f3fa; }
.es-pibChartWrap { padding: 16px 0; position: relative; }
.es-pibSvg { width: 100%; height: 360px; }
.es-pibFoot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }

.es-econGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; padding-top: 24px; }
.es-econTbl { font-size: 13px; margin-top: 4px; }
.es-econTbl th { text-align: left; padding: 10px 0; color: #8c8c8c; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid #2a2a2a; }
.es-econTbl td { padding: 12px 0; color: #b8b8b8; border-bottom: 1px solid #1f1f1f; }
.es-econTbl tr:last-child td { border-bottom: 0; }
.es-econTbl .es-ta-r { text-align: right; }

/* ====== Forex cell fallback ====== */
.es-fxCell span { display: inline; }

/* --- Clicables (auditoría MERCADOS) --- */
.es-root [data-symbol] { cursor: pointer; }
.es-rankRow[data-symbol]:hover,
.es-futRow[data-symbol]:hover,
.es-corpRow[data-symbol]:hover,
.es-bondsTbl tr[data-symbol]:hover td,
.es-forexTbl tr[data-symbol]:hover .es-fxSym { background: rgba(255,255,255,0.04); }
.es-card[data-symbol]:hover,
.es-idxCard[data-symbol]:hover { filter: brightness(1.12); }
/* /markets/corporate-actions — Agent D. Figma 25:242044 / 25:246643 / 25:249843. */

.ca-root {
  background: #000;
  color: #dbdbdb;
  font-family: 'Trebuchet MS', 'Roboto', sans-serif;
  min-height: 100%;
  padding: 0 0 60px;
}

.ca-container {
  max-width: 1315px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Breadcrumb */
.ca-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 32px 0 16px;
  font-size: 13px;
  color: #8c8c8c;
}
.ca-breadcrumbs a {
  color: #8c8c8c;
  text-decoration: none;
}
.ca-breadcrumbs a:hover { color: #dbdbdb; }
.ca-breadcrumbs .ca-sep { color: #4a4a4a; }

/* Hero */
.ca-hero {
  text-align: center;
  padding: 24px 0 32px;
}
.ca-hero h1 {
  font-family: 'Trebuchet MS', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 56px;
  line-height: 64px;
  color: #f0f3fa;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}
.ca-hero p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 24px;
  color: #8c8c8c;
}

/* Tabs */
.ca-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 0 16px;
  border-bottom: 1px solid #2e2e2e;
}
.ca-tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  background: #1f1f1f;
  border: 1px solid #2e2e2e;
  color: #dbdbdb;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  font-family: inherit;
  white-space: nowrap;
}
.ca-tab:hover { background: #2e2e2e; color: #f0f3fa; }
.ca-tab.is-active {
  background: #f2f2f2;
  border-color: #f2f2f2;
  color: #000000;
  font-weight: 500;
}
.ca-tab-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 16px;
  border-radius: 17px;
  background: #000;
  border: 1px solid #2e2e2e;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.ca-tab-cta:hover { background: #1a1a1a; }
.ca-tab-cta svg { width: 14px; height: 14px; }

/* List */
.ca-list { margin: 0; padding: 0; list-style: none; }
.ca-list-header,
.ca-row {
  display: grid;
  grid-template-columns: 113px 87px 1fr 130px;
  align-items: center;
  column-gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #2e2e2e;
  font-size: 14px;
  line-height: 18px;
}
.ca-list-header {
  color: #8c8c8c;
  font-size: 13px;
  padding: 16px 0;
}
.ca-list-header .ca-c-headline { padding-left: 28px; }

.ca-c-time { color: #8c8c8c; }
.ca-c-instr {
  display: flex;
  align-items: center;
}
.ca-c-instr .ca-logo-wrap {
  display: inline-flex;
  margin-left: -3px;
}
.ca-c-instr .ca-logo-wrap:first-child { margin-left: 0; }
.ca-c-instr .ca-logo {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2a2e39;
  box-shadow: 0 0 0 1px #000;
  object-fit: cover;
  overflow: hidden;
}
.ca-c-instr .ca-logo--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
}
.ca-c-headline {
  color: #dbdbdb;
  font-weight: 500;
  font-size: 15px;
  padding-left: 28px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca-c-headline:hover { color: #2962ff; }
.ca-c-provider { color: #8c8c8c; }

.ca-row { cursor: pointer; }
.ca-row:hover { background: rgba(255, 255, 255, 0.02); }

/* Footer link */
.ca-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: #2962ff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.ca-footer-cta:hover { text-decoration: underline; }

/* Empty state */
.ca-empty {
  display: block;
  padding: 60px 0;
  text-align: center;
  color: #8c8c8c;
  font-size: 14px;
  list-style: none;
}
/* =============================================================================
   Analizadores (Screeners) — plantilla visual idéntica al "Analizador de acciones"
   de TradingView, compartida por las 4 páginas:
   /screeners/etf · /screeners/bonds · /screeners/crypto · /screeners/forex
   Prefijo .sc- para evitar colisiones.
   ============================================================================= */

.sc-root {
  background: #000000;
  color: #dbdbdb;
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100%;
  padding: 0 0 60px;
  font-size: 13px;
  position: relative; /* ancla los dropdowns .sc-dd */
}
.sc-root *, .sc-root *::before, .sc-root *::after { box-sizing: border-box; }
.sc-root a { color: inherit; text-decoration: none; }
.sc-root button { font-family: inherit; cursor: pointer; }

.sc-container {
  max-width: none;   /* full width like TradingView (was centered 1480 → big right gap) */
  margin: 0;
  padding: 0 20px;
}

/* ---------- Breadcrumb ---------- */
.sc-breadcrumb {
  padding: 14px 0 18px;
  font-size: 13px;
  color: #8c8c8c;
}
.sc-breadcrumb a { color: #8c8c8c; }
.sc-breadcrumb a:hover { color: #dbdbdb; }
.sc-breadcrumb .sc-bc-sep { padding: 0 6px; color: #4a4a4a; }
.sc-breadcrumb .sc-bc-current { color: #dbdbdb; }

/* ---------- Page title + right actions ---------- */
.sc-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 18px;
}
.sc-title {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 28px; line-height: 36px; font-weight: 600;
  color: #dbdbdb;
  letter-spacing: -0.3px;
}
.sc-title { cursor: pointer; user-select: none; }
.sc-title:hover .sc-title-chev { color: #dbdbdb; }
.sc-title-chev {
  color: #8c8c8c; font-size: 14px; line-height: 1;
  display: inline-flex;
  transition: color 120ms;
}
.sc-title-actions {
  display: inline-flex; gap: 8px;
}
.sc-action-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #1e222d;
  color: #b8b8b8;
  border: 0; border-radius: 50%;
  transition: background 120ms, color 120ms;
}
.sc-action-btn:hover { background: #2a2e39; color: #dbdbdb; }
.sc-action-btn svg { width: 16px; height: 16px; }

/* ---------- Filter pills ---------- */
.sc-pills {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 4px;
}
.sc-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 16px;
  color: #dbdbdb; font-size: 13px;
  white-space: nowrap;
}
.sc-pill:hover { border-color: #4a4a4a; background: #2a2e39; }
.sc-pill .sc-pill-chev {
  color: #787b86; font-size: 10px; margin-left: 2px;
}
.sc-pill.sc-pill-active { background: #2962ff; border-color: #2962ff; color: #fff; }
.sc-pill-flag {
  width: 18px; height: 18px;
  border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: #2a2e39;
}
.sc-pill-flag svg { width: 100%; height: 100%; display: block; }
.sc-pill-icon { display: inline-flex; color: #ffc107; }
.sc-pill-icon svg { width: 14px; height: 14px; }
.sc-pill-square {
  width: 32px; height: 32px; padding: 0;
  justify-content: center;
}
.sc-pill-square svg { width: 14px; height: 14px; color: #b8b8b8; }

/* ---------- Tab bar (Resumen / Rendimiento / etc.) ---------- */
.sc-tabs-wrap {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0 12px;
  border-bottom: 1px solid #2a2e39;
}
.sc-view-toggle {
  display: inline-flex; gap: 0;
  margin-right: 6px;
}
.sc-view-toggle button {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #787b86;
  border-radius: 4px;
}
.sc-view-toggle button:hover { background: #1e222d; color: #dbdbdb; }
.sc-view-toggle button.is-active { background: #2962ff; color: #fff; }
.sc-view-toggle button svg { width: 14px; height: 14px; }

.sc-tabs {
  display: flex; flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tab {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px;
  background: transparent; border: 0;
  color: #b8b8b8;
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sc-tab:hover { color: #dbdbdb; }
.sc-tab.is-active { color: #f0f3fa; border-bottom-color: #2962ff; }

/* ---------- Result count ---------- */
.sc-result-count {
  padding: 14px 0 10px;
  font-size: 13px; color: #787b86;
}

/* ---------- Table ---------- */
.sc-table-wrap {
  overflow-x: auto;
}
.sc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 1200px;
}
.sc-table thead th {
  text-align: right;
  padding: 10px 12px;
  color: #787b86;
  font-size: 12px; font-weight: 600;
  border-bottom: 1px solid #2a2e39;
  white-space: nowrap;
  background: #000000;
  position: sticky; top: 0;
}
.sc-table thead th:first-child {
  text-align: left;
  padding-left: 24px;
}
.sc-table thead th.sc-th-sorted {
  color: #f0f3fa;
}
.sc-table thead th .sc-sort-arrow {
  margin-left: 4px; color: #787b86; font-size: 10px;
}
.sc-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #1e222d;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
  color: #dbdbdb;
  font-variant-numeric: tabular-nums;
}
.sc-table tbody td:first-child {
  text-align: left;
  padding-left: 24px;
}
.sc-table tbody tr:hover td {
  background: rgba(255,255,255,0.04);
}
.sc-table tbody tr { cursor: pointer; }

/* Cabeceras clicables (ordenación) */
.sc-table thead th[data-key]:not([data-nosort]) {
  cursor: pointer;
  user-select: none;
}
.sc-table thead th[data-key]:not([data-nosort]):hover { color: #dbdbdb; }

/* Symbol cell — logo + ticker + name */
.sc-sym {
  display: flex; align-items: center; gap: 12px;
  min-width: 280px;
}
.sc-sym-logo {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 11px;
  background: #2962ff;
  overflow: hidden;
}
.sc-sym-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-sym-ticker {
  font-weight: 700; color: #f0f3fa;
  min-width: 56px;
}
.sc-sym-name {
  color: #b8b8b8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 240px;
}

/* Price + currency */
.sc-price-cell {
  display: inline-flex; align-items: baseline; gap: 4px;
  justify-content: flex-end;
}
.sc-price-cur { color: #787b86; font-size: 11px; text-transform: uppercase; }

/* Change % — plain colored text (TradingView real: sin pill de fondo) */
.sc-chg {
  display: inline-flex; align-items: center; justify-content: flex-end;
  font-weight: 500; font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: transparent; padding: 0; border-radius: 0;
}
.sc-chg.sc-pos { color: #22ab94; }
.sc-chg.sc-neg { color: #f23645; }
.sc-chg.sc-flat { color: #b8b8b8; }

/* Rating tag (bonos) — chip coloreado, no es un cambio % */
.sc-rating-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700; font-size: 12px;
}
.sc-rating-tag.sc-ig { background: rgba(34,171,148,0.16); color: #22ab94; }
.sc-rating-tag.sc-hy { background: rgba(242,54,69,0.16); color: #f23645; }

.sc-pos-text { color: #22ab94; font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.sc-neg-text { color: #f23645; font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.sc-muted { color: #787b86; }

/* Pagination / "Mostrando X de Y" footer link */
.sc-footer-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px;
  color: #2962ff; font-size: 13px; font-weight: 500;
}
.sc-footer-cta:hover { text-decoration: underline; }

/* ---------- Dropdowns (pills de filtro + menú de columnas) ---------- */
.sc-dd {
  position: absolute;
  z-index: 60;
  min-width: 190px;
  max-width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: #000;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  display: flex; flex-direction: column; gap: 2px;
}
.sc-dd-title {
  padding: 6px 10px 8px;
  font-size: 11px; font-weight: 700;
  color: #787b86;
  text-transform: uppercase; letter-spacing: 0.4px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 4px;
}
.sc-dd-item {
  text-align: left;
  background: transparent; border: 0;
  color: #dbdbdb; font-size: 13px;
  padding: 8px 10px; border-radius: 6px;
  white-space: nowrap;
}
.sc-dd-item:hover { background: rgba(255,255,255,.06); }
.sc-dd-item.is-sel { color: #2962ff; font-weight: 700; }
.sc-dd-check {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  font-size: 13px; color: #dbdbdb;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.sc-dd-check:hover { background: rgba(255,255,255,.06); }
.sc-dd-check input { accent-color: #2962ff; margin: 0; }

/* ---------- Toast (feedback de acciones) ---------- */
.sc-toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #161a24;
  border: 1px solid rgba(255,255,255,.08);
  color: #dbdbdb;
  font-size: 13px;
  font-family: 'Trebuchet MS', -apple-system, sans-serif;
  padding: 9px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  pointer-events: none;
  animation: sc-toast-in 160ms ease-out;
}
@keyframes sc-toast-in {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Favorito activo ---------- */
.sc-action-btn.is-fav { color: #f0b90a; }
.sc-action-btn.is-fav svg { fill: #f0b90a; stroke: #f0b90a; }

/* Right rail icons (placeholder for the vertical TradingView app sidebar
   already rendered by the global chrome — leave empty here) */
