/* ============================================
   CEDEARs.AR — Bloomberg Argentina
   Dark terminal aesthetic, IBM Plex
   ============================================ */

:root {
  --bg:          #0a0d12;
  --bg2:         #111922;
  --bg3:         #1a2332;
  --border:      #243040;
  --border2:     #2e3d52;
  --text:        #d4dce8;
  --text-muted:  #7a8fa8;
  --text-dim:    #526070;
  --accent:      #e8a020;
  --accent2:     #f0b840;
  --up:          #00d084;
  --up-muted:    #00d08440;
  --down:        #ff4d4d;
  --down-muted:  #ff4d4d40;
  --blue:        #4a9eff;
  --mono:        'IBM Plex Mono', monospace;
  --sans:        'IBM Plex Sans', sans-serif;
  --radius:      4px;
  --radius-card: 8px;
}

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

html { font-size: 14px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ─── NAVBAR GLOBAL ─── */
.navbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Logo */
.nav-brand { flex-shrink: 0; margin-right: 20px; }
.nav-logo-link { display: flex; align-items: center; }
.nav-logo {
  height: 40px;
  width: auto;
  display: block;
  background: #ffffff;
  border-radius: 5px;
  padding: 4px 8px;
  object-fit: contain;
}

/* Links centrales */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: visible;
}
.nav-link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.nav-active { color: var(--accent); background: var(--bg3); }

/* Acciones derecha */
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

/* Menú de perfil */
.nav-profile { position: relative; }
.nav-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 5px 12px 5px 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
}
.nav-profile-btn:hover { border-color: var(--accent); }
.nav-profile-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-caret { transition: transform .2s; }
.nav-profile.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden;
  z-index: 300;
}
.nav-profile.open .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: background .12s;
}
.nav-dropdown a:hover { background: var(--bg3); color: var(--accent); }
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* Hamburger mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s;
}

/* Botón pequeño */
.btn-sm { font-size: 12px; padding: 5px 12px; }

/* Ticker — mantenido oculto para compatibilidad */
.nav-ticker, .ticker-inner, .tick-item { display: none !important; }

/* ─── DÓLAR BAR ─── */
.dolar-bar {
  background: #060a0f;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.dolar-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 36px;
  overflow-x: auto;
}

.dolar-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.dolar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dolar-name {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.dolar-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.dolar-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}

/* ─── CONTAINER ─── */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* ─── SUMMARY GRID ─── */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.summary-card h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.summary-card.gainers h3 { color: var(--up); }
.summary-card.losers h3 { color: var(--down); }

.summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  transition: background .15s;
  border-radius: 2px;
  padding: 4px 6px;
  margin: 0 -6px;
}
.summary-row:hover { background: var(--bg3); }
.s-ticker { font-family: var(--mono); font-size: 12px; font-weight: 600; width: 50px; }
.s-nombre { font-size: 11px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-price  { font-family: var(--mono); font-size: 12px; text-align: right; }
.s-var    { font-family: var(--mono); font-size: 12px; width: 55px; text-align: right; }

.stat-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-row label { font-size: 12px; color: var(--text-muted); }
.stat-row val { font-family: var(--mono); font-size: 13px; font-weight: 600; }

/* ─── FILTER BAR ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-left { flex-shrink: 0; }

.search-input {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  width: 260px;
  outline: none;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }

.filter-right { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1; }
.filter-label { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }

.filter-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--sans);
  transition: all .15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.filter-view { display: flex; gap: 4px; }
.view-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.view-btn.active, .view-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ─── MARKET TABLE ─── */
.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.market-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .8px;
  color: var(--text-dim);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: var(--th-top, 60px);
  z-index: 10;
  white-space: nowrap;
}

.market-table th.sortable { cursor: pointer; user-select: none; }

/* cotizaciones.php — disable sticky on th since parent has overflow-x:auto */
.cotizaciones-table th {
  position: static;
}
.market-table th.sortable:hover { color: var(--accent); }
.market-table th.num { text-align: right; }

.market-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cedear-row { transition: background .1s; }
.cedear-row:hover { background: var(--bg2); }

