/* ============================================
   Swing Pro — Estilos custom
   Tailwind cubre el 95%. Aquí van los detalles
   que Tailwind no resuelve elegantemente.
   ============================================ */

:root {
  --sp-bg:     #0B0F1A;
  --sp-card:   #141A2B;
  --sp-border: #1F2740;
  --sp-text:   #E8ECF4;
  --sp-muted:  #8B96B0;
  --sp-green:  #16C784;
  --sp-red:    #EA3943;
  --sp-yellow: #F0B90B;
  --sp-accent: #3D5AFE;
}

/* Reset suave */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

/* Cifras tabulares en datos numéricos para que las columnas alineen bien */
.kpi-value,
[data-kpi],
.font-mono,
table {
  font-variant-numeric: tabular-nums;
}

/* ==================== KPI CARDS ==================== */
.kpi-card {
  background: var(--sp-card);
  border: 1px solid var(--sp-border);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.kpi-card:hover {
  border-color: rgba(61, 90, 254, 0.5);
  transform: translateY(-2px);
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sp-muted);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.kpi-value {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.kpi-note {
  font-size: 0.7rem;
  color: var(--sp-muted);
  margin: 0;
}

/* ==================== TICKER CHIPS (cartera pública) ==================== */
.ticker-chip {
  background: var(--sp-card);
  border: 1px solid var(--sp-border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}
.ticker-chip:hover {
  border-color: var(--sp-accent);
  background: rgba(61, 90, 254, 0.05);
}
.ticker-chip .symbol {
  font-family: 'Geist Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sp-text);
}
.ticker-chip .sector {
  font-size: 0.7rem;
  color: var(--sp-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== TRAILING STOP STATES (zona privada) ==================== */
.position-card { position: relative; transition: all 0.3s ease; }

.position-card.running {
  border-color: var(--sp-green);
  box-shadow: 0 0 0 1px var(--sp-green), 0 0 24px rgba(22, 199, 132, 0.15);
}
.position-card.running::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, transparent, var(--sp-green), transparent);
  opacity: 0;
  animation: pulse-running 3s ease-in-out infinite;
  z-index: -1;
}
@keyframes pulse-running {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.4; }
}

.position-card.climbing {
  border-color: var(--sp-yellow);
}

.position-card.heat {
  border-color: var(--sp-red);
  animation: heat-pulse 1.5s ease-in-out infinite;
}
@keyframes heat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 57, 67, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(234, 57, 67, 0); }
}

/* ==================== HEATMAP MENSUAL ==================== */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.heatmap-cell {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: default;
  transition: transform 0.15s ease;
}
.heatmap-cell:hover { transform: scale(1.1); }
.heatmap-cell.empty { background: var(--sp-card); border: 1px dashed var(--sp-border); }

/* ==================== UTILIDADES ==================== */
.fade-in { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ApexCharts overrides (tema oscuro) */
.apexcharts-tooltip {
  background: var(--sp-card) !important;
  border: 1px solid var(--sp-border) !important;
  color: var(--sp-text) !important;
}
.apexcharts-text { fill: var(--sp-muted) !important; }

/* Responsive: KPI más pequeños en móvil */
@media (max-width: 768px) {
  .kpi-value { font-size: 1.75rem; }
}

/* =============================================== */
/* HERO CINEMÁTICO — v1                             */
/* =============================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  background: #06080F;
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
  padding: 6rem 1.5rem 4rem;
  font-optical-sizing: auto;
}

/* --- Estela cinemática lateral (azul → violeta → magenta apagado) --- */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 110% 25%, rgba(180, 60, 200, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 90% at 95% 55%,  rgba(124, 92, 252, 0.20), transparent 65%),
    radial-gradient(ellipse 50% 70% at 80% 85%,  rgba(61, 90, 254, 0.14), transparent 70%);
  filter: blur(40px);
  animation: aurora-drift 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.05); }
}

