/* =========================================================
   ÁPICE Capital — Dashboard
   Estilo: dark/light, esquinas redondeadas, bordes sutiles,
   tipografía geométrica, acentos dorado/gris.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Light theme (default) */
  --bg: #fcfcfc;
  --bg-elev: #ffffff;
  --bg-soft: #ebebee;
  --bg-inset: #e8e8ec;
  --surface: linear-gradient(135deg, #e6e6e6 0%, #ffffff 100%);
  --surface-2: #fafaf8;
  --border: rgba(20, 19, 15, 0.08);
  --border-strong: rgba(20, 18, 15, 0.14);
  --text: #0a0a0a;
  --text-soft: #2e2d2b;
  --text-muted: #6b6b70;
  --text-dim: #9a9aa0;
  --accent: #a7996e;
  --accent-soft: rgba(197, 160, 89, 0.12);
  --accent-text: #b8933f;
  --amber: #f5b324;
  --amber-grad: linear-gradient(135deg, #ffd24d 0%, #f59e0b 45%, #b07c30 100%);
  --buy: #16a36a;
  --buy-soft: rgba(22, 163, 106, 0.12);
  --sell: #e1453a;
  --sell-soft: rgba(225, 69, 58, 0.12);
  --neutral: #b88a1a;
  --neutral-soft: rgba(184, 138, 26, 0.14);
  --shadow-sm: 0 1px 2px rgba(20, 19, 15, 0.04), 0 1px 1px rgba(20, 20, 15, 0.03);
  --shadow-md: 0 6px 18px -8px rgba(20, 19, 15, 0.18), 0 2px 4px rgba(20, 19, 15, 0.04);
  --shadow-lg: 0 24px 48px -24px rgba(20, 19, 15, 0.25), 0 4px 12px rgba(20, 19, 15, 0.06);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;

  --gradiente: linear-gradient(135deg, #f4f4f5 0%, #f4f4f5 100%);
}

html[data-theme="dark"] {
  --bg: #161618;
  --bg-elev: #0e0e0e;
  --bg-soft: #111111;
  --bg-inset: #191919;
  --surface: linear-gradient(135deg, #151516 0%, #1f2022 100%);
  --surface-2: #16161b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f3ef;
  --text-soft: #d8d7d2;
  --text-muted: #8e8d8a;
  --text-dim: #5e5d5b;
  --accent: #C5A059;
  --accent-soft: rgba(197, 160, 89, 0.14);
  --accent-text: #d4ae68;
  --amber: #ffce4d;
  --buy-soft: rgba(31, 200, 130, 0.18);
  --sell-soft: rgba(255, 100, 90, 0.18);
  --buy: #34d399;
  --sell: #ff7a72;
  --neutral: #ffce4d;
  --neutral-soft: rgba(255, 206, 77, 0.16);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 22px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -28px rgba(0, 0, 0, 0.8);

  --gradiente: linear-gradient(135deg, #2a2a27 0%, #272624 100%);
}


/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-elev);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  transition: background-color 220ms ease, color 220ms ease;
}
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 260ms cubic-bezier(.4,.0,.2,1);
}
.app.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  height: 40px;
}
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #0a0a0d;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 4px 10px -4px rgba(0,0,0,0.5);
}
.brand__icon { width: 20px; height: 20px; }
.brand__name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand__name span { color: var(--text-muted); font-weight: 600; margin-left: 4px; }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar__nav::-webkit-scrollbar { display: none; }
/* Mejora 1: separador limpio entre grupos */
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
  opacity: 0.6;
}

/* Mejora 2: labels con micro-línea decorativa */
.nav-group__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  opacity: 0.8;
  padding: 10px 12px 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.nav-group__label::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 14.5px;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav-item .icon { width: 20px; height: 20px; flex: 0 0 20px; opacity: 0.85; }
.nav-item:hover { background: var(--bg-elev); color: var(--text); }

/* Mejora 3: indicador lateral en item activo */
.nav-item.is-active {
  background: var(--bg-soft);
  color: var(--text);
  box-shadow: none;
  border-radius: 0 12px 12px 0;
}
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--text-muted);
}
.nav-item.is-active .icon { opacity: 1; }
html[data-theme="dark"] .nav-item.is-active {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: none;
}
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.user-card__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3a42, #5a5a66);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  flex: 0 0 36px;
}
.user-card__name { font-weight: 700; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.user-card__role { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.user-card__meta { overflow: hidden; min-width: 0; flex: 1; }

/* Sidebar collapsed state */
.app.is-collapsed .sidebar { padding: 18px 12px; align-items: center; overflow: visible; }
.app.is-collapsed .sidebar__nav { overflow: visible; }
.app.is-collapsed .brand__name,
.app.is-collapsed .nav-item span:not(.icon),
.app.is-collapsed .nav-item .badge,
.app.is-collapsed .nav-group__label,
.app.is-collapsed .user-card__meta { display: none; }
.app.is-collapsed .nav-item { justify-content: center; padding: 7px; width: 44px; height: 36px; }
.app.is-collapsed .nav-divider { display: none; }
.app.is-collapsed .user-card { padding: 6px; justify-content: center; }
.app.is-collapsed .brand { justify-content: center; padding: 0; }

/* Tooltip en modo colapsado desktop */
.app.is-collapsed .nav-item span:not(.icon):not(.badge) {
  display: block !important;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  z-index: 300;
}
.app.is-collapsed .nav-item:hover span:not(.icon):not(.badge) { opacity: 1; }

/* ============================================================
   MAIN
   ============================================================ */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.content {
  overflow-x: hidden;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: color-mix(in oklab, var(--bg-elev) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--border); }
.icon-btn svg { width: 18px; height: 18px; }

/* Estilos para botones de redes sociales */
.icon-btn[href*="youtube"]:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.3);
  color: #ff0000;
}
.icon-btn[href*="x.com"]:hover,
.icon-btn[href*="twitter"]:hover {
  background: rgba(29, 155, 240, 0.1);
  border-color: rgba(29, 155, 240, 0.3);
  color: #1d9bf0;
}
.icon-btn[href*="instagram"]:hover {
  background: linear-gradient(45deg, rgba(225, 48, 108, 0.1), rgba(193, 53, 132, 0.1));
  border-color: rgba(225, 48, 108, 0.3);
  color: #e1306c;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff3b30;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg);
  animation: pulse-notification 2s ease-in-out infinite;
}