.ticker-link {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.ticker-link:hover { color: var(--accent); }

.empresa-cell { max-width: 200px; }
.empresa-nombre { display: block; }
.empresa-origen { display: block; font-size: 11px; color: var(--text-muted); }

.sector-badge {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
.sector-badge.sm { font-size: 9px; padding: 1px 4px; }

.num { text-align: right; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-muted) !important; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.up-muted { color: #00d08480 !important; font-family: var(--mono); }
.down-muted { color: #ff4d4d80 !important; font-family: var(--mono); }

.var-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 2px;
}
.var-badge.up { background: var(--up-muted); color: var(--up); }
.var-badge.down { background: var(--down-muted); color: var(--down); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }

.btn-outline {
  background: transparent;
  border-color: var(--border2);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-block { width: 100%; }
.btn.sm { padding: 3px 8px; font-size: 11px; }

.wl-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: color .15s, transform .15s;
  padding: 2px 4px;
}
.wl-btn:hover, .wl-btn.active { color: var(--accent); transform: scale(1.1); }

.alert-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  transition: all .15s;
  white-space: nowrap;
}
.alert-btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-detail {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .15s;
}
.btn-detail:hover { border-color: var(--accent); color: var(--accent); }
.btn-detail.sm { font-size: 10px; }

/* ─── GRID VIEW ─── */
.cedear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.cedear-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: default;
  transition: border-color .15s;
}
.cedear-card:hover { border-color: var(--border2); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card-ticker { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--blue); }
.card-empresa { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.card-precio { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.card-usd { font-family: var(--mono); font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.card-var { font-family: var(--mono); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #00000088;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 20px 60px #000a;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  transition: color .15s;
}
.modal-close:hover { color: var(--down); }

.modal-body { padding: 20px; }
.modal-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ─── FORMS ─── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: .5px;
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--accent); }
.form-control option { background: var(--bg2); }

/* ─── AUTH PAGES ─── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.auth-container { width: 400px; max-width: 95vw; }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.auth-card h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}
.auth-link a { color: var(--accent); text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { background: #ff4d4d20; border: 1px solid var(--down); color: var(--down); }
.alert-success { background: #00d08420; border: 1px solid var(--up); color: var(--up); }

/* ─── CEDEAR DETAIL ─── */
.breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.cedear-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  gap: 24px;
}

.hero-ticker {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 8px;
}
.hero-nombre { font-size: 18px; margin-bottom: 12px; }
.hero-meta { display: flex; gap: 10px; align-items: center; }

.hero-right { text-align: right; }
.hero-price { font-family: var(--mono); font-size: 32px; font-weight: 600; line-height: 1; margin-bottom: 6px; }
.hero-usd { font-family: var(--mono); font-size: 16px; color: var(--text-muted); margin-bottom: 8px; }
.hero-var { font-family: var(--mono); font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.hero-actions { display: flex; gap: 8px; justify-content: flex-end; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat-box label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.stat-box val { font-family: var(--mono); font-size: 15px; font-weight: 600; }

.chart-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chart-header h3 { font-size: 14px; }

/* ─── WATCHLIST PAGE ─── */
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 22px; }
.page-header p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.wl-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}
.wl-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius);
  text-align: center;
}
.wl-stat label { display: block; font-size: 10px; font-family: var(--mono); color: var(--text-dim); margin-bottom: 4px; }
.wl-stat val { font-family: var(--mono); font-size: 20px; font-weight: 600; }

