/* ═══════════════════════════════════════════════════════════
   RADAR SEMANAL RAHION — Paleta C · Diseño WEB responsive
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg-body:          #050f16;
  --bg-container:     #0c1e2a;
  --bg-hero:          #0f2b3d;
  --bg-card:          #0e2233;
  --bg-card-alt:      #122d3e;
  --bg-hook:          #0a1e2c;
  --bg-promo:         #111e2d;
  --bg-promo-border:  #2a3f5a;
  --border:           #1a3a50;
  --border-light:     #1f4560;
  --accent:           #22d3ee;
  --accent-dark:      #04121a;
  --accent-blue:      #3b82f6;
  --accent-sky:       #60a5fa;
  --accent-teal:      #5eead4;
  --accent-glow:      rgba(34,211,238,.15);
  --text-h:           #ffffff;
  --text-body:        #d8edf4;
  --text-soft:        #9ec5d4;
  --text-muted:       #5a8a9f;
  --radius-sm:        8px;
  --radius-md:        14px;
  --radius-lg:        20px;
  --shadow:           0 4px 24px rgba(0,0,0,.4);
  --shadow-card:      0 2px 16px rgba(0,0,0,.3);
  --transition:       160ms ease;
  --sidebar-w:        220px;
  --topbar-h:         56px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════ */
.login-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, #0a2235 0%, #050f16 70%);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.login-card {
  background: var(--bg-container);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%; max-width: 400px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(34,211,238,.06);
}

.login-logo {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: 10px;
}
.logo-mark {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(34,211,238,.3);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.logo-mark svg { color: var(--accent); }
.logo-text   { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--text-muted); text-transform: uppercase; }
.logo-brand  { font-size: 26px; font-weight: 800; color: var(--text-h); letter-spacing: .02em; }

.login-subtitle { color: var(--text-soft); font-size: 14px; margin-bottom: 32px; }

.field-group { text-align: left; margin-bottom: 14px; }
.field-group label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-muted); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: .08em;
}
.field-group input {
  width: 100%;
  background: var(--bg-hero);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  color: var(--text-h); font-family: inherit; font-size: 15px;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.field-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,.1);
}
.login-hint { margin-top: 14px; font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════
   BOTONES GLOBALES
══════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: var(--accent-dark);
  font-family: inherit; font-size: 14px; font-weight: 700;
  border: none; border-radius: var(--radius-sm);
  padding: 11px 22px; cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(34,211,238,.25); }
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--accent);
  border: 1px solid rgba(34,211,238,.4);
  border-radius: var(--radius-sm);
  padding: 8px 16px; font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background var(--transition), border-color var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-outline:hover { background: rgba(34,211,238,.08); border-color: var(--accent); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--text-muted);
  border: none; border-radius: var(--radius-sm);
  padding: 8px 10px; font-family: inherit; font-size: 13px;
  cursor: pointer; transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn-ghost:hover { color: var(--text-h); background: rgba(255,255,255,.04); }

/* ══════════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px 0 16px;
  background: rgba(5,15,22,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  min-width: var(--sidebar-w);
}
.topbar-logo-mark {
  width: 30px; height: 30px;
  background: var(--accent-glow);
  border: 1px solid rgba(34,211,238,.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-logo-mark svg { color: var(--accent); }
.topbar-brand-text { display: flex; flex-direction: column; }
.topbar-brand-name { font-size: 13px; font-weight: 800; color: var(--text-h); letter-spacing: .02em; line-height: 1.1; }
.topbar-brand-sub  { font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; }

.topbar-center {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.topbar-week {
  font-size: 13px; color: var(--text-soft);
  display: flex; align-items: center; gap: 7px;
}
.topbar-week::before {
  content: '';
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.chip {
  background: rgba(34,211,238,.1);
  color: var(--accent);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}

.topbar-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  color: var(--text-soft); font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.topbar-btn:hover { background: rgba(255,255,255,.07); color: var(--text-h); border-color: var(--border-light); }
.topbar-btn svg { flex-shrink: 0; }
.topbar-btn span { display: none; }

/* ══════════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════════ */
.app-shell {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-container);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 12px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 100;
}

.sidebar-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted); letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text-h); }
.nav-item.active {
  background: var(--accent-glow);
  border-color: rgba(34,211,238,.2);
  color: var(--accent);
}
.nav-num {
  font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,.07);
  border-radius: 4px; padding: 1px 6px;
  flex-shrink: 0; color: var(--text-muted);
  min-width: 26px; text-align: center;
}
.nav-item.active .nav-num { background: rgba(34,211,238,.15); color: var(--accent); }