@keyframes pulse-notification {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* Notifications panel */
.notifications-panel {
  position: absolute;
  top: 60px;
  right: 0;
  width: 380px;
  max-height: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.notifications-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.notifications-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.notifications-panel__header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.notifications-panel__close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.notifications-panel__close:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.notifications-panel__close svg {
  width: 14px;
  height: 14px;
}

.notifications-panel__content {
  overflow-y: auto;
  max-height: 440px;
  padding: 8px;
}

.notification-item {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.16s ease;
  position: relative;
}

.notification-item:hover {
  background: var(--bg-soft);
}

.notification-item.is-new {
  background: var(--accent-soft);
}

.notification-item.is-new::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.notification-item.is-new {
  padding-left: 24px;
}

.notification-item__type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.notification-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.notification-item__message {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 6px;
}

.notification-item__date {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.notifications-panel__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.notifications-panel__empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

/* Posicionamiento relativo para el contenedor del botón */
#notificationsBtn {
  position: relative;
}

.topbar__right {
  position: relative;
}


.search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm), 0 0 0 4px var(--accent-soft);
}
.search svg { width: 16px; height: 16px; color: var(--text-muted); flex: 0 0 16px; }
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}
.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.search-clear:hover { color: var(--text); background: var(--bg-soft); }
.search-clear svg { width: 13px; height: 13px; }

/* ── Search wrapper y dropdown ──────────────────────────── */
.search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-wrap .search {
  max-width: 100%;
  width: 100%;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.14);
  z-index: 500;
  overflow: hidden;
  display: none;
  animation: dropdownIn 0.15s ease;
}
.search-dropdown.is-open { display: block; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sección dentro del dropdown */
.sdrop__section { padding: 12px 0 6px; }
.sdrop__section + .sdrop__section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.sdrop__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 16px 8px;
}

/* Item de artículo */
.sdrop__art {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  align-items: center;
  transition: background 0.12s;
}
.sdrop__art:hover, .sdrop__art.is-focused { background: var(--bg-soft); }
.sdrop__art-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.sdrop__art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sdrop__art-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 3px;
}
.sdrop__art-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sdrop__art-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  margin-top: 2px;
}

/* Item de instrumento */
.sdrop__inst {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.sdrop__inst:hover, .sdrop__inst.is-focused { background: var(--bg-soft); }
.sdrop__inst-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sdrop__inst-dot--compra  { background: var(--buy); box-shadow: 0 0 0 3px var(--buy-soft); }
.sdrop__inst-dot--neutral { background: var(--text-muted); box-shadow: 0 0 0 3px rgba(128,128,128,0.12); }
.sdrop__inst-dot--venta   { background: var(--sell); box-shadow: 0 0 0 3px var(--sell-soft); }
.sdrop__inst-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.sdrop__inst-section {
  font-size: 11px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}
.sdrop__inst-state {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.sdrop__inst-state--compra  { color: var(--buy);  background: var(--buy-soft); }
.sdrop__inst-state--neutral { color: var(--text-muted); background: var(--bg-soft); }
.sdrop__inst-state--venta   { color: var(--sell); background: var(--sell-soft); }

/* Item de nota de mercado */
.sdrop__nota {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.sdrop__nota:hover, .sdrop__nota.is-focused { background: var(--bg-soft); }
.sdrop__nota-ticker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 3px 6px;
  border-radius: 5px;
  text-align: center;
}
.sdrop__nota-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sdrop__nota-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Highlight del texto buscado */
.sdrop__hl {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 3px;
  padding: 0 1px;
}

/* Sin resultados */
.sdrop__empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}
.sdrop__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sdrop__footer a {
  color: var(--accent-text);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
}
.sdrop__footer a:hover { text-decoration: underline; }

.topbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar__links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease, background-color 160ms ease;
}
.topbar__links a:hover { color: var(--text); background: var(--bg-soft); }
.topbar__links a.is-active { color: var(--text); }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.ticker-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.ticker-pill__dot { 
  width: 7px; height: 7px; border-radius: 50%; 
  background: var(--buy); 
  box-shadow: 0 0 0 3px var(--buy-soft); 
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.ticker-pill__delta { 
  color: var(--buy); 
  font-family: "JetBrains Mono", monospace; 
  font-size: 12.5px;
  transition: color 0.3s ease;
}

/* Estados del ticker según valor del mercado */
/* Positivo: +1, +2, +3 */
.ticker-pill.positive .ticker-pill__dot {
  background: var(--buy);
  box-shadow: 0 0 0 3px var(--buy-soft);
}
.ticker-pill.positive .ticker-pill__delta {
  color: var(--buy);
}

/* Neutral: 0 */
.ticker-pill.neutral .ticker-pill__dot {
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.15);
}
.ticker-pill.neutral .ticker-pill__delta {
  color: var(--text-muted);
}

/* Negativo: -1, -2, -3 */
.ticker-pill.negative .ticker-pill__dot {
  background: var(--sell);
  box-shadow: 0 0 0 3px var(--sell-soft);
}
.ticker-pill.negative .ticker-pill__delta {
  color: var(--sell);
}