/* --- Grano sutil para textura cinema --- */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* --- Container --- */
.hero-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Eyebrow (línea pequeña arriba) --- */
.hero-eyebrow {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B96B0;
  margin: 0 0 2rem;
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

/* --- KPI estrella (+88,45%) --- */
.hero-headline {
  font-family: 'Geist', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 16rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #F5F7FB;
  margin: 0 0 1.5rem;
  font-feature-settings: "ss01", "tnum";
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  opacity: 0;
  animation: hero-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.hero-sign {
  color: #16C784;
  font-weight: 600;
  font-size: 0.7em;
  margin-right: 0.04em;
  letter-spacing: 0;
}

.hero-number {
  background: linear-gradient(180deg, #FFFFFF 0%, #C9D1E0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.08em;
}

.hero-pct {
  color: #8B96B0;
  font-weight: 500;
  font-size: 0.5em;
  margin-left: 0.06em;
}

/* --- Caption debajo del KPI --- */
.hero-caption {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 400;
  color: #B6BFD3;
  letter-spacing: 0.005em;
  margin: 0 0 3rem;
  max-width: 640px;
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* --- KPIs duros (4 en línea) --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 720px;
  margin: 0 0 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-stat-value {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem);
  font-weight: 600;
  color: #E8ECF4;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.hero-stat-label {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: #8B96B0;
  letter-spacing: 0.02em;
}

/* --- CTAs --- */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 3rem;
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.3s ease, border-color 0.25s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.hero-btn-primary {
  background: #F5F7FB;
  color: #06080F;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 8px 32px -8px rgba(124, 92, 252, 0.4);
}
.hero-btn-primary:hover {
  transform: translateY(-1px);
  background: #FFFFFF;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2),
    0 12px 40px -8px rgba(124, 92, 252, 0.55);
}

.hero-btn-ghost {
  background: transparent;
  color: #E8ECF4;
  border-color: rgba(255,255,255,0.18);
}
.hero-btn-ghost:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

/* --- Meta inferior con pulso vivo --- */
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: #6B7794;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16C784;
  box-shadow: 0 0 0 0 rgba(22, 199, 132, 0.7);
  animation: hero-pulse 2s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(22, 199, 132, 0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(22, 199, 132, 0); }
  100% { box-shadow: 0 0 0 0    rgba(22, 199, 132, 0); }
}

/* --- Animación base de entrada --- */
@keyframes hero-rise {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* =============================================== */
/* RESPONSIVE HERO                                  */
/* =============================================== */

/* Tablet */
@media (max-width: 900px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
    max-width: 480px;
  }
}

/* Móvil */
@media (max-width: 640px) {
  .hero {
    padding: 5rem 1.25rem 3rem;
    min-height: 92vh;
    min-height: 92svh;
  }
  .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    margin-bottom: 1.5rem;
  }
  .hero-headline {
    font-size: clamp(4.2rem, 24vw, 8rem);
    margin-bottom: 1.25rem;
    letter-spacing: -0.04em;
  }
  .hero-caption {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
  }
  .hero-stat-value {
    font-size: 1.05rem;
  }
  .hero-cta {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .hero-btn {
    width: 100%;
    padding: 1rem 1.5rem;
  }
  .hero-meta {
    font-size: 0.72rem;
  }
}

/* --- Respeto a usuarios con prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .hero-aurora,
  .hero-pulse {
    animation: none;
  }
  .hero-eyebrow,
  .hero-headline,
  .hero-caption,
  .hero-stats,
  .hero-cta,
  .hero-meta {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* =============================================== */
/* MENÚ HAMBURGUESA MÓVIL                           */
/* =============================================== */

/* Botón hamburguesa: animación de las 3 rayas → X cuando está activo */
#menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

#menu-toggle .hamburger-line {
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

#menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Panel desplegable: animación de apertura suave */
#menu-mobile {
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu-mobile.is-open {
  background: var(--sp-bg);
}

/* ============================================================
   HEATMAP BLOQUE 4 — usado en /premium y home pública
   Las reglas también existen inline en premium.html.
   Deuda técnica menor: deduplicar post-anuncio moviéndolas
   íntegramente aquí y eliminándolas de premium.html.
   ============================================================ */

@keyframes block4FadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.block4-header-title { color: #E8ECF4; }
.block4-header-sub   { color: #8B96B0; }

.block4-loading {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: #8B96B0;
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.block4-empty-state {
  text-align: center;
  padding: 32px 0;
  font-size: 14px;
  color: #8B96B0;
}

.block4-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 768px) {
  .block4-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

.block4-cell {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(31, 39, 64, 0.6);
  background: rgba(14, 19, 32, 0.5);
  opacity: 0;
  animation: block4FadeInUp 0.42s ease-out forwards;
  transition: transform 0.2s ease;
}
.block4-cell:hover { transform: translateY(-1px); }

.block4-cell .month-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: #8B96B0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.block4-cell .month-pct {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #E8ECF4;
  line-height: 1;
}

.block4-cell.green-strong {
  background: rgba(22, 199, 132, 0.28);
  border-color: rgba(22, 199, 132, 0.5);
}
.block4-cell.green-mid {
  background: rgba(22, 199, 132, 0.18);
  border-color: rgba(22, 199, 132, 0.4);
}
.block4-cell.green-soft {
  background: rgba(22, 199, 132, 0.08);
  border-color: rgba(22, 199, 132, 0.25);
}
.block4-cell.red-soft {
  background: rgba(234, 57, 67, 0.08);
  border-color: rgba(234, 57, 67, 0.25);
}
.block4-cell.red-strong {
  background: rgba(234, 57, 67, 0.18);
  border-color: rgba(234, 57, 67, 0.4);
}
.block4-cell.green-strong .month-pct,
.block4-cell.green-mid    .month-pct,
.block4-cell.green-soft   .month-pct { color: #16C784; }
.block4-cell.red-strong   .month-pct,
.block4-cell.red-soft     .month-pct { color: #EA3943; }

.block4-empty-cell {
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 1px dashed rgba(31, 39, 64, 0.3);
  border-radius: 8px;
  opacity: 0.4;
}

/* ============================================================
   FAQ DESPLEGABLE (<details>)
   Usado en la home para "Por qué TWR".
   Patrón reutilizable para futuras FAQs.
   ============================================================ */

.faq-details {
  background: var(--sp-card);
  border: 1px solid var(--sp-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-details[open] {
  border-color: rgba(22, 199, 132, 0.4);
}

.faq-summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--sp-text);
  user-select: none;
  transition: background 0.2s ease;
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::marker { content: ''; }

.faq-summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sp-green);
  border-bottom: 2px solid var(--sp-green);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-details[open] .faq-summary::after {
  transform: rotate(-135deg) translateY(2px);
}

.faq-summary:hover {
  background: rgba(22, 199, 132, 0.04);
}

.faq-body {
  padding: 1.5rem 1.5rem 1.75rem;
  border-top: 1px solid var(--sp-border);
}

@media (min-width: 768px) {
  .faq-summary { padding: 1.5rem 2rem; font-size: 1.35rem; }
  .faq-body    { padding: 2rem 2rem 2.25rem; }
}

/* ============================================
   TREEMAP SECTORIAL — Composición por sector
   Sub-bloque 2 Home v2
   ============================================ */
.treemap-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sp-bg, #0B0F1A);
}

@media (max-width: 640px) {
  .treemap-wrap { aspect-ratio: 4 / 3; }
}

.treemap-wrap .sector {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: filter 0.22s ease;
  cursor: default;
  box-sizing: border-box;
}

.treemap-wrap .sector:hover {
  filter: brightness(1.18) saturate(1.05);
  z-index: 10;
}

.treemap-wrap .sector-name {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.022em;
  white-space: nowrap;
}

.treemap-wrap .sector-pct {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  font-weight: 500;
  margin-top: 5px;
  opacity: 0.95;
  font-feature-settings: 'tnum' 1, 'zero' 1;
  letter-spacing: -0.01em;
}

/* Tipografía adaptativa según área del rectángulo */
.treemap-wrap .size-xl .sector-name { font-size: 28px; letter-spacing: -0.03em; }
.treemap-wrap .size-xl .sector-pct  { font-size: 20px; margin-top: 8px; }
.treemap-wrap .size-lg .sector-name { font-size: 19px; }
.treemap-wrap .size-lg .sector-pct  { font-size: 15px; }
.treemap-wrap .size-md .sector-name { font-size: 13px; }
.treemap-wrap .size-md .sector-pct  { font-size: 11px; margin-top: 3px; }
.treemap-wrap .size-sm .sector-name { font-size: 11px; letter-spacing: -0.015em; }
.treemap-wrap .size-sm .sector-pct  { font-size: 9px; margin-top: 2px; }

@media (max-width: 640px) {
  .treemap-wrap .size-xl .sector-name { font-size: 21px; }
  .treemap-wrap .size-xl .sector-pct  { font-size: 15px; }
  .treemap-wrap .size-lg .sector-name { font-size: 14px; }
  .treemap-wrap .size-lg .sector-pct  { font-size: 11px; }
}

/* Mensaje de fallback (error de fetch o sin datos) */
.treemap-msg {
  text-align: center;
  color: var(--sp-muted, #8B96B0);
  padding: 80px 20px;
  font-size: 14px;
}
/* ============================================
   OPERACIONES CERRADAS PÚBLICA (sub-bloque 3.1)
   Tabla densa estilo TradingView Screener.
   Todas las clases con prefijo .ct- para evitar colisiones.
   ============================================ */

.closed-trades-section {
  padding: 96px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.ct-intro {
  margin-bottom: 48px;
  max-width: 720px;
}

.ct-eyebrow {
  display: inline-block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: #16C784;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: rgba(22, 199, 132, 0.12);
  border-radius: 4px;
}

.ct-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
  color: #E8ECF4;
}

.ct-title .ct-num {
  color: #16C784;
  font-feature-settings: 'tnum';
}

.ct-lead {
  font-size: 17px;
  color: #8B96B0;
  line-height: 1.6;
}

.ct-lead strong {
  color: #E8ECF4;
  font-weight: 500;
}

/* === Tabla === */
.ct-table-wrap {
  background: #141A2B;
  border: 1px solid #1F2740;
  border-radius: 12px;
  overflow: hidden;
}

.ct-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist', sans-serif;
}

.ct-table thead {
  background: #1A2138;
  border-bottom: 1px solid #1F2740;
}

.ct-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5B6580;
  font-weight: 500;
  border-bottom: 1px solid #1F2740;
}

.ct-table th.ct-num-header {
  text-align: right;
}

.ct-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #161D30;
  font-size: 13px;
  color: #E8ECF4;
  vertical-align: middle;
}

.ct-table tr:last-child td {
  border-bottom: none;
}

.ct-table tr:hover td {
  background: rgba(22, 199, 132, 0.03);
}

.ct-ticker {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.ct-sector {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5B6580;
  padding: 3px 8px;
  background: #1A2138;
  border-radius: 4px;
}

.ct-bar-cell {
  width: 240px;
  padding-right: 24px !important;
}

.ct-bar {
  position: relative;
  height: 6px;
  background: #161D30;
  border-radius: 3px;
  overflow: visible;
}

.ct-bar-zero {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: #5B6580;
  opacity: 0.4;
}

.ct-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #16C784;
  border-radius: 3px;
}

.ct-bar-fill.neg {
  background: #EA3943;
}

.ct-pct {
  font-family: 'Geist Mono', monospace;
  font-weight: 600;
  font-feature-settings: 'tnum';
  text-align: right;
  color: #16C784;
}

.ct-pct.neg {
  color: #EA3943;
}

.ct-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: #8B96B0;
  text-align: right;
  font-feature-settings: 'tnum';
}

.ct-error {
  text-align: center;
  color: #8B96B0;
  padding: 32px 18px !important;
  font-size: 13px;
}

/* === CTA "Ver historial completo" === */
.ct-cta-row {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.ct-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  color: #16C784;
  border: 1px solid rgba(22, 199, 132, 0.25);
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
  font-family: 'Geist', sans-serif;
}

.ct-cta:hover {
  background: #16C784;
  color: #0B0F1A;
  border-color: #16C784;
  transform: translateY(-1px);
}

.ct-cta .ct-arrow {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.ct-cta:hover .ct-arrow {
  transform: translateX(4px);
}

/* === Mobile === */
@media (max-width: 768px) {
  .closed-trades-section {
    padding: 48px 16px;
  }
  .ct-title {
    font-size: 32px;
  }
  .ct-lead {
    font-size: 15px;
  }
  .ct-table th,
  .ct-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
  .ct-bar-cell {
    width: 100px;
    padding-right: 12px !important;
  }
  /* En móvil ocultamos la columna sector para ganar espacio */
  .ct-table th:nth-child(2),
  .ct-table td:nth-child(2) {
    display: none;
  }
}