.section-header { margin: 28px 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.section-header h2 { font-size: 16px; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state.sm { padding: 24px; }
.empty-icon { font-size: 36px; margin-bottom: 12px; color: var(--text-dim); }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.empty-state p { margin-bottom: 16px; font-size: 13px; }

/* ─── FOOTER ─── */
.footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 0;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo { height: 28px; width: auto; }
.footer-tagline { font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 280px; }
.footer-disclaimer {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 7px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copyright {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ─── TOAST NOTIFICATION ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 9999;
  animation: slideInToast .3s ease;
  max-width: 300px;
  box-shadow: 0 8px 24px #0008;
}
.toast.success { border-left: 3px solid var(--up); }
.toast.error   { border-left: 3px solid var(--down); }
.toast.info    { border-left: 3px solid var(--accent); }

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

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card.market-stat { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 14px; height: 54px; }
  .nav-logo { height: 30px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    z-index: 199;
    overflow: visible;
  }
  .nav-links.open { display: flex; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--bg3);
    padding-left: 16px;
  }
  .nav-dropdown-group.open .nav-dropdown-menu { display: block; }
  .nav-link { padding: 10px 20px; border-radius: 0; }
  .nav-hamburger { display: flex; }
  .nav-profile-name { display: none; }
  .container { padding: 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cedear-hero { flex-direction: column; }
  .hero-right { text-align: left; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }
  .market-table { font-size: 12px; }
}

/* ─── LAYOUT CON SIDEBAR ─── */
.main-layout {
  display: flex;
  gap: 0;
  max-width: 1700px;
  margin: 0 auto;
}

.content-col { flex: 1; min-width: 0; }

.sidebar-col {
  width: 300px;
  flex-shrink: 0;
  padding: 20px 16px 20px 0;
}

.sticky-ad { position: sticky; top: 60px; }

/* ─── GOOGLE ADS ZONES ─── */
.ads-zone {
  background: var(--bg2);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
}

.ads-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1px;
  position: absolute;
  top: 4px;
  left: 8px;
}

.ads-placeholder {
  padding: 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ads-top {
  margin: 0;
  padding: 8px;
  min-height: 50px;
  max-height: 200px;
  overflow: hidden;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

/* Evitar que AdSense rompa el layout */
.ads-zone ins.adsbygoogle {
  display: block !important;
  max-height: 200px;
}
.ads-top ins.adsbygoogle {
  max-height: 120px;
}

.ads-mid {
  margin: 20px 0;
  min-height: 100px;
}

.ads-news {
  margin: 20px 0 0;
  min-height: 70px;
}

.ads-sidebar {
  min-height: 550px;
}

.ads-placeholder.tall {
  min-height: 540px;
  flex-direction: column;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2;
}

/* ─── TABS ─── */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-count {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.tab-refresh {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── NEWS SECTION ─── */
.news-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.news-header h2 {
  font-size: 15px;
  font-family: var(--mono);
  letter-spacing: .5px;
  color: var(--text-muted);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Home — 3 noticias en columnas iguales, sin featured */
.news-grid-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* En el home, ninguna tarjeta ocupa más de 1 columna */
.news-grid-home .news-card {
  grid-column: span 1 !important;
  flex-direction: column !important;
}

/* Imagen cuadrada fija en home */
.news-grid-home .news-img {
  height: 180px;
  width: 100%;
}

.news-ver-mas {
  display: flex;
  justify-content: center;
  margin: 20px 0 4px;
}

.news-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
}

.news-card:hover { border-color: var(--border2); }

.news-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.news-featured .news-img {
  width: 320px;
  flex-shrink: 0;
}

.news-img {
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg3);
}

.news-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-fuente {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.news-titulo {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.news-titulo a {
  color: var(--text);
  text-decoration: none;
}
.news-titulo a:hover { color: var(--accent); }

.news-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.news-fecha {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: auto;
}

.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.news-empty p { margin-bottom: 16px; font-size: 13px; }

/* ─── RESPONSIVE SIDEBAR ─── */
@media (max-width: 1200px) {
  .sidebar-col { display: none; }
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-featured { flex-direction: column; }
  .news-featured .news-img { width: 100%; }
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .tabs-bar { overflow-x: auto; }
}

/* ─── TIPO BADGES (CDR / ARG) ─── */
.tipo-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: .5px;
}
.badge-cdr { background: #4a9eff22; color: var(--blue); border: 1px solid #4a9eff44; }
.badge-arg { background: #e8a02022; color: var(--accent); border: 1px solid #e8a02044; }

/* ─── PROGRESS BAR (alertas) ─── */
.progress-bar {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
  width: 80px;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s;
}
.progress-fill.up   { background: var(--up); }
.progress-fill.down { background: var(--down); }

/* ─── ALERT INFO BOX ─── */
.alert-info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.alert-info-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── PAGE HEADER con botón ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.page-header h1 { font-size: 22px; }

/* ─── DOLAR LOADING STATE ─── */
.dolar-loading { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ─── PERIOD SELECTOR ─── */
.period-selector {
  display: flex;
  gap: 4px;
  align-items: center;
}

.period-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: .5px;
  transition: all .15s;
}

.period-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.period-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ─── CHART HEADER UPDATED ─── */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-title-group h3 {
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: .3px;
}

.chart-var-periodo {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius);
}
.chart-var-periodo.up   { background: var(--up-muted);   color: var(--up); }
.chart-var-periodo.down { background: var(--down-muted); color: var(--down); }

/* ─── CHART STATUS / LOADING ─── */
.chart-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 13px;
  flex-direction: column;
  text-align: center;
}

.chart-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── CHART FOOTER ─── */
.chart-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== v2.2 admin + editorial ===== */
.hero-editorial, .page-hero {
  display:grid; grid-template-columns:2fr 1fr; gap:24px; align-items:stretch;
  background:linear-gradient(135deg, rgba(25,37,68,.95), rgba(10,16,30,.95));
  border:1px solid rgba(255,255,255,.08); border-radius:18px; padding:28px; margin:18px 0 22px;
}
.hero-editorial h1, .page-hero h1 { margin:0 0 12px; font-size:clamp(28px,4vw,42px); }
.hero-editorial p, .page-hero p { color:#b9c3d8; line-height:1.6; }
.hero-editorial-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; }
.hero-mini-card { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:20px; }
.section-kicker { display:inline-block; font:600 11px var(--mono); letter-spacing:.12em; color:#84a7ff; margin-bottom:10px; }
.editorial-section { margin:32px 0; }
.editorial-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
.editorial-card { background:#0f1729; border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:18px; display:flex; flex-direction:column; gap:12px; }
.editorial-card h3 { margin:0; font-size:20px; line-height:1.35; }
.editorial-card h3 a { color:#fff; text-decoration:none; }
.editorial-card p { margin:0; color:#b7c2d9; line-height:1.55; }
.editorial-meta { margin-top:auto; display:flex; justify-content:space-between; gap:12px; font-size:12px; color:#8ea0c6; }
.editorial-meta a { color:#8cb3ff; text-decoration:none; }
.page-shell { max-width:1180px; margin:0 auto; padding:24px; }
.article-shell { max-width:900px; }
.article-page { background:#0f1729; border:1px solid rgba(255,255,255,.08); border-radius:18px; padding:28px; }
.article-page h1 { margin:8px 0 8px; font-size:clamp(30px,4vw,46px); }
.article-meta, .article-excerpt { color:#b7c2d9; }
.article-content { margin-top:22px; line-height:1.8; color:#edf2ff; }
.article-content p { margin:0 0 16px; }
.blog-grid { margin-top:22px; }

.admin-page { background:#09111f; color:#edf2ff; }
.admin-shell { display:grid; grid-template-columns:260px 1fr; min-height:100vh; }
.admin-sidebar { background:#0d1628; border-right:1px solid rgba(255,255,255,.06); padding:24px 18px; }
.admin-brand { display:flex; gap:12px; align-items:center; margin-bottom:26px; }
.admin-brand small { display:block; color:#8ea0c6; }
.admin-menu { display:flex; flex-direction:column; gap:8px; }
.admin-menu a { color:#dbe6ff; text-decoration:none; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.03); }
.admin-menu a:hover { background:rgba(132,167,255,.12); }
.admin-main { padding:24px; }
.admin-topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
.admin-topbar h1 { margin:0; }
.admin-grid { display:grid; gap:18px; margin-bottom:18px; }
.admin-grid.cards-4 { grid-template-columns:repeat(4,1fr); }
.admin-grid.two-col { grid-template-columns:1.2fr 1fr; }
.admin-card, .panel-card { background:#0f1729; border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-card); padding:18px; }
.admin-card span, .admin-card small { display:block; color:#93a7cf; }
.admin-card strong { display:block; font-size:34px; margin:8px 0; }
.panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.panel-head h2 { margin:0; font-size:20px; }
.admin-table { width:100%; border-collapse:collapse; }
.admin-table th, .admin-table td { padding:11px 10px; border-bottom:1px solid rgba(255,255,255,.08); text-align:left; vertical-align:top; }
.admin-table th { color:#90a4cc; font:600 12px var(--mono); letter-spacing:.08em; }
.admin-table code { color:#9fd0ff; }
.row-actions { white-space:nowrap; }
.row-actions a, .admin-table a { color:#9ec0ff; text-decoration:none; margin-right:10px; }
.status-badge { display:inline-block; padding:4px 9px; border-radius:999px; font-size:12px; }
.status-badge.ok { background:rgba(32,197,107,.18); color:#80e2ab; }
.status-badge.draft { background:rgba(255,184,77,.14); color:#ffd48f; }
.quick-actions { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
.admin-form .form-control { background:#0b1424; color:#edf2ff; border:1px solid rgba(255,255,255,.1); }
.form-grid.two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.checkbox-line { display:flex; align-items:end; }
.admin-editor { min-height:340px; font-family:var(--mono); }
.form-actions { display:flex; gap:12px; margin-top:18px; }
.alert-success { background:rgba(32,197,107,.14); border:1px solid rgba(32,197,107,.28); color:#9de2bb; padding:12px 14px; border-radius:12px; margin-bottom:16px; }

@media (max-width: 980px) {
  .admin-shell { grid-template-columns:1fr; }
  .admin-grid.cards-4, .admin-grid.two-col, .hero-editorial, .page-hero, .form-grid.two-col { grid-template-columns:1fr; }
}

/* v2.3 newsletter + cartera */
.newsletter-strip{
  display:grid;
  grid-template-columns:1.5fr 1fr;
  gap:18px;
  align-items:center;
  background:linear-gradient(135deg,rgba(11,18,32,.95),rgba(18,31,54,.95));
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:22px;
  margin:18px 0 22px;
}
.newsletter-strip h3{margin:6px 0;font-size:24px}
.newsletter-strip p{margin:0;color:#9fb0c8}
.newsletter-inline-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:center}
.portfolio-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.admin-notice{padding:12px 14px;border-radius:12px;margin:0 0 16px;border:1px solid rgba(255,255,255,.08)}
.admin-notice.success{background:rgba(34,197,94,.12);color:#b8f7ca}
.admin-notice.error{background:rgba(239,68,68,.12);color:#ffd0d0}
.admin-form label{display:block;margin:10px 0 6px;font-weight:600}
.admin-list{margin:0;padding-left:18px;color:#9fb0c8}
.admin-list li{margin:0 0 8px}
.portfolio-layout .panel-card{height:fit-content}
@media (max-width: 900px){
  .newsletter-strip,.newsletter-inline-form{grid-template-columns:1fr}
  .portfolio-summary-grid{grid-template-columns:1fr}
}


/* ===== v2.4 editorial + ads helpers ===== */
.blog-shell-layout, .article-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px; align-items:start; }
.blog-sidebar { display:flex; flex-direction:column; gap:18px; }
.sidebar-panel { background:rgba(10,14,22,.9); border:1px solid rgba(255,255,255,.08); border-radius:18px; padding:20px; box-shadow:0 10px 30px rgba(0,0,0,.25); }
.blog-filters { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 24px; }
.filter-chip { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px; border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.03); color:#dbe7ff; text-decoration:none; font-size:13px; }
.filter-chip span { opacity:.8; font-family:var(--mono); font-size:11px; }
.filter-chip.active { background:linear-gradient(135deg, rgba(0,255,194,.16), rgba(88,101,242,.18)); border-color:rgba(0,255,194,.28); }
.topic-list { margin:12px 0 0; padding-left:18px; }
.topic-list li { margin:0 0 10px; color:#c8d3ea; }
.topic-list a { color:#e8f0ff; text-decoration:none; }
.topic-list a:hover { text-decoration:underline; }
.blog-inline-ad { grid-column:1 / -1; }
.article-top-ad { margin-bottom:18px; }
.rich-content { color:#dce8f8; line-height:1.8; }
.rich-content h2, .rich-content h3 { margin:28px 0 12px; color:#ffffff; }
.rich-content p { margin:0 0 16px; }
.rich-content ul, .rich-content ol { margin:0 0 18px 20px; }
.rich-content li { margin-bottom:10px; }
.rich-content .article-callout { border:1px solid rgba(0,255,194,.18); background:rgba(0,255,194,.06); border-radius:16px; padding:16px 18px; margin:20px 0; }
.related-posts { margin-top:28px; }
.compact-grid .blog-card h3 { min-height:auto; }
.auth-inline-ad { width:min(480px, calc(100% - 32px)); margin:18px auto 0; }
@media (max-width: 980px) {
  .blog-shell-layout, .article-layout { grid-template-columns:1fr; }
  .blog-sidebar { order:2; }
}

/* v2.5 comparador, calculadoras y herramientas */
.tools-strip {
  margin: 22px 0;
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(18,28,48,.94), rgba(14,21,37,.92));
}
.tools-strip-actions { display:flex; gap:10px; flex-wrap:wrap; }
.content-grid-2 { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:18px; margin:20px 0; }
.comparison-table-wrap { overflow:auto; }
.comparison-table { width:100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td { padding:14px 12px; border-bottom:1px solid rgba(255,255,255,.08); vertical-align:top; }
.comparison-table th { text-align:left; font-size:12px; color:var(--muted); letter-spacing:.05em; }
.broker-brand { display:flex; align-items:flex-start; gap:12px; }
.broker-brand p { margin:4px 0 0; font-size:13px; color:var(--muted); }
.broker-logo { min-width:58px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#121d30; border:1px solid rgba(255,255,255,.08); font-family:var(--mono); font-size:12px; font-weight:700; }
.rating-pill { display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:999px; background:rgba(34,197,94,.12); color:#8df4b1; font-weight:700; }
.calc-card, .calc-results { min-height: 100%; }
.calc-result-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid rgba(255,255,255,.08); gap:12px; }
.calc-result-row strong { font-size:22px; }
.checkbox-row label { display:flex; gap:8px; align-items:center; }
@media (max-width: 900px) {
  .tools-strip, .content-grid-2 { grid-template-columns:1fr; display:grid; }
  .comparison-table { min-width: 860px; }
}


.broker-cta-bar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:12px 0 24px}
.broker-detail-grid{margin-bottom:20px}
.broker-rich-content h3{margin-top:20px}
.broker-logo a{text-decoration:none;color:inherit}
@media (max-width: 900px){.broker-cta-bar{align-items:flex-start}}


/* v2.6.1 safe additions */
.content-grid-2{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;margin:16px 0;}
@media(max-width:980px){.content-grid-2{grid-template-columns:1fr;}}
.compact-links a{display:block;padding:8px 0;border-bottom:1px solid var(--border);text-decoration:none;}
.brokers-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;}
.broker-card{background:var(--bg2);border:1px solid var(--border);padding:16px;border-radius:var(--radius);}
.broker-card-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;}
.mini-specs{list-style:none;padding:0;margin:10px 0 14px;}
.mini-specs li{padding:4px 0;color:var(--text-muted);}
.card-actions{display:flex;gap:8px;flex-wrap:wrap;}
.article-shell{max-width:980px;margin:0 auto;padding:20px 24px 60px;}
.article-card h1{margin-bottom:12px;}
.article-card p{margin:0 0 14px;}
.article-card h2{margin:22px 0 10px;}
.article-card ul{margin-left:18px;}

/* ─── NOTICIAS PAGE ─── */
.news-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.news-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 24px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.news-grid-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.news-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
}

.news-card:hover { border-color: var(--accent); }

.news-card-featured {
  grid-column: span 1;
}

.news-img {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg3);
  flex-shrink: 0;
}

.news-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.news-fuente {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-titulo {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.news-titulo a {
  color: var(--text);
  text-decoration: none;
}

.news-titulo a:hover { color: var(--accent); }

.news-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.news-fecha {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: auto;
  padding-top: 6px;
}

.news-inline-ad {
  grid-column: 1 / -1;
  margin: 8px 0;
}

@media (max-width: 768px) {
  .news-grid-full { grid-template-columns: 1fr; }
  .news-card-featured { grid-column: span 1; }
}

/* ─── NEWS SHOW MORE ─── */
.news-card-hidden {
  display: none;
}

.news-show-more {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

.btn-show-more {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 32px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background .15s, border-color .15s;
}

.btn-show-more:hover {
  background: var(--bg2);
  border-color: var(--accent);
}

/* ─── TICKER SEARCH PAGE ─── */
.ticker-search-section {
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.ticker-search-box {
  position: relative;
  margin-top: 20px;
  max-width: 600px;
}

.ticker-input-wrap {
  display: flex;
  gap: 0;
}

.ticker-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
  outline: none;
  transition: border-color .15s;
}

.ticker-input:focus { border-color: var(--accent); }
.ticker-input::placeholder { color: var(--text-dim); font-weight: 400; font-size: 13px; letter-spacing: 0; }

.ticker-search-btn {
  background: var(--accent);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.ticker-search-btn:hover { background: var(--accent2); }

.ticker-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
}

.ticker-suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.ticker-suggestion-item:hover { background: var(--bg3); }
.ticker-suggestion-item strong { font-family: var(--mono); color: var(--accent); min-width: 60px; }
.ticker-suggestion-item span { font-size: 13px; flex: 1; }
.ticker-suggestion-item small { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }

.ticker-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ticker-chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .5px;
  transition: all .15s;
}

.ticker-chip:hover, .ticker-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg2);
}

/* Ticker hero */
.ticker-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.ticker-hero-left { display: flex; align-items: center; gap: 16px; }

.ticker-badge {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 8px 16px;
  letter-spacing: 2px;
}

.ticker-nombre { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.ticker-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ticker-hero-right { text-align: right; flex-shrink: 0; }
.ticker-precio-grande { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--text); }
.ticker-var { font-family: var(--mono); font-size: 15px; font-weight: 600; margin-top: 4px; }

/* Stats row */
.ticker-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 4px;
}

.ticker-stat {
  background: var(--bg2);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-stat label {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.ticker-stat val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* List preview */
.ticker-list-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: 12px;
}

.ticker-list-item {
  display: grid;
  grid-template-columns: 70px 1fr 100px 70px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg2);
  text-decoration: none;
  transition: background .12s;
}

.ticker-list-item:hover { background: var(--bg3); }
.ticker-list-symbol { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent); }
.ticker-list-nombre { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker-list-precio { font-family: var(--mono); font-size: 12px; text-align: right; }
.ticker-list-var { font-family: var(--mono); font-size: 12px; text-align: right; font-weight: 600; }

@media (max-width: 768px) {
  .ticker-stats-row { grid-template-columns: repeat(3, 1fr); }
  .ticker-list-preview { grid-template-columns: 1fr; }
  .ticker-hero { flex-direction: column; }
  .ticker-hero-right { text-align: left; }
}

/* ─── NAV DROPDOWN MENUS ─── */
.nav-dropdown-group {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-group.open .nav-dropdown-trigger {
  color: var(--text);
  background: var(--bg3);
}
.nav-dropdown-trigger .nav-caret { transition: transform .2s; }
.nav-dropdown-group.open .nav-dropdown-trigger .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 300;
  overflow: hidden;
}
.nav-dropdown-group.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--bg3); color: var(--accent); }
.nav-dropdown-menu a small {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-left: auto;
}

/* ─── SCROLL TO TOP ─── */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, border-color .15s;
  z-index: 150;
}
.scroll-top-btn.visible { opacity: 1; pointer-events: all; }
.scroll-top-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── FADE-IN SCROLL ANIMATION ─── */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── PRICE TIMESTAMP ─── */
.price-timestamp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 0 2px;
}
.price-timestamp span { color: var(--accent); }

/* ─── NEWS IMAGE PLACEHOLDER ─── */
.news-img-placeholder {
  height: 160px;
  width: 100%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.news-img-placeholder span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ─── ARTICLE PREV/NEXT NAVIGATION ─── */
.article-prevnext {
  margin: 32px 0 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.prevnext-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.prevnext-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.prevnext-btn:hover {
  border-color: var(--accent);
  background: var(--bg3);
}
.prevnext-prev { text-align: left; }
.prevnext-next { text-align: right; }
.prevnext-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--accent);
  text-transform: uppercase;
}
.prevnext-titulo {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prevnext-cat {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
}
.prevnext-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.prevnext-index:hover { border-color: var(--accent); color: var(--accent); }
.prevnext-empty {
  display: flex;
  align-items: center;
  padding: 14px 16px;
}
@media (max-width: 600px) {
  .prevnext-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .prevnext-index {
    grid-column: 1 / -1;
    order: -1;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 8px;
  }
  .prevnext-empty { display: none; }
}

/* ─── ADSENSE IFRAME FIX ─── */
ins.adsbygoogle { display: block !important; width: 100% !important; }
.ads-zone { overflow: hidden !important; }
.ads-top   { max-height: 110px !important; overflow: hidden !important; }
.ads-mid   { max-height: 290px !important; overflow: hidden !important; }
.ads-sidebar { max-height: 640px !important; overflow: hidden !important; }
.ads-top > div { max-height: 100px !important; overflow: hidden !important; }