/* ---------- Content area ---------- */
.content {
  padding: 28px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.page-head__sub {
  color: var(--text-muted);
  margin-top: 3px;
  font-size: 14.5px;
}
.page-head__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.16s ease;
}
.chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--text);
}
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.28);
}
.chip.is-active:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1208;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.28);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--buy); }

/* ============================================================
   HERO 3 COLUMNAS
   ============================================================ */
.hero3 {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: stretch;
  min-height: 410px;
}

/* Wrapper label + lista */
.hero3__col-top {
  display: flex;
  flex-direction: column;
}

/* Label de columna */
.hero3__col-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.hero3__col-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.hero3__col-dot--fire { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Columna izquierda — notas ──────────────────────────── */
.hero3__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  gap: 0;
}

.hero3__notes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -20px;
}

.hero3__note-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 7px 20px;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease;
}
.hero3__note-item:hover {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.hero3__note-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.hero3__note-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero3__note-ticker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-text);
  text-align: center;
  word-break: break-all;
  line-height: 1.2;
}
.hero3__note-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero3__note-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero3__note-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero3__note-date {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}
.hero3__note-impact {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
}
.hero3__note-impact--alto   { background: rgba(248,113,113,0.15); color: #f87171; }
.hero3__note-impact--medio  { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.hero3__note-impact--bajo   { background: rgba(160,160,160,0.12); color: #8e8d8a; }

.hero3__see-all {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  padding: 10px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  transition: color 0.15s;
}
.hero3__see-all:hover { color: var(--accent-text); }

/* ── Columna central — featured heredado ───────────────── */
.hero3__center {
  /* hereda .featured, solo necesita min-height */
  min-height: 410px;
}

/* ── Columna derecha — trending ─────────────────────────── */
.hero3__right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.hero3__trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero3__trending-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.hero3__trending-item:hover {
  background: var(--bg-inset);
}

.hero3__trending-num {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: var(--border-strong);
  font-family: "JetBrains Mono", monospace;
  padding-top: 3px;
  letter-spacing: -0.03em;
}
.hero3__trending-item:nth-child(1) .hero3__trending-num { color: var(--accent-text); }
.hero3__trending-item:nth-child(2) .hero3__trending-num { color: rgba(197,160,89,0.55); }
.hero3__trending-item:nth-child(3) .hero3__trending-num { color: rgba(197,160,89,0.35); }

.hero3__trending-body { min-width: 0; }
.hero3__trending-ticker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-text);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.hero3__trending-cat {
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 9.5px;
}
.hero3__trending-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s ease;
}
.hero3__trending-item:hover .hero3__trending-title {
  color: var(--accent-text);
}
.hero3__trending-date {
  font-size: 10px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

/* ── Hero titulares panel ────────────────────────────────── */
.hero3__titulares-list {
  list-style: none;
  margin: 0 -20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero3__tit-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 7px 20px;
  border-radius: 0;
  text-decoration: none;
  transition: background 160ms ease;
}
.hero3__tit-item:hover {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.hero3__tit-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero3__tit-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero3__tit-fallback {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}
.hero3__tit-body { min-width: 0; }
.hero3__tit-medio {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}
.hero3__tit-headline {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero3__tit-item:hover .hero3__tit-headline { color: var(--accent-text); }

/* ── LEGACY .hero (por si queda referencia) ──────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* ── Artículo destacado ─────────────────────────────────── */
.featured {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

/* Imagen full-bleed que ocupa toda la tarjeta */
.featured__media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(197, 160, 89, 0.25), transparent 60%),
    radial-gradient(80% 60% at 10% 100%, rgba(120, 100, 60, 0.3), transparent 65%),
    linear-gradient(135deg, #1c1a14 0%, #0a0905 100%);
}
.featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.featured:hover .featured__media img {
  transform: scale(1.03);
}

/* Degradado sobre la imagen — más suave arriba, denso abajo */
.featured__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 30%,
    rgba(0, 0, 0, 0.55) 65%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

/* Tag "Destacado" */
.featured__tag {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  background: rgba(10, 10, 14, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.featured__tag .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ff7a72;
  box-shadow: 0 0 0 3px rgba(255,122,114,0.3);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,122,114,0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(255,122,114,0.1); }
}

/* Contenido superpuesto sobre la imagen */
.featured__overlay {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.featured__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
}
.featured__meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.featured h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.featured__lead {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 4px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, gap 0.2s ease;
}
.featured__link:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  gap: 12px;
}
.featured__link svg {
  width: 14px; height: 14px;
  transition: transform 0.2s ease;
}
.featured__link:hover svg { transform: translateX(2px); }

/* ── Aside noticias ─────────────────────────────────────── */
.news-aside {
  
  padding: 20px;
  
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.news-aside__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 6px;
}
.news-aside__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 4px;
}
.news-aside__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.news-aside__link:hover { color: var(--accent-text); }

.news-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.news-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  align-items: center;
  transition: background-color 160ms ease, border-left-color 160ms ease;
  border-left: 2px solid transparent;
}
.news-row:hover {
  background: var(--bg);
  border-left-color: var(--accent);
}
.news-row__thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  flex: 0 0 64px;
  overflow: hidden;
}
.news-row__content { min-width: 0; }
.news-row__cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 3px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  width: fit-content;
}
.news-row__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.news-row__top .news-row__cat { margin-bottom: 0; }
.news-row__top .news-row__meta { margin-top: 0; }
.news-row__cat--economía   { background: rgba(52,211,153,0.18);  color: #34d399; border-color: rgba(52,211,153,0.25); }
.news-row__cat--política   { background: rgba(140,140,160,0.18); color: #9898b0; border-color: rgba(140,140,160,0.25); }
.news-row__cat--operativa  { background: rgba(251,191,36,0.18);  color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.news-row__cat--conceptual { background: rgba(232,121,249,0.18); color: #e879f9; border-color: rgba(232,121,249,0.25); }

.nota-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 7px;
}
.nota-tag--bull { background: var(--buy-soft);  color: var(--buy); }
.nota-tag--bear { background: var(--sell-soft); color: var(--sell); }
.nota-tag--cat  { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.featured__overlay .nota-tag--cat { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }

.news-row__title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.news-row__meta {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
}
.news-row__arrow { display: none; }


/* ============================================================
   CARD GRID — STOCK PANELS
   ============================================================ */
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: -6px;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head__sub { color: var(--text-muted); font-size: 14.5px; }
.section-head .tabs {
  display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px; gap: 2px;
  box-shadow: var(--shadow-sm);
}
.section-head .tabs button {
  padding: 7px 13px; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); border-radius: 999px;
}
.section-head .tabs button.is-active {
  background: var(--bg); color: var(--text);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .section-head .tabs button.is-active { background: var(--bg-elev); }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: color-mix(in oklab, var(--bg-elev) 10%, transparent);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.panel__title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px;
}
.panel__title .panel__icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(130, 130, 140, 0.15);
  display: grid; place-items: center;
  color: var(--text-muted);
}
.panel__icon svg { width: 15px; height: 15px; }
.panel__list { display: flex; flex-direction: column; flex: 1; }

/* Botón de detalle en panel__head */
.panel__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, gap 0.2s ease;
  letter-spacing: 0.01em;
}
.panel__link svg {
  width: 12px; height: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.panel__link:hover {
  color: var(--accent-text);
  background: var(--bg-elev);
  border-color: rgba(197,160,89,0.2);
  gap: 8px;
}
.panel__link:hover svg {
  transform: translateX(2px);
}

.stock-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  transition: background-color 160ms ease;
}
.stock-row:last-child { border-bottom: none; }
.stock-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }

.stock-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  color: #fff;
  letter-spacing: -0.02em;
  flex: 0 0 36px;
  box-shadow: var(--shadow-sm);
}
.stock-info { min-width: 0; }
.stock-line1 { display: flex; align-items: center; gap: 8px; }
.stock-ticker { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.stock-name { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
}
.stock-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }

.stock-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tag--buy { background: var(--buy-soft); color: var(--buy); }
.tag--sell { background: var(--sell-soft); color: var(--sell); }
.tag--neutral { background: var(--neutral-soft); color: var(--neutral); }
.tag--watch { background: var(--accent-soft); color: var(--accent-text); }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.stock-target { font-family: "JetBrains Mono", monospace; font-size: 12.5px; font-weight: 600; color: var(--text); }

/* ============================================================
   SECTOR PERFORMANCE PANEL
   ============================================================ */
.sector-row {
  display: grid;
  grid-template-columns: 120px 1fr 54px;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 160ms ease;
}
.sector-row:last-child { border-bottom: none; }
.sector-row:hover {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.sector-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sector-bar-wrap {
  height: 7px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.sector-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.sector-bar--pos { background: var(--buy); }
.sector-bar--neg { background: var(--sell); }
.sector-pct {
  font-size: 12px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  text-align: right;
  white-space: nowrap;
}
.sector-pct--pos { color: var(--buy); }
.sector-pct--neg { color: var(--sell); }
.note-row {
  display: grid;
  grid-template-columns: 36px 80px 1fr;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  transition: background-color 160ms ease;
}
.note-row:last-child { border-bottom: none; }
.note-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.note-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.note-ticker {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-family: "JetBrains Mono", monospace;
}
.note-date {
  font-size: 11px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}
.note-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============================================================
   CALENDAR PANEL
   ============================================================ */
.calendar-panel { grid-column: span 1; }
.cal-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cal-row:last-child { border-bottom: none; }
.cal-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.cal-date {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 6px 0;
  text-align: center;
}
.cal-date__d { font-weight: 800; font-size: 16px; line-height: 1; }
.cal-date__m { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.cal-title { font-weight: 600; font-size: 13.5px; }
.cal-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.idx-cal-row {
  display: grid;
  grid-template-columns: 44px 1fr 36px;
  gap: 12px;
  padding: 11px 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.idx-cal-row:last-child { border-bottom: none; }
.idx-cal-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.idx-cal-date {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 5px 0;
  text-align: center;
  flex-shrink: 0;
}
.idx-cal-date__d { font-weight: 800; font-size: 15px; line-height: 1; }
.idx-cal-date__m { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.idx-cal-info { min-width: 0; }
.idx-cal-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idx-cal-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.idx-cal-hora { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.idx-cal-flag { display: flex; justify-content: center; }

/* ── Index Reports panel ─────────────────────────────── */
.idx-rep-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  padding: 11px 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.idx-rep-row:last-child { border-bottom: none; }
.idx-rep-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.idx-rep-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.idx-rep-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.idx-rep-logo__fb {
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
}
.idx-rep-info { min-width: 0; }
.idx-rep-ticker {
  display: flex; align-items: baseline; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px; color: var(--text);
}
.idx-rep-fecha { font-family: inherit; font-weight: 400; font-size: 10.5px; color: var(--text-muted); }
.idx-rep-empresa { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idx-rep-badge {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 20px; white-space: nowrap;
  text-transform: uppercase;
}
.idx-rep-badge--pre  { background: rgba(148,148,168,.15); color: #9494a8; }
.idx-rep-badge--post { background: rgba(245,158,11,.15); color: #f59e0b; }
.idx-vol-val { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ── Index Activity panel ─────────────────────────────── */
.idx-act-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  align-items: center;
}
.idx-act-row:last-child { border-bottom: none; }
.idx-act-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }

.idx-act-badge {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  text-transform: uppercase;
}
.idx-act-badge--ganancia { background: rgba(34,197,94,.14);  color: #22c55e; }
.idx-act-badge--cierre   { background: color-mix(in oklab, var(--text-muted) 10%, transparent); color: var(--text-muted); }
.idx-act-badge--compra   { background: rgba(148,148,168,.14);  color: #9494a8; }
.idx-act-badge--venta    { background: rgba(239,68,68,.14);   color: #ef4444; }
.idx-act-badge--asegurar { background: rgba(245,158,11,.14);  color: #f59e0b; }
.idx-act-badge--recompra { background: rgba(168,85,247,.14);  color: #a855f7; }
.idx-act-res {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  font-weight: 600; white-space: nowrap; min-width: 52px; text-align: right;
}
.idx-act-res--pos  { color: #22c55e; }
.idx-act-res--neg  { color: #ef4444; }
.idx-act-res--none { color: var(--text-dim); }

.cal-flag-wrap {
  width: 28px; height: 20px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.cal-flag {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cal-flag-fallback {
  display: none;
  width: 100%; height: 100%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 9px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}
.cal-imp {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
.imp--alto  { background: var(--sell-soft); color: var(--sell); }
.imp--medio { background: color-mix(in oklab, #f59e0b 15%, transparent); color: #f59e0b; }
.imp--bajo  { background: var(--bg-soft); color: var(--text-muted); }

/* ============================================================
   ACTIVITY PANEL
   ============================================================ */
.activity-row {
  display: grid;
  grid-template-columns: 32px 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-row:hover { background: color-mix(in oklab, var(--accent) 4%, transparent); }
.activity-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  color: var(--text-soft);
}
.activity-dot svg { width: 14px; height: 14px; }
.activity-dot.is-buy { background: var(--buy-soft); color: var(--buy); }
.activity-dot.is-sell { background: var(--sell-soft); color: var(--sell); }
.activity-action { 
  font-size: 13.5px; 
  font-weight: 600;
  color: var(--text);
}
.activity-ticker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-ticker { 
  font-size: 14px; 
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  letter-spacing: 0.02em;
}
.activity-date { 
  color: var(--text-muted); 
  font-size: 11px; 
  font-family: "JetBrains Mono", monospace; 
}
.activity-timeframe {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  background: var(--bg-soft);
  border-radius: 6px;
  white-space: nowrap;
}

/* ============================================================
   PORTFOLIO panel (special)
   ============================================================ */
.portfolio-panel { display: flex; flex-direction: column; }
.portfolio-summary {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 2px;
  padding: 8px 18px 0;
}
.portfolio-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.portfolio-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--buy);
  background: var(--buy-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.spark { width: 100%; height: 60px; margin: 6px 0 10px; padding: 0 18px; box-sizing: border-box; }

/* ── Index portfolio panel ── */
.idx-pft-seg-bar {
  height: 6px;
  margin: 10px 18px 2px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.idx-pft-seg { height: 100%; border-radius: 99px; flex-shrink: 0; }
.idx-pft-row {
  display: grid;
  grid-template-columns: 8px 1fr 42px;
  gap: 10px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.idx-pft-row:last-child { border-bottom: none; }
.idx-pft-row:hover { background: color-mix(in oklab, var(--accent) 3%, transparent); }
.idx-pft-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.idx-pft-name {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  color: var(--text-soft);
}
.idx-pft-bar-wrap {
  height: 4px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
  width: 100%;
}
.idx-pft-bar-fill { height: 100%; border-radius: 99px; }
.idx-pft-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

/* ============================================================
   VOLUME panel
   ============================================================ */
.vol-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
}
.vol-row:last-child { border-bottom: none; }
.vol-row .stock-ticker { font-size: 13.5px; }

/* Portfolio items con barras en columna central alineadas */
.portfolio-item {
  display: grid;
  grid-template-columns: 110px 1fr 50px;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.16s ease;
}
.portfolio-item:last-child { border-bottom: none; }
.portfolio-item:hover {
  background: color-mix(in oklab, var(--accent) 4%, transparent);
}
.portfolio-item__label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.portfolio-item__pct {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.portfolio-item .stock-ticker {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.vol-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.vol-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.vol-x { font-family: "JetBrains Mono", monospace; font-size: 12.5px; font-weight: 600; text-align: right; }

/* ============================================================
   ARTÍCULOS PREVIEW — galería + trending
   ============================================================ */
.art-preview-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.art-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.art-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
}
.art-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.art-card__img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}
.art-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.art-card__img-fallback {
  width: 100%; height: 100%;
}
.art-card__cat {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  padding: 3px 7px;
  border-radius: 5px;
}

.art-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.art-card__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.art-card__lead {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  flex: 1;
}
.art-card__date {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  margin-top: 2px;
}

.art-trending {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: sticky;
  top: 80px;
}

@media (max-width: 900px) {
  .art-preview-layout {
    grid-template-columns: 1fr;
  }
  .art-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .art-trending {
    position: static;
  }
}
@media (max-width: 560px) {
  .art-gallery {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   VIDEO GALLERY
   ============================================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.4,.0,.2,1), box-shadow 220ms;
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background-color: #0f1020;
}
.video-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.55) 100%);
  transition: background 280ms ease;
}
.video-card:hover .video-thumb::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.65) 100%);
}
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: grid; place-items: center;
  color: #0a0a0a;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: background 280ms ease, color 280ms ease, transform 280ms cubic-bezier(.34,1.56,.64,1), box-shadow 280ms ease;
}
.video-play::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(197, 160, 89, 0.7);
  transform: scale(1);
  opacity: 0;
  transition: transform 500ms ease, opacity 500ms ease;
}
.video-card:hover .video-play {
  background: var(--accent);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 12px 32px rgba(197,160,89,0.35);
}
.video-card:hover .video-play::before {
  transform: scale(1.75);
  opacity: 0;
  transition: transform 500ms ease, opacity 500ms ease;
}
.video-play svg { width: 16px; height: 16px; margin-left: 2px; }
.video-duration {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  z-index: 2;
}
.video-body { padding: 16px 18px 18px; }
.video-body h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.video-body p { margin: 0; color: var(--text-muted); font-size: 12.5px; }

/* ============================================================
   FLUJO DE CAPITAL — Actividad institucional
   ============================================================ */
.flujo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.flujo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms, border-color 200ms;
}
.flujo-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.flujo-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.flujo-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flujo-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.flujo-card__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.flujo-card__badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 7px;
}
.flujo-card__badge--pos {
  background: var(--buy-soft);
  color: var(--buy);
}
.flujo-card__badge--neg {
  background: var(--sell-soft);
  color: var(--sell);
}

.flujo-chart {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 90px;
  position: relative;
}
/* línea del eje 0 */
.flujo-chart::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-strong);
  pointer-events: none;
}
.flujo-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* zona superior (positivos): ocupa mitad del alto, barra crece desde abajo */
.flujo-half--pos {
  height: 50%;
  display: flex;
  align-items: flex-end;
}
/* zona inferior (negativos): ocupa mitad del alto, barra crece desde arriba */
.flujo-half--neg {
  height: 50%;
  display: flex;
  align-items: flex-start;
}
.flujo-bar {
  width: 100%;
}
.flujo-bar--pos {
  background: #34d399;
  border-radius: 3px 3px 0 0;
}
.flujo-bar--neg {
  background: #ff7a72;
  border-radius: 0 0 3px 3px;
}

.flujo-axis {
  display: flex;
  gap: 3px;
  margin-top: 8px;
  padding: 0 1px;
}
.flujo-axis-label {
  flex: 1;
  font-size: 9.5px;
  color: var(--text-dim);
  font-family: "JetBrains Mono", monospace;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.flujo-bar-wrap { cursor: crosshair; }

.flujo-tooltip {
  position: fixed;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  pointer-events: none;
  white-space: nowrap;
}
.flujo-tip-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.flujo-tip-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}
.flujo-tip--pos { color: #34d399; }
.flujo-tip--neg { color: #ff7a72; }

/* ============================================================
   GESTORES — Portafolio institucional
   ============================================================ */
.gest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms, border-color 200ms;
}
.gest-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.gest-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.gest-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
}
.gest-info { flex: 1; min-width: 0; }
.gest-name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gest-fund {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.gest-meta { text-align: right; flex-shrink: 0; }
.gest-perf {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--buy);
}
.gest-perf--neg { color: var(--sell); }
.gest-assets {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
}

.gest-positions { padding: 8px 0 0; }
.gest-pos-row {
  display: grid;
  grid-template-columns: 18px 46px 1fr 38px;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
}
.gest-pos-row:last-child { padding-bottom: 4px; }
.gest-pos-logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.gest-ticker {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-text);
}
.gest-co {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gest-bar-wrap {
  position: relative;
  height: 3px;
  border-radius: 99px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-top: 3px;
  grid-column: 1 / -1;
}
.gest-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0.55;
}
.gest-pct {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: right;
}

.gest-expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: color 180ms, background 180ms;
  margin-top: 4px;
}
.gest-expand-btn:hover { color: var(--text); background: color-mix(in oklab, var(--accent) 4%, transparent); }
.gest-expand-btn svg { transition: transform 240ms cubic-bezier(.4,.0,.2,1); flex-shrink: 0; }
.gest-card.is-open .gest-expand-btn svg { transform: rotate(180deg); }

.gest-extra { display: none; }
.gest-card.is-open .gest-extra { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn, a.btn, button.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.btn svg, a.btn svg, button.btn svg { flex-shrink: 0; }

.btn--primary, a.btn--primary, button.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn--ghost, a.btn--ghost, button.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border-strong);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: var(--accent-text);
}
.btn--ghost svg {
  transition: transform 0.2s ease;
}
.btn--ghost:hover svg {
  transform: translateX(3px);
}

.btn--accent, a.btn--accent, button.btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--accent:hover { opacity: 0.88; transform: translateY(-1px); }
.btn--accent:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn--accent.is-success { background: var(--buy, #22c55e); border-color: var(--buy, #22c55e); }

.form-feedback {
  font-size: 13px;
  margin-top: 10px;
  border-radius: 8px;
  min-height: 0;
  transition: all 200ms ease;
}
.form-feedback--ok {
  color: var(--buy, #22c55e);
  background: rgba(34,197,94,0.08);
  padding: 10px 14px;
}
.form-feedback--err {
  color: var(--sell, #ef4444);
  background: rgba(239,68,68,0.08);
  padding: 10px 14px;
}

/* ============================================================
   MENTORING — sección de entrenamiento personalizado
   ============================================================ */
.mentor2 {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

/* Fila superior: header a la izquierda, stats a la derecha */
.mentor2__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Separador entre las dos filas */
.mentor2__bottom {
  display: grid;
  grid-template-columns: 1fr minmax(0, 340px);
  gap: 28px;
  align-items: start;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.mentor2__header { min-width: 0; }

.mentor2__title {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
.mentor2__title em {
  font-style: italic;
  color: var(--accent-text);
}

.mentor2__lead {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.mentor2__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mentor2__stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mentor2__stat-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-text);
  line-height: 1;
  letter-spacing: -0.03em;
}
.mentor2__stat-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.mentor2__method { min-width: 0; }
.mentor2__method-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.mentor2__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.mentor2__list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.45;
}
.mentor2__list li:last-child { border-bottom: none; }
.mentor2__list-n {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 20px;
}
.mentor2__list-t {
  font-size: 13.5px;
  color: var(--text-soft);
}

/* Columna derecha — formulario */
.mentor2__right {
  position: relative;
}
.mentor2__form-wrap {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.mentor2__form-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mentor2__form-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}
.mentor2__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mentor2__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 180ms ease, transform 180ms ease;
  letter-spacing: 0.02em;
}
.mentor2__submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.mentor2__submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.mentor2__submit.is-success { background: var(--buy, #22c55e); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  align-items: start;
}
.contact__info h2 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.contact__info > p { color: var(--text-muted); margin: 0; font-size: 14.5px; line-height: 1.6; }

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}
.contact__channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.contact__channel:hover {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.contact__channel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.18s ease;
}
.contact__channel:hover .contact__channel-icon {
  color: var(--accent-text);
}
.contact__channel-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.contact__channel-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.contact__channel-handle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}
.contact__response-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px !important;
  font-size: 12px !important;
  color: var(--text-dim) !important;
}

.form {
  display: flex; flex-direction: column; gap: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field input, .field textarea, .field select {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  width: 100%;
}
.field select option {
  background: #1e1e22;
  color: #f4f3ef;
}
html[data-theme="light"] .field select option {
  background: #ffffff;
  color: #0a0a0a;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 110px; }
.form__submit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form__hint { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 5, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform 220ms cubic-bezier(.4,.0,.2,1);
  position: relative;
  
  /* Ocultar scrollbar pero mantener funcionalidad */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
}
.modal::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.modal-backdrop.is-open .modal { transform: none; }
.modal__media {
  aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  background-color: #141210;
  position: relative;
}
.modal__close {
  position: fixed; /* Cambio de absolute a fixed para que permanezca visible */
  top: calc(6vh + 40px); /* Ajustado para que esté dentro del área visible del modal */
  right: calc((100vw - 760px) / 2 + 40px); /* Centrado con respecto al modal */
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(10,10,14,0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.16);
  z-index: 101;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal__close:hover {
  background: rgba(225, 69, 58, 0.85);
  border-color: rgba(255,255,255,0.3);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(225, 69, 58, 0.4);
}
.modal__close svg { 
  width: 14px; height: 14px;
  transition: transform 0.3s ease;
}
.modal__close:hover svg {
  transform: scale(1.15);
}
.modal__body { padding: 28px 32px 32px; }
.modal__meta { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.modal__body h2 { margin: 0 0 14px; font-size: 28px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.modal__body p { color: var(--text-soft); font-size: 15px; line-height: 1.7; margin: 0 0 12px; }
.modal__body p.lead { font-size: 17px; color: var(--text); font-weight: 500; }

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

/* Tablet: sidebar auto-colapsado a icon-only (881–1200px) */
@media (min-width: 881px) and (max-width: 1200px) {
  /* Por defecto en tablet: icon-only */
  .app { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
  .sidebar { padding: 18px 12px; align-items: center; }
  .brand__name,
  .nav-item span:not(.icon),
  .nav-item .badge,
  .nav-group__label,
  .user-card__meta { display: none; }
  .nav-item { justify-content: center; padding: 7px; width: 44px; height: 36px; }
  .nav-divider { display: none; }
  .user-card { padding: 6px; justify-content: center; }
  .brand { justify-content: center; padding: 0; }

  /* Tooltip al hover en modo colapsado */
  .nav-item { position: relative; }
  .nav-item > span:not(.icon):not(.badge) {
    display: block !important;
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease;
    z-index: 300;
  }
  .nav-item:hover > span:not(.icon):not(.badge) { opacity: 1; }

  /* Sidebar expandido (is-expanded): flota sobre el contenido */
  .app.is-expanded { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
  .app.is-expanded .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 18px 14px 18px 18px;
    align-items: flex-start;
    z-index: 200;
    box-shadow: 4px 0 32px rgba(0,0,0,0.35);
  }
  .app.is-expanded .brand__name,
  .app.is-expanded .nav-item span:not(.icon),
  .app.is-expanded .nav-item .badge,
  .app.is-expanded .nav-group__label,
  .app.is-expanded .user-card__meta { display: block !important; }
  .app.is-expanded .nav-item { justify-content: flex-start; padding: 7px 12px; width: auto; height: auto; }
  .app.is-expanded .user-card { padding: 10px; justify-content: flex-start; }
  .app.is-expanded .brand { justify-content: flex-start; padding: 4px 6px; }
  .app.is-expanded .nav-item > span:not(.icon):not(.badge) { position: static; opacity: 1; transform: none; background: none; border: none; box-shadow: none; padding: 0; }
  .app.is-expanded ~ .sidebar-overlay,
  .sidebar-overlay.is-expanded {
    display: block !important;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 199;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 200;
    padding: 18px 14px 18px 18px !important;
    background: var(--bg);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .sidebar.is-open {
    left: 0;
  }
  
  /* Mostrar todos los elementos del menú cuando está abierto */
  .sidebar .brand__name,
  .sidebar .nav-item span:not(.icon),
  .sidebar .nav-item .badge,
  .sidebar .nav-group__label,
  .sidebar .user-card__meta {
    display: block !important;
  }
  
  .sidebar .nav-item {
    justify-content: flex-start !important;
    padding: 10px 12px !important;
  }
  
  .sidebar .user-card {
    padding: 12px !important;
    justify-content: flex-start !important;
  }
  
  /* Overlay oscuro detrás del menú */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  
  .topbar__links { display: none; }
  .search { max-width: none; }
  .content { padding: 22px 18px 60px; }
  .page-head h1 { font-size: 18px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.site-footer__brand { padding-right: 16px; }
.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.site-footer__logo .page-eyebrow__dot {
  background: var(--text-muted);
  box-shadow: none;
}
.site-footer__logo-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.site-footer__logo-text em {
  font-style: normal;
  color: var(--text-muted);
}
.site-footer__tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 10px;
}
.site-footer__disclaimer {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer__col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.site-footer__col a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer__col a:hover { color: var(--text-soft); }
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 32px;
  gap: 16px;
}
.site-footer__copy {
  font-size: 12px;
  color: var(--text-dim);
}
.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-footer__legal a {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer__legal a:hover { color: var(--text-muted); }
.site-footer__dot { color: var(--text-dim); font-size: 12px; }

@media (max-width: 1100px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer__brand { grid-column: 1 / -1; padding-right: 0; }
}
@media (max-width: 560px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================ */

@media (max-width: 1100px) {
  .hero3 { grid-template-columns: 1fr; }
  .hero3__left { order: 2; }
  .hero3__center { order: 1; min-height: 380px; }
  .hero3__right { order: 3; }
  .hero { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .mentor2 { padding: 28px; }
  .mentor2__top { grid-template-columns: 1fr; gap: 20px; }
  .mentor2__bottom { grid-template-columns: 1fr; }
  .mentor2__right { position: static; }
  .gest-grid { grid-template-columns: repeat(2, 1fr); }
  .flujo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  /* Section heads: botón/label de la derecha pasa debajo del título */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topbar {
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  /* Fila superior: toggle + botones de la derecha */
  #sidebarToggle { order: 1; }
  .topbar__right { order: 2; margin-left: auto; }
  /* Barra de búsqueda ocupa fila completa debajo */
  .search-wrap { order: 3; width: 100%; }
  .search { max-width: none; width: 100%; }
  .icon-btn { width: 38px; height: 38px; }
  .ticker-pill { font-size: 12px; padding: 6px 11px; }
  .featured__body { padding: 20px; }
  .featured h2 { font-size: 22px; }
  .panel { padding: 16px; }
  .mentor2 { padding: 20px; }
  .mentor2__title { font-size: 22px; }
  .mentor2__stats { grid-template-columns: 1fr; }
  .contact { padding: 22px; }
  
  /* Panel de notificaciones en móvil */
  .notifications-panel {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
    max-width: 380px;
  }
  
  /* Ajustar botón X del modal en móvil */
  .modal__close {
    top: 32px;
    right: 32px;
  }
}

/* Media query para tablets y pantallas medianas */
@media (max-width: 820px) {
  .modal__close {
    right: calc((100vw - 90vw) / 2 + 24px);
  }
}

/* Overlay debe estar oculto por defecto en desktop */
@media (min-width: 881px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* ============================================================
   ESTADO PREVIEW — index.html
   ============================================================ */
.estado-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(175px, 100%), 1fr));
  gap: 8px;
}

/* ============================================================
   ESTADO DEL MERCADO - estado.html
   ============================================================ */

/* Contadores globales en el page-head */
.estado-totals {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: var(--shadow-sm);
}
.estado-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 8px;
}
.estado-total__num {
  font-size: 16px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.estado-total__label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.estado-total--compra  .estado-total__num { color: var(--buy); }
.estado-total--neutral .estado-total__num { color: var(--text-muted); }
.estado-total--venta   .estado-total__num { color: var(--sell); }
.estado-total__sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

/* Secciones */
#estadoSections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.estado-section__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}

/* Grid de tarjetas */
.estado-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(175px, 100%), 1fr));
  gap: 8px;
}

/* Tarjeta individual */
.estado-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
  cursor: default;
}
.estado-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Fila superior: nombre + badge */
.estado-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.estado-card__name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

/* Badge de estado */
.estado-card__badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.estado-card--compra  .estado-card__badge { background: var(--buy-soft);  color: var(--buy); }
.estado-card--neutral .estado-card__badge { background: var(--bg-soft);   color: var(--text-muted); border: 1px solid var(--border); }
.estado-card--venta   .estado-card__badge { background: var(--sell-soft); color: var(--sell); }

/* Fecha */
.estado-card__date {
  font-size: 10.5px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  padding-bottom: 6px;
}

/* Línea de color en el fondo — margin negativo para romper el padding del card */
.estado-card__bar {
  height: 3px;
  margin: 0 -14px;
  margin-top: auto;
}
.estado-card--compra  .estado-card__bar { background: var(--buy); }
.estado-card--neutral .estado-card__bar { background: var(--border-strong); }
.estado-card--venta   .estado-card__bar { background: var(--sell); }

/* Responsive */
@media (max-width: 768px) {
  .estado-cards { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 6px; }
}
@media (max-width: 480px) {
  .estado-cards { grid-template-columns: 1fr; }
  .gest-grid { grid-template-columns: 1fr; }
  .flujo-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGE EYEBROW — dot + label reutilizable
   ============================================================ */
.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.page-eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent);
}
.page-eyebrow__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================================
   PAGE HERO — header visual reutilizable (notas, daytrading…)
   ============================================================ */
.page-hero {
  position: relative;
  padding: 8px 4px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-hero__bg-mark {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 130px;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--border);
  opacity: 0.2;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.page-hero__left {
  position: relative;
  z-index: 1;
}

.page-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.page-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent);
}

.page-hero__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-hero__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.page-hero__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.page-hero__right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.page-hero__stat {
  text-align: right;
}

.page-hero__stat-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.page-hero__stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

.page-hero__filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .page-hero { padding: 24px 22px 22px; flex-direction: column; align-items: flex-start; }
  .page-hero__right { align-items: flex-start; }
  .page-hero__title { font-size: 24px; }
  .page-hero__bg-mark { font-size: 80px; }
  .page-hero__stat { text-align: left; }
}

/* ============================================================
   SCROLLBAR (subtle)
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.content > * { animation: pop-in 360ms cubic-bezier(.4,.0,.2,1) backwards; }
.content > *:nth-child(1) { animation-delay: 0ms; }
.content > *:nth-child(2) { animation-delay: 60ms; }
.content > *:nth-child(3) { animation-delay: 120ms; }
.content > *:nth-child(4) { animation-delay: 180ms; }
.content > *:nth-child(5) { animation-delay: 240ms; }