.sidebar-sep {
  height: 1px; background: var(--border);
  margin: 10px 0;
}

.sidebar-footer {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-meta { font-size: 11px; color: var(--text-muted); padding: 6px 10px; line-height: 1.6; }

/* MAIN */
.page-main {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  padding: 32px 32px 80px;
  max-width: 1100px;
}

/* ══════════════════════════════════════════════
   HERO — Estilo dashboard web
══════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0d2d42 0%, #0a1f2f 60%, #071624 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34,211,238,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.3), transparent);
}

.hero-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap; gap: 12px;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
}
.hero-tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: .15em; color: var(--accent); text-transform: uppercase;
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: 999px; padding: 4px 12px;
}
.hero-date { font-size: 13px; color: var(--text-muted); }

.hero-h1 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800; color: var(--text-h); line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}
.hero-h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 15px; color: var(--text-soft); line-height: 1.6;
  max-width: 540px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.stat-box {
  background: rgba(0,0,0,.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-val  { font-size: 24px; font-weight: 800; color: var(--text-h); line-height: 1; }
.stat-val.accent { color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ══════════════════════════════════════════════
   SECCIONES
══════════════════════════════════════════════ */
.section { margin-bottom: 48px; scroll-margin-top: calc(var(--topbar-h) + 20px); }

.section-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-num {
  font-size: 11px; font-weight: 800; color: var(--accent);
  letter-spacing: .06em;
  background: rgba(34,211,238,.1);
  border: 1px solid rgba(34,211,238,.2);
  border-radius: 6px; padding: 3px 9px;
  flex-shrink: 0;
}
.section-title {
  font-size: 19px; font-weight: 700; color: var(--text-h); flex: 1;
}
.section-badge {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-hero); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 11px;
}
.pulso-badge {
  font-size: 11px; color: var(--accent-teal);
  background: rgba(94,234,212,.07);
  border: 1px solid rgba(94,234,212,.2);
  border-radius: 999px; padding: 3px 11px;
}

/* ══════════════════════════════════════════════
   NOTICIAS — grid 2 columnas en desktop
══════════════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.news-card:hover {
  border-color: rgba(34,211,238,.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.news-stripe {
  height: 3px; flex-shrink: 0;
}
.stripe-1 { background: linear-gradient(90deg, var(--accent), #0ea5e9); }
.stripe-2 { background: linear-gradient(90deg, var(--accent-sky), #818cf8); }
.stripe-3 { background: linear-gradient(90deg, var(--accent-teal), #34d399); }

.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.news-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  flex-wrap: wrap;
}
.news-source {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.news-date { font-size: 11px; color: var(--text-muted); }
.sep { color: var(--border-light); }

.news-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; margin-left: auto;
}
.tag-rumor      { background: rgba(251,191,36,.1); color: #fbbf24; border: 1px solid rgba(251,191,36,.2); }
.tag-confirmada { background: rgba(34,197,94,.08); color: #4ade80; border: 1px solid rgba(34,197,94,.18); }

.news-title {
  font-size: 15px; font-weight: 700; color: var(--text-h);
  line-height: 1.35; margin-bottom: 8px;
}
.news-summary {
  font-size: 13px; color: var(--text-soft); line-height: 1.7;
  margin-bottom: 16px; flex: 1;
}
.news-cta { margin-top: auto; }

/* ══════════════════════════════════════════════
   IDEAS — grid 2 columnas en desktop
══════════════════════════════════════════════ */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.idea-card {
  background: var(--bg-card-alt, #122d3e);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), background var(--transition);
  display: flex; flex-direction: column; gap: 12px;
}
.idea-card.elegida {
  border-color: rgba(34,211,238,.5);
  background: rgba(34,211,238,.03);
  box-shadow: 0 0 0 1px rgba(34,211,238,.1) inset;
}

.idea-top {
  display: flex; align-items: flex-start; gap: 12px;
}
.idea-num {
  font-size: 11px; font-weight: 800; color: var(--accent);
  background: rgba(34,211,238,.1); border-radius: 6px;
  padding: 3px 8px; flex-shrink: 0; margin-top: 1px;
}
.idea-title { font-size: 15px; font-weight: 700; color: var(--text-h); line-height: 1.3; flex: 1; }

.status-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.idea-status-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase; flex-shrink: 0;
}
.status-pending    { background: rgba(251,191,36,.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,.2); }
.status-guardada   { background: rgba(34,197,94,.1);   color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.status-descartada { background: rgba(239,68,68,.1);   color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.status-elegida    { background: rgba(34,211,238,.12); color: var(--accent); border: 1px solid rgba(34,211,238,.25); }

.format-tag {
  font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px;
}

.hook-block {
  background: var(--bg-hook);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
}
.hook-label {
  font-size: 10px; font-weight: 800; color: var(--accent);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 5px;
}
.hook-text {
  font-size: 13px; color: var(--text-soft); font-style: italic; line-height: 1.65;
}

.idea-footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; flex-wrap: wrap;
}
.idea-actions { display: flex; gap: 8px; margin-left: auto; }

.btn-status {
  font-size: 12px; font-weight: 600; padding: 6px 12px;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); color: var(--text-muted);
  background: rgba(255,255,255,.03); font-family: inherit;
  transition: all var(--transition);
}
.btn-status:hover { border-color: var(--border-light); color: var(--text-soft); }

.btn-toggle {
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid rgba(34,211,238,.4); color: var(--accent);
  background: transparent; font-family: inherit;
  transition: all var(--transition);
}
.btn-toggle:hover, .btn-toggle.active {
  background: var(--accent); color: var(--accent-dark); border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   FORMATO LARGO
══════════════════════════════════════════════ */
.formato-card {
  background: linear-gradient(135deg, #0d2d42 0%, #0e2030 100%);
  border: 1px solid rgba(96,165,250,.3);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: 0 0 48px rgba(59,130,246,.08);
}
.formato-label {
  font-size: 11px; font-weight: 700; color: var(--accent-sky);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px;
}
.formato-title  { font-size: 22px; font-weight: 800; color: var(--text-h); line-height: 1.25; margin-bottom: 10px; }
.formato-desc   { font-size: 14px; color: var(--text-soft); line-height: 1.7; margin-bottom: 20px; }

.formato-subtemas { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.formato-subtemas li {
  font-size: 14px; color: var(--text-soft);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,.2); border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-sky);
}
.formato-subtemas li::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-sky); flex-shrink: 0;
}

.formato-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.formato-meta-item { font-size: 13px; color: var(--text-muted); }
.formato-meta-item strong { color: var(--accent-sky); }

/* ══════════════════════════════════════════════
   PULSO TIKTOK
══════════════════════════════════════════════ */
.pulso-nota {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 20px; padding: 10px 16px;
  background: rgba(94,234,212,.05);
  border-left: 3px solid var(--accent-teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

.pulso-tabla-wrap { overflow-x: auto; margin-bottom: 28px; border-radius: var(--radius-md); border: 1px solid var(--border); }

.pulso-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.pulso-tabla th {
  text-align: left; padding: 12px 14px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: .07em; text-transform: uppercase;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border);
}
.pulso-tabla th:not(:first-child) { text-align: right; }
.pulso-tabla td {
  padding: 11px 14px; color: var(--text-soft);
  border-bottom: 1px solid rgba(26,58,80,.5); vertical-align: middle;
}
.pulso-tabla td:not(:first-child) { text-align: right; }
.pulso-tabla tr:last-child td { border-bottom: none; }
.pulso-tabla tr:hover td { background: rgba(34,211,238,.025); }
.video-titulo { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text-body); }

.colab-badge {
  font-size: 10px; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.2);
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}

/* BARRAS */
.barras-section { margin-top: 4px; }
.barra-titulo { font-size: 14px; font-weight: 600; color: var(--text-soft); margin-bottom: 16px; }
.barras-list { display: flex; flex-direction: column; gap: 10px; }
.barra-row { display: flex; align-items: center; gap: 12px; }
.barra-label { font-size: 12px; color: var(--text-muted); width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-track { flex: 1; height: 10px; background: rgba(255,255,255,.05); border-radius: 999px; overflow: hidden; }
.barra-fill { height: 100%; border-radius: 999px; transition: width .7s cubic-bezier(.4,0,.2,1); }
.barra-val  { font-size: 12px; font-weight: 700; color: var(--text-soft); width: 55px; text-align: right; flex-shrink: 0; }

.analisis-block {
  background: rgba(94,234,212,.04);
  border: 1px solid rgba(94,234,212,.15);
  border-radius: var(--radius-md);
  padding: 18px 20px; margin-top: 24px;
}
.analisis-label { font-size: 11px; font-weight: 700; color: var(--accent-teal); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.analisis-text  { font-size: 13px; color: var(--text-soft); line-height: 1.7; }

/* ══════════════════════════════════════════════
   COLABORACIONES
══════════════════════════════════════════════ */
.colabs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.colab-card {
  background: var(--bg-promo);
  border: 1px solid var(--bg-promo-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.colab-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.colab-brand  { font-size: 18px; font-weight: 800; color: var(--text-h); }
.colab-estado { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.estado-activa { background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.2); }

.colab-metricas { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.colab-metric {
  flex: 1; min-width: 90px;
  text-align: center; padding: 12px;
  background: rgba(0,0,0,.2); border-radius: var(--radius-sm);
}
.colab-metric-val   { font-size: 22px; font-weight: 800; color: var(--text-h); display: block; }
.colab-metric-label { font-size: 11px; color: var(--text-muted); }
.colab-nota { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ══════════════════════════════════════════════
   FOOTER EDITORIAL
══════════════════════════════════════════════ */
.editorial-footer {
  margin-top: 20px;
  background: var(--bg-container);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}
.footer-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.footer-label { font-size: 12px; color: var(--text-muted); }
.confianza-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.2);
}
.creditos-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(34,211,238,.08); color: var(--accent); border: 1px solid rgba(34,211,238,.2);
}
.footer-fuentes-title { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.footer-fuentes-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.footer-fuentes-list li { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.footer-fuentes-list li::before { content: '→'; color: var(--accent); font-size: 11px; }
.footer-nota { margin-top: 16px; font-size: 11px; color: var(--text-muted); padding-top: 14px; border-top: 1px solid var(--border); line-height: 1.6; }

/* ══════════════════════════════════════════════
   SNACKBAR
══════════════════════════════════════════════ */
.snackbar {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: #0d2033;
  border: 1px solid var(--accent);
  color: var(--text-h);
  padding: 11px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(34,211,238,.1);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
  opacity: 0; pointer-events: none; white-space: nowrap; z-index: 999;
}
.snackbar.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,15,22,.8);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 20px;
}
.modal-card {
  background: var(--bg-container);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%; max-width: 540px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
}
.modal-title { font-size: 19px; font-weight: 700; color: var(--text-h); margin-bottom: 10px; }
.modal-desc  { font-size: 13px; color: var(--text-soft); margin-bottom: 22px; line-height: 1.6; }
.modal-desc code { background: var(--bg-hero); padding: 1px 7px; border-radius: 4px; color: var(--accent); font-size: 12px; }

.modal-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.modal-tab {
  flex: 1; padding: 9px; background: var(--bg-hero);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.modal-tab.active { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.4); color: var(--accent); }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 36px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: border-color var(--transition);
}
.dropzone.drag-over { border-color: var(--accent); background: rgba(34,211,238,.03); }
.dropzone p { font-size: 13px; color: var(--text-muted); }

.json-textarea {
  width: 100%; height: 160px;
  background: var(--bg-hero); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  color: var(--text-soft); font-family: 'Courier New', monospace;
  font-size: 12px; resize: vertical; outline: none;
  transition: border-color var(--transition);
}
.json-textarea:focus { border-color: var(--accent); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 16px; opacity: .3; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-soft); }
.empty-desc  { font-size: 13px; line-height: 1.65; }

/* ══════════════════════════════════════════════
   MOBILE — sidebar colapsada como bottom nav
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    display: none; /* Ocultar sidebar en móvil */
  }

  .page-main {
    margin-left: 0;
    padding: 20px 16px 100px;
  }

  /* Bottom navigation en móvil */
  .bottom-nav {
    display: flex !important;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(12,30,42,.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    z-index: 200;
  }

  .topbar-brand-sub  { display: none; }
  .topbar-brand-name { font-size: 12px; }
  .topbar-week       { font-size: 11px; }
  .topbar-btn .btn-label { display: none; }

  .hero { padding: 24px 20px; }
  .hero-h1 { font-size: 24px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  .news-grid  { grid-template-columns: 1fr; }
  .ideas-grid { grid-template-columns: 1fr; }
  .colabs-grid { grid-template-columns: 1fr; }

  .pulso-tabla th:nth-child(3),
  .pulso-tabla td:nth-child(3) { display: none; } /* ocultar comentarios en mobile */

  .formato-card { padding: 22px 20px; }

  .chip { display: none; }

  .topbar { padding: 0 12px; }
  .topbar-actions { gap: 4px; }
}

@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
  .topbar-btn span { display: inline; }
}

/* Ajuste para pantallas extra grandes */
@media (min-width: 1300px) {
  .page-main { padding: 40px 48px 80px; }
  .news-grid  { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════
   BOTTOM NAV (móvil)
══════════════════════════════════════════════ */
.bottom-nav {
  display: none;
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 4px; color: var(--text-muted);
  font-size: 10px; font-weight: 600; cursor: pointer;
  text-decoration: none; letter-spacing: .03em;
  transition: color var(--transition);
  border: none; background: none; font-family: inherit;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item svg { opacity: .6; }
.bottom-nav-item.active svg { opacity: 1; }
